Properties

$bright

$bright : 

Type

$realmCustom

$realmCustom : 

Type

$realmCustomJson

$realmCustomJson : 

Type

$host

$host : 

Type

$hostCustom

$hostCustom : 

Type

$paths

$paths : 

Type

$registrationData

$registrationData : 

Type

$pathCourses

$pathCourses : 

Type

$instance

$instance : 

Type

$userResults

$userResults : 

Type

Methods

__destroy()

__destroy() 

getPathData()

getPathData(  $path_key) 

returns the path metadata for a key

Parameters

$path_key

getInstance()

getInstance() : \Bright\Singleton

Returns the *Singleton* instance of this class.

Returns

\Bright\Singleton

The Singleton instance.

num_learners()

num_learners() 

numPathSteps()

numPathSteps(  $path_key) 

returns the number of steps in a path

Parameters

$path_key

getCourseByGuid()

getCourseByGuid(String  $courseGuid) : \stdClass

Return a course object by GUID

Parameters

String $courseGuid

SCORMCLoud GUID

Returns

\stdClass —

Object or null if not found.

getPathStatus()

getPathStatus(String  $path_key) 

Checks path registrations for competion,success,etc.

Parameters

String $path_key

path key

getPathScore()

getPathScore(  $path_key) 

return the average score for a path

Parameters

$path_key

getPathCourses()

getPathCourses(  $path_key) 

Returns the courses for a path key.

Parameters

$path_key

getUserResults()

getUserResults() 

Get user results from Bright.

setPathCourses()

setPathCourses(  $path_key,   $courses = array()) : Array

Sets the courses for a path_key

Parameters

$path_key
$courses

Returns

Array —

of path courses

isPathComplete()

isPathComplete(  $path_key,   $field = "complete",   $data = "complete") 

returns true if the path is complete

Parameters

$path_key
$field
$data

numPathStepsComplete()

numPathStepsComplete(  $path_key,   $field = 'complete',   $data = 'complete') 

Returns the number of path steps complete

Parameters

$path_key
$field
$data

foreach_path()

foreach_path(  $closure,   $data = null) 

Parameters

$closure
$data

forEachPathRegistration()

forEachPathRegistration(String  $key, \Bright\function  $func, mixed  $data = null) 

Call a closure on each registrations of a path

Parameters

String $key

path key

\Bright\function $func

a closure to call on the $data

mixed $data

data object to pass in

getNumberOfPaths()

getNumberOfPaths() : integer

Returns

integer —

number of paths

getPathTitle()

getPathTitle(  $path_key) 

Parameters

$path_key

getAveragePathScore()

getAveragePathScore(\Bright\in  $round = 2) : float

Return the average score foreach path

Parameters

\Bright\in $round

number of rounding

Returns

float —

average path score

getPathStatuses()

getPathStatuses() 

return an array of path statuses for each $path.

getPathLastAccessesAt()

getPathLastAccessesAt(  $path_key) 

Takes a path key, and returns the time that the path was last accessed at.

Parameters

$path_key

getPathsAsArray()

getPathsAsArray() 

Returns an array of paths

getPathKeys()

getPathKeys() 

getMostRecentPath()

getMostRecentPath() 

Returns the path key that has been accessed most recently.

pathExists()

pathExists(  $key) 

returns true if the key is a valid path.

Parameters

$key

courses_complete()

courses_complete() 

num_courses()

num_courses() 

average_score()

average_score() 

get_path_url()

get_path_url(  $key) 

Parameters

$key

num_path_steps()

num_path_steps() 

get_newest_path()

get_newest_path() 

get_newest_path_key()

get_newest_path_key() 

__construct()

__construct() 

get_courselist_with_results()

get_courselist_with_results() 

Loads the user's e-learning results data, if it hasn't already been loaded

__clone()

__clone() : void

Private clone method to prevent cloning of the instance of the *Singleton* instance.

__wakeup()

__wakeup() : void

Private unserialize method to prevent unserializing of the *Singleton* instance.