Use instance of moodle_url() in the function notice()
This commit is contained in:
parent
00e9eaba4d
commit
54be90f5c4
1 changed files with 2 additions and 1 deletions
3
view.php
3
view.php
|
@ -56,7 +56,8 @@ if ($customcert->requiredtime && !$canmanage) {
|
|||
if (\mod_customcert\certificate::get_course_time($course->id) < ($customcert->requiredtime * 60)) {
|
||||
$a = new stdClass;
|
||||
$a->requiredtime = $customcert->requiredtime;
|
||||
notice(get_string('requiredtimenotmet', 'customcert', $a), "$CFG->wwwroot/course/view.php?id=$course->id");
|
||||
$url = new moodle_url('/course/view.php', ['id' => $course->id]);
|
||||
notice(get_string('requiredtimenotmet', 'customcert', $a), $url);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue