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

Fix to issue #965.

parent 71d0cb9b
No related branches found
No related tags found
No related merge requests found
...@@ -521,12 +521,14 @@ class qtype_stack extends question_type { ...@@ -521,12 +521,14 @@ class qtype_stack extends question_type {
$prtnames = array_keys($this->get_prt_names_from_question($question->questiontext, $question->specificfeedback)); $prtnames = array_keys($this->get_prt_names_from_question($question->questiontext, $question->specificfeedback));
foreach ($prtnames as $name) { foreach ($prtnames as $name) {
if (array_key_exists($name, $questiondata->prts)) {
$prtvalue = 0; $prtvalue = 0;
if (!$allformative) { if (!$allformative) {
$prtvalue = $questiondata->prts[$name]->value / $totalvalue; $prtvalue = $questiondata->prts[$name]->value / $totalvalue;
} }
$question->prts[$name] = new stack_potentialresponse_tree_lite($questiondata->prts[$name], $question->prts[$name] = new stack_potentialresponse_tree_lite($questiondata->prts[$name],
$prtvalue, $question); $prtvalue, $question);
} // If not we just added a PRT.
} }
$question->deployedseeds = array_values($questiondata->deployedseeds); $question->deployedseeds = array_values($questiondata->deployedseeds);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment