Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
qtype_ordering\question_hint_ordering Class Reference
Inheritance diagram for qtype_ordering\question_hint_ordering:
question_hint_with_parts question_hint

Public Member Functions

 __construct (int $id, string $hint, int $hintformat, bool $shownumcorrect, bool $clearwrong, bool $highlightresponse)
 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.
 
bool bool $highlightresponse
 Highlight response in the hint options.
 
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.
 

Constructor & Destructor Documentation

◆ __construct()

qtype_ordering\question_hint_ordering::__construct ( int $id,
string $hint,
int $hintformat,
bool $shownumcorrect,
bool $clearwrong,
bool $highlightresponse )

Constructor.

Parameters
int$idThe hint id from the database.
string$hintThe hint text.
int$hintformatThe corresponding text FORMAT_... type.
bool$shownumcorrectWhether the number of right parts should be shown.
bool$clearwrongWhether the wrong parts should be reset.
bool$highlightresponseWhether to highlight response.

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 qtype_ordering\question_hint_ordering::load_from_record ( $row)
static

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

Parameters
object$rowwith $row->hint, ->shownumcorrect and ->clearwrong set.
Return values
question_hint_with_parts

Reimplemented from question_hint_with_parts.


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