]> git.mjollnir.org Git - moodle.git/commitdiff
Tidying up the way pix images are used.
authormoodler <moodler>
Mon, 28 Apr 2003 04:32:55 +0000 (04:32 +0000)
committermoodler <moodler>
Mon, 28 Apr 2003 04:32:55 +0000 (04:32 +0000)
It's now also possible to override the standard pix with a set of new ones
in a theme.

21 files changed:
course/lib.php
course/social.php
course/topics.php
course/view.php
course/weeks.php
files/pix/folder.gif
lib/weblib.php
pix/i/files.gif [moved from files/pix/files.gif with 100% similarity]
pix/i/search.gif [moved from pix/t/search.gif with 100% similarity]
pix/t/delete.gif
pix/t/down.gif
pix/t/edit.gif
pix/t/hide.gif
pix/t/left.gif
pix/t/right.gif
pix/t/show.gif
pix/t/up.gif
user/index.php
user/lib.php
user/user.gif [deleted file]
user/users.gif [deleted file]

index 5a4f6778692e96bcccda3a9e63ace7f994a3d4fb..5316579e732e77ff213361d1bb40a202a99f4ecf 100644 (file)
@@ -175,7 +175,7 @@ function print_log($course, $user=0, $date=0, $order="ORDER BY l.time ASC") {
         }
         echo "<td nowrap align=right><font size=2>".userdate($log->time, "%a")."</td>";
         echo "<td nowrap><font size=2>".userdate($log->time, $strftimedatetime)."</td>";
-        echo "<TD NOWRAP><FONT SIZE=2>";
+        echo "<td nowrap><font size=2>";
         link_to_popup_window("/lib/ipatlas/plot.php?address=$log->ip&user=$log->userid", "ipatlas","$log->ip", 400, 700);
         echo "</td>";
         echo "<td nowrap><font size=2><a href=\"../user/view.php?id=$log->userid&course=$log->course\"><b>$log->firstname $log->lastname</b></td>";
@@ -190,7 +190,7 @@ function print_log($course, $user=0, $date=0, $order="ORDER BY l.time ASC") {
 
 
 function print_all_courses($category="all", $style="full", $maxcount=999, $width=180) {
-    global $CFG, $USER;
+    global $CFG, $THEME, $USER;
 
     if ($category == "all") {
         $courses = get_courses();
@@ -212,16 +212,20 @@ function print_all_courses($category="all", $style="full", $maxcount=999, $width
 
     if ($style == "minimal") {
         $count = 0;
-        $icon  = "<IMG SRC=\"pix/i/course.gif\" HEIGHT=16 WIDTH=16 ALT=\"".get_string("course")."\">";
+        if (empty($THEME->custompix)) {
+            $icon  = "<img src=\"$CFG->wwwroot/pix/i/course.gif\" height=16 width=16 alt=\"".get_string("course")."\">";
+        } else {
+            $icon  = "<img src=\"$CFG->wwwroot/theme/$CFG->theme/pix/i/course.gif\" height=16 width=16 alt=\"".get_string("course")."\">";
+        }
         if ($courses) {
             foreach ($courses as $course) {
-                $moddata[]="<A TITLE=\"$course->shortname\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
+                $moddata[]="<a title=\"$course->shortname\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
                 $modicon[]=$icon;
                 if ($count++ >= $maxcount) {
                     break;
                 }
             }   
-            $fulllist = "<P><A HREF=\"$CFG->wwwroot/course/\">".get_string("fulllistofcourses")."</A>...";
+            $fulllist = "<p><a href=\"$CFG->wwwroot/course/\">".get_string("fulllistofcourses")."</a>...";
         } else {
             $moddata = array();
             $modicon = array();
@@ -232,23 +236,29 @@ function print_all_courses($category="all", $style="full", $maxcount=999, $width
     } else if ($courses) {
         foreach ($courses as $course) {
             print_course($course);
-            echo "<BR>\n";
+            echo "<br />\n";
         }
 
     } else {
-        echo "<P>".get_string("nocoursesyet")."</P>";
+        echo "<p>".get_string("nocoursesyet")."</p>";
     }
 }
 
 
 function print_course($course) {
 
-    global $CFG;
+    global $CFG, $THEME;
 
     if (! $site = get_site()) {
         error("Could not find a site!");
     }
 
+    if (empty($THEME->custompix)) {
+        $pixpath = "$CFG->wwwroot/pix";
+    } else {
+        $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
+    }
+
     print_simple_box_start("CENTER", "100%");
 
     echo "<TABLE WIDTH=100%>";
@@ -271,12 +281,12 @@ function print_course($course) {
     if ($course->guest) {
         $strallowguests = get_string("allowguests");
         echo "<A TITLE=\"$strallowguests\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
-        echo "<IMG VSPACE=4 ALT=\"$strallowguests\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$CFG->wwwroot/user/user.gif\"></A>&nbsp;&nbsp;";
+        echo "<IMG VSPACE=4 ALT=\"$strallowguests\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$pixpath/i/user.gif\"></A>&nbsp;&nbsp;";
     }
     if ($course->password) {
         $strrequireskey = get_string("requireskey");
         echo "<A TITLE=\"$strrequireskey\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
-        echo "<IMG VSPACE=4 ALT=\"$strrequireskey\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$CFG->wwwroot/pix/i/key.gif\"></A>";
+        echo "<IMG VSPACE=4 ALT=\"$strrequireskey\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$pixpath/i/key.gif\"></A>";
     }
 
 
@@ -644,9 +654,14 @@ function print_side_block_end() {
 
 
 function print_admin_links ($siteid, $width=180) {
-    global $CFG;
+    global $CFG, $THEME;
     
-    $icon = "<IMG SRC=\"$CFG->wwwroot/pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+    if (empty($THEME->custompix)) {
+        $icon = "<img src=\"$CFG->wwwroot/pix/i/settings.gif\" height=16 width=16 alt=\"\">";
+    } else {
+        $icon = "<img src=\"$CFG->wwwroot/theme/$CFG->theme/pix/i/settings.gif\" height=16 width=16 alt=\"\">";
+    }
+
     if (isadmin()) {
            $moddata[]="<A HREF=\"$CFG->wwwroot/$CFG->admin/config.php\">".get_string("configvariables")."</A>";
                $modicon[]=$icon;
@@ -696,45 +711,53 @@ function print_admin_links ($siteid, $width=180) {
 
     print_side_block(get_string("administration"), "", $moddata, $modicon, $fulladmin, $width);
 
-    echo "<IMG SRC=\"$CFG->wwwroot/pix/spacer.gif\" WIDTH=\"$width\" HEIGHT=1><BR>";
+    echo "<img src=\"$CFG->wwwroot/pix/spacer.gif\" width=\"$width\" height=1><br>";
 }
 
 function print_course_admin_links($course, $width=180) {
-    global $USER, $CFG;
+    global $USER, $CFG, $THEME;
 
+    if (empty($THEME->custompix)) {
+        $pixpath = "$CFG->wwwroot/pix";
+        $modpixpath = "$CFG->wwwroot/mod";
+    } else {
+        $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
+        $modpixpath = "$CFG->wwwroot/theme/$CFG->theme/pix/mod";
+    }
     if (isteacher($course->id)) {
-        $adminicon[]="<IMG SRC=\"$CFG->wwwroot/pix/i/edit.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+        $adminicon[]="<img src=\"$pixpath/i/edit.gif\" height=16 width=16 alt=\"\">";
         if (isediting($course->id)) {
-            $admindata[]="<A HREF=\"view.php?id=$course->id&edit=off\">".get_string("turneditingoff")."</A>";
+            $admindata[]="<a href=\"view.php?id=$course->id&edit=off\">".get_string("turneditingoff")."</a>";
         } else {
-            $admindata[]="<A HREF=\"view.php?id=$course->id&edit=on\">".get_string("turneditingon")."</A>";
+            $admindata[]="<a href=\"view.php?id=$course->id&edit=on\">".get_string("turneditingon")."</a>";
         }
-        $admindata[]="<A HREF=\"edit.php?id=$course->id\">".get_string("settings")."...</A>";
-        $adminicon[]="<IMG SRC=\"$CFG->wwwroot/pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+        $admindata[]="<a href=\"edit.php?id=$course->id\">".get_string("settings")."...</a>";
+        $adminicon[]="<img src=\"$pixpath/i/settings.gif\" height=16 width=16 alt=\"\">";
         if (!$course->teachers) {
             $course->teachers = get_string("defaultcourseteachers");
         }
-        $admindata[]="<A HREF=\"teachers.php?id=$course->id\">$course->teachers...</A>";
-        $adminicon[]="<IMG SRC=\"$CFG->wwwroot/pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+        $admindata[]="<a href=\"teachers.php?id=$course->id\">$course->teachers...</a>";
+        $adminicon[]="<img src=\"$pixpath/i/settings.gif\" height=16 width=16 alt=\"\">";
     
-        $admindata[]="<A HREF=\"grades.php?id=$course->id\">".get_string("grades")."...</A>";
-        $adminicon[]="<IMG SRC=\"$CFG->wwwroot/pix/i/grades.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+        $admindata[]="<a href=\"grades.php?id=$course->id\">".get_string("grades")."...</a>";
+        $adminicon[]="<img src=\"$pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
     
-        $admindata[]="<A HREF=\"log.php?id=$course->id\">".get_string("logs")."...</A>";
-        $adminicon[]="<IMG SRC=\"$CFG->wwwroot/pix/i/log.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
-        $admindata[]="<A HREF=\"$CFG->wwwroot/files/index.php?id=$course->id\">".get_string("files")."...</A>";
-        $adminicon[]="<IMG SRC=\"$CFG->wwwroot/files/pix/files.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+        $admindata[]="<a href=\"log.php?id=$course->id\">".get_string("logs")."...</a>";
+        $adminicon[]="<img src=\"$pixpath/i/log.gif\" height=16 width=16 alt=\"\">";
+
+        $admindata[]="<a href=\"$CFG->wwwroot/files/index.php?id=$course->id\">".get_string("files")."...</a>";
+        $adminicon[]="<img src=\"$pixpath/i/files.gif\" height=16 width=16 alt=\"\">";
     
-        $admindata[]="<A HREF=\"$CFG->wwwroot/doc/view.php?id=$course->id&file=teacher.html\">".get_string("help")."...</A>";
-        $adminicon[]="<IMG SRC=\"$CFG->wwwroot/mod/resource/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+        $admindata[]="<a href=\"$CFG->wwwroot/doc/view.php?id=$course->id&file=teacher.html\">".get_string("help")."...</a>";
+        $adminicon[]="<img src=\"$modpixpath/resource/icon.gif\" height=16 width=16 alt=\"\">";
 
         if ($teacherforum = forum_get_course_forum($course->id, "teacher")) {
-            $admindata[]="<A HREF=\"$CFG->wwwroot/mod/forum/view.php?f=$teacherforum->id\">".get_string("nameteacher", "forum")."</A>";
-            $adminicon[]="<IMG SRC=\"$CFG->wwwroot/mod/forum/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+            $admindata[]="<a href=\"$CFG->wwwroot/mod/forum/view.php?f=$teacherforum->id\">".get_string("nameteacher", "forum")."</a>";
+            $adminicon[]="<img src=\"$modpixpath/forum/icon.gif\" height=16 width=16 alt=\"\">";
         }
     } else {
-        $admindata[]="<A HREF=\"grade.php?id=$course->id\">".get_string("grades")."...</A>";
-        $adminicon[]="<IMG SRC=\"$CFG->wwwroot/pix/i/grades.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+        $admindata[]="<a href=\"grade.php?id=$course->id\">".get_string("grades")."...</a>";
+        $adminicon[]="<img src=\"$pixpath/i/grades.gif\" height=16 width=16 alt=\"\">";
     } 
 
     print_side_block(get_string("administration"), "", $admindata, $adminicon, "", $width);
@@ -746,53 +769,59 @@ function print_course_categories($categories, $selected="none", $width=180) {
     $strallowguests = get_string("allowguests");
     $strrequireskey = get_string("requireskey");
 
+    if (empty($THEME->custompix)) {
+        $pixpath = "$CFG->wwwroot/pix";
+    } else {
+        $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
+    }
+
     if ($selected == "index") {  // Print comprehensive index of categories with courses
         if ($courses = get_courses()) {
             if (isset($USER->id) and !isadmin()) {
                 print_simple_box_start("CENTER", "100%", $THEME->cellheading);
-                print_heading("<A HREF=\"course/index.php?category=my\">".get_string("mycourses")."</A>", "LEFT");
+                print_heading("<a href=\"course/index.php?category=my\">".get_string("mycourses")."</a>", "left");
                 $some = false;
-                echo "<UL>";
+                echo "<ul>";
                 foreach ($courses as $key => $course) {
                     if (isteacher($course->id) or isstudent($course->id)) {
-                        echo "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
-                        echo "<BR>";
+                        echo "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
+                        echo "<br />";
                         $some = true;
                     }
                 }
                 if (!$some) {
                     print_string("nocoursesyet");
                 }
-                echo "</UL>";
+                echo "</ul>";
                 print_simple_box_end();
                 print_spacer(8,1);
             }
             foreach ($categories as $category) {
                 print_simple_box_start("CENTER", "100%");
-                print_heading("<A HREF=\"course/index.php?category=$category->id\">$category->name</A>", "LEFT");
+                print_heading("<a href=\"course/index.php?category=$category->id\">$category->name</a>", "left");
                 $some = false;
-                echo "<UL>";
+                echo "<ul>";
                 foreach ($courses as $key => $course) {
                     if ($course->category == $category->id) {
-                        echo "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
+                        echo "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
                         echo "&nbsp;&nbsp;";
                         unset($courses[$key]);
                         if ($course->guest ) {
-                            echo "<A TITLE=\"$strallowguests\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
-                            echo "<IMG ALT=\"\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$CFG->wwwroot/user/user.gif\"></A>";
+                            echo "<a title=\"$strallowguests\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
+                            echo "<img alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/user.gif\"></a>";
                         }
                         if ($course->password) {
-                            echo "<A TITLE=\"$strrequireskey\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
-                            echo "<IMG ALT=\"\" HEIGHT=16 WIDTH=16 BORDER=0 SRC=\"$CFG->wwwroot/pix/i/key.gif\"></A>";
+                            echo "<a title=\"$strrequireskey\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
+                            echo "<img alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\"></a>";
                         }
-                        echo "<BR>";
+                        echo "<br />";
                         $some = true;
                     }
                 }
                 if (!$some) {
                     print_string("nocoursesyet");
                 }
-                echo "</UL>";
+                echo "</ul>";
                 print_simple_box_end();
                 print_spacer(8,1);
             }
@@ -800,17 +829,17 @@ function print_course_categories($categories, $selected="none", $width=180) {
 
     } else {                    // Print short list of categories only 
         foreach ($categories as $cat) {
-            $caticon[]="<IMG SRC=\"$CFG->wwwroot/pix/i/course.gif\" HEIGHT=16 WIDTH=16>";
+            $caticon[]="<img src=\"$pixpath/i/course.gif\" height=16 width=16>";
             if ($cat->id == $selected) {
                 $catdata[]="$cat->name";
             } else {
-                $catdata[]="<A HREF=\"$CFG->wwwroot/course/index.php?category=$cat->id\">$cat->name</A>";
+                $catdata[]="<a href=\"$CFG->wwwroot/course/index.php?category=$cat->id\">$cat->name</a>";
             }
         }
-        $catdata[] = "<A HREF=\"$CFG->wwwroot/course/index.php?category=all\">".get_string("fulllistofcourses")."</A>";
+        $catdata[] = "<a href=\"$CFG->wwwroot/course/index.php?category=all\">".get_string("fulllistofcourses")."</a>";
         $caticon[] = "";
         if (isset($USER->id)) {
-            $catdata[] = "<A HREF=\"$CFG->wwwroot/course/index.php?category=my\">".get_string("mycourses")."</A>";
+            $catdata[] = "<a href=\"$CFG->wwwroot/course/index.php?category=my\">".get_string("mycourses")."</a>";
             $caticon[] = "";
         }
         print_side_block(get_string("categories"), "", $catdata, $caticon, "", $width);
@@ -1019,7 +1048,7 @@ function move_module($cm, $move) {
 }
 
 function make_editing_buttons($moduleid, $absolute=false, $visible=true, $str=NULL) {
-    global $CFG;
+    global $CFG, $THEME;
 
     if (empty($str)) {
         $str->delete   = get_string("delete");
@@ -1031,27 +1060,33 @@ function make_editing_buttons($moduleid, $absolute=false, $visible=true, $str=NU
     }
 
     if ($absolute) {
-        $path = "$CFG->wwwroot/course/";
+        $path = "$CFG->wwwroot/course";
+    } else {
+        $path = ".";
+    }
+
+    if (empty($THEME->custompix)) {
+        $pixpath = "$path/../pix";
     } else {
-        $path = "";
+        $pixpath = "$path/../theme/$CFG->theme/pix";
     }
 
     if ($visible) {
-        $hideshow = " <A TITLE=\"$str->hide\" HREF=\"".$path."mod.php?hide=$moduleid\"><IMG 
-                        SRC=".$path."../pix/t/hide.gif BORDER=0></A>";
+        $hideshow = " <a title=\"$str->hide\" href=\"$path/mod.php?hide=$moduleid\"><img 
+                        src=\"$pixpath/t/hide.gif\" height=11 width=11 border=0></a>";
     } else {
-        $hideshow = " <A TITLE=\"$str->show\" HREF=\"".$path."mod.php?show=$moduleid\"><IMG 
-                        SRC=".$path."../pix/t/show.gif BORDER=0></A>";
+        $hideshow = " <a title=\"$str->show\" href=\"$path/mod.php?show=$moduleid\"><img 
+                        src=\"$pixpath/t/show.gif\" height=11 width=11 border=0></a>";
     }
 
-    return "<A TITLE=\"$str->delete\" HREF=\"".$path."mod.php?delete=$moduleid\"><IMG 
-             SRC=".$path."../pix/t/delete.gif BORDER=0></A>
-          <A TITLE=\"$str->moveup\" HREF=\"".$path."mod.php?id=$moduleid&move=-1\"><IMG 
-             SRC=".$path."../pix/t/up.gif BORDER=0></A>
-          <A TITLE=\"$str->movedown\" HREF=\"".$path."mod.php?id=$moduleid&move=1\"><IMG 
-             SRC=".$path."../pix/t/down.gif BORDER=0></A>
-          <A TITLE=\"$str->update\" HREF=\"".$path."mod.php?update=$moduleid\"><IMG 
-             SRC=".$path."../pix/t/edit.gif BORDER=0></A> $hideshow";
+    return "<a title=\"$str->delete\" href=\"$path/mod.php?delete=$moduleid\"><img 
+             src=\"$pixpath/t/delete.gif\" height=11 width=11 border=0></a>
+          <a title=\"$str->moveup\" href=\"$path/mod.php?id=$moduleid&move=-1\"><img 
+             src=\"$pixpath/t/up.gif\" height=11 width=11 border=0></a>
+          <a title=\"$str->movedown\" href=\"$path/mod.php?id=$moduleid&move=1\"><img 
+             src=\"$pixpath/t/down.gif\" height=11 width=11 border=0></a>
+          <a title=\"$str->update\" href=\"$path/mod.php?update=$moduleid\"><img 
+             src=\"$pixpath/t/edit.gif\" height=11 width=11 border=0></a> $hideshow";
 }
 
 ?>
index 3371135532c08cba262aa8966d883a02ce4036c4..aae3dce78c6cd9b89bf597199bbedad6582760b1 100644 (file)
 
 /// Print a form to search forums
       $searchform = forum_print_search_form($course, "", true);
-      $searchform = "<DIV ALIGN=\"CENTER\">$searchform</DIV>";
+      $searchform = "<div align=\"center\">$searchform</div>";
       print_side_block(get_string("search","forum"), $searchform, "", "", "", $leftwidth);
 
 /// Admin links and controls
       print_course_admin_links($course);
 
-      echo "</TD>";
+      echo "</td>";
 
-      echo "<TD WIDTH=\"*\" VALIGN=\"TOP\">";
+      echo "<td width=\"*\" valign=\"top\">";
       if ($social = forum_get_course_forum($course->id, "social")) {
           if (forum_is_subscribed($USER->id, $social->id)) {
               $subtext = get_string("unsubscribe", "forum");
           } else {
               $subtext = get_string("subscribe", "forum");
           }
-          $headertext = "<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR><TD>".get_string("socialheadline")."</TD><TD ALIGN=RIGHT><FONT SIZE=1><A HREF=\"../mod/forum/subscribe.php?id=$social->id\">$subtext</A></TD></TR></TABLE>";
+          $headertext = "<table border=0 width=100% cellpadding=0 cellspacing=0><tr><td>".get_string("socialheadline")."</td><td align=right><font size=1><a href=\"../mod/forum/subscribe.php?id=$social->id\">$subtext</a></td></tr></table>";
           print_heading_block($headertext);
-          echo "<IMG ALT=\"\" HEIGHT=7 SRC=\"../pix/spacer.gif\"><BR>";
+          echo "<img alt=\"\" height=7 src=\"../pix/spacer.gif\"><br>";
     
           forum_print_latest_discussions($social->id, 10, "plain", "", false);
 
index 94b7e4a35f189df86bcb1b221c8563e9cf3163bf..4035aff102f0b1564f85ac2e738ecd4dcc724bd7 100644 (file)
 
 
 /// Layout the whole page as three big columns.
-    echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>";
+    echo "<table border=0 cellpadding=3 cellspacing=0 width=100%>";
 
 /// The left column ...
 
-    echo "<TR VALIGN=top><TD VALIGN=top WIDTH=180>";
+    echo "<tr valign=top><td valign=top width=180>";
     
 /// Links to people
-    $moddata[]="<A TITLE=\"".get_string("listofallpeople")."\" HREF=\"../user/index.php?id=$course->id\">".get_string("participants")."</A>";
-    $modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
-    $editmyprofile = "<A TITLE=\"$USER->firstname $USER->lastname\" HREF=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</A>";
+    $moddata[]="<a title=\"".get_string("listofallpeople")."\" href=\"../user/index.php?id=$course->id\">".get_string("participants")."</a>";
+    $modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
+    $editmyprofile = "<a title=\"$USER->firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</a>";
     if ($USER->description) {
         $moddata[]= $editmyprofile;
     } else {
-        $moddata[]= $editmyprofile." <BLINK>*</BLINK>";
+        $moddata[]= $editmyprofile." <blink>*</blink>";
     }
-    $modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+    $modicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
     print_side_block(get_string("people"), "", $moddata, $modicon);
 
 
     $modicon = array();
     if ($modnamesused) {
         foreach ($modnamesused as $modname => $modfullname) {
-            $moddata[] = "<A HREF=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</A>";
-            $modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+            $moddata[] = "<a href=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</a>";
+            $modicon[] = "<img src=\"$modpixpath/$modname/icon.gif\" height=16 width=16 alt=\"\">";
         }
     }
     print_side_block($stractivities, "", $moddata, $modicon);
 
 /// Print a form to search forums
     $searchform = forum_print_search_form($course, "", true);
-    $searchform = "<DIV ALIGN=\"CENTER\">$searchform</DIV>";
+    $searchform = "<div align=\"center\">$searchform</div>";
     print_side_block(get_string("search","forum"), $searchform);
 
 /// Admin links and controls
     print_course_admin_links($course);
 
 /// Start main column
-    echo "</TD><TD WIDTH=\"*\">";
+    echo "</td><td width=\"*\">";
 
     print_heading_block(get_string("topicoutline"), "100%", "outlineheadingblock");
     print_spacer(8, 1, true);
     $thistopic = $sections[$topic];
 
     if ($thistopic->summary or $thistopic->sequence or isediting($course->id)) {
-        echo "<TR>";
-        echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading\" class=\"topicsoutlineside\" VALIGN=top WIDTH=20>&nbsp;</TD>";
-        echo "<TD VALIGN=top BGCOLOR=\"$THEME->cellcontent\" class=\"topicsoutlinecontent\" WIDTH=\"100%\">";
+        echo "<tr>";
+        echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\" valign=top width=20>&nbsp;</td>";
+        echo "<td valign=top bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontent\" width=\"100%\">";
     
         if (isediting($course->id)) {
-            $thistopic->summary .= "&nbsp;<A TITLE=\"$streditsummary\" ".
-                                     "HREF=\"editsection.php?id=$thistopic->id\"><IMG SRC=\"../pix/t/edit.gif\" ".
-                                     "BORDER=0 ALT=\"$streditsummary\"></A></P>";
+            $thistopic->summary .= "&nbsp;<a title=\"$streditsummary\" ".
+                                     "href=\"editsection.php?id=$thistopic->id\"><img src=\"$pixpath/t/edit.gif\" ".
+                                     "height=11 width=11 border=0 alt=\"$streditsummary\"></a></p>";
         }
     
         echo text_to_html($thistopic->summary);
         print_section($course, $thistopic, $mods, $modnamesused);
     
         if (isediting($course->id)) {
-            echo "<DIV ALIGN=right>";
+            echo "<div align=right>";
             popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$topic&add=", 
                         $modnames, "section$topic", "", "$stradd...", "mods", $stractivities);
-            echo "</DIV>";
+            echo "</div>";
         }
     
-        echo "</TD>";
-        echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading\" class=\"topicsoutlineside\" VALIGN=top ALIGN=CENTER WIDTH=10>&nbsp;";
-        echo "</TD>";
-        echo "</TR>";
-        echo "<TR><TD COLSPAN=3><IMG SRC=\"../pix/spacer.gif\" WIDTH=1 HEIGHT=1></TD></TR>";
+        echo "</td>";
+        echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\" valign=top align=center width=10>&nbsp;";
+        echo "</td>";
+        echo "</tr>";
+        echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
     }
 
 
             $colormain  = "bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontent\"";
         }
 
-        echo "<TR>";
-        echo "<TD NOWRAP $colorsides VALIGN=top WIDTH=20>";
-        echo "<P ALIGN=CENTER><FONT SIZE=3><B>$section</B></FONT></P>";
-        echo "</TD>";
+        echo "<tr>";
+        echo "<td nowrap $colorsides valign=top width=20>";
+        echo "<p align=center><font size=3><b>$section</b></font></p>";
+        echo "</td>";
 
-        echo "<TD VALIGN=top $colormain WIDTH=\"100%\">";
+        echo "<td valign=top $colormain width=\"100%\">";
 
         if (!empty($sections[$section])) {
             $thissection = $sections[$section];
         }
 
         if (isediting($course->id)) {
-            $thissection->summary .= "&nbsp;<A HREF=editsection.php?id=$thissection->id><IMG SRC=\"../pix/t/edit.gif\" BORDER=0 ALT=\"$streditsummary\"></A>";
+            $thissection->summary .= "&nbsp;<a href=editsection.php?id=$thissection->id><img src=\"$pixpath/t/edit.gif\" border=0 height=11 width=11 alt=\"$streditsummary\"></a>";
         }
 
         echo text_to_html($thissection->summary);
         print_section($course, $thissection, $mods, $modnamesused);
 
         if (isediting($course->id)) {
-            echo "<DIV ALIGN=right>";
+            echo "<div align=right>";
             popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=", 
                         $modnames, "section$section", "", "$stradd...", "mods", $stractivities);
-            echo "</DIV>";
+            echo "</div>";
         }
 
-        echo "</TD>";
-        echo "<TD NOWRAP $colorsides VALIGN=top ALIGN=CENTER WIDTH=10>";
-        echo "<FONT SIZE=1>";
+        echo "</td>";
+        echo "<td nowrap $colorsides valign=top align=center width=10>";
+        echo "<font size=1>";
         if (isset($USER->topic)) {
             $strshowalltopics = get_string("showalltopics");
-            echo "<A HREF=\"view.php?id=$course->id&topic=all\" TITLE=\"$strshowalltopics\"><IMG SRC=../pix/i/all.gif BORDER=0></A><BR><BR>";
+            echo "<a href=\"view.php?id=$course->id&topic=all\" title=\"$strshowalltopics\"><img src=\"$pixpath/i/all.gif\" height=25 width=16 border=0></a><br><br>";
         } else {
             $strshowonlytopic = get_string("showonlytopic", "", $section);
-            echo "<A HREF=\"view.php?id=$course->id&topic=$section\" TITLE=\"$strshowonlytopic\"><IMG SRC=../pix/i/one.gif BORDER=0></A><BR><BR>";
+            echo "<a href=\"view.php?id=$course->id&topic=$section\" title=\"$strshowonlytopic\"><img src=\"$pixpath/i/one.gif\" height=16 width=16 border=0></a><br><br>";
         }
         if (isediting($course->id) and $course->marker != $section) {
             $strmarkthistopic = get_string("markthistopic");
-            echo "<A HREF=\"view.php?id=$course->id&marker=$section\" TITLE=\"$strmarkthistopic\"><IMG SRC=../pix/i/marker.gif BORDER=0></A><BR><BR>";
+            echo "<a href=\"view.php?id=$course->id&marker=$section\" title=\"$strmarkthistopic\"><img src=\"$pixpath/i/marker.gif\" height=16 width=16 border=0></a><br><br>";
         }
-        echo "</TD>";
-        echo "</TR>";
-        echo "<TR><TD COLSPAN=3><IMG SRC=\"../pix/spacer.gif\" WIDTH=1 HEIGHT=1></TD></TR>";
+        echo "</td>";
+        echo "</tr>";
+        echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
 
         $section++;
     }
-    echo "</TABLE>";
+    echo "</table>";
     
 
     if ($news or $course->showrecent) {
-        echo "</TD><TD WIDTH=210>";
+        echo "</td><td width=210>";
 
         /// Print all the news items.
 
         if ($news) {
             print_side_block_start(get_string("latestnews"), 210, "sideblocklatestnews");
-            echo "<FONT SIZE=\"-2\">";
+            echo "<font size=\"-2\">";
             forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "", false);
-            echo "</FONT>";
+            echo "</font>";
             print_side_block_end();
         }
         
         print_spacer(1, 120, true);
     }
 
-    echo "</TD></TR></TABLE>\n";
+    echo "</td></tr></table>\n";
 
 ?>
index fa5b47db4157cf9d736d0ccf6994596d8ad89fc9..75808f865ee4620b85912528a86f7785740b6173 100644 (file)
         redirect("$CFG->wwwroot/");
     }
 
+    if (empty($THEME->custompix)) {
+        $pixpath = "../pix";
+        $modpixpath = "../mod";
+    } else {
+        $pixpath = "../theme/$CFG->theme/pix";
+        $modpixpath = "../theme/$CFG->theme/pix/mod";
+    }
 
     $courseword = get_string("course");
 
index 9c8bc360823b043db86084ecb9259780db897066..5a2c34c255d97c0e2baa8be676756123bc62e7c2 100644 (file)
 
 
 /// Layout the whole page as three big columns.
-    echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>";
+    echo "<table border=0 cellpadding=3 cellspacing=0 width=100%>";
 
 /// The left column ...
 
-    echo "<TR VALIGN=top><TD VALIGN=top WIDTH=180>";
+    echo "<tr valign=top><td valign=top width=180>";
 
 /// Links to people
-    $moddata[]="<A TITLE=\"".get_string("listofallpeople")."\" HREF=\"../user/index.php?id=$course->id\">".get_string("participants")."</A>";
-    $modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
-    $editmyprofile = "<A TITLE=\"$USER->firstname $USER->lastname\" HREF=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</A>";
+    $moddata[]="<a title=\"".get_string("listofallpeople")."\" href=\"../user/index.php?id=$course->id\">".get_string("participants")."</a>";
+    $modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
+    $editmyprofile = "<a title=\"$USER->firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</a>";
     if ($USER->description) {
         $moddata[]= $editmyprofile;
     } else {
-        $moddata[]= $editmyprofile." <BLINK>*</BLINK>";
+        $moddata[]= $editmyprofile." <blink>*</blink>";
     }
-    $modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+    $modicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
     print_side_block(get_string("people"), "", $moddata, $modicon);
 
 
@@ -47,8 +47,8 @@
     $modicon = array();
     if ($modnamesused) {
         foreach ($modnamesused as $modname => $modfullname) {
-            $moddata[] = "<A HREF=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</A>";
-            $modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+            $moddata[] = "<a href=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</a>";
+            $modicon[] = "<img src=\"$modpixpath/$modname/icon.gif\" height=16 width=16 alt=\"\">";
         }
     }
     print_side_block($stractivities, "", $moddata, $modicon);
     $thisweek = $sections[$week];
 
     if ($thisweek->summary or $thisweek->sequence or isediting($course->id)) {
-        echo "<TR>";
-        echo "<TD NOWRAP BGCOLOR=\"$THEME->cellheading\" class=\"weeklyoutlineside\" VALIGN=top WIDTH=20>&nbsp;</TD>";
-        echo "<TD VALIGN=top BGCOLOR=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\" WIDTH=\"100%\">";
+        echo "<tr>";
+        echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=top width=20>&nbsp;</td>";
+        echo "<td valign=top bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\" width=\"100%\">";
 
         if (isediting($course->id)) {
-            $thisweek->summary .= "&nbsp;<A TITLE=\"$streditsummary\" ".
-                                  "HREF=\"editsection.php?id=$thisweek->id\"><IMG SRC=\"../pix/t/edit.gif\" ".
-                                  "BORDER=0 ALT=\"$streditsummary\"></A></P>";
+            $thisweek->summary .= "&nbsp;<a title=\"$streditsummary\" ".
+                                  "href=\"editsection.php?id=$thisweek->id\"><img height=11 width=11 src=\"$pixpath/t/edit.gif\" ".
+                                  "border=0 alt=\"$streditsummary\"></a></p>";
         }
     
         echo text_to_html($thisweek->summary);
         print_section($course, $thisweek, $mods, $modnamesused);
 
         if (isediting($course->id)) {
-            echo "<DIV ALIGN=right>";
+            echo "<div align=right>";
             popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$week&add=", 
                         $modnames, "section$week", "", "$stradd...", "mods", $stractivities);
-            echo "</DIV>";
+            echo "</div>";
         }
 
         echo "</TD>";
             $colormain  = "bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\"";
         }
 
-        echo "<TR>";
-        echo "<TD NOWRAP $colorsides VALIGN=top WIDTH=20>";
-        echo "<P ALIGN=CENTER><FONT SIZE=3><B>$week</B></FONT></P>";
-        echo "</TD>";
+        echo "<tr>";
+        echo "<td nowrap $colorsides valign=top width=20>";
+        echo "<p align=center><font size=3><b>$week</b></font></p>";
+        echo "</td>";
 
-        echo "<TD $colormain VALIGN=top WIDTH=\"100%\">";
-        echo "<P><FONT SIZE=3 COLOR=\"$THEME->cellheading2\">$weekday - $endweekday</FONT></P>";
+        echo "<td $colormain valign=top width=\"100%\">";
+        echo "<p><font size=3 color=\"$THEME->cellheading2\">$weekday - $endweekday</font></p>";
 
         if (!empty($sections[$week])) {
             $thisweek = $sections[$week];
         }
 
         if (isediting($course->id)) {
-            $thisweek->summary .= "&nbsp;<A TITLE=\"$streditsummary\" HREF=\"editsection.php?id=$thisweek->id\"><IMG SRC=\"../pix/t/edit.gif\" BORDER=0 ALT=\"$streditsummary\"></A></P>";
+            $thisweek->summary .= "&nbsp;<a title=\"$streditsummary\" href=\"editsection.php?id=$thisweek->id\"><img src=\"$pixpath/t/edit.gif\" height=11 width=11 border=0 alt=\"$streditsummary\"></a></p>";
         }
 
         echo text_to_html($thisweek->summary);
         print_section($course, $thisweek, $mods, $modnamesused);
 
         if (isediting($course->id)) {
-            echo "<DIV ALIGN=right>";
+            echo "<div align=right>";
             popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$week&add=", 
                         $modnames, "section$week", "", "$stradd...");
-            echo "</DIV>";
+            echo "</div>";
         }
 
-        echo "</TD>";
-        echo "<TD NOWRAP $colorsides VALIGN=top ALIGN=CENTER WIDTH=10>";
-        echo "<FONT SIZE=1>";
+        echo "</td>";
+        echo "<td nowrap $colorsides valign=top align=center width=10>";
+        echo "<font size=1>";
         if (isset($USER->section)) {
             $strshowallweeks = get_string("showallweeks");
-            echo "<A HREF=\"view.php?id=$course->id&week=all\" TITLE=\"$strshowallweeks\"><IMG SRC=../pix/i/all.gif BORDER=0></A></FONT>";
+            echo "<a href=\"view.php?id=$course->id&week=all\" title=\"$strshowallweeks\"><img src=\"$pixpath/i/all.gif\" height=25 width=16 border=0></a></font>";
         } else {
             $strshowonlyweek = get_string("showonlyweek", "", $week);
-            echo "<A HREF=\"view.php?id=$course->id&week=$week\" TITLE=\"$strshowonlyweek\"><IMG SRC=../pix/i/one.gif BORDER=0></A></FONT>";
+            echo "<a href=\"view.php?id=$course->id&week=$week\" title=\"$strshowonlyweek\"><img src=\"$pixpath/i/one.gif\" height=16 width=16 border=0></a></font>";
         }
-        echo "</TD>";
-        echo "</TR>";
-        echo "<TR><TD COLSPAN=3><IMG SRC=\"../pix/spacer.gif\" WIDTH=1 HEIGHT=1></TD></TR>";
+        echo "</td>";
+        echo "</tr>";
+        echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
 
         $week++;
         $weekdate = $nextweekdate;
     }
-    echo "</TABLE>";
+    echo "</table>";
     
     if (!empty($news) or !empty($course->showrecent)) {
-        echo "</TD><TD WIDTH=210>";
+        echo "</td><td width=210>";
 
         // Print all the news items.
 
         if (!empty($news)) {
             print_side_block_start(get_string("latestnews"), 210, "sideblocklatestnews");
-            echo "<FONT SIZE=\"-2\">";
+            echo "<font size=\"-2\">";
             forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "", false);
-            echo "</FONT>";
+            echo "</font>";
             print_side_block_end();
         }
         
         print_spacer(1, 120, true);
     }
 
-    echo "</TD></TR></TABLE>\n";
+    echo "</td></tr></table>\n";
 
 ?>
index 4e183891f2e69c7323dfc10adac38e15150e1d7f..e75b283b47ceeb92d5b688a6a70ac6c040d0bb05 100755 (executable)
Binary files a/files/pix/folder.gif and b/files/pix/folder.gif differ
index 73a44bf8c118ff11a43c837b656b63e360ebd86d..f0bddcb9a6ad47f934279a1ad059a68f340e492f 100644 (file)
@@ -1108,17 +1108,23 @@ function helpbutton ($page, $title="", $module="moodle", $image=true, $linktext=
     // $image = use a help image for the link?  (true/false/"both")
     // $text = if defined then this text is used in the page, and 
     //         the $page variable is ignored.
-    global $CFG;
+    global $CFG, $THEME;
 
     if ($module == "") {
         $module = "moodle";
     }
 
+    if (empty($THEME->custompix)) {
+        $icon = "$CFG->wwwroot/pix/help.gif";
+    } else {
+        $icon = "$CFG->wwwroot/theme/$CFG->theme/pix/help.gif";
+    }
+
     if ($image) {
         if ($linktext) {
-            $linkobject = "$title<IMG align=\"absmiddle\" BORDER=0 HEIGHT=17 WIDTH=22 ALT=\"\" SRC=\"$CFG->wwwroot/pix/help.gif\">";
+            $linkobject = "$title<img align=\"absmiddle\" border=0 height=17 width=22 alt=\"\" src=\"$icon\">";
         } else {
-            $linkobject = "<IMG align=\"absmiddle\" BORDER=0 HEIGHT=17 WIDTH=22 ALT=\"$title\" SRC=\"$CFG->wwwroot/pix/help.gif\">";
+            $linkobject = "<img align=\"absmiddle\" border=0 height=17 width=22 alt=\"$title\" src=\"$icon\">";
         }
     } else {
         $linkobject = $title;
similarity index 100%
rename from files/pix/files.gif
rename to pix/i/files.gif
similarity index 100%
rename from pix/t/search.gif
rename to pix/i/search.gif
index fef6b39e7085ef549124a5ee79591a32d3e94ee2..83fd604c592095027f168e97b962c6f05abd669d 100644 (file)
Binary files a/pix/t/delete.gif and b/pix/t/delete.gif differ
index 693c3749f6dc40d81f05265c5ea43eb7feb99bf0..f270157d1cf918eecff381e381b341022261fdd1 100644 (file)
Binary files a/pix/t/down.gif and b/pix/t/down.gif differ
index e19239533dcb742f897df1f6a9186ec704745ff2..af71778efea08944a8a5d2d04a2f39b3453ee87f 100644 (file)
Binary files a/pix/t/edit.gif and b/pix/t/edit.gif differ
index f2092f26832c5c5acf74f7cd8ba9d75bf148f3a0..fa4b4facdd11251acd1474a5a0cf321b0e78747c 100644 (file)
Binary files a/pix/t/hide.gif and b/pix/t/hide.gif differ
index 9772fb29e34ed1164fd76bd15651d3290566c728..08201d453f75d01c035b3e6eea2f7033eb58c705 100755 (executable)
Binary files a/pix/t/left.gif and b/pix/t/left.gif differ
index 55cdd1f4f7796ad41aa07f56c98d3723f8975a52..52e52c2e10fa6fda6ea2b15e33da32df2f8f00a4 100755 (executable)
Binary files a/pix/t/right.gif and b/pix/t/right.gif differ
index 8a2e50b24f44cfaa198b396d33892e520fbf4d50..bb598399b3450ce77c75de83724d9d756e80131d 100644 (file)
Binary files a/pix/t/show.gif and b/pix/t/show.gif differ
index 6de0cf15c07a8d33de56dea3eeceb08693ca185a..2056b6e6ac0a0047ef503f4929dccc9d66cb9a8e 100644 (file)
Binary files a/pix/t/up.gif and b/pix/t/up.gif differ
index eda612a762c4ee9ab26cd8714d2176572ae8be3f..b92f058b654f30acbfdff933c60c7559d2e6d1e4 100644 (file)
         $dsort = "u.$sort";
     }
 
-    if ($students = get_course_students($course->id, "$dsort $dir")) {
+    if (!$showall) {
+        $limit = "LIMIT ".USER_LARGE_CLASS;
+    } else {
+        $limit = "";
+    }
+
+    if ($students = get_course_students($course->id, "$dsort $dir $limit")) {
         $numstudents = count($students);
         echo "<h2 align=center>$numstudents $course->students</h2>";
-        if ($numstudents < $USER_SMALL_CLASS) {
+        if ($numstudents < USER_SMALL_CLASS) {
             foreach ($students as $student) {
                 print_user($student, $course, $string);
             }
             $table->cellpadding = 2;
             $table->cellspacing = 0;
             
-            $count = 0;
             foreach ($students as $student) {
-                $count++;
-                if (!$showall and $count > $USER_LARGE_CLASS) {
-                    break;
-                }
+
                 if ($student->lastaccess) {
                     $lastaccess = format_time(time() - $student->lastaccess, $string);
                 } else {
                     $lastaccess = $string->never;
                 }
 
-                if ($showall and $numstudents > $USER_LARGE_CLASS) {  // Don't show pictures
+                if ($showall and $numstudents > USER_LARGE_CLASS) {  // Don't show pictures
                     $picture = "";
                 } else {
                     $picture = print_user_picture($student->id, $course->id, $student->picture, false, true);
             }
             print_table($table);
 
-            if ($numstudents > $USER_LARGE_CLASS and !$showall) {
-                $moreinfo->count  = $USER_LARGE_CLASS;
+            if ($numstudents == USER_LARGE_CLASS and !$showall) {
+                $numstudents = count_records("user_students", "course", $course->id);
+                $moreinfo->count  = USER_LARGE_CLASS;
                 $moreinfo->things = strtolower($course->students);
                 echo "<center><p>".get_string("displayingfirst", "", $moreinfo);
                 echo " (<a href=\"index.php?id=$course->id&sort=$sort&dir=$dir&showall=1\">".get_string("showall", "", $numstudents)."</a>)";
index 4f25cc7c2635c6b487b8e5b5f8d058089c09e8a6..4f54d4b4af09fbe7d3041352b02a7d460290aeba 100644 (file)
@@ -1,8 +1,7 @@
 <?PHP  // $Id$
 
-$USER_SMALL_CLASS = 20;   // Below this is considered small
-$USER_LARGE_CLASS = 200;  // Above this is considered large
-$USER_HUGE_CLASS  = 500;  // Above this is considered too many to display
+define('USER_SMALL_CLASS', 20);   // Below this is considered small
+define('USER_LARGE_CLASS', 200);  // Above this is considered large
 
 /// FUNCTIONS ///////////////////////////////////////////////////////////
 
diff --git a/user/user.gif b/user/user.gif
deleted file mode 100755 (executable)
index 33b256e..0000000
Binary files a/user/user.gif and /dev/null differ
diff --git a/user/users.gif b/user/users.gif
deleted file mode 100755 (executable)
index 2873352..0000000
Binary files a/user/users.gif and /dev/null differ