From c633af7a5a09998a597905cec263056858a63d1c Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 19 Sep 2007 07:13:20 +0000 Subject: [PATCH] course/edit: mark the course contextpath as dirty to force a reload Combined with the path creation in create_context() we can now create a course, enter and edit it immediately. Amazing. Like - 21st century technology. --- course/edit.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/course/edit.php b/course/edit.php index c7f3c052eb..f25fb849f5 100644 --- a/course/edit.php +++ b/course/edit.php @@ -100,6 +100,10 @@ role_assign($CFG->creatornewroleid, $USER->id, 0, $context->id); } + // ensure we can use the course right after creating it + // this means trigger a reload of accessinfo... + mark_context_dirty($context->path); + if ($data->metacourse and has_capability('moodle/course:managemetacourse', $context)) { // Redirect users with metacourse capability to student import redirect($CFG->wwwroot."/course/importstudents.php?id=$course->id"); -- 2.39.5