]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url
authortjhunt <tjhunt>
Thu, 2 Jul 2009 10:53:31 +0000 (10:53 +0000)
committertjhunt <tjhunt>
Thu, 2 Jul 2009 10:53:31 +0000 (10:53 +0000)
28 files changed:
admin/blocks.php
admin/lang.php
admin/roles/usersroles.php
blocks/admin/block_admin.php
blocks/admin_tree/block_admin_tree.php
blocks/course_list/block_course_list.php
blocks/loancalc/block_loancalc.php
blocks/messages/block_messages.php
blocks/moodleblock.class.php
blocks/online_users/block_online_users.php
blocks/participants/block_participants.php
blocks/site_main_menu/block_site_main_menu.php
blocks/social_activities/block_social_activities.php
blog/rsslib.php
calendar/lib.php
calendar/view.php
course/category.php
course/format/topics/format.php
course/format/weeks/format.php
course/index.php
course/lib.php
course/pending.php
course/search.php
enrol/manual/enrol.php
files/draftfiles.php
files/index.php
grade/edit/tree/lib.php
grade/lib.php

index aa5a0c3078fe7244e3c7215a6700543e5c7d3959..a34f89079b122a0a849b2f74609e127b845c8a7e 100644 (file)
 
         if ($blocks[$blockid]->visible) {
             $visible = '<a href="blocks.php?hide='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strhide.'">'.
-                       '<img src="'.$CFG->pixpath.'/i/hide.gif" class="icon" alt="'.$strhide.'" /></a>';
+                       '<img src="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon" alt="'.$strhide.'" /></a>';
         } else {
             $visible = '<a href="blocks.php?show='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strshow.'">'.
-                       '<img src="'.$CFG->pixpath.'/i/show.gif" class="icon" alt="'.$strshow.'" /></a>';
+                       '<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon" alt="'.$strshow.'" /></a>';
             $class = ' class="dimmed_text"'; // Leading space required!
         }
         if ($blockobject->instance_allow_multiple()) {
index 1a5c68a32b39ee0002df953c03ec26971876675f..c6142f6601e66250a9f2c3128517394ef7920bb2 100644 (file)
                     if (LANG_DISPLAY_MISSING_LINKS) {
                         $missingtarget = '<a name="missing'.$missingcounter.'"></a>';
                         $missingnext = '<a href="#missing'.($missingcounter+1).'">'.
-                        '<img src="' . $CFG->pixpath . '/t/down.gif" class="iconsmall" alt="'.$strnext.'" /></a>';
+                        '<img src="' . $OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
                         $missingprev = '<a href="#missing'.($missingcounter-1).'">'.
-                        '<img src="' . $CFG->pixpath . '/t/up.gif" class="iconsmall" alt="'.$strprev.'" /></a>';
+                        '<img src="' . $OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
                     }
                 } else {
                     // the string is translated in the pack being processed
                         if (LANG_DISPLAY_MISSING_LINKS) {
                             $missingtarget = '<a name="missing'.$missingcounter.'"></a>';
                             $missingnext = '<a href="#missing'.($missingcounter+1).'">'.
-                            '<img src="' . $CFG->pixpath . '/t/down.gif" class="iconsmall" alt="'.$strnext.'" /></a>';
+                            '<img src="' . $OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
                             $missingprev = '<a href="#missing'.($missingcounter-1).'">'.
-                            '<img src="' . $CFG->pixpath . '/t/up.gif" class="iconsmall" alt="'.$strprev.'" /></a>';
+                            '<img src="' . $OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
                         }
                     }
                 }
index 2859e7a77c7481320d9c3adcd10f8252d72136aa..60c7290c7df0da66a7551209e20646c6b7ec9db7 100644 (file)
@@ -159,7 +159,7 @@ print_box_end();
 print_footer($course);
 
 function print_report_tree($contextid, $contexts, $systemcontext, $fullname) {
-    global $CFG;
+    global $CFG, $OUTPUT;
 
     // Only compute lang strings, etc once.
     static $stredit = null, $strcheckpermissions, $globalroleassigner, $assignurl, $checkurl;
@@ -207,9 +207,9 @@ function print_report_tree($contextid, $contexts, $systemcontext, $fullname) {
                 $strcheck = get_string('checkuserspermissionshere', 'role', $a);
             }
             echo ' <a title="' . $strgoto . '" href="' . $raurl . '"><img class="iconsmall" src="' .
-                    $CFG->pixpath . '/t/edit.gif" alt="' . $stredit . '" /></a> ';
+                    $OUTPUT->old_icon_url('t/edit') . '" alt="' . $stredit . '" /></a> ';
             echo ' <a title="' . $strcheck . '" href="' . $churl . '"><img class="iconsmall" src="' .
-                    $CFG->pixpath . '/t/preview.gif" alt="' . $strcheckpermissions . '" /></a> ';
+                    $OUTPUT->old_icon_url('t/preview') . '" alt="' . $strcheckpermissions . '" /></a> ';
             echo "</p>\n";
         }
     }
index 5432733a98972508384585143d3af605bb4d5314..9b0cddfc93b26e8005a97b4261ab5b69eac10250 100644 (file)
@@ -7,7 +7,7 @@ class block_admin extends block_list {
     }
 
     function get_content() {
-        global $CFG, $USER, $DB;
+        global $CFG, $USER, $DB, $OUTPUT;
 
         if ($this->content !== NULL) {
             return $this->content;
@@ -33,7 +33,7 @@ class block_admin extends block_list {
 
     /// Course editing on/off
         if ($course->id !== SITEID and has_capability('moodle/course:update', $context)) {
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/edit.gif" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/edit') . '" class="icon" alt="" />';
             if ($this->page->user_is_editing()) {
                 $this->content->items[]='<a href="view.php?id='.$course->id.'&amp;edit=off&amp;sesskey='.sesskey().'">'.get_string('turneditingoff').'</a>';
             } else {
@@ -41,17 +41,17 @@ class block_admin extends block_list {
             }
 
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/course/edit.php?id='.$course->id.'">'.get_string('settings').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/settings.gif" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/settings') . '" class="icon" alt="" />';
         }
 
     /// Assign roles to the course
         if ($course->id != SITEID) {
             if (has_capability('moodle/role:assign', $context)) {
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">'.get_string('assignroles', 'role').'</a>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/roles.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="icon" alt="" />';
             } else if (get_overridable_roles($context, ROLENAME_ORIGINAL)) {
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$context->id.'">'.get_string('overridepermissions', 'role').'</a>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/roles.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="icon" alt="" />';
             }
         }
 
@@ -76,7 +76,7 @@ class block_admin extends block_list {
 
             if ($reportavailable) {
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/report/index.php?id='.$course->id.'">'.get_string('grades').'</a>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/grades') . '" class="icon" alt="" />';
             }
         }
 
@@ -84,7 +84,7 @@ class block_admin extends block_list {
         if (!empty($CFG->enableoutcomes)) {
             if ($course->id!==SITEID and has_capability('moodle/course:update', $context)) {
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/edit/outcome/course.php?id='.$course->id.'">'.get_string('outcomes', 'grades').'</a>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/outcomes.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/outcomes') . '" class="icon" alt="" />';
             }
         }
 
@@ -93,11 +93,11 @@ class block_admin extends block_list {
             if (has_capability('moodle/course:managemetacourse', $context)) {
                 $strchildcourses = get_string('childcourses');
                 $this->content->items[]='<a href="importstudents.php?id='.$course->id.'">'.$strchildcourses.'</a>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/course.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/course') . '" class="icon" alt="" />';
             } else if (has_capability('moodle/role:assign', $context)) {
                 $strchildcourses = get_string('childcourses');
                 $this->content->items[]='<span class="dimmed_text">'.$strchildcourses.'</span>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/course.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/course') . '" class="icon" alt="" />';
             }
         }
 
@@ -106,37 +106,37 @@ class block_admin extends block_list {
         if (($course->id!==SITEID) && ($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $context)) {
             $strgroups = get_string('groups');
             $this->content->items[]='<a title="'.$strgroups.'" href="'.$CFG->wwwroot.'/group/index.php?id='.$course->id.'">'.$strgroups.'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/group.gif" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/group') . '" class="icon" alt="" />';
         }
 
     /// Backup this course
         if ($course->id!==SITEID and has_capability('moodle/site:backup', $context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/backup/backup.php?id='.$course->id.'">'.get_string('backup').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/backup.gif" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/backup') . '" class="icon" alt="" />';
         }
 
     /// Restore to this course
         if ($course->id !== SITEID and has_capability('moodle/site:restore', $context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$course->id.'&amp;wdir=/backupdata">'.get_string('restore').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/restore.gif" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/restore') . '" class="icon" alt="" />';
         }
 
     /// Import data from other courses
         if ($course->id !== SITEID and has_capability('moodle/site:import', $context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/course/import.php?id='.$course->id.'">'.get_string('import').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/restore.gif" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/restore') . '" class="icon" alt="" />';
         }
 
     /// Reset this course
         if ($course->id!==SITEID and has_capability('moodle/course:reset', $context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/course/reset.php?id='.$course->id.'">'.get_string('reset').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/return.gif" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/return') . '" class="icon" alt="" />';
         }
 
     /// View course reports
         if ($course->id !== SITEID and has_capability('moodle/site:viewreports', $context)) { // basic capability for listing of reports
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/course/report.php?id='.$course->id.'">'.get_string('reports').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/stats.gif" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/stats') . '" class="icon" alt="" />';
         }
 
     /// Manage questions
@@ -162,7 +162,7 @@ class block_admin extends block_list {
             if ($questionlink) {
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/question/'.$questionlink.
                         '?courseid='.$course->id.'">'.get_string('questions', 'quiz').'</a>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/questions.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/questions') . '" class="icon" alt="" />';
             }
         }
 
@@ -171,13 +171,13 @@ class block_admin extends block_list {
         $editabletypes = repository::get_editable_types($context);
         if ($course->id !== SITEID && has_capability('moodle/course:update', $context) && !empty($editabletypes)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/repository/manage_instances.php?contextid='.$context->id.'">'.get_string('repositories').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/repository.png" alt=""/>';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/repository') . '" alt=""/>';
         }
 
     /// Manage files
         if ($course->id !== SITEID and has_capability('moodle/course:managefiles', $context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$course->id.'">'.get_string('files').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/files.gif" class="icon" alt=""/>';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/files') . '" class="icon" alt=""/>';
         }
 
     /// Authorize hooks
@@ -190,24 +190,24 @@ class block_admin extends block_list {
                 }
             }
             $this->content->items[] = $paymenturl;
-            $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" class="icon" alt="" />';
+            $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('i/payment') . '" class="icon" alt="" />';
         }
 
     /// Unenrol link
         if (empty($course->metacourse) && ($course->id!==SITEID)) {
             if (has_capability('moodle/legacy:guest', $context, NULL, false)) {   // Are a guest now
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/course/enrol.php?id='.$course->id.'">'.get_string('enrolme', '', format_string($course->shortname)).'</a>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/user') . '" class="icon" alt="" />';
             } else if (has_capability('moodle/role:unassignself', $context, NULL, false) and get_user_roles($context, $USER->id, false)) {  // Have some role
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/course/unenrol.php?id='.$course->id.'">'.get_string('unenrolme', '', format_string($course->shortname)).'</a>';
-                $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/user') . '" class="icon" alt="" />';
             }
         }
 
     /// Link to the user own profile (except guests)
         if (!isguestuser() and isloggedin()) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&amp;course='.$course->id.'">'.get_string('profile').'</a>';
-            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/user') . '" alt="" />';
         }
 
         return $this->content;
index 79551eb24a4c38b949c6eca19e31fd7daf2d24b9..c6aee6266ee10f6ea042d57d460e0d9cdda720bd 100644 (file)
@@ -33,11 +33,11 @@ class block_admin_tree extends block_base {
     }
 
     function open_folder($visiblename) {
-        global $CFG;
+        global $OUTPUT;
         $strfolderopened = s(get_string('folderopened'));
 
         $this->tempcontent .= '<div class="depth'.$this->currentdepth.'"><a name="d'.$this->divcounter.'">';
-        $this->tempcontent .= '<img id="vh_div'.$this->divcounter.'indicator" src="'.$CFG->pixpath.'/i/open.gif" alt="'.$strfolderopened.'" /> ';
+        $this->tempcontent .= '<img id="vh_div'.$this->divcounter.'indicator" src="'.$OUTPUT->old_icon_url('i/open') . '" alt="'.$strfolderopened.'" /> ';
         $this->tempcontent .= $visiblename.'</a></div><div id="vh_div'.$this->divcounter.'">'."\n";
         $this->currentdepth++;
         $this->divcounter++;
@@ -55,7 +55,7 @@ class block_admin_tree extends block_base {
     }
 
     function build_tree (&$content) {
-        global $CFG;
+        global $CFG, $OUTPUT;
         if ($content instanceof admin_settingpage) {
             // show hidden pages in tree if hidden page active
             if ($content->check_access() and (($content->name == $this->section) or !$content->is_hidden())) {
@@ -63,7 +63,7 @@ class block_admin_tree extends block_base {
                 if ($content->is_hidden()) {
                     $class .= ' hidden';
                 }
-                $this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$CFG->pixpath.'/i/item.gif', $class);
+                $this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$OUTPUT->old_icon_url('i/item'), $class);
             }
         } else if ($content instanceof admin_externalpage) {
             // show hidden pages in tree if hidden page active
@@ -77,7 +77,7 @@ class block_admin_tree extends block_base {
                 if ($content->is_hidden()) {
                     $class .= ' hidden';
                 }
-                $this->create_item($content->visiblename, $content->url, $CFG->pixpath.'/i/item.gif', $class);
+                $this->create_item($content->visiblename, $content->url, $OUTPUT->old_icon_url('i/item'), $class);
             }
         } else if ($content instanceof admin_category) {
             if ($content->check_access() and !$content->is_hidden()) {
index c3f66127048dbf260ca52b6ad82f1b52bb265b29..1099800cffc4aff8b0c4c70eb9b248ea7b8c4324 100644 (file)
@@ -109,14 +109,14 @@ class block_course_list extends block_list {
     }
 
     function get_remote_courses() {
-        global $CFG, $USER;
+        global $CFG, $USER, $OUTPUT;
 
         if (!is_enabled_auth('mnet')) {
             // no need to query anything remote related
             return;
         }
 
-        $icon  = '<img src="'.$CFG->pixpath.'/i/mnethost.gif" class="icon" alt="'.get_string('course').'" />';
+        $icon  = '<img src="'.$OUTPUT->old_icon_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
 
         // only for logged in users!
         if (!isloggedin() || isguest()) {
index 7018725e742e2fad0b6c0971c68a7897f55ba959..95f28e9c88d1f30d4d760fbacc2da5dd1ae6336d 100644 (file)
@@ -9,9 +9,9 @@ class block_loancalc extends block_base {
     }
 
     function get_content() {
-        global $CFG;
+        global $CFG, $OUTPUT;
 
-        $calc = $CFG->pixpath.'/i/calc.gif';
+        $calc = $OUTPUT->old_icon_url('i/calc');
         
         $this->content->text = '
         <script type="text/javascript">
index 9304276f1822ecc81e0c07012aaff69dfe092209..7e54676b504c0e50a38bc232dae9bad00c2836a0 100644 (file)
@@ -7,7 +7,7 @@ class block_messages extends block_base {
     }
 
     function get_content() {
-        global $USER, $CFG, $DB;
+        global $USER, $CFG, $DB, $OUTPUT;
 
         if (!$CFG->messaging) {
             return ''; 
@@ -43,7 +43,7 @@ class block_messages extends block_base {
                 $this->content->text .= '<li class="listentry"><div class="user"><a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.SITEID.'" title="'.$timeago.'">';
                 $this->content->text .= print_user_picture($user, SITEID, $user->picture, 0, true, false, '', false);
                 $this->content->text .= fullname($user).'</a></div>';
-                $this->content->text .= '<div class="message"><a href="'.$CFG->wwwroot.'/message/discussion.php?id='.$user->id.'" onclick="this.target=\'message_'.$user->id.'\'; return openpopup(\'/message/discussion.php?id='.$user->id.'\', \'message_'.$user->id.'\', \'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\', 0);"><img class="iconsmall" src="'.$CFG->pixpath.'/t/message.gif" alt="" />&nbsp;'.$user->count.'</a>';
+                $this->content->text .= '<div class="message"><a href="'.$CFG->wwwroot.'/message/discussion.php?id='.$user->id.'" onclick="this.target=\'message_'.$user->id.'\'; return openpopup(\'/message/discussion.php?id='.$user->id.'\', \'message_'.$user->id.'\', \'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\', 0);"><img class="iconsmall" src="'.$OUTPUT->old_icon_url('t/message') . '" alt="" />&nbsp;'.$user->count.'</a>';
                 $this->content->text .= '</div></li>';
             }
             $this->content->text .= '</ul>'; 
index 72e4eec81b9b7c62ebf50e4c9432a6b0df7e0725..2eff44e1353caa7d5cf9222e6dfb1d56542f2821 100644 (file)
@@ -367,7 +367,7 @@ class block_base {
 
 
     function _title_html() {
-        global $CFG;
+        global $OUTPUT;
 
         //Accessibility: validation, can't have <div> inside <h2>, use <span>.
         $title = '<div class="title">';
@@ -377,7 +377,7 @@ class block_base {
             //Theme the buttons using, Admin - Miscellaneous - smartpix.
             $strshow = addslashes_js(get_string('showblocka', 'access', strip_tags($this->title)));
             $strhide = addslashes_js(get_string('hideblocka', 'access', strip_tags($this->title)));
-            $title .= '<input type="image" src="'.$CFG->pixpath.'/t/switch_minus.gif" '. 
+            $title .= '<input type="image" src="'.$OUTPUT->old_icon_url('t/switch_minus') . '" '. 
                 'id="togglehide_inst'.$this->instance->id.'" '.
                 'onclick="elementToggleHide(this, true, function(el) {'.
                 'return findParentNode(el, \'DIV\', \'sideblock\'); },'.
@@ -405,7 +405,7 @@ class block_base {
      * @todo complete documenting this function. Define $options.
      */
     function _add_edit_controls($options) {
-        global $CFG, $USER;
+        global $CFG, $USER, $OUTPUT;
 
         // TODO - temporary hack to get the block context only if it already exists.
         global $DB;
@@ -458,7 +458,7 @@ class block_base {
         $script = $page->url->out(false, array('instanceid' => $this->instance->id, 'sesskey' => sesskey()));
 
         $movebuttons .= '<a class="icon roles" title="'. $this->str->assignroles .'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">' .
-                        '<img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$this->str->assignroles.'" /></a>';
+                        '<img src="'.$OUTPUT->old_icon_url('i/roles') . '" alt="'.$this->str->assignroles.'" /></a>';
 
         // TODO MDL-19010 fix and re-enable.
         if (false && $this->user_can_edit()) {
@@ -468,12 +468,12 @@ class block_base {
 
         if ($options & BLOCK_CONFIGURE && $this->user_can_edit()) {
             $movebuttons .= '<a class="icon edit" title="'. $this->str->configure .'" href="'.$script.'&amp;blockaction=config">' .
-                            '<img src="'. $CFG->pixpath .'/t/edit.gif" alt="'. $this->str->configure .'" /></a>';
+                            '<img src="'. $OUTPUT->old_icon_url('t/edit') . '" alt="'. $this->str->configure .'" /></a>';
         }
 
         if ($this->user_can_addto($page)) {
             $movebuttons .= '<a class="icon delete" title="'. $this->str->delete .'" href="'.$script.'&amp;blockaction=delete">' .
-                            '<img src="'. $CFG->pixpath .'/t/delete.gif" alt="'. $this->str->delete .'" /></a>';
+                            '<img src="'. $OUTPUT->old_icon_url('t/delete') . '" alt="'. $this->str->delete .'" /></a>';
         }
 
         if ($options & BLOCK_MOVE_LEFT) {
@@ -482,11 +482,11 @@ class block_base {
         }
         if ($options & BLOCK_MOVE_UP) {
             $movebuttons .= '<a class="icon up" title="'. $this->str->moveup .'" href="'.$script.'&amp;blockaction=moveup">' .
-                            '<img src="'. $CFG->pixpath .'/t/up.gif" alt="'. $this->str->moveup .'" /></a>';
+                            '<img src="'. $OUTPUT->old_icon_url('t/up') . '" alt="'. $this->str->moveup .'" /></a>';
         }
         if ($options & BLOCK_MOVE_DOWN) {
             $movebuttons .= '<a class="icon down" title="'. $this->str->movedown .'" href="'.$script.'&amp;blockaction=movedown">' .
-                            '<img src="'. $CFG->pixpath .'/t/down.gif" alt="'. $this->str->movedown .'" /></a>';
+                            '<img src="'. $OUTPUT->old_icon_url('t/down') . '" alt="'. $this->str->movedown .'" /></a>';
         }
         if ($options & BLOCK_MOVE_RIGHT) {
             $movebuttons .= '<a class="icon right" title="'. $this->str->moveright .'" href="'.$script.'&amp;blockaction=moveright">' .
index 33923ea317ecac02ac11bbc3337db5b97e0ed1aa..d51cdc6cbb0e158c4a69f7b59ff85a906cf9eebd 100644 (file)
@@ -14,7 +14,7 @@ class block_online_users extends block_base {
     function has_config() {return true;}
 
     function get_content() {
-        global $USER, $CFG, $DB;
+        global $USER, $CFG, $DB, $OUTPUT;
 
         if ($this->content !== NULL) {
             return $this->content;
@@ -162,7 +162,7 @@ class block_online_users extends block_base {
                 }
                 if ($canshowicon and ($USER->id != $user->id) and  $user->username != 'guest') {  // Only when logged in and messaging active etc
                     $this->content->text .= '<div class="message"><a title="'.get_string('messageselectadd').'" href="'.$CFG->wwwroot.'/message/discussion.php?id='.$user->id.'" onclick="this.target=\'message_'.$user->id.'\';return openpopup(\'/message/discussion.php?id='.$user->id.'\', \'message_'.$user->id.'\', \'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500\', 0);">'
-                        .'<img class="iconsmall" src="'.$CFG->pixpath.'/t/message.gif" alt="'. get_string('messageselectadd') .'" /></a></div>';
+                        .'<img class="iconsmall" src="'.$OUTPUT->old_icon_url('t/message') . '" alt="'. get_string('messageselectadd') .'" /></a></div>';
                 }
                 $this->content->text .= "</li>\n";
             }
index c7653937ba6ae7d9b457ee57c0ed961439df2e0d..77dd5faee9ccd9fe22a3089cbefcc9199d66ea5e 100644 (file)
@@ -8,7 +8,7 @@ class block_participants extends block_list {
 
     function get_content() {
 
-        global $CFG;
+        global $CFG, $OUTPUT;
 
         if (empty($this->instance)) {
             $this->content = '';
@@ -37,7 +37,7 @@ class block_participants extends block_list {
 
         $this->content->items[] = '<a title="'.get_string('listofallpeople').'" href="'.
                                   $CFG->wwwroot.'/user/index.php?contextid='.$currentcontext->id.'">'.get_string('participants').'</a>';
-        $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/users.gif" class="icon" alt="" />';
+        $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('i/users') . '" class="icon" alt="" />';
 
         return $this->content;
     }
index 3d1cfd3c441c62af0043916a6c92b25ca237cc6f..9c2068e09595e2f74cef99693be36a9db841e15d 100644 (file)
@@ -11,7 +11,7 @@ class block_site_main_menu extends block_list {
     }
 
     function get_content() {
-        global $USER, $CFG, $DB;
+        global $USER, $CFG, $DB, $OUTPUT;
 
         if ($this->content !== NULL) {
             return $this->content;
@@ -80,7 +80,7 @@ class block_site_main_menu extends block_list {
         $editbuttons = '';
 
         if ($ismoving) {
-            $this->content->icons[] = '<img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="" />';
+            $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" alt="" />';
             $this->content->items[] = $USER->activitycopyname.'&nbsp;(<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true&amp;sesskey='.sesskey().'">'.$strcancel.'</a>)';
         }
 
index 5e5bd35ebf6107771d64a4773e241ccd4d0077f8..aacb80f450ec1e1fe96cc2d483d9ec6773689662 100644 (file)
@@ -11,7 +11,7 @@ class block_social_activities extends block_list {
     }
 
     function get_content() {
-        global $USER, $CFG, $DB;
+        global $USER, $CFG, $DB, $OUTPUT;
 
         if ($this->content !== NULL) {
             return $this->content;
@@ -89,7 +89,7 @@ class block_social_activities extends block_list {
         $editbuttons = '';
 
         if ($ismoving) {
-            $this->content->icons[] = '&nbsp;<img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="" />';
+            $this->content->icons[] = '&nbsp;<img align="bottom" src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" alt="" />';
             $this->content->items[] = $USER->activitycopyname.'&nbsp;(<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true&amp;sesskey='.sesskey().'">'.$strcancel.'</a>)';
         }
 
index e0d68aed0c507677d8ab854fac737afbb624c617..0f73502fa8fbf82dddb342f39832612a184ed9a8 100755 (executable)
@@ -8,7 +8,7 @@
     // needs some hacking to rss/file.php
     function blog_rss_print_link($filtertype, $filterselect, $tagid=0, $tooltiptext='') {
 
-        global $CFG, $USER;
+        global $CFG, $USER, $OUTPUT;
 
         if (empty($USER->id)) {
             $userid = 1;
@@ -36,7 +36,7 @@
         }
 
         $path .= '/rss.xml';
-        $rsspix = $CFG->pixpath .'/i/rss.gif';
+        $rsspix = $OUTPUT->old_icon_url('i/rss');
 
         require_once($CFG->libdir.'/filelib.php');
         $path = get_file_url($path, null, 'rssfile');
index f4a9a4986af40fd7714acb3ae78bce45c8646334..bc2e1294ef52266842eaec35e4ca9c788e7c38f5 100644 (file)
@@ -69,7 +69,7 @@ $CALENDARDAYS = array('sunday','monday','tuesday','wednesday','thursday','friday
 
 
 function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_year = false) {
-    global $CFG, $USER;
+    global $CFG, $USER, $OUTPUT;
 
     $display = new stdClass;
     $display->minwday = get_user_preferences('calendar_startwday', CALENDAR_STARTING_WEEKDAY);
@@ -236,16 +236,16 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
                     $popupalt  = $event->modulename;
 
                 } else if ($event->courseid == SITEID) {                                // Site event
-                    $popupicon = $CFG->pixpath.'/c/site.gif';
+                    $popupicon = $OUTPUT->old_icon_url('c/site');
                     $popupalt  = '';
                 } else if ($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) {      // Course event
-                    $popupicon = $CFG->pixpath.'/c/course.gif';
+                    $popupicon = $OUTPUT->old_icon_url('c/course');
                     $popupalt  = '';
                 } else if ($event->groupid) {                                      // Group event
-                    $popupicon = $CFG->pixpath.'/c/group.gif';
+                    $popupicon = $OUTPUT->old_icon_url('c/group');
                     $popupalt  = '';
                 } else if ($event->userid) {                                       // User event
-                    $popupicon = $CFG->pixpath.'/c/user.gif';
+                    $popupicon = $OUTPUT->old_icon_url('c/user');
                     $popupalt  = '';
                 }
                 $popupcontent .= '<div><img class="icon" src="'.$popupicon.'" alt="'.$popupalt.'" /><a href="'.$dayhref.'#event_'.$event->id.'">'.format_string($event->name, true).'</a></div>';
@@ -467,7 +467,7 @@ function calendar_get_upcoming($courses, $groups, $users, $daysinfuture, $maxeve
 }
 
 function calendar_add_event_metadata($event) {
-    global $CFG;
+    global $CFG, $OUTPUT;
 
     //Support multilang in event->name
     $event->name = format_string($event->name,true);
@@ -493,25 +493,25 @@ function calendar_add_event_metadata($event) {
 
 
     } else if($event->courseid == SITEID) {                              // Site event
-        $event->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/site.gif" alt="'.get_string('globalevent', 'calendar').'" style="vertical-align: middle;" />';
+        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/site') . '" alt="'.get_string('globalevent', 'calendar').'" style="vertical-align: middle;" />';
         $event->cssclass = 'event_global';
     } else if($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) {          // Course event
         calendar_get_course_cached($coursecache, $event->courseid);
-        $event->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/course.gif" alt="'.get_string('courseevent', 'calendar').'" style="vertical-align: middle;" />';
+        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/course') . '" alt="'.get_string('courseevent', 'calendar').'" style="vertical-align: middle;" />';
         $event->courselink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$event->courseid.'">'.$coursecache[$event->courseid]->fullname.'</a>';
         $event->cssclass = 'event_course';
     } else if ($event->groupid) {                                    // Group event
-        $event->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/group.gif" alt="'.get_string('groupevent', 'calendar').'" style="vertical-align: middle;" />';
+        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/group') . '" alt="'.get_string('groupevent', 'calendar').'" style="vertical-align: middle;" />';
         $event->cssclass = 'event_group';
     } else if($event->userid) {                                      // User event
-        $event->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/user.gif" alt="'.get_string('userevent', 'calendar').'" style="vertical-align: middle;" />';
+        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/user') . '" alt="'.get_string('userevent', 'calendar').'" style="vertical-align: middle;" />';
         $event->cssclass = 'event_user';
     }
     return $event;
 }
 
 function calendar_print_event($event) {
-    global $CFG, $USER;
+    global $CFG, $USER, $OUTPUT;
 
     static $strftimetime;
 
@@ -562,11 +562,11 @@ function calendar_print_event($event) {
             $deletelink = ''; // deleting activities directly from calendar is dangerous/confusing - see MDL-11843
         }
         echo ' <a href="'.$editlink.'"><img
-                  src="'.$CFG->pixpath.'/t/edit.gif" alt="'.get_string('tt_editevent', 'calendar').'"
+                  src="'.$OUTPUT->old_icon_url('t/edit') . '" alt="'.get_string('tt_editevent', 'calendar').'"
                   title="'.get_string('tt_editevent', 'calendar').'" /></a>';
         if ($deletelink) {
             echo ' <a href="'.$deletelink.'"><img
-                      src="'.$CFG->pixpath.'/t/delete.gif" alt="'.get_string('tt_deleteevent', 'calendar').'"
+                      src="'.$OUTPUT->old_icon_url('t/delete') . '" alt="'.get_string('tt_deleteevent', 'calendar').'"
                       title="'.get_string('tt_deleteevent', 'calendar').'" /></a>';
         }
         echo '</div>';
@@ -786,7 +786,7 @@ function calendar_top_controls($type, $data) {
 }
 
 function calendar_filter_controls($type, $vars = NULL, $course = NULL, $courses = NULL) {
-    global $CFG, $SESSION, $USER;
+    global $CFG, $SESSION, $USER, $OUTPUT;
 
     $groupevents = true;
     $getvars = '';
@@ -820,17 +820,17 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL, $courses
 
     $content .= '<tr>';
     if($SESSION->cal_show_global) {
-        $content .= '<td class="eventskey event_global" style="width: 11px;"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hideglobal', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showglobal'.$getvars."'".'" /></td>';
+        $content .= '<td class="eventskey event_global" style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hideglobal', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showglobal'.$getvars."'".'" /></td>';
         $content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showglobal'.$getvars.'" title="'.get_string('tt_hideglobal', 'calendar').'">'.get_string('global', 'calendar').'</a></td>'."\n";
     } else {
-        $content .= '<td style="width: 11px;"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showglobal', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showglobal'.$getvars."'".'" /></td>';
+        $content .= '<td style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showglobal', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showglobal'.$getvars."'".'" /></td>';
         $content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showglobal'.$getvars.'" title="'.get_string('tt_showglobal', 'calendar').'">'.get_string('global', 'calendar').'</a></td>'."\n";
     }
     if($SESSION->cal_show_course) {
-        $content .= '<td class="eventskey event_course" style="width: 11px;"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hidecourse', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showcourses'.$getvars."'".'" /></td>';
+        $content .= '<td class="eventskey event_course" style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hidecourse', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showcourses'.$getvars."'".'" /></td>';
         $content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showcourses'.$getvars.'" title="'.get_string('tt_hidecourse', 'calendar').'">'.get_string('course', 'calendar').'</a></td>'."\n";
     } else {
-        $content .= '<td style="width: 11px;"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_showcourse', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showcourses'.$getvars."'".'" /></td>';
+        $content .= '<td style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_showcourse', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showcourses'.$getvars."'".'" /></td>';
         $content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showcourses'.$getvars.'" title="'.get_string('tt_showcourse', 'calendar').'">'.get_string('course', 'calendar').'</a></td>'."\n";
     
     }
@@ -842,10 +842,10 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL, $courses
         if($groupevents) {
             // This course MIGHT have group events defined, so show the filter
             if($SESSION->cal_show_groups) {
-                $content .= '<td class="eventskey event_group" style="width: 11px;"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hidegroups', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showgroups'.$getvars."'".'" /></td>';
+                $content .= '<td class="eventskey event_group" style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hidegroups', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showgroups'.$getvars."'".'" /></td>';
                 $content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showgroups'.$getvars.'" title="'.get_string('tt_hidegroups', 'calendar').'">'.get_string('group', 'calendar').'</a></td>'."\n";
             } else {
-                $content .= '<td style="width: 11px;"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showgroups', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showgroups'.$getvars."'".'" /></td>';
+                $content .= '<td style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showgroups', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showgroups'.$getvars."'".'" /></td>';
                 $content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showgroups'.$getvars.'" title="'.get_string('tt_showgroups', 'calendar').'">'.get_string('group', 'calendar').'</a></td>'."\n";
             }
         } else {
@@ -853,10 +853,10 @@ function calendar_filter_controls($type, $vars = NULL, $course = NULL, $courses
             $content .= '<td style="width: 11px;"></td><td>&nbsp;</td>'."\n";
         }
         if($SESSION->cal_show_user) {
-            $content .= '<td class="eventskey event_user" style="width: 11px;"><img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hideuser', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showuser'.$getvars."'".'" /></td>';
+            $content .= '<td class="eventskey event_user" style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.get_string('hide').'" title="'.get_string('tt_hideuser', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showuser'.$getvars."'".'" /></td>';
             $content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_hideuser', 'calendar').'">'.get_string('user', 'calendar').'</a></td>'."\n";
         } else {
-            $content .= '<td style="width: 11px;"><img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showuser', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showuser'.$getvars."'".'" /></td>';
+            $content .= '<td style="width: 11px;"><img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.get_string('show').'" title="'.get_string('tt_showuser', 'calendar').'" style="cursor:pointer" onclick="location.href='."'".CALENDAR_URL.'set.php?var=showuser'.$getvars."'".'" /></td>';
             $content .= '<td><a href="'.CALENDAR_URL.'set.php?var=showuser'.$getvars.'" title="'.get_string('tt_showuser', 'calendar').'">'.get_string('user', 'calendar').'</a></td>'."\n";
         }
     }
index 9c32b4b12724454beb4811c81aafd964cf2326cf..7dfe7e72babf50e31f795cdf3899fec40e9fe323 100644 (file)
             $usernameencoded = urlencode($USER->username);
 
             echo "<a href=\"export_execute.php?preset_what=all&amp;preset_time=recentupcoming&amp;username=$usernameencoded&amp;authtoken=$authtoken\">"
-                 .'<img src="'.$CFG->pixpath.'/i/ical.gif" height="14" width="36" '
+                 .'<img src="'.$OUTPUT->old_icon_url('i/ical') . '" height="14" width="36" '
                  .'alt="'.get_string('ical', 'calendar').'" '
                  .'title="'.get_string('quickdownloadcalendar', 'calendar').'" />'
                  .'</a>';
index fb205b3f86a90be950797030ca6048a16add2b3c..9f569c2cad869e6c5dede7a018d1a25cdcf454bf 100644 (file)
                 echo '<td>';
                 if (has_capability('moodle/course:update', $coursecontext)) {
                     echo '<a title="'.$strsettings.'" href="'.$CFG->wwwroot.'/course/edit.php?id='.$acourse->id.'">'.
-                            '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$stredit.'" /></a> ';
+                            '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.$stredit.'" /></a> ';
                 } else {
                     echo $spacer;
                 }
                 // role assignment link
                 if (has_capability('moodle/role:assign', $coursecontext)) {
                     echo '<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$coursecontext->id.'">'.
-                            '<img src="'.$CFG->pixpath.'/i/roles.gif" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ';
+                            '<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ';
                 } else {
                     echo $spacer;
                 }
 
                 if (can_delete_course($acourse->id)) {
                     echo '<a title="'.$strdelete.'" href="delete.php?id='.$acourse->id.'">'.
-                            '<img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.'" /></a> ';
+                            '<img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.$strdelete.'" /></a> ';
                 } else {
                     echo $spacer;
                 }
                     if (!empty($acourse->visible)) {
                         echo '<a title="'.$strhide.'" href="category.php?id='.$category->id.'&amp;page='.$page.
                             '&amp;perpage='.$perpage.'&amp;hide='.$acourse->id.'&amp;sesskey='.sesskey().'">'.
-                            '<img src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$strhide.'" /></a> ';
+                            '<img src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.$strhide.'" /></a> ';
                     } else {
                         echo '<a title="'.$strshow.'" href="category.php?id='.$category->id.'&amp;page='.$page.
                             '&amp;perpage='.$perpage.'&amp;show='.$acourse->id.'&amp;sesskey='.sesskey().'">'.
-                            '<img src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$strshow.'" /></a> ';
+                            '<img src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.$strshow.'" /></a> ';
                     }
                 } else {
                     echo $spacer;
 
                 if (has_capability('moodle/site:backup', $coursecontext)) {
                     echo '<a title="'.$strbackup.'" href="../backup/backup.php?id='.$acourse->id.'">'.
-                            '<img src="'.$CFG->pixpath.'/t/backup.gif" class="iconsmall" alt="'.$strbackup.'" /></a> ';
+                            '<img src="'.$OUTPUT->old_icon_url('t/backup') . '" class="iconsmall" alt="'.$strbackup.'" /></a> ';
                 } else {
                     echo $spacer;
                 }
                 if (has_capability('moodle/site:restore', $coursecontext)) {
                     echo '<a title="'.$strrestore.'" href="../files/index.php?id='.$acourse->id.
                          '&amp;wdir=/backupdata">'.
-                         '<img src="'.$CFG->pixpath.'/t/restore.gif" class="iconsmall" alt="'.$strrestore.'" /></a> ';
+                         '<img src="'.$OUTPUT->old_icon_url('t/restore') . '" class="iconsmall" alt="'.$strrestore.'" /></a> ';
                 } else {
                     echo $spacer;
                 }
                     if ($up) {
                         echo '<a title="'.$strmoveup.'" href="category.php?id='.$category->id.'&amp;page='.$page.
                              '&amp;perpage='.$perpage.'&amp;moveup='.$acourse->id.'&amp;sesskey='.sesskey().'">'.
-                             '<img src="'.$CFG->pixpath.'/t/up.gif" class="iconsmall" alt="'.$strmoveup.'" /></a> ';
+                             '<img src="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strmoveup.'" /></a> ';
                     } else {
                         echo $spacer;
                     }
                     if ($down) {
                         echo '<a title="'.$strmovedown.'" href="category.php?id='.$category->id.'&amp;page='.$page.
                              '&amp;perpage='.$perpage.'&amp;movedown='.$acourse->id.'&amp;sesskey='.sesskey().'">'.
-                             '<img src="'.$CFG->pixpath.'/t/down.gif" class="iconsmall" alt="'.$strmovedown.'" /></a> ';
+                             '<img src="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strmovedown.'" /></a> ';
                     } else {
                         echo $spacer;
                     }
                 if (!empty($acourse->guest)) {
                     echo '<a href="view.php?id='.$acourse->id.'"><img title="'.
                          $strallowguests.'" class="icon" src="'.
-                         $CFG->pixpath.'/i/guest.gif" alt="'.$strallowguests.'" /></a>';
+                         $OUTPUT->old_icon_url('i/guest') . '" alt="'.$strallowguests.'" /></a>';
                 }
                 if (!empty($acourse->password)) {
                     echo '<a href="view.php?id='.$acourse->id.'"><img title="'.
                          $strrequireskey.'" class="icon" src="'.
-                         $CFG->pixpath.'/i/key.gif" alt="'.$strrequireskey.'" /></a>';
+                         $OUTPUT->old_icon_url('i/key') . '" alt="'.$strrequireskey.'" /></a>';
                 }
                 if (!empty($acourse->summary)) {
                     link_to_popup_window ("/course/info.php?id=$acourse->id", "courseinfo",
-                                          '<img alt="'.get_string('info').'" class="icon" src="'.$CFG->pixpath.'/i/info.gif" />',
+                                          '<img alt="'.get_string('info').'" class="icon" src="'.$OUTPUT->old_icon_url('i/info') . '" />',
                                            400, 500, $strsummary);
                 }
                 echo "</td>";
index 3eac76ac0668730b36abf8e6b9c7af9a20c95f29..6e3acffec4e7a0ced993a2401c0728040ad00d4b 100644 (file)
 
         if ($PAGE->user_is_editing() && has_capability('moodle/course:update', $coursecontext)) {
             echo '<a title="'.$streditsummary.'" '.
-                 ' href="editsection.php?id='.$thissection->id.'"><img src="'.$CFG->pixpath.'/t/edit.gif" '.
+                 ' href="editsection.php?id='.$thissection->id.'"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" '.
                  ' class="icon edit" alt="'.$streditsummary.'" /></a>';
         }
         echo '</div>';
             
             if ($displaysection == $section) { // Show the zoom boxes
                 echo '<a href="view.php?id='.$course->id.'&amp;topic=0#section-'.$section.'" title="'.$strshowalltopics.'">'.
-                     '<img src="'.$CFG->pixpath.'/i/all.gif" class="icon" alt="'.$strshowalltopics.'" /></a><br />';
+                     '<img src="'.$OUTPUT->old_icon_url('i/all') . '" class="icon" alt="'.$strshowalltopics.'" /></a><br />';
             } else {
                 $strshowonlytopic = get_string("showonlytopic", "", $section);
                 echo '<a href="view.php?id='.$course->id.'&amp;topic='.$section.'" title="'.$strshowonlytopic.'">'.
-                     '<img src="'.$CFG->pixpath.'/i/one.gif" class="icon" alt="'.$strshowonlytopic.'" /></a><br />';
+                     '<img src="'.$OUTPUT->old_icon_url('i/one') . '" class="icon" alt="'.$strshowonlytopic.'" /></a><br />';
             }
 
             if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
 
                if ($course->marker == $section) {  // Show the "light globe" on/off
-                           echo '<a href="view.php?id='.$course->id.'&amp;marker=0&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkedthistopic.'">'.'<img src="'.$CFG->pixpath.'/i/marked.gif" alt="'.$strmarkedthistopic.'" /></a><br />';
+                           echo '<a href="view.php?id='.$course->id.'&amp;marker=0&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkedthistopic.'">'.'<img src="'.$OUTPUT->old_icon_url('i/marked') . '" alt="'.$strmarkedthistopic.'" /></a><br />';
                } else {
-                    echo '<a href="view.php?id='.$course->id.'&amp;marker='.$section.'&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkthistopic.'">'.'<img src="'.$CFG->pixpath.'/i/marker.gif" alt="'.$strmarkthistopic.'" /></a><br />';
+                    echo '<a href="view.php?id='.$course->id.'&amp;marker='.$section.'&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkthistopic.'">'.'<img src="'.$OUTPUT->old_icon_url('i/marker') . '" alt="'.$strmarkthistopic.'" /></a><br />';
                }
 
                 if ($thissection->visible) {        // Show the hide/show eye
                     echo '<a href="view.php?id='.$course->id.'&amp;hide='.$section.'&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strtopichide.'">'.
-                         '<img src="'.$CFG->pixpath.'/i/hide.gif" class="icon hide" alt="'.$strtopichide.'" /></a><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon hide" alt="'.$strtopichide.'" /></a><br />';
                 } else {
                     echo '<a href="view.php?id='.$course->id.'&amp;show='.$section.'&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strtopicshow.'">'.
-                         '<img src="'.$CFG->pixpath.'/i/show.gif" class="icon hide" alt="'.$strtopicshow.'" /></a><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon hide" alt="'.$strtopicshow.'" /></a><br />';
                 }
                 if ($section > 1) {                       // Add a arrow to move section up
                     echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.sesskey().'#section-'.($section-1).'" title="'.$strmoveup.'">'.
-                         '<img src="'.$CFG->pixpath.'/t/up.gif" class="icon up" alt="'.$strmoveup.'" /></a><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('t/up') . '" class="icon up" alt="'.$strmoveup.'" /></a><br />';
                 }
 
                 if ($section < $course->numsections) {    // Add a arrow to move section down
                     echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=1&amp;sesskey='.sesskey().'#section-'.($section+1).'" title="'.$strmovedown.'">'.
-                         '<img src="'.$CFG->pixpath.'/t/down.gif" class="icon down" alt="'.$strmovedown.'" /></a><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('t/down') . '" class="icon down" alt="'.$strmovedown.'" /></a><br />';
                 }
             }
             echo '</div>';
 
                 if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
                     echo ' <a title="'.$streditsummary.'" href="editsection.php?id='.$thissection->id.'">'.
-                         '<img src="'.$CFG->pixpath.'/t/edit.gif" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
                 }
                 echo '</div>';
 
index 4e6e171013cb9b18c66da8e0754c721bb72e92be..5c570023a6e82fd5a61b5d5bdb7e6393ce3bd2b7 100644 (file)
 
         if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
             echo '<p><a title="'.$streditsummary.'" '.
-                 ' href="editsection.php?id='.$thissection->id.'"><img src="'.$CFG->pixpath.'/t/edit.gif" '.
+                 ' href="editsection.php?id='.$thissection->id.'"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" '.
                  ' class="icon edit" alt="'.$streditsummary.'" /></a></p>';
         }
         echo '</div>';
             
             if ($displaysection == $section) {
                 echo '<a href="view.php?id='.$course->id.'&amp;week=0#section-'.$section.'" title="'.$strshowallweeks.'">'.
-                     '<img src="'.$CFG->pixpath.'/i/all.gif" class="icon wkall" alt="'.$strshowallweeks.'" /></a><br />';
+                     '<img src="'.$OUTPUT->old_icon_url('i/all') . '" class="icon wkall" alt="'.$strshowallweeks.'" /></a><br />';
             } else {
                 $strshowonlyweek = get_string("showonlyweek", "", $section);
                 echo '<a href="view.php?id='.$course->id.'&amp;week='.$section.'" title="'.$strshowonlyweek.'">'.
-                     '<img src="'.$CFG->pixpath.'/i/one.gif" class="icon wkone" alt="'.$strshowonlyweek.'" /></a><br />';
+                     '<img src="'.$OUTPUT->old_icon_url('i/one') . '" class="icon wkone" alt="'.$strshowonlyweek.'" /></a><br />';
             }
 
             if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
                 if ($thissection->visible) {        // Show the hide/show eye
                     echo '<a href="view.php?id='.$course->id.'&amp;hide='.$section.'&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strweekhide.'">'.
-                         '<img src="'.$CFG->pixpath.'/i/hide.gif" class="icon hide" alt="'.$strweekhide.'" /></a><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon hide" alt="'.$strweekhide.'" /></a><br />';
                 } else {
                     echo '<a href="view.php?id='.$course->id.'&amp;show='.$section.'&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strweekshow.'">'.
-                         '<img src="'.$CFG->pixpath.'/i/show.gif" class="icon hide" alt="'.$strweekshow.'" /></a><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon hide" alt="'.$strweekshow.'" /></a><br />';
                 }
                 if ($section > 1) {                       // Add a arrow to move section up
                     echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=-1&amp;sesskey='.sesskey().'#section-'.($section-1).'" title="'.$strmoveup.'">'.
-                         '<img src="'.$CFG->pixpath.'/t/up.gif" class="icon up" alt="'.$strmoveup.'" /></a><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('t/up') . '" class="icon up" alt="'.$strmoveup.'" /></a><br />';
                 }
 
                 if ($section < $course->numsections) {    // Add a arrow to move section down
                     echo '<a href="view.php?id='.$course->id.'&amp;random='.rand(1,10000).'&amp;section='.$section.'&amp;move=1&amp;sesskey='.sesskey().'#section-'.($section+1).'" title="'.$strmovedown.'">'.
-                         '<img src="'.$CFG->pixpath.'/t/down.gif" class="icon down" alt="'.$strmovedown.'" /></a><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('t/down') . '" class="icon down" alt="'.$strmovedown.'" /></a><br />';
                 }
             }
             echo '</div>';
 
                 if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
                     echo ' <a title="'.$streditsummary.'" href="editsection.php?id='.$thissection->id.'">'.
-                         '<img src="'.$CFG->pixpath.'/t/edit.gif" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
+                         '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
                 }
                 echo '</div>';
 
index e8de6cac0a056072d1b5acb729008af42d5bdfba..24b613252d7f19bbc8a963f97fb9989d09e9d890 100644 (file)
 function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $up=false, $down=false) {
 /// Recursive function to print all the categories ready for editing
 
-    global $CFG, $USER;
+    global $CFG, $USER, $OUTPUT;
 
     static $str = NULL;
 
@@ -297,28 +297,28 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
 
         if (has_capability('moodle/category:manage', $category->context)) {
             echo '<a title="'.$str->edit.'" href="editcategory.php?id='.$category->id.'"><img'.
-                 ' src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$str->edit.'" /></a> ';
+                 ' src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.$str->edit.'" /></a> ';
 
             echo '<a title="'.$str->delete.'" href="index.php?delete='.$category->id.'&amp;sesskey='.sesskey().'"><img'.
-                 ' src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$str->delete.'" /></a> ';
+                 ' src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.$str->delete.'" /></a> ';
 
             if (!empty($category->visible)) {
                 echo '<a title="'.$str->hide.'" href="index.php?hide='.$category->id.'&amp;sesskey='.sesskey().'"><img'.
-                     ' src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.$str->hide.'" /></a> ';
+                     ' src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.$str->hide.'" /></a> ';
             } else {
                 echo '<a title="'.$str->show.'" href="index.php?show='.$category->id.'&amp;sesskey='.sesskey().'"><img'.
-                     ' src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" alt="'.$str->show.'" /></a> ';
+                     ' src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.$str->show.'" /></a> ';
             }
 
             if ($up) {
                 echo '<a title="'.$str->moveup.'" href="index.php?moveup='.$category->id.'&amp;sesskey='.sesskey().'"><img'.
-                     ' src="'.$CFG->pixpath.'/t/up.gif" class="iconsmall" alt="'.$str->moveup.'" /></a> ';
+                     ' src="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$str->moveup.'" /></a> ';
             } else {
                 echo $str->spacer;
             }
             if ($down) {
                 echo '<a title="'.$str->movedown.'" href="index.php?movedown='.$category->id.'&amp;sesskey='.sesskey().'"><img'.
-                     ' src="'.$CFG->pixpath.'/t/down.gif" class="iconsmall" alt="'.$str->movedown.'" /></a> ';
+                     ' src="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$str->movedown.'" /></a> ';
             } else {
                 echo $str->spacer;
             }
index ba47511a2308b57b6bb7294a27b206cf77821297..75697a8130353df685437de730f23fdf68c0230d 100644 (file)
@@ -1864,7 +1864,7 @@ function make_categories_options() {
  * This function is only used by print_whole_category_list() above
  */
 function print_category_info($category, $depth, $showcourses = false) {
-    global $CFG, $DB;
+    global $CFG, $DB, $OUTPUT;
     static $strallowguests, $strrequireskey, $strsummary;
 
     if (empty($strsummary)) {
@@ -1882,7 +1882,7 @@ function print_category_info($category, $depth, $showcourses = false) {
     }
 
     if ($showcourses and $coursecount) {
-        $catimage = '<img src="'.$CFG->pixpath.'/i/course.gif" alt="" />';
+        $catimage = '<img src="'.$OUTPUT->old_icon_url('i/course') . '" alt="" />';
     } else {
         $catimage = "&nbsp;";
     }
@@ -1923,19 +1923,19 @@ function print_category_info($category, $depth, $showcourses = false) {
                 echo '</td><td align="right" valign="top" class="course info">';
                 if ($course->guest ) {
                     echo '<a title="'.$strallowguests.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
-                    echo '<img alt="'.$strallowguests.'" src="'.$CFG->pixpath.'/i/guest.gif" /></a>';
+                    echo '<img alt="'.$strallowguests.'" src="'.$OUTPUT->old_icon_url('i/guest') . '" /></a>';
                 } else {
                     echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
                 }
                 if ($course->password) {
                     echo '<a title="'.$strrequireskey.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
-                    echo '<img alt="'.$strrequireskey.'" src="'.$CFG->pixpath.'/i/key.gif" /></a>';
+                    echo '<img alt="'.$strrequireskey.'" src="'.$OUTPUT->old_icon_url('i/key') . '" /></a>';
                 } else {
                     echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
                 }
                 if ($course->summary) {
                     link_to_popup_window ('/course/info.php?id='.$course->id, 'courseinfo',
-                                          '<img alt="'.$strsummary.'" src="'.$CFG->pixpath.'/i/info.gif" />',
+                                          '<img alt="'.$strsummary.'" src="'.$OUTPUT->old_icon_url('i/info') . '" />',
                                            400, 500, $strsummary);
                 } else {
                     echo '<img alt="" style="width:18px;height:16px;" src="'.$CFG->pixpath.'/spacer.gif" />';
@@ -2322,14 +2322,14 @@ function print_remote_course($course, $width="100%") {
 }
 
 function print_remote_host($host, $width="100%") {
-    global $CFG, $USER;
+    global $OUTPUT;
 
     $linkcss = '';
 
     echo '<div class="coursebox clearfix">';
     echo '<div class="info">';
     echo '<div class="name">';
-    echo '<img src="'.$CFG->pixpath.'/i/mnethost.gif" class="icon" alt="'.get_string('course').'" />';
+    echo '<img src="'.$OUTPUT->old_icon_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
     echo '<a title="'.s($host['name']).'" href="'.s($host['url']).'">'
         . s($host['name']).'</a> - ';
     echo $host['count'] . ' ' . get_string('courses');
@@ -2718,7 +2718,7 @@ function moveto_module($mod, $section, $beforemod=NULL) {
 }
 
 function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-1, $section=-1) {
-    global $CFG, $USER, $DB;
+    global $CFG, $USER, $DB, $OUTPUT;
 
     static $str;
     static $sesskey;
@@ -2764,12 +2764,12 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
         if ($mod->visible) {
             $hideshow = '<a class="editing_hide" title="'.$str->hide.'" href="'.$path.'/mod.php?hide='.$mod->id.
                         '&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$CFG->pixpath.'/t/hide.gif" class="iconsmall" '.
+                        ' src="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" '.
                         ' alt="'.$str->hide.'" /></a>'."\n";
         } else {
             $hideshow = '<a class="editing_show" title="'.$str->show.'" href="'.$path.'/mod.php?show='.$mod->id.
                         '&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$CFG->pixpath.'/t/show.gif" class="iconsmall" '.
+                        ' src="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" '.
                         ' alt="'.$str->show.'" /></a>'."\n";
         }
     } else {
@@ -2780,17 +2780,17 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
         if ($mod->groupmode == SEPARATEGROUPS) {
             $grouptitle = $str->groupsseparate;
             $groupclass = 'editing_groupsseparate';
-            $groupimage = $CFG->pixpath.'/t/groups.gif';
+            $groupimage = $OUTPUT->old_icon_url('t/groups') . '';
             $grouplink  = $path.'/mod.php?id='.$mod->id.'&amp;groupmode=0&amp;sesskey='.$sesskey;
         } else if ($mod->groupmode == VISIBLEGROUPS) {
             $grouptitle = $str->groupsvisible;
             $groupclass = 'editing_groupsvisible';
-            $groupimage = $CFG->pixpath.'/t/groupv.gif';
+            $groupimage = $OUTPUT->old_icon_url('t/groupv') . '';
             $grouplink  = $path.'/mod.php?id='.$mod->id.'&amp;groupmode=1&amp;sesskey='.$sesskey;
         } else {
             $grouptitle = $str->groupsnone;
             $groupclass = 'editing_groupsnone';
-            $groupimage = $CFG->pixpath.'/t/groupn.gif';
+            $groupimage = $OUTPUT->old_icon_url('t/groupn') . '';
             $grouplink  = $path.'/mod.php?id='.$mod->id.'&amp;groupmode=2&amp;sesskey='.$sesskey;
         }
         if ($mod->groupmodelink) {
@@ -2810,16 +2810,16 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
         if ($moveselect) {
             $move =     '<a class="editing_move" title="'.$str->move.'" href="'.$path.'/mod.php?copy='.$mod->id.
                         '&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" '.
+                        ' src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" '.
                         ' alt="'.$str->move.'" /></a>'."\n";
         } else {
             $move =     '<a class="editing_moveup" title="'.$str->moveup.'" href="'.$path.'/mod.php?id='.$mod->id.
                         '&amp;move=-1&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$CFG->pixpath.'/t/up.gif" class="iconsmall" '.
+                        ' src="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" '.
                         ' alt="'.$str->moveup.'" /></a>'."\n".
                         '<a class="editing_movedown" title="'.$str->movedown.'" href="'.$path.'/mod.php?id='.$mod->id.
                         '&amp;move=1&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$CFG->pixpath.'/t/down.gif" class="iconsmall" '.
+                        ' src="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" '.
                         ' alt="'.$str->movedown.'" /></a>'."\n";
         }
     } else {
@@ -2853,7 +2853,7 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
     if (has_capability('moodle/course:managegroups', $modcontext)){
         $context = get_context_instance(CONTEXT_MODULE, $mod->id);
         $assign = '<a class="editing_assign" title="'.$str->assign.'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.
-            $context->id.'"><img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$str->assign.'" class="iconsmall"/></a>';
+            $context->id.'"><img src="'.$OUTPUT->old_icon_url('i/roles') . '" alt="'.$str->assign.'" class="iconsmall"/></a>';
     } else {
         $assign = '';
     }
@@ -2861,11 +2861,11 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
     return '<span class="commands">'."\n".$leftright.$move.
            '<a class="editing_update" title="'.$str->update.'" href="'.$path.'/mod.php?update='.$mod->id.
            '&amp;sesskey='.$sesskey.$section.'"><img'.
-           ' src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" '.
+           ' src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" '.
            ' alt="'.$str->update.'" /></a>'."\n".
            '<a class="editing_delete" title="'.$str->delete.'" href="'.$path.'/mod.php?delete='.$mod->id.
            '&amp;sesskey='.$sesskey.$section.'"><img'.
-           ' src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" '.
+           ' src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" '.
            ' alt="'.$str->delete.'" /></a>'."\n".$hideshow.$groupmode."\n".$assign.'</span>';
 }
 
index d8b1d6b499cf0cfc3465cd2dba1d73faf5ba0eb3..bc13b3d2874b650fbad3ba14cd6ce0c64b70d417 100644 (file)
 
         /// Show an enrolment key icon in the first column if applicable.
             if (!empty($course->password)) {
-                $row[] = '<img hspace="1" alt="'.$strrequireskey.'" class="icon" src="'.$CFG->pixpath.'/i/key.gif" />';
+                $row[] = '<img hspace="1" alt="'.$strrequireskey.'" class="icon" src="'.$OUTPUT->old_icon_url('i/key') . '" />';
             } else {
                 $row[] = '';
             }
index 780c7897a33affda4f004642f360464023676e4c..10a2b05e91a7984f245247df74a488767ee17492 100644 (file)
                 // checks whether user can do role assignment
                 if (has_capability('moodle/role:assign', $coursecontext)) {
                     echo'<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$coursecontext->id.'">';
-                    echo '<img src="'.$CFG->pixpath.'/i/roles.gif" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
+                    echo '<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
                 }
 
                 // checks whether user can delete course
index a08157432fb7ed6f1fcfed93c9dfba5fb93360fa..5d2f06307dd5169f82f5072a10b91b73de38ef5d 100644 (file)
@@ -373,7 +373,7 @@ function cron() {
 * @param    course  the current course, as an object
 */
 function get_access_icons($course) {
-    global $CFG;
+    global $CFG, $OUTPUT;
 
     global $strallowguests;
     global $strrequireskey;
@@ -387,11 +387,11 @@ function get_access_icons($course) {
 
     if (!empty($course->guest)) {
         $str .= '<a title="'.$strallowguests.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
-        $str .= '<img class="accessicon" alt="'.$strallowguests.'" src="'.$CFG->pixpath.'/i/guest.gif" /></a>&nbsp;&nbsp;';
+        $str .= '<img class="accessicon" alt="'.$strallowguests.'" src="'.$OUTPUT->old_icon_url('i/guest') . '" /></a>&nbsp;&nbsp;';
     }
     if (!empty($course->password)) {
         $str .= '<a title="'.$strrequireskey.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
-        $str .= '<img class="accessicon" alt="'.$strrequireskey.'" src="'.$CFG->pixpath.'/i/key.gif" /></a>';
+        $str .= '<img class="accessicon" alt="'.$strrequireskey.'" src="'.$OUTPUT->old_icon_url('i/key') . '" /></a>';
     }
 
     return $str;
index dc19cd25dbb960268e191b551d1487e8a3c60851..5af4f66cf24da56607b445e55b75ec1d3bf0e30d 100644 (file)
@@ -132,7 +132,7 @@ $strdelete   = get_string('delete');
 
 if ($parent) {
     echo '<div class="folder">';
-    echo '<a href="draftfiles.php?itemid='.$itemid.'&amp;filepath='.$parent->get_filepath().'&amp;subdirs='.$subdirs.'&amp;maxbytes='.$maxbytes.'"><img src="'.$CFG->pixpath.'/f/parent.gif" class="icon" alt="" />&nbsp;'.get_string('parentfolder').'</a>';
+    echo '<a href="draftfiles.php?itemid='.$itemid.'&amp;filepath='.$parent->get_filepath().'&amp;subdirs='.$subdirs.'&amp;maxbytes='.$maxbytes.'"><img src="'.$OUTPUT->old_icon_url('f/parent') . '" class="icon" alt="" />&nbsp;'.get_string('parentfolder').'</a>';
     echo '</div>';
 }
 
index 0a4946898dc8493d4c75540b45787cb4681a8b79..96e1c4b0908b52ee8c2e93660dfceb8b0806c7fa 100644 (file)
@@ -258,7 +258,7 @@ function displaydir($file_info) {
 
         echo "<tr class=\"folder\">";
         print_cell();
-        print_cell('left', '<a href="index.php?'.$params.'"><img src="'.$CFG->pixpath.'/f/parent.gif" class="icon" alt="" />&nbsp;'.get_string('parentfolder').'</a>', 'name');
+        print_cell('left', '<a href="index.php?'.$params.'"><img src="'.$OUTPUT->old_icon_url('f/parent') . '" class="icon" alt="" />&nbsp;'.get_string('parentfolder').'</a>', 'name');
         print_cell();
         print_cell();
         print_cell();
index 19dc9eaa2680721a25c2763b8225163f835cdd3e..bf63d4934c67840f4d7d33ffa74934db6133d762 100755 (executable)
@@ -89,7 +89,7 @@ class grade_edit_tree {
      * @return string HTML
      */
     public function build_html_tree($element, $totals, $parents, &$categories, $level, &$row_count) {
-        global $CFG, $COURSE, $USER;
+        global $CFG, $COURSE, $USER, $OUTPUT;
 
         $object = $element['object'];
         $eid    = $element['eid'];
@@ -117,11 +117,11 @@ class grade_edit_tree {
         if ($element['type'] == 'item' or ($element['type'] == 'category' and $element['depth'] > 1)) {
             if ($this->element_deletable($element)) {
                 $actions .= '<a href="index.php?id='.$COURSE->id.'&amp;action=delete&amp;eid='
-                         . $eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'
+                         . $eid.'&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'
                          . get_string('delete').'" title="'.get_string('delete').'"/></a>';
             }
             $actions .= '<a href="index.php?id='.$COURSE->id.'&amp;action=moveselect&amp;eid='
-                     . $eid.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/move.gif" class="iconsmall" alt="'
+                     . $eid.'&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" alt="'
                      . get_string('move').'" title="'.get_string('move').'"/></a>';
         }
 
index c8cd25fdbf77f18b33fd3b0d23e89cbf1cf67d96..6bdd550ddbfdd279946997ff93bd0fa8a3e131fd 100644 (file)
@@ -1232,7 +1232,7 @@ class grade_structure {
      * @return string icon or spacer
      */
     public function get_element_icon(&$element, $spacerifnone=false) {
-        global $CFG;
+        global $CFG, $OUTPUT;
 
         switch ($element['type']) {
             case 'item':
@@ -1245,7 +1245,7 @@ class grade_structure {
 
                 if ($element['object']->is_calculated()) {
                     $strcalc = get_string('calculatedgrade', 'grades');
-                    return '<img src="'.$CFG->pixpath.'/i/calc.gif" class="icon itemicon" title="'.
+                    return '<img src="'.$OUTPUT->old_icon_url('i/calc') . '" class="icon itemicon" title="'.
                             s($strcalc).'" alt="'.s($strcalc).'"/>';
 
                 } else if (($is_course or $is_category) and ($is_scale or $is_value)) {
@@ -1257,11 +1257,11 @@ class grade_structure {
                             case GRADE_AGGREGATE_WEIGHTED_MEAN2:
                             case GRADE_AGGREGATE_EXTRACREDIT_MEAN:
                                 $stragg = get_string('aggregation', 'grades');
-                                return '<img src="'.$CFG->pixpath.'/i/agg_mean.gif" ' .
+                                return '<img src="'.$OUTPUT->old_icon_url('i/agg_mean') . '" ' .
                                         'class="icon itemicon" title="'.s($stragg).'" alt="'.s($stragg).'"/>';
                             case GRADE_AGGREGATE_SUM:
                                 $stragg = get_string('aggregation', 'grades');
-                                return '<img src="'.$CFG->pixpath.'/i/agg_sum.gif" ' .
+                                return '<img src="'.$OUTPUT->old_icon_url('i/agg_sum') . '" ' .
                                         'class="icon itemicon" title="'.s($stragg).'" alt="'.s($stragg).'"/>';
                         }
                     }
@@ -1276,12 +1276,12 @@ class grade_structure {
                 } else if ($element['object']->itemtype == 'manual') {
                     if ($element['object']->is_outcome_item()) {
                         $stroutcome = get_string('outcome', 'grades');
-                        return '<img src="'.$CFG->pixpath.'/i/outcomes.gif" ' .
+                        return '<img src="'.$OUTPUT->old_icon_url('i/outcomes') . '" ' .
                                 'class="icon itemicon" title="'.s($stroutcome).
                                 '" alt="'.s($stroutcome).'"/>';
                     } else {
                         $strmanual = get_string('manualitem', 'grades');
-                        return '<img src="'.$CFG->pixpath.'/t/manual_item.gif" '.
+                        return '<img src="'.$OUTPUT->old_icon_url('t/manual_item') . '" '.
                                 'class="icon itemicon" title="'.s($strmanual).
                                 '" alt="'.s($strmanual).'"/>';
                     }
@@ -1290,7 +1290,7 @@ class grade_structure {
 
             case 'category':
                 $strcat = get_string('category', 'grades');
-                return '<img src="'.$CFG->pixpath.'/f/folder.gif" class="icon itemicon" ' .
+                return '<img src="'.$OUTPUT->old_icon_url('f/folder') . '" class="icon itemicon" ' .
                         'title="'.s($strcat).'" alt="'.s($strcat).'" />';
         }
 
@@ -1419,7 +1419,7 @@ class grade_structure {
      * @return string
      */
     public function get_edit_icon($element, $gpr) {
-        global $CFG;
+        global $CFG, $OUTPUT;
 
         if (!has_capability('moodle/grade:manage', $this->context)) {
             if ($element['type'] == 'grade' and has_capability('moodle/grade:edit', $this->context)) {
@@ -1484,7 +1484,7 @@ class grade_structure {
         }
 
         if ($url) {
-            return '<a href="'.$url.'"><img src="'.$CFG->pixpath.'/t/edit.gif" ' .
+            return '<a href="'.$url.'"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" ' .
                     'class="iconsmall" alt="'.s($stredit).'" title="'.s($stredit).'"/></a>';
 
         } else {
@@ -1538,7 +1538,7 @@ class grade_structure {
                      . '&amp;eid='.$element['eid'];
             $url     = $gpr->add_url_params($url);
             $action  = '<a href="'.$url.'" class="hide"><img src="'.
-                    $CFG->pixpath.'/t/hide.gif" class="iconsmall" alt="'.s($strhide).'" title="'.s($strhide).'"/></a>';
+                    $OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.s($strhide).'" title="'.s($strhide).'"/></a>';
         }
         return $action;
     }
@@ -1552,7 +1552,7 @@ class grade_structure {
      * @return string
      */
     public function get_locking_icon($element, $gpr) {
-        global $CFG;
+        global $CFG, $OUTPUT;
 
         $strparams = $this->get_params_for_iconstr($element);
         $strunlock = get_string('unlockverbose', 'grades', $strparams);
@@ -1563,7 +1563,7 @@ class grade_structure {
             $strparamobj = new stdClass();
             $strparamobj->itemname = $element['object']->grade_item->itemname;
             $strnonunlockable = get_string('nonunlockableverbose', 'grades', $strparamobj);
-            $action  = '<img src="'.$CFG->pixpath.'/t/unlock_gray.gif" alt="'.
+            $action  = '<img src="'.$OUTPUT->old_icon_url('t/unlock_gray') . '" alt="'.
                     s($strnonunlockable).'" class="iconsmall" title="'.
                     s($strnonunlockable).'"/>';
         } else if ($element['object']->is_locked()) {
@@ -1601,7 +1601,7 @@ class grade_structure {
 
             $url     = $gpr->add_url_params($url);
             $action  = '<a href="'.$url.'" class="lock"><img src="'.
-                    $CFG->pixpath.'/t/lock.gif" class="iconsmall" alt="'.
+                    $OUTPUT->old_icon_url('t/lock') . '" class="iconsmall" alt="'.
                     s($strlock).'" title="' . s($strlock).'"/></a>';
         }
         return $action;