Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_scorm_attempt_bar Class Reference

Component representing a SCORM attempts bar. More...

Inheritance diagram for mod_scorm_attempt_bar:
renderable

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.
 

Detailed Description

Component representing a SCORM attempts bar.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

mod_scorm_attempt_bar::__construct ( $attemptids,
$attempt,
$baseurl,
$pagevar = 'page' )

Constructor mod_scorm_attempt_bar with only the required params.

Parameters
array$attemptidsan array of attempts the user has made
int$attemptThe attempt you are currently viewing
string | moodle_url$baseurlurl of the current page, the $pagevar parameter is added
string$pagevarname of page parameter that holds the attempt number

Member Function Documentation

◆ prepare()

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.

Parameters
renderer_base$output
moodle_page$page
string$target
Exceptions
coding_exception

Member Data Documentation

◆ $attemptlinks

array mod_scorm_attempt_bar::$attemptlinks = array()

An array of strings.

One of them is just a string: the current attempt

◆ $baseurl

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.

◆ $pagevar

string mod_scorm_attempt_bar::$pagevar

This is the variable name that you use for the attempt in your code (ie.

'tablepage', 'blogpage', etc)


The documentation for this class was generated from the following file: