]> git.mjollnir.org Git - moodle.git/commitdiff
Whoops. Missed setting $totalcount var
authorthepurpleblob <thepurpleblob>
Wed, 21 Feb 2007 11:57:28 +0000 (11:57 +0000)
committerthepurpleblob <thepurpleblob>
Wed, 21 Feb 2007 11:57:28 +0000 (11:57 +0000)
course/search.php

index 4283d76f4ce9202364c8d7ae923ac7d541940141..047f56d81fbb3e3535986aeb033841196605e685 100644 (file)
 
         // run through blocks and get (unique) courses
         $courses = array();
+        $totalcount = 0;
         foreach ($blocks as $block) {
             $courseid = $block->pageid;
             if ($courseid==0) {
                 error( "Could not read data for courseid=$courseid" );
             }
             $courses[$courseid] = $course;
+            $totalcount++;
         }
     }
     // get list of courses containing modules if required
 
         // run through modules and get (unique) courses
         $courses = array();
+        $totalcount = 0;
         foreach ($modules as $module) {
             $courseid = $module->course;
             if ($courseid==0) {
                 error( "Could not read data for courseid=$courseid" );
             }
             $courses[$courseid] = $course;
+            $totalcount++;
         }
     }
     else {