MDL-23502 improved coding style
authorPetr Skoda <skodak@moodle.org>
Sat, 31 Jul 2010 10:14:05 +0000 (10:14 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 31 Jul 2010 10:14:05 +0000 (10:14 +0000)
course/edit.php

index 8ddbe2f..890a13f 100644 (file)
@@ -116,7 +116,7 @@ if ($editform->is_cancelled()) {
             enrol_try_internal_enrol($course->id, $USER->id, $CFG->creatornewroleid);
 
         }
-        if (!is_enrolled(get_context_instance(CONTEXT_COURSE, $course->id))) {
+        if (!is_enrolled($context)) {
             // Redirect to manual enrolment page if possible
             $instances = enrol_get_instances($course->id, true);
             foreach($instances as $instance) {