Skip to content
Snippets Groups Projects
Commit c0935dc6 authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Ensure the description field is not null.

parent 55ad4da5
Branches
No related tags found
No related merge requests found
...@@ -1898,6 +1898,10 @@ class qtype_stack_question extends question_graded_automatically_with_countback ...@@ -1898,6 +1898,10 @@ class qtype_stack_question extends question_graded_automatically_with_countback
'questionid' => $id, 'questionid' => $id,
'field' => 'specificfeedback' 'field' => 'specificfeedback'
]); ]);
// Legacy questions may have a null description before being saved/compiled.
if ($questiondescription === null) {
$questiondescription = '';
}
$questiondescription = stack_castext_file_filter($questiondescription, [ $questiondescription = stack_castext_file_filter($questiondescription, [
'questionid' => $id, 'questionid' => $id,
'field' => 'questiondescription' 'field' => 'questiondescription'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment