Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
question_hint Class Reference

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

Inheritance diagram for question_hint:
question_hint_with_parts question_hint_ddmarker

Public Member Functions

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

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. More...
 

Public Attributes

string $hint
 The feedback hint to be shown.
 
integer $hintformat
 The corresponding text FORMAT_... More...
 
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, and question_hint_ddmarker.

◆ 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 question_hint_with_parts, and question_hint_ddmarker.

Member Data Documentation

◆ $hintformat

integer question_hint::$hintformat

The corresponding text FORMAT_...

type.


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