Merge branch 'master' of gitlab.steinbeisschule-reutlingen.de:L_DA/mod_timetable
This commit is contained in:
commit
aefe6411a4
1 changed files with 2 additions and 1 deletions
|
@ -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']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue