Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
qbehaviour_adaptive_mark_details Class Reference

This class encapsulates all the information about the current state-of-play scoring-wise. More...

Public Member Functions

 __construct ($state, $maxmark=null, $actualmark=null, $rawmark=null, $currentpenalty=null, $totalpenalty=null, $improvable=null)
 Constructor.
 
 get_formatted_marks ($markdp)
 Get the marks, formatted to a certain number of decimal places, in the form required by calls like get_string('gradingdetails', 'qbehaviour_adaptive', $a).
 

Public Attributes

float $actualmark
 the current mark for this question.
 
float $currentpenalty
 the the amount of additional penalty this attempt attracted.
 
bool $improvable
 whether it is possible for this mark to be improved in future.
 
float $maxmark
 the maximum mark for this question.
 
float $rawmark
 the raw mark for this question before penalties were applied.
 
question_state $state
 the current state of the question.
 
float $totalpenalty
 the total that will apply to future attempts.
 

Detailed Description

This class encapsulates all the information about the current state-of-play scoring-wise.

It is used to communicate between the beahviour and the renderer.

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

Constructor & Destructor Documentation

◆ __construct()

qbehaviour_adaptive_mark_details::__construct ( $state,
$maxmark = null,
$actualmark = null,
$rawmark = null,
$currentpenalty = null,
$totalpenalty = null,
$improvable = null )

Constructor.

Parameters
question_state$state

Member Function Documentation

◆ get_formatted_marks()

qbehaviour_adaptive_mark_details::get_formatted_marks ( $markdp)

Get the marks, formatted to a certain number of decimal places, in the form required by calls like get_string('gradingdetails', 'qbehaviour_adaptive', $a).

Parameters
int$markdpthe number of decimal places required.
Return values
arrayready to substitute into language strings.

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