mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
relacing deprecated functions with capability checks
This commit is contained in:
parent
0dde27bb52
commit
9ce384ba1e
10 changed files with 17 additions and 20 deletions
|
@ -12,7 +12,7 @@
|
|||
if (!has_capability('mod/hotpot:viewreport',get_context_instance(CONTEXT_COURSE, $params->course))) {
|
||||
error("You are not allowed to view this page!");
|
||||
}
|
||||
if (isadmin()) {
|
||||
if (has_capability('mod/hotpot:viewreport', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
|
||||
$params->location = optional_param('location', HOTPOT_LOCATION_COURSEFILES);
|
||||
} else {
|
||||
$params->location = HOTPOT_LOCATION_COURSEFILES;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue