Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
Component representing a SCORM attempts bar. More...
Public Member Functions | |
__construct ($attemptids, $attempt, $baseurl, $pagevar='page') | |
Constructor mod_scorm_attempt_bar with only the required params. | |
prepare (renderer_base $output, moodle_page $page, $target) | |
Prepares the scorm attempt bar for output. | |
Public Attributes | |
int | $attempt |
The attempt you are currently viewing. | |
array | $attemptids |
An array of the attemptids. | |
array | $attemptlinks = array() |
An array of strings. | |
string moodle_url | $baseurl |
If this is a string then it is the url which will be appended with $pagevar, an equals sign and the attempt number. | |
string | $nextlink = null |
A HTML link representing the "next" attempt. | |
string | $pagevar |
This is the variable name that you use for the attempt in your code (ie. | |
string | $previouslink = null |
A HTML link representing the "previous" attempt. | |
Component representing a SCORM attempts bar.
mod_scorm_attempt_bar::__construct | ( | $attemptids, | |
$attempt, | |||
$baseurl, | |||
$pagevar = 'page' ) |
Constructor mod_scorm_attempt_bar with only the required params.
array | $attemptids | an array of attempts the user has made |
int | $attempt | The attempt you are currently viewing |
string | moodle_url | $baseurl | url of the current page, the $pagevar parameter is added |
string | $pagevar | name of page parameter that holds the attempt number |
mod_scorm_attempt_bar::prepare | ( | renderer_base | $output, |
moodle_page | $page, | ||
$target ) |
Prepares the scorm attempt bar for output.
This method validates the arguments set up for the scorm attempt bar and then produces fragments of HTML to assist display later on.
renderer_base | $output | |
moodle_page | $page | |
string | $target |
coding_exception |
array mod_scorm_attempt_bar::$attemptlinks = array() |
An array of strings.
One of them is just a string: the current attempt
string moodle_url mod_scorm_attempt_bar::$baseurl |
If this is a string then it is the url which will be appended with $pagevar, an equals sign and the attempt number.
If this is a moodle_url object then the pagevar param will be replaced by the attempt no, for each attempt.
string mod_scorm_attempt_bar::$pagevar |
This is the variable name that you use for the attempt in your code (ie.
'tablepage', 'blogpage', etc)