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

Question hint for ddmarker. More...

Inheritance diagram for question_hint_ddmarker:
question_hint_with_parts question_hint

Public Member Functions

 __construct ($id, $hint, $hintformat, $shownumcorrect, $clearwrong, $statewhichincorrect)
 Constructor.
 
 adjust_display_options (question_display_options $options)
 Adjust this display options according to the hint settings.
 

Static Public Member Functions

static load_from_record ($row)
 Create a basic hint from a row loaded from the question_hints table in the database.
 

Public Attributes

boolean $clearwrong
 option to clear the parts of the question that were wrong on retry.
 
string $hint
 The feedback hint to be shown.
 
integer $hintformat
 The corresponding text FORMAT_... type.
 
integer $id
 The hint id.
 
boolean $shownumcorrect
 option to show the number of sub-parts of the question that were right.
 
 $statewhichincorrect
 

Detailed Description

Question hint for ddmarker.

An extension of question_hint for questions like match and multiple choice with multile answers, where there are options for whether to show the number of parts right at each stage, and to reset the wrong parts.

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

Constructor & Destructor Documentation

◆ __construct()

question_hint_ddmarker::__construct ( $id,
$hint,
$hintformat,
$shownumcorrect,
$clearwrong,
$statewhichincorrect )

Constructor.

Parameters
intthe hint id from the database.
string$hintThe hint text
intthe corresponding text FORMAT_... type.
bool$shownumcorrectwhether the number of right parts should be shown
bool$clearwrongwhether the wrong parts should be reset.

Member Function Documentation

◆ adjust_display_options()

question_hint_with_parts::adjust_display_options ( question_display_options $options)
inherited

Adjust this display options according to the hint settings.

Parameters
question_display_options$options

Reimplemented from question_hint.

◆ load_from_record()

static question_hint_ddmarker::load_from_record ( $row)
static

Create a basic hint from a row loaded from the question_hints table in the database.

Parameters
object$rowwith property options as well as hint, shownumcorrect and clearwrong set.
Return values
question_hint_ddmarker

Reimplemented from question_hint_with_parts.


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