mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Whoops. Missed setting $totalcount var
This commit is contained in:
parent
616ad119ad
commit
806dab4385
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue