Skip to content

Commit

Permalink
Bug with editing essay questions.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Feb 28, 2007
1 parent e3455f1 commit 6fce318
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions question/type/essay/edit_essay_form.php
Expand Up @@ -25,16 +25,15 @@ function definition_inner(&$mform) {
}

function set_data($question) {
if (isset($question->options)){
$question->feedback = $question->options->answer->feedback;
if (isset($question->options) && isset($question->options->answers)) {
$answer = reset($question->options->answers);
$question->feedback = $answer->feedback;
}
parent::set_data($question);
}

function qtype() {
return 'essay';
}


}
?>

0 comments on commit 6fce318

Please sign in to comment.