mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-12884: cli installer should create the context for the Miscellaneous course category
This commit is contained in:
parent
7ce4ce0aa4
commit
9816d8afc0
@ -1195,7 +1195,11 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
|
||||
|
||||
$cat = new Object();
|
||||
$cat->name = get_string('miscellaneous');
|
||||
if (insert_record('course_categories', $cat)) {
|
||||
$cat->depth = 1;
|
||||
if ($catid = insert_record('course_categories', $cat)) {
|
||||
// make sure category context exists
|
||||
get_context_instance(CONTEXT_COURSECAT, $catid);
|
||||
mark_context_dirty('/'.SYSCONTEXTID);
|
||||
// do nothing
|
||||
} else {
|
||||
error("Serious Error! Could not set up a default course category!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user