mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Merge branch 'MDL-61950-master' of git://github.com/ryanwyllie/moodle
This commit is contained in:
commit
3a37a5e934
@ -181,16 +181,15 @@ class calculator {
|
||||
|
||||
// Finish computing the averages, and put the sub-question data into the
|
||||
// corresponding questions.
|
||||
|
||||
// This cannot be a foreach loop because we need to have both
|
||||
// $question and $nextquestion available, but apart from that it is
|
||||
// foreach ($this->questions as $qid => $question).
|
||||
$slots = $this->stats->get_all_slots();
|
||||
$this->progress->start_progress('', count($slots), 1);
|
||||
foreach ($slots as $slot) {
|
||||
$totalnumberofslots = count($slots);
|
||||
$maxindex = $totalnumberofslots - 1;
|
||||
$this->progress->start_progress('', $totalnumberofslots, 1);
|
||||
foreach ($slots as $index => $slot) {
|
||||
$this->stats->for_slot($slot)->sort_variants();
|
||||
$this->progress->increment_progress();
|
||||
$nextslot = current($slots);
|
||||
$nextslotindex = $index + 1;
|
||||
$nextslot = ($nextslotindex > $maxindex) ? false : $slots[$nextslotindex];
|
||||
|
||||
$this->initial_question_walker($this->stats->for_slot($slot));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user