Avoiding a notice
This commit is contained in:
+5
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user