From e1658dad73316f0c147d27c7bc5d26b54d1d9bbe Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Wed, 15 Nov 2006 06:23:28 +0000 Subject: [PATCH] merged, replacing deprecated functions --- mod/choice/lib.php | 2 +- mod/choice/report.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 9f15f43062..fdee3e7163 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -335,7 +335,7 @@ function choice_show_results($choice, $course, $cm, $forcepublish='') { if ($currentgroup) { $users = get_group_users($currentgroup, "u.firstname ASC", '', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber'); } else { - $users = get_course_users($course->id, "u.firstname ASC", '', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber') + get_admins(); + $users = get_users_by_capability($context, 'mod/choice:choose'); } if (!$users) { diff --git a/mod/choice/report.php b/mod/choice/report.php index 0e413d1af4..c5b74b6881 100644 --- a/mod/choice/report.php +++ b/mod/choice/report.php @@ -45,8 +45,7 @@ update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm)); } - $users = get_course_users($course->id, "u.firstname ASC", '', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber') + get_admins(); - + $users = get_users_by_capability($context, 'mod/choice:choose'); if (!$users) { print_heading(get_string("nousersyet")); -- 2.39.5