MDL-47651 quiz responses: allow for qtypes without responses
This commit is contained in:
@@ -132,6 +132,10 @@ class quiz_first_or_all_responses_table extends quiz_last_responses_table {
|
||||
*/
|
||||
public function get_summary_after_try($tablerow, $slot) {
|
||||
$qa = $this->get_question_attempt($tablerow->usageid, $slot);
|
||||
if (!($qa->get_question() instanceof question_manually_gradable)) {
|
||||
// No responses, and we cannot call summarise_response below.
|
||||
return null;
|
||||
}
|
||||
$submissionsteps = $qa->get_steps_with_submitted_response_iterator();
|
||||
$step = $submissionsteps[$tablerow->try];
|
||||
if ($step === null) {
|
||||
|
||||
Reference in New Issue
Block a user