MDL-52813 mod_quiz: New method for getting the type of a question
This commit is contained in:
@@ -1232,6 +1232,17 @@ class quiz_attempt {
|
||||
return $this->quba->get_question_action_time($slot);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the question type name for a given slot within the current attempt.
|
||||
*
|
||||
* @param int $slot the number used to identify this question within this attempt.
|
||||
* @return string the question type name
|
||||
* @since Moodle 3.1
|
||||
*/
|
||||
public function get_question_type_name($slot) {
|
||||
return $this->quba->get_question($slot)->get_type_name();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the time remaining for an in-progress attempt, if the time is short
|
||||
* enought that it would be worth showing a timer.
|
||||
|
||||
Reference in New Issue
Block a user