MDL-16251
Changed tests to empty rather than isset to avoid notices when array is set but empty
This commit is contained in:
@@ -31,7 +31,7 @@ class question_edit_essay_form extends question_edit_form {
|
||||
}
|
||||
|
||||
function set_data($question) {
|
||||
if (isset($question->options) && isset($question->options->answers)) {
|
||||
if (!empty($question->options) && !empty($question->options->answers)) {
|
||||
$answer = reset($question->options->answers);
|
||||
$question->feedback = $answer->feedback;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user