]> git.mjollnir.org Git - moodle.git/commitdiff
get_config() callers switched to expect a single value returned
authormartinlanghoff <martinlanghoff>
Tue, 16 Jan 2007 23:27:14 +0000 (23:27 +0000)
committermartinlanghoff <martinlanghoff>
Tue, 16 Jan 2007 23:27:14 +0000 (23:27 +0000)
This simplifies the logic in the callers -- a good hint that
that we are doing the right thing.

grade/lib.php

index 8b04ba07ccbd4d12fccac77ded418cee5f3cdeeb..3978c7b1bf0ae5f621964c6861f5efc7e7c3e2fc 100644 (file)
@@ -3106,12 +3106,12 @@ function grade_get_course_students($courseid) {
     } 
         
     $configvar = get_config('', 'gradebookroles');
-    if (empty($configvar->value)) {
+    if (empty($configvar)) {
         notify ('no roles defined in admin->appearance->graderoles');
         return false; // no roles to displayreturn false;  
     }
          
-    if ($rolestoget = explode(',', $configvar->value)) {
+    if ($rolestoget = explode(',', $configvar)) {
         foreach ($rolestoget as $crole) {
             if ($tempstudents = get_role_users($crole, $context, true)) {
                 foreach ($tempstudents as $tempuserid=>$tempstudent) {