mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-42609 course: management default missing bits
With the previous commit in this issue, now the course management UI defaults to show the "default category" courses. But some bits were missing in order to make that default behavior fully equivalent with the manual navigation to that category. This patch: - Adds the missing categoryid url param, used by some of the options in the UI, like sorting, that was completely broken. - Sets the context to the default category, previously was being set to system context, incorrectly if now we are defaulting to a category. That way everything is 100% the same than when we land to the category manually.
This commit is contained in:
parent
4c8914b777
commit
fa4f0de6b1
1 changed files with 2 additions and 1 deletions
|
@ -71,7 +71,8 @@ if ($courseid) {
|
||||||
$courseid = null;
|
$courseid = null;
|
||||||
$category = coursecat::get_default();
|
$category = coursecat::get_default();
|
||||||
$categoryid = $category->id;
|
$categoryid = $category->id;
|
||||||
$context = $systemcontext;
|
$context = context_coursecat::instance($category->id);
|
||||||
|
$url->param('categoryid', $category->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there is a selected category param, and if there is apply it.
|
// Check if there is a selected category param, and if there is apply it.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue