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

Subclass of question_answer with the extra information required by the numerical question type. More...

Inheritance diagram for qtype_numerical_answer:
question_answer

Public Member Functions

 __construct ($id, $answer, $fraction, $feedback, $feedbackformat, $tolerance)
 
 get_tolerance_interval ()
 
 within_tolerance ($value)
 

Public Attributes

string $answer
 the answer.
 
integer $answerformat = FORMAT_PLAIN
 one of the FORMAT_... More...
 
string $feedback
 the feedback for this answer.
 
integer $feedbackformat
 one of the FORMAT_... More...
 
number $fraction
 the fraction this answer is worth.
 
integer $id
 the answer id.
 
float $tolerance
 allowable margin of error.
 
integer string $tolerancetype = 2
 see get_tolerance_interval() for the meaning of this value.
 

Detailed Description

Subclass of question_answer with the extra information required by the numerical question type.

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

Member Data Documentation

◆ $answerformat

integer question_answer::$answerformat = FORMAT_PLAIN
inherited

one of the FORMAT_...

constans.

◆ $feedbackformat

integer question_answer::$feedbackformat
inherited

one of the FORMAT_...

constans.


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