Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added some flush

  • Loading branch information...
commit 11c1d52551919a7c83891d3adfe49541493ad61b 1 parent 040c7b7
stronk7 authored

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. +14 0 backup/restore_execute.html
14 backup/restore_execute.html
@@ -107,6 +107,7 @@
107 107 $coursecreator_count = 0;
108 108 $admin_count = 0;
109 109 $other_count = 0;
  110 + $counter = 0;
110 111 //Iterate, filling counters
111 112 foreach ($recs as $rec) {
112 113 //Get full record, using backup_getids
@@ -128,6 +129,15 @@
128 129 } else if ($record->info == "new" or $record->info == "exists") {
129 130 $other_count++;
130 131 }
  132 + //Do some output
  133 + $counter++;
  134 + if ($counter % 10 == 0) {
  135 + echo ".";
  136 + if ($counter % 200 == 0) {
  137 + echo "<br>";
  138 + }
  139 + backup_flush(300);
  140 + }
131 141 }
132 142 //Now print information gathered
133 143 echo " (new: ".$new_count.", existing: ".$exists_count.")";
@@ -233,4 +243,8 @@
233 243 error ("An error has ocurred");
234 244 }
235 245
  246 + //Print final message
  247 + print_simple_box(get_string("restorefinished"),"CENTER");
  248 + print_continue($moodle_home."/course/view.php?id=".$restore->course_id);
  249 +
236 250 ?>

0 comments on commit 11c1d52

Please sign in to comment.
Something went wrong with that request. Please try again.