Skip to content

Commit

Permalink
MDL-27877 question engine progress bars not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Jun 16, 2011
1 parent c3f85e2 commit 08c458d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions local/qeupgradehelper/afterupgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ protected function convert_quiz_attempt($quiz, $attempt, $questionsessionsrs, $q
protected function reset_progress($done, $outof) {
if (is_null($this->progressbar)) {
$this->progressbar = new progress_bar('qe2reset');
$this->progressbar->create();
}

gc_collect_cycles(); // This was really helpful in PHP 5.2. Perhaps remove.
Expand Down
1 change: 1 addition & 0 deletions mod/quiz/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ function xmldb_quiz_upgrade($oldversion) {

if ($oldattempts) {
$pbar = new progress_bar('q15upgrade');
$pbar->create();
$a = new stdClass();
$a->todo = count($oldattempts);
$a->done = 0;
Expand Down
1 change: 1 addition & 0 deletions question/engine/upgrade/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class question_engine_attempt_upgrader {
protected function print_progress($done, $outof, $quizid) {
if (is_null($this->progressbar)) {
$this->progressbar = new progress_bar('qe2upgrade');
$this->progressbar->create();
}

gc_collect_cycles(); // This was really helpful in PHP 5.2. Perhaps remove.
Expand Down

0 comments on commit 08c458d

Please sign in to comment.