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

Fix to issue #930.

parent c47e3396
Branches
No related tags found
No related merge requests found
......@@ -509,9 +509,12 @@ class qtype_stack extends question_type {
$inputdata->type, $inputdata->name, $inputdata->tans, $question->options, $parameters);
}
$prtnames = array_keys($this->get_prt_names_from_question($question->questiontext, $question->specificfeedback));
$totalvalue = 0;
$allformative = true;
foreach ($questiondata->prts as $name => $prtdata) {
foreach ($prtnames as $name) {
$prtdata = $questiondata->prts[$name];
// At this point we do not have the PRT method is_formative() available to us.
if ($prtdata->feedbackstyle > 0) {
$totalvalue += $prtdata->value;
......@@ -524,8 +527,6 @@ class qtype_stack extends question_type {
$question->name);
}
$prtnames = array_keys($this->get_prt_names_from_question($question->questiontext, $question->specificfeedback));
foreach ($prtnames as $name) {
if (array_key_exists($name, $questiondata->prts)) {
$prtvalue = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment