Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-29722 - No default guest enrol instance for requested courses

  • Loading branch information...
commit 81bb0556d9a604f13296e036e55f4bfd31775014 1 parent 024f0f7
@sunner sunner authored nebgor committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 enrol/guest/lib.php
View
4 enrol/guest/lib.php
@@ -271,6 +271,10 @@ public function course_updated($inserted, $course, $data) {
}
}
$this->add_instance($course, $fields);
+ } else {
+ if ($this->get_config('defaultenrol')) {
+ $this->add_default_instance($course);
+ }
}
} else {
$instances = $DB->get_records('enrol', array('courseid'=>$course->id, 'enrol'=>'guest'));
Please sign in to comment.
Something went wrong with that request. Please try again.