From ffbe59b8d02b6e47026849765a0f36f95f6fff12 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 12 Aug 2004 07:52:44 +0000 Subject: [PATCH] Avoiding a notice --- course/edit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/course/edit.php b/course/edit.php index 4a8b2cc4dd..1210f67ace 100644 --- a/course/edit.php +++ b/course/edit.php @@ -38,7 +38,11 @@ if ($form = data_submitted()) { - check_for_restricted_user($USER->username, "$CFG->wwwroot/course/view.php?id=$course->id"); + if (empty($course)) { + check_for_restricted_user($USER->username, "$CFG->wwwroot"); + } else { + check_for_restricted_user($USER->username, "$CFG->wwwroot/course/view.php?id=$course->id"); + } $form->startdate = make_timestamp($form->startyear, $form->startmonth, $form->startday); -- 2.39.5