From 33ca51fbdfe1c479afbd5ea200917bafdee24d49 Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 8 Jan 2007 22:24:16 +0000 Subject: [PATCH] backported fixes for warnings when exporting logs in excel format --- course/lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/course/lib.php b/course/lib.php index 139eb92e592..11356c1232f 100644 --- a/course/lib.php +++ b/course/lib.php @@ -532,7 +532,8 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname, $modname, $modid, $modaction, $groupid)) { return false; } - + + $courses = array(); if ($course->id == SITEID) { $courses[0] = ''; if ($ccc = get_courses('all', 'c.id ASC', 'c.id,c.shortname')) { @@ -540,6 +541,8 @@ function print_log_xls($course, $user, $date, $order='l.time DESC', $modname, $courses[$cc->id] = $cc->shortname; } } + } else { + $courses[$course->id] = $course->shortname; } $count=0;