relacing deprecated functions with capability checks

This commit is contained in:
toyomoyo 2006-09-19 14:16:40 +00:00
parent 0dde27bb52
commit 9ce384ba1e
10 changed files with 17 additions and 20 deletions

View file

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