]> git.mjollnir.org Git - moodle.git/commitdiff
merged, replacing deprecated functions
authortoyomoyo <toyomoyo>
Wed, 15 Nov 2006 06:23:28 +0000 (06:23 +0000)
committertoyomoyo <toyomoyo>
Wed, 15 Nov 2006 06:23:28 +0000 (06:23 +0000)
mod/choice/lib.php
mod/choice/report.php

index 9f15f43062ff84491256c6efca8a7d632e0cfa3a..fdee3e7163f6a30ef2a36f026d0b15f568fc3a20 100644 (file)
@@ -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) {
index 0e413d1af4b5a3f499ef10e665e229256ed00011..c5b74b6881db9d9746a9859d7ecc815fba259cd8 100644 (file)
@@ -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"));