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

Class to represent a hint associated with a question. More...

Inheritance diagram for question_hint:
question_hint_with_parts qtype_ordering\question_hint_ordering question_hint_ddmarker

Public Member Functions

 __construct ($id, $hint, $hintformat)
 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

string $hint
 The feedback hint to be shown.
 
integer $hintformat
 The corresponding text FORMAT_... type.
 
integer $id
 The hint id.
 

Detailed Description

Class to represent a hint associated with a question.

Used by iteractive mode, etc. A question has an array of these.

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

Constructor & Destructor Documentation

◆ __construct()

question_hint::__construct ( $id,
$hint,
$hintformat )

Constructor.

Parameters
intthe hint id from the database.
string$hintThe hint text
intthe corresponding text FORMAT_... type.

Member Function Documentation

◆ adjust_display_options()

question_hint::adjust_display_options ( question_display_options $options)

Adjust this display options according to the hint settings.

Parameters
question_display_options$options

Reimplemented in question_hint_with_parts.

◆ load_from_record()

static question_hint::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 set.
Return values
question_hint

Reimplemented in qtype_ordering\question_hint_ordering, question_hint_ddmarker, and question_hint_with_parts.


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