MDL-23502 added missing instance data validation

This commit is contained in:
Petr Skoda 2010-07-31 19:04:57 +00:00
parent 06fa8101fc
commit 953234e097

View File

@ -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