MDL-21781 fixed cap checks

This commit is contained in:
Petr Skoda 2010-04-23 09:08:37 +00:00
parent b980c56e2e
commit c7d5ed1cf3
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ require_login();
$cohort = $DB->get_record('cohort', array('id'=>$id), '*', MUST_EXIST);
$context = get_context_instance_by_id($cohort->contextid, MUST_EXIST);
require_capability('moodle/cohort:view', $context);
require_capability('moodle/cohort:assign', $context);
$PAGE->set_url('/cohort/assign.php', array('id'=>$id));
$PAGE->set_Context($context);

View File

@ -52,7 +52,7 @@ if ($id) {
$cohort->description = '';
}
require_capability('moodle/cohort:view', $context);
require_capability('moodle/cohort:manage', $context);
$returnurl = new moodle_url('/cohort/index.php', array('contextid'=>$context->id));