mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 18:04:43 +02:00
Merge branch 'MDL-35530' of git://github.com/rwijaya/moodle
This commit is contained in:
commit
bdd7b01a33
@ -387,12 +387,14 @@ switch ($mode) {
|
||||
// Grading form
|
||||
// Expects the following to be set: $attemptid, $answer, $user, $page, $attempt
|
||||
$essayinfo = unserialize($attempt->useranswer);
|
||||
$currentpage = $lesson->load_page($attempt->pageid);
|
||||
|
||||
$mform = new essay_grading_form(null, array('scoreoptions'=>$scoreoptions, 'user'=>$user));
|
||||
$data = new stdClass;
|
||||
$data->id = $cm->id;
|
||||
$data->attemptid = $attemptid;
|
||||
$data->score = $essayinfo->score;
|
||||
$data->question = format_string($currentpage->contents, $currentpage->contentsformat);
|
||||
$data->studentanswer = format_string($essayinfo->answer, $essayinfo->answerformat);
|
||||
$data->response = $essayinfo->response;
|
||||
$mform->set_data($data);
|
||||
|
@ -53,6 +53,7 @@ class essay_grading_form extends moodleform {
|
||||
$mform->addElement('hidden', 'mode', 'update');
|
||||
$mform->setType('mode', PARAM_ALPHA);
|
||||
|
||||
$mform->addElement('static', 'question', get_string('question', 'lesson'));
|
||||
$mform->addElement('static', 'studentanswer', get_string('studentresponse', 'lesson', fullname($this->_customdata['user'], true)));
|
||||
|
||||
$mform->addElement('textarea', 'response', get_string('comments', 'lesson'), array('rows'=>'15', 'cols'=>'60'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user