]> git.mjollnir.org Git - moodle.git/commitdiff
Removed references to showsiteparticipantslist. Replaced by capability.
authorvyshane <vyshane>
Mon, 18 Sep 2006 05:28:06 +0000 (05:28 +0000)
committervyshane <vyshane>
Mon, 18 Sep 2006 05:28:06 +0000 (05:28 +0000)
user/index.php
user/tabs.php

index 7ade006948adb7c703ccf6a0ec85d5568abc2c5c..3d8bb516d617056d1736558772567b8464b366bd 100644 (file)
     require_capability('moodle/course:viewparticipants', $context);
 
     if (!$course->category) {
-        if (!$CFG->showsiteparticipantslist and !has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
+        if (!has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
             print_header("$course->shortname: ".get_string('participants'), $course->fullname,
                          get_string('participants'), "", "", true, "&nbsp;", navmenu($course));
-            notice(get_string('sitepartlist0'));
-        }
-        if ($CFG->showsiteparticipantslist < 2 and !isteacherinanycourse()) {
-            print_header("$course->shortname: ".get_string('participants'), $course->fullname,
-                         get_string('participants'), "", "", true, "&nbsp;", navmenu($course));
-            notice(get_string('sitepartlist1'));
+            notice(get_string('sitepartlist'));
         }
     }
 
index 95640a3d1757da1e1fe72e7a6d51ee9b2561ae7e..742f11798d0b4fd0a43a29cf0bf1dcdcf89001d8 100644 (file)
@@ -35,8 +35,8 @@
         
         if ($CFG->bloglevel >= 4) {
             if (isteacher(SITEID) || 
-                ($CFG->showsiteparticipants == 1 && isteacherinanycourse()) || 
-                ($CFG->showsiteparticipantslist == 2)) {
+                ( $CFG->showsiteparticipants == 1
+                        && has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_SYSTEM, SITEID)) ) {
                 $toprow[] = new tabobject('participants', $CFG->wwwroot.'/user/index.php?id='.SITEID,
                     get_string('participants'));
             }