Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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: