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

Class to represent a question answer, loaded from the question_answers table in the database. More...

Inheritance diagram for question_answer:
qtype_numerical_answer

Public Member Functions

 __construct ($id, $answer, $fraction, $feedback, $feedbackformat)
 Constructor. More...
 

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.
 

Detailed Description

Class to represent a question answer, loaded from the question_answers table in the database.

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

Constructor & Destructor Documentation

◆ __construct()

question_answer::__construct (   $id,
  $answer,
  $fraction,
  $feedback,
  $feedbackformat 
)

Constructor.

Parameters
int$idthe answer.
string$answerthe answer.
number$fractionthe fraction this answer is worth.
string$feedbackthe feedback for this answer.
int$feedbackformatthe format of the feedback.

Member Data Documentation

◆ $answerformat

integer question_answer::$answerformat = FORMAT_PLAIN

one of the FORMAT_...

constans.

◆ $feedbackformat

integer question_answer::$feedbackformat

one of the FORMAT_...

constans.


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