From b451aed01f9767247001a18d687382b87779f600 Mon Sep 17 00:00:00 2001 From: Pavel Pisklakov Date: Sat, 30 Nov 2013 02:32:49 +0600 Subject: [PATCH] Changed deprecated get_context_instance to context_module::instance --- renderer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 renderer.php diff --git a/renderer.php b/renderer.php old mode 100644 new mode 100755 index c335682..6e0264e --- a/renderer.php +++ b/renderer.php @@ -103,7 +103,7 @@ class mod_attendance_renderer extends plugin_renderer_base { $group = $fcontrols->pageparams->group; } - $totalusers = count_enrolled_users(get_context_instance(CONTEXT_MODULE, $fcontrols->cm->id), 'mod/attendance:canbelisted', $group); + $totalusers = count_enrolled_users(context_module::instance($fcontrols->cm->id), 'mod/attendance:canbelisted', $group); $usersperpage = $fcontrols->pageparams->perpage; if (empty($fcontrols->pageparams->page) || !$fcontrols->pageparams->page || !$totalusers || !$usersperpage) { return $paging_controls; @@ -367,13 +367,13 @@ class mod_attendance_renderer extends plugin_renderer_base { } else { $groups = $group; } - $users = get_users_by_capability(get_context_instance(CONTEXT_MODULE, $takedata->cm->id), 'mod/attendance:canbelisted', + $users = get_users_by_capability(context_module::instance($takedata->cm->id), 'mod/attendance:canbelisted', 'u.id, u.firstname, u.lastname, u.email', '', '', '', $groups, '', false, true); $totalusers = count($users); } else { - $totalusers = count_enrolled_users(get_context_instance(CONTEXT_MODULE, $takedata->cm->id), 'mod/attendance:canbelisted', $group); + $totalusers = count_enrolled_users(context_module::instance($takedata->cm->id), 'mod/attendance:canbelisted', $group); } $usersperpage = $takedata->pageparams->perpage; if (!empty($takedata->pageparams->page) && $takedata->pageparams->page && $totalusers && $usersperpage) {