Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
mod_quiz\output\list_of_attempts Class Reference
Inheritance diagram for mod_quiz\output\list_of_attempts:
renderable core\output\named_templatable templatable

Public Member Functions

 __construct (int $timenow)
 Constructor.
 
 add_attempt (quiz_attempt $attemptobj)
 Add an event to the list.
 
 export_for_template (renderer_base $output)
 Function to export the renderer data in a format that is suitable for a mustache template.
 
 get_template_name (\renderer_base $renderer)
 Get the name of the template to use for this templatable.
 

Protected Attributes

quiz_attempt[] array $attempts = []
 The list of attempts to summarise.
 
int int $timenow
 time to consider as now.
 

Constructor & Destructor Documentation

◆ __construct()

mod_quiz\output\list_of_attempts::__construct ( int $timenow)

Constructor.

Parameters
int$timenowtime that is now.

Member Function Documentation

◆ add_attempt()

mod_quiz\output\list_of_attempts::add_attempt ( quiz_attempt $attemptobj)

Add an event to the list.

Parameters
quiz_attempt$attemptobj

◆ export_for_template()

mod_quiz\output\list_of_attempts::export_for_template ( renderer_base $output)

Function to export the renderer data in a format that is suitable for a mustache template.

This means:

  1. No complex types - only stdClass, array, int, string, float, bool
  2. Any additional info that is required for the template is pre-calculated (e.g. capability checks).
Parameters
renderer_base$outputUsed to do a final render of any components that need to be rendered for export.
Return values
stdClass|array

Implements templatable.

◆ get_template_name()

mod_quiz\output\list_of_attempts::get_template_name ( \renderer_base $renderer)

Get the name of the template to use for this templatable.

Parameters
renderer_base$rendererThe renderer requesting the template name
Return values
string

Implements core\output\named_templatable.


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