diff --git a/course/grades.php b/course/grades.php index ad030201619..8296168c0d2 100644 --- a/course/grades.php +++ b/course/grades.php @@ -43,7 +43,7 @@ -> $strgrades"); setup_and_print_groups($course, $groupmode, "grades.php?id=$course->id"); notice(get_string("nostudentsingroup"), "$CFG->wwwroot/course/view.php?id=$course->id"); - print_footer(); + print_footer($course); exit; } } else { @@ -52,7 +52,7 @@ "wwwroot/course/view.php?id=$course->id\">$course->shortname -> $strgrades"); notice(get_string("nostudentsyet"), "$CFG->wwwroot/course/view.php?id=$course->id"); - print_footer(); + print_footer($course); exit; } } diff --git a/course/group.php b/course/group.php index cca314d509e..172376c2df8 100644 --- a/course/group.php +++ b/course/group.php @@ -3,8 +3,8 @@ /// Shows current group, and allows editing of the group /// icon and other settings related to that group - require_once('../config.php'); - require_once('lib.php'); + require_once('../config.php'); + require_once('lib.php'); require_variable($id); // Course id optional_variable($group); // Optionally look at other groups @@ -104,7 +104,7 @@ use_html_editor("description"); } - print_footer(); + print_footer($course); exit; } diff --git a/course/loglive.php b/course/loglive.php index ddcf20bc670..d9aebfe51c3 100644 --- a/course/loglive.php +++ b/course/loglive.php @@ -36,7 +36,7 @@ print_log($course, $user, $date, "l.time DESC", 0, 500, "loglive.php?id=$course->id&user=$user&date=$date"); - print_footer(); + print_footer($course); exit; diff --git a/course/student.php b/course/student.php index 581b0c9ba71..7497b73ecf4 100644 --- a/course/student.php +++ b/course/student.php @@ -150,6 +150,6 @@ print_simple_box_end(); - print_footer(); + print_footer($course); ?> diff --git a/course/teacher.php b/course/teacher.php index b782f36a3e7..8f45b049341 100644 --- a/course/teacher.php +++ b/course/teacher.php @@ -220,6 +220,6 @@ echo ""; } - print_footer(); + print_footer($course); ?> diff --git a/course/unenrol.php b/course/unenrol.php index 3450588cc5b..a8693227490 100644 --- a/course/unenrol.php +++ b/course/unenrol.php @@ -58,6 +58,6 @@ notice_yesno ($strunenrolsure, "unenrol.php?id=$id&user=$user->id&confirm=yes&sesskey=$USER->sesskey", "$HTTP_REFERER"); - print_footer(); + print_footer($course); ?> diff --git a/lib/moodlelib.php b/lib/moodlelib.php index c1f3cd354a3..651a1ff8714 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -3947,7 +3947,7 @@ function get_string($identifier, $module='', $a=NULL) { global $course; /// Not a nice hack, but quick if (empty($CFG->courselang)) { - if (!empty($course->lang)) { + if (isset($course->lang)) { $CFG->courselang = $course->lang; } } diff --git a/mod/choice/view.php b/mod/choice/view.php index 887e4a1fc67..93216cfc0fc 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -94,7 +94,7 @@ if ($choice->timeopen > time() ) { print_simple_box(get_string("notopenyet", "choice", userdate($choice->timeopen)), "center"); - print_footer(); + print_footer($course); exit; } diff --git a/mod/forum/discuss.php b/mod/forum/discuss.php index 08e4e13631a..18f64d61dd0 100644 --- a/mod/forum/discuss.php +++ b/mod/forum/discuss.php @@ -143,7 +143,7 @@ $canreply = false; } else { print_heading("Sorry, you can't see this discussion because you are not in this group"); - print_footer(); + print_footer($course); die; } diff --git a/mod/forum/post.php b/mod/forum/post.php index c85c827d107..54c854b78b7 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -47,7 +47,7 @@ } notice_yesno(get_string('noguestpost', 'forum').'

'.get_string('liketologin'), $wwwroot, $_SERVER['HTTP_REFERER']); - print_footer(); + print_footer($course); exit; } diff --git a/mod/forum/subscribe.php b/mod/forum/subscribe.php index bd8c240b23e..849bda55073 100644 --- a/mod/forum/subscribe.php +++ b/mod/forum/subscribe.php @@ -59,7 +59,7 @@ } notice_yesno(get_string('noguestsubscribe', 'forum').'

'.get_string('liketologin'), $wwwroot, $_SERVER['HTTP_REFERER']); - print_footer(); + print_footer($course); exit; } diff --git a/mod/forum/subscribers.php b/mod/forum/subscribers.php index be6472b582e..5953cf72676 100644 --- a/mod/forum/subscribers.php +++ b/mod/forum/subscribers.php @@ -161,6 +161,6 @@ print_simple_box_end(); - print_footer(); + print_footer($course); ?> diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 4660720bddd..53a2bf88f77 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -105,7 +105,7 @@ echo "\n"; if (empty($quiz->popup)) { - print_footer(); + print_footer($course); } exit; diff --git a/mod/quiz/multiple.php b/mod/quiz/multiple.php index 13e26338628..6584e25f3f4 100644 --- a/mod/quiz/multiple.php +++ b/mod/quiz/multiple.php @@ -167,6 +167,6 @@ echo ''; print_simple_box_end(); - print_footer(); + print_footer($course); ?>