mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-66336_master' of https://github.com/marxjohnson/moodle
This commit is contained in:
commit
ad534481f8
@ -69,8 +69,11 @@ if ($courseid) {
|
||||
$course = null;
|
||||
$courseid = null;
|
||||
$topchildren = core_course_category::top()->get_children();
|
||||
if (empty($topchildren)) {
|
||||
throw new moodle_exception('cannotviewcategory', 'error');
|
||||
}
|
||||
$category = reset($topchildren);
|
||||
$categoryid = $category ? $category->id : 0;
|
||||
$categoryid = $category->id;
|
||||
$context = context_coursecat::instance($category->id);
|
||||
$url->param('categoryid', $category->id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user