mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-23502 added missing instance data validation
This commit is contained in:
parent
06fa8101fc
commit
953234e097
@ -48,7 +48,7 @@ if (!enrol_is_enabled('self')) {
|
||||
$plugin = enrol_get_plugin('self');
|
||||
|
||||
if ($instanceid) {
|
||||
$instance = $DB->get_record('enrol', array('courseid'=>$course->id, 'id'=>$instanceid), '*', MUST_EXIST);
|
||||
$instance = $DB->get_record('enrol', array('courseid'=>$course->id, 'enrol'=>'self', 'id'=>$instanceid), '*', MUST_EXIST);
|
||||
} else {
|
||||
require_capability('moodle/course:enrolconfig', $context);
|
||||
// no instance yet, we have to add new instance
|
||||
|
Loading…
x
Reference in New Issue
Block a user