diff --git a/externallib.php b/externallib.php index c8b6125..da2f848 100644 --- a/externallib.php +++ b/externallib.php @@ -149,7 +149,8 @@ class mod_timetable_external extends external_api { //Capability checking //OPTIONAL but in most web service it should present if (!has_capability('mod/timetable:view'.$params['type'], $usercontext)) { - if (!(($params['type'] == 'class') && has_capability('mod/timetable:viewownclass', $usercontext) && ($params['name'] == str_replace('_','/',$USER->department)))) + //if (!(($params['type'] == 'class') && has_capability('mod/timetable:viewownclass', $usercontext) && ($params['name'] == str_replace('_','/',$USER->department)))) + if (!(($params['type'] == 'class') && ($params['name'] == str_replace('_','/',$USER->department)))) throw new \moodle_exception('cannotviewtimetable'.$params['type']); }