Whoops. Missed setting $totalcount var

This commit is contained in:
thepurpleblob 2007-02-21 11:57:28 +00:00
parent 616ad119ad
commit 806dab4385

View file

@ -124,6 +124,7 @@
// run through blocks and get (unique) courses // run through blocks and get (unique) courses
$courses = array(); $courses = array();
$totalcount = 0;
foreach ($blocks as $block) { foreach ($blocks as $block) {
$courseid = $block->pageid; $courseid = $block->pageid;
if ($courseid==0) { if ($courseid==0) {
@ -133,6 +134,7 @@
error( "Could not read data for courseid=$courseid" ); error( "Could not read data for courseid=$courseid" );
} }
$courses[$courseid] = $course; $courses[$courseid] = $course;
$totalcount++;
} }
} }
// get list of courses containing modules if required // get list of courses containing modules if required
@ -144,6 +146,7 @@
// run through modules and get (unique) courses // run through modules and get (unique) courses
$courses = array(); $courses = array();
$totalcount = 0;
foreach ($modules as $module) { foreach ($modules as $module) {
$courseid = $module->course; $courseid = $module->course;
if ($courseid==0) { if ($courseid==0) {
@ -153,6 +156,7 @@
error( "Could not read data for courseid=$courseid" ); error( "Could not read data for courseid=$courseid" );
} }
$courses[$courseid] = $course; $courses[$courseid] = $course;
$totalcount++;
} }
} }
else { else {