MDL-34640 quesion reponse files: PARTIAL SOLUTION to allowing resonse files to be graded automatically.

This commit is contained in:
Tim Hunt
2013-03-30 19:53:15 +00:00
parent 595708884a
commit 8a1e7b7756
2 changed files with 95 additions and 1 deletions
+12
View File
@@ -403,6 +403,18 @@ class question_attempt_step {
if (!is_null($record->fraction)) {
$step->fraction = $record->fraction + 0;
}
// This next chunk of code requires getting $contextid and $qtype here.
// Somehow, we need to get that information to this point by modifying
// all the paths by which this method can be called.
foreach (question_bank::get_qtype($qtype)->response_file_areas() as $area) {
if (empty($step->data[$area])) {
continue;
}
$step->data[$area] = new question_file_loader($this, $area, $step->data[$area], $contextid)
}
return $step;
}
}