Skip to content
Snippets Groups Projects
Unverified Commit 16b43547 authored by Daniil Fajnberg's avatar Daniil Fajnberg
Browse files

Fix rendering error when `$question->specificfeedbackinstantiated` is `null`

parent 16a96f58
Branches
No related tags found
No related merge requests found
...@@ -206,6 +206,10 @@ class qtype_stack_renderer extends qtype_renderer { ...@@ -206,6 +206,10 @@ class qtype_stack_renderer extends qtype_renderer {
$question->castextprocessor = new castext2_qa_processor($qa); $question->castextprocessor = new castext2_qa_processor($qa);
} }
if ($question->specificfeedbackinstantiated === null) {
// Invalid question, otherwise this would be here.
return '';
}
$feedbacktext = $question->specificfeedbackinstantiated->get_rendered($question->castextprocessor); $feedbacktext = $question->specificfeedbackinstantiated->get_rendered($question->castextprocessor);
if (!$feedbacktext) { if (!$feedbacktext) {
return ''; return '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment