MDL-20787 final switch to new $OUTPUT->pix_url() - yay!
authorPetr Skoda <skodak@moodle.org>
Wed, 16 Dec 2009 21:50:45 +0000 (21:50 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 16 Dec 2009 21:50:45 +0000 (21:50 +0000)
157 files changed:
admin/blocks.php
admin/filters.php
admin/lang.php
admin/mnet/access_control.php
admin/mnet/enr_courses.php
admin/modules.php
admin/qtypes.php
admin/report/configlog/index.php
admin/roles/lib.php
admin/roles/manage.php
admin/roles/usersroles.php
admin/user.php
admin/user/user_bulk_display.php
admin/user/user_bulk_enrol.php
blocks/activity_modules/block_activity_modules.php
blocks/admin/block_admin.php
blocks/admin_tree/block_admin_tree.php
blocks/course_list/block_course_list.php
blocks/course_summary/block_course_summary.php
blocks/global_navigation_tree/block_global_navigation_tree.php
blocks/loancalc/block_loancalc.php
blocks/messages/block_messages.php
blocks/mnet_hosts/block_mnet_hosts.php
blocks/online_users/block_online_users.php
blocks/participants/block_participants.php
blocks/rss_client/managefeeds.php
blocks/settings_navigation_tree/block_settings_navigation_tree.php
blocks/site_main_menu/block_site_main_menu.php
blocks/social_activities/block_social_activities.php
blocks/tags/block_tags.php
blog/external_blogs.php
blog/locallib.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/info.php
course/lib.php
course/modedit.php
course/pending.php
course/recent.php
course/report/log/lib.php
course/report/outline/index.php
course/report/outline/lib.php
course/report/participation/lib.php
course/report/progress/index.php
course/report/progress/lib.php
course/report/stats/lib.php
course/resources.php
course/search.php
course/user.php
enrol/manual/enrol.php
files/draftfiles.php
files/index.php
grade/edit/tree/lib.php
grade/export/keymanager.php
grade/import/keymanager.php
grade/lib.php
grade/report/grader/lib.php
group/groupings.php
index.php
lib/adminlib.php
lib/ajax/ajaxlib.php
lib/configonlylib.php
lib/deprecatedlib.php
lib/filelib.php
lib/form/modgrade.php
lib/formslib.php
lib/googleapi.php
lib/listlib.php
lib/navigationlib.php
lib/outputcomponents.php
lib/outputrenderers.php
lib/portfoliolib.php
lib/questionlib.php
lib/rsslib.php
lib/tablelib.php
lib/upgradelib.php
lib/weblib.php
message/lib.php
mod/assignment/lib.php
mod/assignment/type/online/assignment.class.php
mod/assignment/type/upload/assignment.class.php
mod/assignment/type/uploadsingle/assignment.class.php
mod/chat/lib.php
mod/data/field.php
mod/data/field/file/field.class.php
mod/data/lib.php
mod/data/preset.php
mod/feedback/delete_template.php
mod/feedback/edit.php
mod/feedback/lib.php
mod/feedback/mapcourse.php
mod/folder/locallib.php
mod/forum/index.php
mod/forum/lib.php
mod/glossary/editcategories.php
mod/glossary/lib.php
mod/glossary/view.php
mod/hotpot/index.php
mod/hotpot/lib.php
mod/lesson/renderer.php
mod/quiz/editlib.php
mod/quiz/lib.php
mod/quiz/locallib.php
mod/quiz/styles.php [deleted file]
mod/quiz/summary.php
mod/quiz/tabs.php
mod/resource/index.php
mod/scorm/datamodels/aicclib.php
mod/scorm/datamodels/scorm_12lib.php
mod/scorm/datamodels/scorm_13lib.php
mod/scorm/lib.php
mod/scorm/loadSCO.php
mod/scorm/locallib.php
mod/scorm/report.php
mod/url/index.php
mod/wiki/ewiki/plugins/moodle/downloads.php
question/category_class.php
question/contextmove_form.php
question/contextmoveq_form.php
question/editlib.php
question/type/multianswer/questiontype.php
question/type/questiontype.php
repository/alfresco/repository.class.php
repository/boxnet/repository.class.php
repository/filepicker.php
repository/filesystem/repository.class.php
repository/lib.php
repository/local/repository.class.php
repository/mahara/repository.class.php
repository/merlot/repository.class.php
repository/s3/repository.class.php
repository/url/repository.class.php
repository/webdav/repository.class.php
repository/wikimedia/repository.class.php
search/query.php
tag/coursetags_edit.php
theme/base/layout/embedded.php
theme/base/layout/general.php
theme/base/layout/home.php
theme/standard/layout/embedded.php
theme/standard/layout/frametop.php
theme/standard/layout/home.php
theme/standard/layout/minimal.php
theme/standard/layout/normal.php
user/index.php
user/message.html
user/pix.php
user/portfolio.php
user/portfoliologs.php
user/profile/index.php
user/selector/lib.php
user/view.php

index d75e698..6678975 100644 (file)
 
         if ($blocks[$blockid]->visible) {
             $visible = '<a href="blocks.php?hide='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strhide.'">'.
-                       '<img src="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon" alt="'.$strhide.'" /></a>';
+                       '<img src="'.$OUTPUT->pix_url('i/hide') . '" class="icon" alt="'.$strhide.'" /></a>';
         } else {
             $visible = '<a href="blocks.php?show='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strshow.'">'.
-                       '<img src="'.$OUTPUT->old_icon_url('i/show') . '" class="icon" alt="'.$strshow.'" /></a>';
+                       '<img src="'.$OUTPUT->pix_url('i/show') . '" class="icon" alt="'.$strshow.'" /></a>';
             $class = ' class="dimmed_text"'; // Leading space required!
         }
 
index 763adff..9249be9 100644 (file)
@@ -233,7 +233,7 @@ function action_url($filterpath, $action) {
 function action_icon($url, $icon, $straction) {
     global $CFG, $OUTPUT;
     return '<a href="' . $url . '" title="' . $straction . '">' .
-            '<img src="' . $OUTPUT->old_icon_url('t/' . $icon) . '" alt="' . $straction . '" /></a> ';
+            '<img src="' . $OUTPUT->pix_url('t/' . $icon) . '" alt="' . $straction . '" /></a> ';
 }
 
 function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings) {
@@ -256,7 +256,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
 
     // Re-order
     $updown = '';
-    $spacer = '<img src="' . $OUTPUT->old_icon_url('spacer') . '" class="iconsmall" alt="" /> ';
+    $spacer = '<img src="' . $OUTPUT->pix_url('spacer') . '" class="iconsmall" alt="" /> ';
     if ($filterinfo->active != TEXTFILTER_DISABLED) {
         if (!$isfirstrow) {
             $updown .= action_icon(action_url($filter, 'up'), 'up', get_string('up'));
index 1bb3f04..b80df3d 100644 (file)
                     if (LANG_DISPLAY_MISSING_LINKS) {
                         $missingtarget = '<a name="missing'.$missingcounter.'"></a>';
                         $missingnext = '<a href="#missing'.($missingcounter+1).'">'.
-                        '<img src="' . $OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
+                        '<img src="' . $OUTPUT->pix_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
                         $missingprev = '<a href="#missing'.($missingcounter-1).'">'.
-                        '<img src="' . $OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
+                        '<img src="' . $OUTPUT->pix_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="' . $OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
+                            '<img src="' . $OUTPUT->pix_url('t/down') . '" class="iconsmall" alt="'.$strnext.'" /></a>';
                             $missingprev = '<a href="#missing'.($missingcounter-1).'">'.
-                            '<img src="' . $OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
+                            '<img src="' . $OUTPUT->pix_url('t/up') . '" class="iconsmall" alt="'.$strprev.'" /></a>';
                         }
                     }
                 }
index 6d0fb49..6008680 100644 (file)
@@ -151,7 +151,7 @@ foreach ($columns as $column) {
     } else {
         $columndir = $dir == "ASC" ? "DESC" : "ASC";
         $columnicon = $dir == "ASC" ? "down" : "up";
-        $columnicon = " <img src=\"" . $OUTPUT->old_icon_url('t/' . $columnicon) . "\" alt=\"\" />";
+        $columnicon = " <img src=\"" . $OUTPUT->pix_url('t/' . $columnicon) . "\" alt=\"\" />";
     }
     $headings[$column] = "<a href=\"?sort=$column&amp;dir=$columndir&amp;\">".$string[$column]."</a>$columnicon";
 }
index aa8a8aa..8901d44 100644 (file)
@@ -32,7 +32,7 @@
     echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
            . '<table class="generaltable">';
 
-    $icon  = "<img src=\"" . $OUTPUT->old_icon_url('i/course') . "\"".
+    $icon  = "<img src=\"" . $OUTPUT->pix_url('i/course') . "\"".
     " class=\"icon\" alt=\"".get_string("course")."\" />";
 
     foreach ($courses as $course) {
index c6af968..6642d96 100644 (file)
     foreach ($modulebyname as $modulename => $module) {
 
         // took out hspace="\10\", because it does not validate. don't know what to replace with.
-        $icon = "<img src=\"" . $OUTPUT->old_icon_url('icon', $module->name) . "\" class=\"icon\" alt=\"\" />";
+        $icon = "<img src=\"" . $OUTPUT->pix_url('icon', $module->name) . "\" class=\"icon\" alt=\"\" />";
 
         $delete = "<a href=\"modules.php?delete=$module->name&amp;sesskey=".sesskey()."\">$strdelete</a>";
 
 
         if ($module->visible) {
             $visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=".sesskey()."\" title=\"$strhide\">".
-                       "<img src=\"" . $OUTPUT->old_icon_url('i/hide') . "\" class=\"icon\" alt=\"$strhide\" /></a>";
+                       "<img src=\"" . $OUTPUT->pix_url('i/hide') . "\" class=\"icon\" alt=\"$strhide\" /></a>";
             $class = "";
         } else {
             $visible = "<a href=\"modules.php?show=$module->name&amp;sesskey=".sesskey()."\" title=\"$strshow\">".
-                       "<img src=\"" . $OUTPUT->old_icon_url('i/show') . "\" class=\"icon\" alt=\"$strshow\" /></a>";
+                       "<img src=\"" . $OUTPUT->pix_url('i/show') . "\" class=\"icon\" alt=\"$strshow\" /></a>";
             $class = " class=\"dimmed_text\"";
         }
         if ($module->name == "forum") {
index f09612a..be03869 100644 (file)
                 $rowclass = 'dimmed_text';
             }
         } else {
-            $icons = '<img src="' . $OUTPUT->old_icon_url('spacer') . '" alt="" class="spacer" />';
+            $icons = '<img src="' . $OUTPUT->pix_url('spacer') . '" alt="" class="spacer" />';
         }
 
         // Move icons.
@@ -282,7 +282,7 @@ function icon_html($action, $qtypename, $icon, $alt, $tip) {
     $html = ' <form action="' . admin_url('qtypes.php') . '" method="post"><div>';
     $html .= '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
     $html .= '<input type="image" name="' . $action . '" value="' . $qtypename .
-            '" src="' . $OUTPUT->old_icon_url($icon) . '" alt="' . $alt . '" ' . $tip . '/>';
+            '" src="' . $OUTPUT->pix_url($icon) . '" alt="' . $alt . '" ' . $tip . '/>';
     $html .= '</div></form>';
     return $html;
 }
index 86dc289..2d2f9ad 100644 (file)
@@ -46,7 +46,7 @@ foreach ($columns as $column=>$strcolumn) {
         } else {
             $columnicon = $dir == 'ASC' ? 'down':'up';
         }
-        $columnicon = " <img src=\"" . $OUTPUT->old_icon_url('t/' . $columnicon) . "\" alt=\"\" />";
+        $columnicon = " <img src=\"" . $OUTPUT->pix_url('t/' . $columnicon) . "\" alt=\"\" />";
 
     }
     $hcolumns[$column] = "<a href=\"index.php?sort=$column&amp;dir=$columndir&amp;page=$page&amp;perpage=$perpage\">".$strcolumn."</a>$columnicon";
index 76fd7af..5e96bc1 100644 (file)
@@ -421,7 +421,7 @@ abstract class capability_table_with_risks extends capability_table_base {
     function get_risk_icon($type) {
         global $OUTPUT;
         if (!isset($this->riskicons[$type])) {
-            $iconurl = $OUTPUT->old_icon_url('i/' . str_replace('risk', 'risk_', $type));
+            $iconurl = $OUTPUT->pix_url('i/' . str_replace('risk', 'risk_', $type));
 
             $link = html_link::make($this->risksurl, '<img src="' . $iconurl . '" alt="' . get_string($type . 'short', 'admin') . '" />');
             $link->add_action(new popup_action('click', $link->url, 'docspopup'));
index 633c8ae..623a503 100755 (executable)
 function get_action_icon($url, $icon, $alt, $tooltip) {
     global $OUTPUT;
     return '<a title="' . $tooltip . '" href="'. $url . '">' .
-            '<img src="' . $OUTPUT->old_icon_url('t/' . $icon) . '" class="iconsmall" alt="' . $alt . '" /></a> ';
+            '<img src="' . $OUTPUT->pix_url('t/' . $icon) . '" class="iconsmall" alt="' . $alt . '" /></a> ';
 }
 function get_spacer() {
     global $OUTPUT;
-    return '<img src="' . $OUTPUT->old_icon_url('spacer') . '" class="iconsmall" alt="" /> ';
+    return '<img src="' . $OUTPUT->pix_url('spacer') . '" class="iconsmall" alt="" /> ';
 }
index b7d3aa6..0fddff7 100644 (file)
@@ -201,9 +201,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="' .
-                    $OUTPUT->old_icon_url('t/edit') . '" alt="' . $stredit . '" /></a> ';
+                    $OUTPUT->pix_url('t/edit') . '" alt="' . $stredit . '" /></a> ';
             echo ' <a title="' . $strcheck . '" href="' . $churl . '"><img class="iconsmall" src="' .
-                    $OUTPUT->old_icon_url('t/preview') . '" alt="' . $strcheckpermissions . '" /></a> ';
+                    $OUTPUT->pix_url('t/preview') . '" alt="' . $strcheckpermissions . '" /></a> ';
             echo "</p>\n";
         }
     }
index 4b78f94..ad8a4ab 100644 (file)
             } else {
                 $columnicon = $dir == "ASC" ? "down":"up";
             }
-            $columnicon = " <img src=\"" . $OUTPUT->old_icon_url('t/' . $columnicon) . "\" alt=\"\" />";
+            $columnicon = " <img src=\"" . $OUTPUT->pix_url('t/' . $columnicon) . "\" alt=\"\" />";
 
         }
         $$column = "<a href=\"user.php?sort=$column&amp;dir=$columndir\">".$string[$column]."</a>$columnicon";
index 1530eed..58c11b7 100755 (executable)
@@ -56,7 +56,7 @@ foreach ($columns as $column) {
         $columndir = 'asc';
     } else {
         $columndir = $dir == 'asc' ? 'desc' : 'asc';
-        $columnicon = ' <img src="'.$OUTPUT->old_icon_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'f" alt="" />';
+        $columnicon = ' <img src="'.$OUTPUT->pix_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'f" alt="" />';
     }
     $table->head[] = '<a href="user_bulk_display.php?sort='.$column.'&amp;dir='.$columndir.'">'.$strtitle.'</a>'.$columnicon;
     $table->align[] = 'left';
index 859a715..48ab6f2 100644 (file)
@@ -61,7 +61,7 @@ foreach ($columns as $column) {
         $columndir = 'asc';
     } else {
         $columndir = ($dir == 'asc') ? 'desc' : 'asc';
-        $columnicon = ' <img src="'.$OUTPUT->old_icon_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'" alt="" />';
+        $columnicon = ' <img src="'.$OUTPUT->pix_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'" alt="" />';
     }
     $table->head[] = '<a href="user_bulk_enrol.php?sort='.$column.'&amp;dir='.$columndir.'">'.$strtitle.'</a>'.$columnicon;
     $table->align[] = 'left';
index 3b8a820..4989926 100644 (file)
@@ -51,10 +51,10 @@ class block_activity_modules extends block_list {
         foreach ($modfullnames as $modname => $modfullname) {
             if ($modname === 'resources') {
                 $this->content->items[] = '<a href="'.$CFG->wwwroot.'/course/resources.php?id='.$course->id.'">'.$modfullname.'</a>';
-                $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('f/html') . '" class="icon" alt="" />';
+                $this->content->icons[] = '<img src="'.$OUTPUT->pix_url('f/html') . '" class="icon" alt="" />';
             } else {
                 $this->content->items[] = '<a href="'.$CFG->wwwroot.'/mod/'.$modname.'/index.php?id='.$course->id.'">'.$modfullname.'</a>';
-                $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('icon', $modname) . '" class="icon" alt="" />';
+                $this->content->icons[] = '<img src="'.$OUTPUT->pix_url('icon', $modname) . '" class="icon" alt="" />';
             }
         }
 
index ec7b4a2..f07f47f 100644 (file)
@@ -32,7 +32,7 @@ class block_admin extends block_list {
 
     /// Course editing on/off
         if ($course->id !== SITEID and has_capability('moodle/course:update', $this->page->context)) {
-            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/edit') . '" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_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 {
@@ -40,17 +40,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="'.$OUTPUT->old_icon_url('i/settings') . '" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/settings') . '" class="icon" alt="" />';
         }
 
     /// Assign roles to the course
         if ($course->id != SITEID) {
             if (has_capability('moodle/role:assign', $this->page->context)) {
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$this->page->context->id.'">'.get_string('assignroles', 'role').'</a>';
-                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/roles') . '" class="icon" alt="" />';
             } else if (get_overridable_roles($this->page->context, ROLENAME_ORIGINAL)) {
                 $this->content->items[]='<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$this->page->context->id.'">'.get_string('overridepermissions', 'role').'</a>';
-                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/roles') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/roles') . '" class="icon" alt="" />';
             }
         }
 
@@ -75,7 +75,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="'.$OUTPUT->old_icon_url('i/grades') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/grades') . '" class="icon" alt="" />';
             }
         }
 
@@ -83,7 +83,7 @@ class block_admin extends block_list {
         if (!empty($CFG->enableoutcomes)) {
             if ($course->id!==SITEID and has_capability('moodle/course:update', $this->page->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="'.$OUTPUT->old_icon_url('i/outcomes') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/outcomes') . '" class="icon" alt="" />';
             }
         }
 
@@ -92,11 +92,11 @@ class block_admin extends block_list {
             if (has_capability('moodle/course:managemetacourse', $this->page->context)) {
                 $strchildcourses = get_string('childcourses');
                 $this->content->items[]='<a href="importstudents.php?id='.$course->id.'">'.$strchildcourses.'</a>';
-                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/course') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/course') . '" class="icon" alt="" />';
             } else if (has_capability('moodle/role:assign', $this->page->context)) {
                 $strchildcourses = get_string('childcourses');
                 $this->content->items[]='<span class="dimmed_text">'.$strchildcourses.'</span>';
-                $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/course') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/course') . '" class="icon" alt="" />';
             }
         }
 
@@ -105,37 +105,37 @@ class block_admin extends block_list {
         if (($course->id!==SITEID) && ($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $this->page->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="'.$OUTPUT->old_icon_url('i/group') . '" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/group') . '" class="icon" alt="" />';
         }
 
     /// Backup this course
         if ($course->id!==SITEID and has_capability('moodle/site:backup', $this->page->context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/backup/backup.php?id='.$course->id.'">'.get_string('backup').'</a>';
-            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/backup') . '" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/backup') . '" class="icon" alt="" />';
         }
 
     /// Restore to this course
         if ($course->id !== SITEID and has_capability('moodle/site:restore', $this->page->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="'.$OUTPUT->old_icon_url('i/restore') . '" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/restore') . '" class="icon" alt="" />';
         }
 
     /// Import data from other courses
         if ($course->id !== SITEID and has_capability('moodle/site:import', $this->page->context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/course/import.php?id='.$course->id.'">'.get_string('import').'</a>';
-            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/restore') . '" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/restore') . '" class="icon" alt="" />';
         }
 
     /// Reset this course
         if ($course->id!==SITEID and has_capability('moodle/course:reset', $this->page->context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/course/reset.php?id='.$course->id.'">'.get_string('reset').'</a>';
-            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/return') . '" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/return') . '" class="icon" alt="" />';
         }
 
     /// View course reports
         if ($course->id !== SITEID and has_capability('moodle/site:viewreports', $this->page->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="'.$OUTPUT->old_icon_url('i/stats') . '" class="icon" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/stats') . '" class="icon" alt="" />';
         }
 
     /// Manage questions
@@ -161,7 +161,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="'.$OUTPUT->old_icon_url('i/questions') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/questions') . '" class="icon" alt="" />';
             }
         }
 
@@ -170,13 +170,13 @@ class block_admin extends block_list {
         $editabletypes = repository::get_editable_types($this->page->context);
         if ($course->id !== SITEID && has_capability('moodle/course:update', $this->page->context) && !empty($editabletypes)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/repository/manage_instances.php?contextid='.$this->page->context->id.'">'.get_string('repositories').'</a>';
-            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/repository') . '" alt=""/>';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/repository') . '" alt=""/>';
         }
 
     /// Manage files
         if ($course->id !== SITEID and has_capability('moodle/course:managefiles', $this->page->context)) {
             $this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$course->id.'">'.get_string('files').'</a>';
-            $this->content->icons[]='<img src="'.$OUTPUT->old_icon_url('i/files') . '" class="icon" alt=""/>';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/files') . '" class="icon" alt=""/>';
         }
 
     /// Authorize hooks
@@ -189,24 +189,24 @@ class block_admin extends block_list {
                 }
             }
             $this->content->items[] = $paymenturl;
-            $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('i/payment') . '" class="icon" alt="" />';
+            $this->content->icons[] = '<img src="'.$OUTPUT->pix_url('i/payment') . '" class="icon" alt="" />';
         }
 
     /// Unenrol link
         if (empty($course->metacourse) && ($course->id!==SITEID)) {
             if (has_capability('moodle/legacy:guest', $this->page->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="'.$OUTPUT->old_icon_url('i/user') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/user') . '" class="icon" alt="" />';
             } else if (has_capability('moodle/role:unassignself', $this->page->context, NULL, false) and get_user_roles($this->page->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="'.$OUTPUT->old_icon_url('i/user') . '" class="icon" alt="" />';
+                $this->content->icons[]='<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/user') . '" alt="" />';
+            $this->content->icons[]='<img src="'.$OUTPUT->pix_url('i/user') . '" alt="" />';
         }
 
         return $this->content;
index a0d9ed7..5351f21 100644 (file)
@@ -35,7 +35,7 @@ class block_admin_tree extends block_base {
         $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="'.$OUTPUT->old_icon_url('i/open') . '" alt="'.$strfolderopened.'" /> ';
+        $this->tempcontent .= '<img id="vh_div'.$this->divcounter.'indicator" src="'.$OUTPUT->pix_url('i/open') . '" alt="'.$strfolderopened.'" /> ';
         $this->tempcontent .= $visiblename.'</a></div><div id="vh_div'.$this->divcounter.'">'."\n";
         $this->currentdepth++;
         $this->divcounter++;
@@ -61,7 +61,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,$OUTPUT->old_icon_url('i/item'), $class);
+                $this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$OUTPUT->pix_url('i/item'), $class);
             }
         } else if ($content instanceof admin_externalpage) {
             // show hidden pages in tree if hidden page active
@@ -75,7 +75,7 @@ class block_admin_tree extends block_base {
                 if ($content->is_hidden()) {
                     $class .= ' hidden';
                 }
-                $this->create_item($content->visiblename, $content->url, $OUTPUT->old_icon_url('i/item'), $class);
+                $this->create_item($content->visiblename, $content->url, $OUTPUT->pix_url('i/item'), $class);
             }
         } else if ($content instanceof admin_category) {
             if ($content->check_access() and !$content->is_hidden()) {
@@ -141,7 +141,7 @@ class block_admin_tree extends block_base {
             $this->page->requires->js('blocks/admin_tree/admintree.js');
             $this->page->requires->js_function_call('admin_tree.init',
                     array($this->divcounter - 1, $this->expandnodes,
-                    $OUTPUT->old_icon_url('i/open'), $OUTPUT->old_icon_url('i/closed'),
+                    $OUTPUT->pix_url('i/open'), $OUTPUT->pix_url('i/closed'),
                     get_string('folderopened'), get_string('folderclosed')));
 
             $this->content = new object();
index f2363f4..010f914 100644 (file)
@@ -24,7 +24,7 @@ class block_course_list extends block_list {
         $this->content->icons = array();
         $this->content->footer = '';
 
-        $icon  = "<img src=\"" . $OUTPUT->old_icon_url('i/course') . "\"".
+        $icon  = "<img src=\"" . $OUTPUT->pix_url('i/course') . "\"".
                  " class=\"icon\" alt=\"".get_string("coursecategory")."\" />";
 
         $adminseesall = true;
@@ -116,7 +116,7 @@ class block_course_list extends block_list {
             return;
         }
 
-        $icon  = '<img src="'.$OUTPUT->old_icon_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
+        $icon  = '<img src="'.$OUTPUT->pix_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
 
         // only for logged in users!
         if (!isloggedin() || isguestuser()) {
index 5605632..38ea887 100644 (file)
@@ -35,7 +35,7 @@ class block_course_summary extends block_base {
             } else {
                 $editpage = $CFG->wwwroot.'/course/edit.php?id='.$this->page->course->id;
             }
-            $this->content->text .= "<div class=\"editbutton\"><a href=\"$editpage\"><img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" alt=\"".get_string('edit')."\" /></a></div>";
+            $this->content->text .= "<div class=\"editbutton\"><a href=\"$editpage\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" alt=\"".get_string('edit')."\" /></a></div>";
         }
         $this->content->footer = '';
 
index 175d9bc..b71955c 100644 (file)
@@ -163,7 +163,7 @@ class block_global_navigation_tree extends block_tree {
         $reloadicon->link->url = $this->page->url;
         $reloadicon->link->url->param('regenerate','navigation');
         $reloadicon->link->add_class('customcommand');
-        $reloadicon->image->src = $OUTPUT->old_icon_url('t/reload');
+        $reloadicon->image->src = $OUTPUT->pix_url('t/reload');
         $reloadicon->alt = get_string('reload');
         $reloadicon->title = get_string('reload');
         $this->content->footer .= $OUTPUT->action_icon($reloadicon);
@@ -175,12 +175,12 @@ class block_global_navigation_tree extends block_tree {
             $moveicon->link->add_classes('moveto customcommand requiresjs');
             $moveicon->link->url = $this->page->url;
             if ($this->docked) {
-                $moveicon->image->src = $OUTPUT->old_icon_url('t/movetoblock');
+                $moveicon->image->src = $OUTPUT->pix_url('t/movetoblock');
                 $moveicon->image->alt = $toggleblockdisplay;
                 $moveicon->image->title = $toggleblockdisplay;
                 $moveicon->link->url->param('undock', $this->instance->id);
             } else {
-                $moveicon->image->src = $OUTPUT->old_icon_url('t/movetosidetab');
+                $moveicon->image->src = $OUTPUT->pix_url('t/movetosidetab');
                 $moveicon->image->alt = $togglesidetabdisplay;
                 $moveicon->image->title = $togglesidetabdisplay;
                 $moveicon->link->url->param('dock', $this->instance->id);
index 7ba2401..4416ad9 100644 (file)
@@ -11,7 +11,7 @@ class block_loancalc extends block_base {
     function get_content() {
         global $CFG, $OUTPUT;
 
-        $calc = $OUTPUT->old_icon_url('i/calc');
+        $calc = $OUTPUT->pix_url('i/calc');
 
         $this->content->text = '
         <script type="text/javascript">
index 3f176f5..512a5dd 100644 (file)
@@ -47,7 +47,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 .= $OUTPUT->user_picture(moodle_user_picture::make($user, SITEID));
                 $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="'.$OUTPUT->old_icon_url('t/message') . '" 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->pix_url('t/message') . '" alt="" />&nbsp;'.$user->count.'</a>';
                 $this->content->text .= '</div></li>';
             }
             $this->content->text .= '</ul>';
index bafebf0..87ec465 100644 (file)
@@ -82,7 +82,7 @@ class block_mnet_hosts extends block_list {
 
         if ($hosts) {
             foreach ($hosts as $host) {
-            $icon  = '<img src="'.$OUTPUT->old_icon_url('i/'.$host->application.'_host') . '"'.
+            $icon  = '<img src="'.$OUTPUT->pix_url('i/'.$host->application.'_host') . '"'.
                 ' class="icon" alt="'.get_string('server', 'block_mnet_hosts').'" />';
 
                 $this->content->icons[]=$icon;
index aa951a9..cc0b245 100644 (file)
@@ -154,7 +154,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="'.$OUTPUT->old_icon_url('t/message') . '" alt="'. get_string('messageselectadd') .'" /></a></div>';
+                        .'<img class="iconsmall" src="'.$OUTPUT->pix_url('t/message') . '" alt="'. get_string('messageselectadd') .'" /></a></div>';
                 }
                 $this->content->text .= "</li>\n";
             }
index 3390868..1931a9b 100644 (file)
@@ -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="'.$OUTPUT->old_icon_url('i/users') . '" class="icon" alt="" />';
+        $this->content->icons[] = '<img src="'.$OUTPUT->pix_url('i/users') . '" class="icon" alt="" />';
 
         return $this->content;
     }
index 8181c9b..afac104 100644 (file)
@@ -120,14 +120,14 @@ foreach($feeds as $feed) {
     $editaction = new moodle_action_icon();
     $editaction->link->url = $CFG->wwwroot .'/blocks/rss_client/editfeed.php?rssid=' . $feed->id . $extraparams;
     $editaction->link->title = get_string('edit');
-    $editaction->image->src = $OUTPUT->old_icon_url('t/edit');
+    $editaction->image->src = $OUTPUT->pix_url('t/edit');
     $editaction->image->alt = get_string('edit');
 
     $deleteaction = new moodle_action_icon();
     $deleteaction->link->url = $CFG->wwwroot .'/blocks/rss_client/managefeeds.php?deleterssid=' . $feed->id .
             '&sesskey=' . sesskey() . $extraparams;
     $deleteaction->link->title = get_string('delete');
-    $deleteaction->image->src = $OUTPUT->old_icon_url('t/delete');
+    $deleteaction->image->src = $OUTPUT->pix_url('t/delete');
     $deleteaction->image->alt = get_string('delete');
     $deleteaction->link->add_confirm_action(get_string('deletefeedconfirm', 'block_rss_client'));
 
index 6ceb6e9..131b87f 100644 (file)
@@ -145,7 +145,7 @@ class block_settings_navigation_tree extends block_tree {
             $url->param('regenerate','navigation');
             $reloadicon->link->url = $url;
             $reloadicon->link->add_class('customcommand');
-            $reloadicon->image->src = $OUTPUT->old_icon_url('t/reload');
+            $reloadicon->image->src = $OUTPUT->pix_url('t/reload');
             $reloadicon->alt = get_string('reload');
             $reloadicon->title = get_string('reload');
 
@@ -158,12 +158,12 @@ class block_settings_navigation_tree extends block_tree {
                 $moveicon->link->add_classes('moveto customcommand requiresjs');
                 $moveicon->link->url = $this->page->url;
                 if ($this->docked) {
-                    $moveicon->image->src = $OUTPUT->old_icon_url('t/movetoblock');
+                    $moveicon->image->src = $OUTPUT->pix_url('t/movetoblock');
                     $moveicon->image->alt = $toggleblockdisplay;
                     $moveicon->image->title = $toggleblockdisplay;
                     $moveicon->link->url->param('undock', $this->instance->id);
                 } else {
-                    $moveicon->image->src = $OUTPUT->old_icon_url('t/movetosidetab');
+                    $moveicon->image->src = $OUTPUT->pix_url('t/movetosidetab');
                     $moveicon->image->alt = $togglesidetabdisplay;
                     $moveicon->image->title = $togglesidetabdisplay;
                     $moveicon->link->url->param('dock', $this->instance->id);
index 14d802a..093e3b7 100644 (file)
@@ -50,9 +50,9 @@ class block_site_main_menu extends block_list {
                             ' href="'.$CFG->wwwroot.'/mod/'.$cm->modname.'/view.php?id='.$cm->id.'">'.$instancename.'</a>';
                         //Accessibility: incidental image - should be empty Alt text
                         if (!empty($cm->icon)) {
-                            $icon = $OUTPUT->old_icon_url($cm->icon);
+                            $icon = $OUTPUT->pix_url($cm->icon);
                         } else {
-                            $icon = $OUTPUT->old_icon_url('icon', $cm->modname);
+                            $icon = $OUTPUT->pix_url('icon', $cm->modname);
                         }
                         $this->content->icons[] = '<img src="'.$icon.'" class="icon" alt="" />';
                     }
@@ -80,7 +80,7 @@ class block_site_main_menu extends block_list {
         $editbuttons = '';
 
         if ($ismoving) {
-            $this->content->icons[] = '<img src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" alt="" />';
+            $this->content->icons[] = '<img src="'.$OUTPUT->pix_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>)';
         }
 
@@ -110,7 +110,7 @@ class block_site_main_menu extends block_list {
                             continue;
                         }
                         $this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?moveto='.$mod->id.'&amp;sesskey='.sesskey().'">'.
-                            '<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->old_icon_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
+                            '<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->pix_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
                         $this->content->icons[] = '';
                     }
                     $instancename = $modinfo->cms[$modnumber]->name;
@@ -122,9 +122,9 @@ class block_site_main_menu extends block_list {
                         $extra = '';
                     }
                     if (!empty($modinfo->cms[$modnumber]->icon)) {
-                        $icon = $OUTPUT->old_icon_url($modinfo->cms[$modnumber]->icon);
+                        $icon = $OUTPUT->pix_url($modinfo->cms[$modnumber]->icon);
                     } else {
-                        $icon = $OUTPUT->old_icon_url('icon', $mod->modname);
+                        $icon = $OUTPUT->pix_url('icon', $mod->modname);
                     }
 
                     if ($mod->modname == 'label') {
@@ -142,7 +142,7 @@ class block_site_main_menu extends block_list {
 
         if ($ismoving) {
             $this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?movetosection='.$section->id.'&amp;sesskey='.sesskey().'">'.
-                                      '<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->old_icon_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
+                                      '<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->pix_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
             $this->content->icons[] = '';
         }
 
index 2ed93ad..6ce2d13 100644 (file)
@@ -52,9 +52,9 @@ class block_social_activities extends block_list {
                             ' href="'.$CFG->wwwroot.'/mod/'.$cm->modname.'/view.php?id='.$cm->id.'">'.$instancename.'</a>';
                         //Accessibility: incidental image - should be empty Alt text
                         if (!empty($cm->icon)) {
-                            $icon = $OUTPUT->old_icon_url($cm->icon);
+                            $icon = $OUTPUT->pix_url($cm->icon);
                         } else {
-                            $icon = $OUTPUT->old_icon_url('icon', $cm->modname);
+                            $icon = $OUTPUT->pix_url('icon', $cm->modname);
                         }
                         $this->content->icons[] = '<img src="'.$icon.'" class="icon" alt="" />';
                     }
@@ -89,7 +89,7 @@ class block_social_activities extends block_list {
         $editbuttons = '';
 
         if ($ismoving) {
-            $this->content->icons[] = '&nbsp;<img align="bottom" src="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" alt="" />';
+            $this->content->icons[] = '&nbsp;<img align="bottom" src="'.$OUTPUT->pix_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>)';
         }
 
@@ -119,7 +119,7 @@ class block_social_activities extends block_list {
                             continue;
                         }
                         $this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?moveto='.$mod->id.'&amp;sesskey='.sesskey().'">'.
-                            '<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->old_icon_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
+                            '<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->pix_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
                         $this->content->icons[] = '';
                     }
                     $instancename = $modinfo->cms[$modnumber]->name;
@@ -131,9 +131,9 @@ class block_social_activities extends block_list {
                         $extra = '';
                     }
                     if (!empty($modinfo->cms[$modnumber]->icon)) {
-                        $icon = $OUTPUT->old_icon_url($modinfo->cms[$modnumber]->icon);
+                        $icon = $OUTPUT->pix_url($modinfo->cms[$modnumber]->icon);
                     } else {
-                        $icon = $OUTPUT->old_icon_url('icon', $mod->modname);
+                        $icon = $OUTPUT->pix_url('icon', $mod->modname);
                     }
 
                     if ($mod->modname == 'label') {
@@ -151,7 +151,7 @@ class block_social_activities extends block_list {
 
         if ($ismoving) {
             $this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?movetosection='.$section->id.'&amp;sesskey='.sesskey().'">'.
-                                      '<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->old_icon_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
+                                      '<img style="height:16px; width:80px; border:0px" src="'.$OUTPUT->pix_url('movehere') . '" alt="'.$strmovehere.'" /></a>';
             $this->content->icons[] = '';
         }
 
index 4d8222e..2211e14 100644 (file)
@@ -234,7 +234,7 @@ class block_tags extends block_base {
                     $arrowtitle = get_string('arrowtitle', $tagslang);
                     $coursetaghelpbutton = $OUTPUT->help_icon(moodle_help_icon::make('addtags', 'adding tags', $tagslang));
                     $sesskey = sesskey();
-                    $arrowright = $OUTPUT->old_icon_url('t/arrow_left');
+                    $arrowright = $OUTPUT->pix_url('t/arrow_left');
                     $this->content->footer .= <<<EOT
                         <hr />
                         <form action="{$CFG->wwwroot}/tag/coursetags_add.php" method="post" id="coursetag"
index 796f970..5628a65 100644 (file)
@@ -72,12 +72,12 @@ if (!empty($blogs)) {
     $table->head = array(get_string('name'), get_string('url'), get_string('timefetched', 'blog'), get_string('valid', 'blog'), get_string('actions'));
 
     foreach ($blogs as $blog) {
-        $validicon = html_image::make($OUTPUT->old_icon_url('i/tick_green_big'));
+        $validicon = html_image::make($OUTPUT->pix_url('i/tick_green_big'));
         $validicon->alt = get_string('feedisvalid', 'blog');
         $validicon->title = get_string('feedisvalid', 'blog');
 
         if ($blog->failedlastsync) {
-            $validicon->src = $OUTPUT->old_icon_url('i/cross_red_big');
+            $validicon->src = $OUTPUT->pix_url('i/cross_red_big');
             $validicon->alt = get_string('feedisinvalid', 'blog');
             $validicon->title = get_string('feedisinvalid', 'blog');
         }
@@ -85,13 +85,13 @@ if (!empty($blogs)) {
         $editicon = new moodle_action_icon;
         $editicon->link->url = new moodle_url($CFG->wwwroot.'/blog/external_blog_edit.php', array('id' => $blog->id));
         $editicon->link->title = get_string('editexternalblog', 'blog');
-        $editicon->image->src = $OUTPUT->old_icon_url('t/edit');
+        $editicon->image->src = $OUTPUT->pix_url('t/edit');
         $editicon->image->alt = get_string('editexternalblog', 'blog');
 
         $deleteicon = new moodle_action_icon;
         $deleteicon->link->url = new moodle_url($CFG->wwwroot.'/blog/external_blogs.php', array('delete' => $blog->id, 'sesskey' => sesskey()));
         $deleteicon->link->title = get_string('deleteexternalblog', 'blog');
-        $deleteicon->image->src = $OUTPUT->old_icon_url('t/delete');
+        $deleteicon->image->src = $OUTPUT->pix_url('t/delete');
         $deleteicon->image->alt = get_string('deleteexternalblog', 'blog');
         $deleteicon->add_confirm_action(get_string('externalblogdeleteconfirm', 'blog'));
         $icons = $OUTPUT->action_icon($editicon) . $OUTPUT->action_icon($deleteicon);
index d63df1e..565ea9c 100644 (file)
@@ -239,7 +239,7 @@ class blog_entry {
                 if ($contextrec->contextlevel ==  CONTEXT_COURSE) {
                     $associcon = new moodle_action_icon();
                     $associcon->link->url = new moodle_url($CFG->wwwroot.'/course/view.php', array('id' => $contextrec->instanceid));
-                    $associcon->image->src = $OUTPUT->old_icon_url('i/course');
+                    $associcon->image->src = $OUTPUT->pix_url('i/course');
                     $associcon->linktext = $DB->get_field('course', 'shortname', array('id' => $contextrec->instanceid));
                     $assocstr .= $OUTPUT->action_icon($associcon);
                     $hascourseassocs = true;
@@ -262,7 +262,7 @@ class blog_entry {
 
                     $associcon = new moodle_action_icon();
                     $associcon->link->url = new moodle_url($CFG->wwwroot.'/mod/'.$modname.'/view.php', array('id' => $modinfo->id));
-                    $associcon->image->src = $OUTPUT->old_icon_url('icon', $modname);
+                    $associcon->image->src = $OUTPUT->pix_url('icon', $modname);
                     $associcon->linktext = $DB->get_field($modname, 'name', array('id' => $modinfo->instance));
                     $assocstr .= $OUTPUT->action_icon($associcon);
                     $assocstr .= ', ';
@@ -499,7 +499,7 @@ class blog_entry {
             $type     = mimeinfo_from_type("type", $mimetype);
 
             $image = new html_image();
-            $image->src = $OUTPUT->old_icon_url("/f/$icon");
+            $image->src = $OUTPUT->pix_url("/f/$icon");
             $image->add_class('icon');
             $image->alt = $filename;
 
index 5607814..11cd91c 100755 (executable)
@@ -35,7 +35,7 @@ function blog_rss_print_link($filtertype, $filterselect, $tagid=0, $tooltiptext=
     }
 
     $path .= '/rss.xml';
-    $rsspix = $OUTPUT->old_icon_url('i/rss');
+    $rsspix = $OUTPUT->pix_url('i/rss');
 
     require_once($CFG->libdir.'/filelib.php');
     $path = get_file_url($path, null, 'rssfile');
index 15c5756..ce1dead 100644 (file)
@@ -247,20 +247,20 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
                 }
                 $event = $events[$eventid];
                 if(!empty($event->modulename)) {
-                    $popupicon = $OUTPUT->old_icon_url('icon', $event->modulename) . '';
+                    $popupicon = $OUTPUT->pix_url('icon', $event->modulename) . '';
                     $popupalt  = $event->modulename;
 
                 } else if ($event->courseid == SITEID) {                                // Site event
-                    $popupicon = $OUTPUT->old_icon_url('c/site');
+                    $popupicon = $OUTPUT->pix_url('c/site');
                     $popupalt  = '';
                 } else if ($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) {      // Course event
-                    $popupicon = $OUTPUT->old_icon_url('c/course');
+                    $popupicon = $OUTPUT->pix_url('c/course');
                     $popupalt  = '';
                 } else if ($event->groupid) {                                      // Group event
-                    $popupicon = $OUTPUT->old_icon_url('c/group');
+                    $popupicon = $OUTPUT->pix_url('c/group');
                     $popupalt  = '';
                 } else if ($event->userid) {                                       // User event
-                    $popupicon = $OUTPUT->old_icon_url('c/user');
+                    $popupicon = $OUTPUT->pix_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>';
@@ -505,7 +505,7 @@ function calendar_add_event_metadata($event) {
 
         $modulename = get_string('modulename', $event->modulename);
         $eventtype = get_string($event->eventtype, $event->modulename);
-        $icon = $OUTPUT->old_icon_url('icon', $event->modulename) . '';
+        $icon = $OUTPUT->pix_url('icon', $event->modulename) . '';
 
         $event->icon = '<img height="16" width="16" src="'.$icon.'" alt="'.$eventtype.'" title="'.$modulename.'" style="vertical-align: middle;" />';
         $event->referer = '<a href="'.$CFG->wwwroot.'/mod/'.$event->modulename.'/view.php?id='.$module->id.'">'.$event->name.'</a>';
@@ -514,18 +514,18 @@ function calendar_add_event_metadata($event) {
 
 
     } else if($event->courseid == SITEID) {                              // Site event
-        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->old_icon_url('c/site') . '" alt="'.get_string('globalevent', 'calendar').'" style="vertical-align: middle;" />';
+        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('c/course') . '" alt="'.get_string('courseevent', 'calendar').'" style="vertical-align: middle;" />';
+        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('c/group') . '" alt="'.get_string('groupevent', 'calendar').'" style="vertical-align: middle;" />';
+        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('c/user') . '" alt="'.get_string('userevent', 'calendar').'" style="vertical-align: middle;" />';
+        $event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('c/user') . '" alt="'.get_string('userevent', 'calendar').'" style="vertical-align: middle;" />';
         $event->cssclass = 'event_user';
     }
     return $event;
@@ -590,11 +590,11 @@ function calendar_print_event($event, $showactions=true) {
             $deletelink = ''; // deleting activities directly from calendar is dangerous/confusing - see MDL-11843
         }
         echo ' <a href="'.$editlink.'"><img
-                  src="'.$OUTPUT->old_icon_url('t/edit') . '" alt="'.get_string('tt_editevent', 'calendar').'"
+                  src="'.$OUTPUT->pix_url('t/edit') . '" alt="'.get_string('tt_editevent', 'calendar').'"
                   title="'.get_string('tt_editevent', 'calendar').'" /></a>';
         if ($deletelink) {
             echo ' <a href="'.$deletelink.'"><img
-                      src="'.$OUTPUT->old_icon_url('t/delete') . '" alt="'.get_string('tt_deleteevent', 'calendar').'"
+                      src="'.$OUTPUT->pix_url('t/delete') . '" alt="'.get_string('tt_deleteevent', 'calendar').'"
                       title="'.get_string('tt_deleteevent', 'calendar').'" /></a>';
         }
         echo '</div>';
@@ -848,17 +848,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="'.$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 class="eventskey event_global" style="width: 11px;"><img src="'.$OUTPUT->pix_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="'.$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 style="width: 11px;"><img src="'.$OUTPUT->pix_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="'.$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 class="eventskey event_course" style="width: 11px;"><img src="'.$OUTPUT->pix_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="'.$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 style="width: 11px;"><img src="'.$OUTPUT->pix_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";
 
     }
@@ -870,10 +870,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="'.$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 class="eventskey event_group" style="width: 11px;"><img src="'.$OUTPUT->pix_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="'.$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 style="width: 11px;"><img src="'.$OUTPUT->pix_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 {
@@ -881,10 +881,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="'.$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 class="eventskey event_user" style="width: 11px;"><img src="'.$OUTPUT->pix_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="'.$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 style="width: 11px;"><img src="'.$OUTPUT->pix_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 18ed3b5..2cfbb9d 100644 (file)
@@ -191,7 +191,7 @@ if (!empty($CFG->enablecalendarexport)) {
         $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="'.$OUTPUT->old_icon_url('i/ical') . '" height="14" width="36" '
+             .'<img src="'.$OUTPUT->pix_url('i/ical') . '" height="14" width="36" '
              .'alt="'.get_string('ical', 'calendar').'" '
              .'title="'.get_string('quickdownloadcalendar', 'calendar').'" />'
              .'</a>';
index 50034cd..34c98a4 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="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.$stredit.'" /></a> ';
+                            '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/roles') . '" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ';
+                            '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.$strdelete.'" /></a> ';
+                            '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.$strhide.'" /></a> ';
+                            '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.$strshow.'" /></a> ';
+                            '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/backup') . '" class="iconsmall" alt="'.$strbackup.'" /></a> ';
+                            '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/restore') . '" class="iconsmall" alt="'.$strrestore.'" /></a> ';
+                         '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$strmoveup.'" /></a> ';
+                             '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$strmovedown.'" /></a> ';
+                             '<img src="'.$OUTPUT->pix_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="'.
-                         $OUTPUT->old_icon_url('i/guest') . '" alt="'.$strallowguests.'" /></a>';
+                         $OUTPUT->pix_url('i/guest') . '" alt="'.$strallowguests.'" /></a>';
                 }
                 if (!empty($acourse->password)) {
                     echo '<a href="view.php?id='.$acourse->id.'"><img title="'.
                          $strrequireskey.'" class="icon" src="'.
-                         $OUTPUT->old_icon_url('i/key') . '" alt="'.$strrequireskey.'" /></a>';
+                         $OUTPUT->pix_url('i/key') . '" alt="'.$strrequireskey.'" /></a>';
                 }
                 if (!empty($acourse->summary)) {
-                    $link = html_link::make("/course/info.php?id=$acourse->id", '<img alt="'.get_string('info').'" class="icon" src="'.$OUTPUT->old_icon_url('i/info') . '" />');
+                    $link = html_link::make("/course/info.php?id=$acourse->id", '<img alt="'.get_string('info').'" class="icon" src="'.$OUTPUT->pix_url('i/info') . '" />');
                     $link->add_action(new popup_action('click', $link->url, 'courseinfo'));
                     $link->title = $strsummary;
                     echo $OUTPUT->link($link);
index 9a1e56a..90e1ec7 100644 (file)
@@ -109,7 +109,7 @@ if ($thissection->summary or $thissection->sequence or $PAGE->user_is_editing())
 
     if ($PAGE->user_is_editing() && has_capability('moodle/course:update', $coursecontext)) {
         echo '<a title="'.$streditsummary.'" '.
-             ' href="editsection.php?id='.$thissection->id.'"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" '.
+             ' href="editsection.php?id='.$thissection->id.'"><img src="'.$OUTPUT->pix_url('t/edit') . '" '.
              ' class="icon edit" alt="'.$streditsummary.'" /></a>';
     }
     echo '</div>';
@@ -184,36 +184,36 @@ while ($section <= $course->numsections) {
 
         if ($displaysection == $section) {     // Show the zoom boxes
             echo '<a href="view.php?id='.$course->id.'&amp;topic=0#section-'.$section.'" title="'.$strshowalltopics.'">'.
-                 '<img src="'.$OUTPUT->old_icon_url('i/all') . '" class="icon" alt="'.$strshowalltopics.'" /></a><br />';
+                 '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/one') . '" class="icon" alt="'.$strshowonlytopic.'" /></a><br />';
+                 '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/marked') . '" 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->pix_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="'.$OUTPUT->old_icon_url('i/marker') . '" 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->pix_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="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon hide" alt="'.$strtopichide.'" /></a><br />';
+                     '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/show') . '" class="icon hide" alt="'.$strtopicshow.'" /></a><br />';
+                     '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/up') . '" class="icon up" alt="'.$strmoveup.'" /></a><br />';
+                     '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/down') . '" class="icon down" alt="'.$strmovedown.'" /></a><br />';
+                     '<img src="'.$OUTPUT->pix_url('t/down') . '" class="icon down" alt="'.$strmovedown.'" /></a><br />';
             }
         }
         echo '</div>';
@@ -232,7 +232,7 @@ while ($section <= $course->numsections) {
 
             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="'.$OUTPUT->old_icon_url('t/edit') . '" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
+                     '<img src="'.$OUTPUT->pix_url('t/edit') . '" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
             }
             echo '</div>';
 
index 7830bcf..069fe9a 100644 (file)
@@ -99,7 +99,7 @@
 
         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="'.$OUTPUT->old_icon_url('t/edit') . '" '.
+                 ' href="editsection.php?id='.$thissection->id.'"><img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/all') . '" class="icon wkall" alt="'.$strshowallweeks.'" /></a><br />';
+                     '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/one') . '" class="icon wkone" alt="'.$strshowonlyweek.'" /></a><br />';
+                     '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/hide') . '" class="icon hide" alt="'.$strweekhide.'" /></a><br />';
+                         '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/show') . '" class="icon hide" alt="'.$strweekshow.'" /></a><br />';
+                         '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/up') . '" class="icon up" alt="'.$strmoveup.'" /></a><br />';
+                         '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/down') . '" class="icon down" alt="'.$strmovedown.'" /></a><br />';
+                         '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/edit') . '" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
+                         '<img src="'.$OUTPUT->pix_url('t/edit') . '" class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
                 }
                 echo '</div>';
 
index ff82fd5..895feba 100644 (file)
@@ -327,28 +327,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="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.$str->edit.'" /></a> ';
+                 ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.$str->delete.'" /></a> ';
+                 ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" alt="'.$str->hide.'" /></a> ';
+                     ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" alt="'.$str->show.'" /></a> ';
+                     ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" alt="'.$str->moveup.'" /></a> ';
+                     ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" alt="'.$str->movedown.'" /></a> ';
+                     ' src="'.$OUTPUT->pix_url('t/down') . '" class="iconsmall" alt="'.$str->movedown.'" /></a> ';
             } else {
                 echo $str->spacer;
             }
index ded88b3..e30301d 100644 (file)
         echo $OUTPUT->box_start('generalbox icons');
         if ($course->guest) {
             $strallowguests = get_string('allowguests');
-            echo "<div><img alt=\"\" class=\"icon guest\" src=\"" . $OUTPUT->old_icon_url('i/guest') . "\" />&nbsp;$strallowguests</div>";
+            echo "<div><img alt=\"\" class=\"icon guest\" src=\"" . $OUTPUT->pix_url('i/guest') . "\" />&nbsp;$strallowguests</div>";
         }
         if ($course->password) {
             $strrequireskey = get_string('requireskey');
-            echo "<div><img alt=\"\" class=\"icon key\" src=\"" . $OUTPUT->old_icon_url('i/key') . "\" />&nbsp;$strrequireskey</div>";
+            echo "<div><img alt=\"\" class=\"icon key\" src=\"" . $OUTPUT->pix_url('i/key') . "\" />&nbsp;$strrequireskey</div>";
         }
         echo $OUTPUT->box_end();
     }
index cd0a314..80fbbaa 100644 (file)
@@ -1343,7 +1343,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
             if ($ismoving) {
                 echo '<a title="'.$strmovefull.'"'.
                      ' href="'.$CFG->wwwroot.'/course/mod.php?moveto='.$mod->id.'&amp;sesskey='.sesskey().'">'.
-                     '<img class="movetarget" src="'.$OUTPUT->old_icon_url('movehere') . '" '.
+                     '<img class="movetarget" src="'.$OUTPUT->pix_url('movehere') . '" '.
                      ' alt="'.$strmovehere.'" /></a><br />
                      ';
             }
@@ -1383,12 +1383,12 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
                 if (!empty($customicon)) {
                     if (substr($customicon, 0, 4) === 'mod/') {
                         list($modname, $iconname) = explode('/', substr($customicon, 4), 2);
-                        $icon = $OUTPUT->old_icon_url(str_replace(array('.gif', '.png'), '', $customicon), $modname);
+                        $icon = $OUTPUT->pix_url(str_replace(array('.gif', '.png'), '', $customicon), $modname);
                     } else {
-                        $icon = $OUTPUT->old_icon_url(str_replace(array('.gif', '.png'), '', $customicon));
+                        $icon = $OUTPUT->pix_url(str_replace(array('.gif', '.png'), '', $customicon));
                     }
                 } else {
-                    $icon = $OUTPUT->old_icon_url('icon', $mod->modname);
+                    $icon = $OUTPUT->pix_url('icon', $mod->modname);
                 }
 
                 //Accessibility: for files get description via icon, this is very ugly hack!
@@ -1506,7 +1506,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
                     }
                 }
                 if ($completionicon) {
-                    $imgsrc = $OUTPUT->old_icon_url('i/completion-'.$completionicon);
+                    $imgsrc = $OUTPUT->pix_url('i/completion-'.$completionicon);
                     $imgalt = get_string('completion-alt-'.$completionicon,'completion');
                     if ($completion==COMPLETION_TRACKING_MANUAL && !$isediting) {
                         $imgtitle = get_string('completion-title-'.$completionicon,'completion');
@@ -1570,7 +1570,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
     if ($ismoving) {
         echo '<li><a title="'.$strmovefull.'"'.
              ' href="'.$CFG->wwwroot.'/course/mod.php?movetosection='.$section->id.'&amp;sesskey='.sesskey().'">'.
-             '<img class="movetarget" src="'.$OUTPUT->old_icon_url('movehere') . '" '.
+             '<img class="movetarget" src="'.$OUTPUT->pix_url('movehere') . '" '.
              ' alt="'.$strmovehere.'" /></a></li>
              ';
     }
@@ -1952,7 +1952,7 @@ function print_category_info($category, $depth, $showcourses = false) {
     }
 
     if ($showcourses and $coursecount) {
-        $catimage = '<img src="'.$OUTPUT->old_icon_url('i/course') . '" alt="" />';
+        $catimage = '<img src="'.$OUTPUT->pix_url('i/course') . '" alt="" />';
     } else {
         $catimage = "&nbsp;";
     }
@@ -1996,23 +1996,23 @@ 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="'.$OUTPUT->old_icon_url('i/guest') . '" /></a>';
+                    echo '<img alt="'.$strallowguests.'" src="'.$OUTPUT->pix_url('i/guest') . '" /></a>';
                 } else {
-                    echo '<img alt="" style="width:18px;height:16px;" src="'.$OUTPUT->old_icon_url('spacer') . '" />';
+                    echo '<img alt="" style="width:18px;height:16px;" src="'.$OUTPUT->pix_url('spacer') . '" />';
                 }
                 if ($course->password) {
                     echo '<a title="'.$strrequireskey.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
-                    echo '<img alt="'.$strrequireskey.'" src="'.$OUTPUT->old_icon_url('i/key') . '" /></a>';
+                    echo '<img alt="'.$strrequireskey.'" src="'.$OUTPUT->pix_url('i/key') . '" /></a>';
                 } else {
-                    echo '<img alt="" style="width:18px;height:16px;" src="'.$OUTPUT->old_icon_url('spacer') . '" />';
+                    echo '<img alt="" style="width:18px;height:16px;" src="'.$OUTPUT->pix_url('spacer') . '" />';
                 }
                 if ($course->summary) {
-                    $link = html_link::make('/course/info.php?id='.$course->id, '<img alt="'.$strsummary.'" src="'.$OUTPUT->old_icon_url('i/info') . '" />');
+                    $link = html_link::make('/course/info.php?id='.$course->id, '<img alt="'.$strsummary.'" src="'.$OUTPUT->pix_url('i/info') . '" />');
                     $link->add_action(new popup_action('click', $link->url, 'courseinfo', array('height' => 400, 'width' => 500)));
                     $link->title = $strsummary;
                     echo $OUTPUT->link($link);
                 } else {
-                    echo '<img alt="" style="width:18px;height:16px;" src="'.$OUTPUT->old_icon_url('spacer') . '" />';
+                    echo '<img alt="" style="width:18px;height:16px;" src="'.$OUTPUT->pix_url('spacer') . '" />';
                 }
                 echo '</td></tr>';
             }
@@ -2215,7 +2215,7 @@ function print_course($course, $highlightterms = '') {
                     if ($ra->hidden == 0 || $canseehidden) {
                         $fullname = fullname($ra->user, $canviewfullnames);
                         if ($ra->hidden == 1) {
-                            $status = " <img src=\"" . $OUTPUT->old_icon_url('t/show') . "\" title=\"".get_string('userhashiddenassignments', 'role')."\" alt=\"".get_string('hiddenassign')."\" class=\"hide-show-image\"/>";
+                            $status = " <img src=\"" . $OUTPUT->pix_url('t/show') . "\" title=\"".get_string('userhashiddenassignments', 'role')."\" alt=\"".get_string('hiddenassign')."\" class=\"hide-show-image\"/>";
                         } else {
                             $status = '';
                         }
@@ -2423,7 +2423,7 @@ function print_remote_host($host, $width="100%") {
     echo '<div class="coursebox clearfix">';
     echo '<div class="info">';
     echo '<div class="name">';
-    echo '<img src="'.$OUTPUT->old_icon_url('i/mnethost') . '" class="icon" alt="'.get_string('course').'" />';
+    echo '<img src="'.$OUTPUT->pix_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');
@@ -2859,12 +2859,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="'.$OUTPUT->old_icon_url('t/hide') . '" class="iconsmall" '.
+                        ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/show') . '" class="iconsmall" '.
+                        ' src="'.$OUTPUT->pix_url('t/show') . '" class="iconsmall" '.
                         ' alt="'.$str->show.'" /></a>'."\n";
         }
     } else {
@@ -2875,17 +2875,17 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
         if ($mod->groupmode == SEPARATEGROUPS) {
             $grouptitle = $str->groupsseparate;
             $groupclass = 'editing_groupsseparate';
-            $groupimage = $OUTPUT->old_icon_url('t/groups') . '';
+            $groupimage = $OUTPUT->pix_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 = $OUTPUT->old_icon_url('t/groupv') . '';
+            $groupimage = $OUTPUT->pix_url('t/groupv') . '';
             $grouplink  = $path.'/mod.php?id='.$mod->id.'&amp;groupmode=1&amp;sesskey='.$sesskey;
         } else {
             $grouptitle = $str->groupsnone;
             $groupclass = 'editing_groupsnone';
-            $groupimage = $OUTPUT->old_icon_url('t/groupn') . '';
+            $groupimage = $OUTPUT->pix_url('t/groupn') . '';
             $grouplink  = $path.'/mod.php?id='.$mod->id.'&amp;groupmode=2&amp;sesskey='.$sesskey;
         }
         if ($mod->groupmodelink) {
@@ -2905,16 +2905,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="'.$OUTPUT->old_icon_url('t/move') . '" class="iconsmall" '.
+                        ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/up') . '" class="iconsmall" '.
+                        ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/down') . '" class="iconsmall" '.
+                        ' src="'.$OUTPUT->pix_url('t/down') . '" class="iconsmall" '.
                         ' alt="'.$str->movedown.'" /></a>'."\n";
         }
     } else {
@@ -2935,20 +2935,20 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
         if ($indent > 0) {
             $leftright .= '<a class="editing_moveleft" title="'.$str->moveleft.'" href="'.$path.'/mod.php?id='.$mod->id.
                         '&amp;indent=-1&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$OUTPUT->old_icon_url($leftarrow).'" class="iconsmall" '.
+                        ' src="'.$OUTPUT->pix_url($leftarrow).'" class="iconsmall" '.
                         ' alt="'.$str->moveleft.'" /></a>'."\n";
         }
         if ($indent >= 0) {
             $leftright .= '<a class="editing_moveright" title="'.$str->moveright.'" href="'.$path.'/mod.php?id='.$mod->id.
                         '&amp;indent=1&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$OUTPUT->old_icon_url($rightarrow).'" class="iconsmall" '.
+                        ' src="'.$OUTPUT->pix_url($rightarrow).'" class="iconsmall" '.
                         ' alt="'.$str->moveright.'" /></a>'."\n";
         }
     }
     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="'.$OUTPUT->old_icon_url('i/roles') . '" alt="'.$str->assign.'" class="iconsmall"/></a>';
+            $context->id.'"><img src="'.$OUTPUT->pix_url('i/roles') . '" alt="'.$str->assign.'" class="iconsmall"/></a>';
     } else {
         $assign = '';
     }
@@ -2956,11 +2956,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="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" '.
+           ' src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" '.
+           ' src="'.$OUTPUT->pix_url('t/delete') . '" class="iconsmall" '.
            ' alt="'.$str->delete.'" /></a>'."\n".$hideshow.$groupmode."\n".$assign.'</span>';
 }
 
index d73366c..aaf2c1d 100644 (file)
         $helpicon->page = 'mods';
         $helpicon->text = $pageheading;
         $helpicon->module = $module->name;
-        echo $OUTPUT->heading_with_help($helpicon, $OUTPUT->old_icon_url('icon', $module->name));
+        echo $OUTPUT->heading_with_help($helpicon, $OUTPUT->pix_url('icon', $module->name));
 
         $mform->display();
 
index 3fc067a..717239c 100644 (file)
@@ -107,7 +107,7 @@ if (empty($pending)) {
 
     // Loop over requested courses.
     $keyicon = new html_image();
-    $keyicon->src = $OUTPUT->old_icon_url('i/key');
+    $keyicon->src = $OUTPUT->pix_url('i/key');
     $keyicon->alt = $strrequireskey;
     $keyicon->add_class('icon');
     $keyicon = $OUTPUT->image($keyicon);
index f363199..31e8cbc 100644 (file)
@@ -246,7 +246,7 @@ if (!empty($activities)) {
                 $name        = format_string($cm->name);
                 $modfullname = $modnames[$cm->modname];
 
-                $image = "<img src=\"" . $OUTPUT->old_icon_url('icon', $cm->modname) . "\" class=\"icon\" alt=\"$modfullname\" />";
+                $image = "<img src=\"" . $OUTPUT->pix_url('icon', $cm->modname) . "\" class=\"icon\" alt=\"$modfullname\" />";
                 echo "<h4>$image $modfullname".
                      " <a href=\"$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id\" $linkformat>$name</a></h4>";
            }
index c430168..58b6ea5 100644 (file)
@@ -560,12 +560,12 @@ function log_report_extend_navigation($navigation, $course, $context) {
     global $CFG, $OUTPUT;
     if (has_capability('coursereport/log:view', $context)) {
         $url = new moodle_url($CFG->wwwroot.'/course/report/log/index.php', array('id'=>$course->id));
-        $navigation->add(get_string('log:view', 'coursereport_log'), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/report'));
+        $navigation->add(get_string('log:view', 'coursereport_log'), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/report'));
     }
     if (has_capability('coursereport/log:viewlive', $context)) {
         $livelogs = get_string('livelogs');
         $link = html_link::make('/course/report/log/live.php?id='. $course->id, $livelogs);
         $link->add_action(new popup_action('click', $link->url, 'livelog', array('height' => 500, 'width' => 800)));
-        $navigation->add($livelogs, $link, navigation_node::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/report'));
+        $navigation->add($livelogs, $link, navigation_node::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/report'));
     }
 }
\ No newline at end of file
index 985b25f..1ffacc9 100644 (file)
             $activitycell = new html_table_cell();
             $activitycell->add_class('activity');
 
-            $activityicon = html_image::make($OUTPUT->old_icon_url('icon', $cm->modname));
+            $activityicon = html_image::make($OUTPUT->pix_url('icon', $cm->modname));
             $activityicon->add_class('icon');
             $activityicon->alt = $modulename;
 
index 2c6e6c3..7c933c2 100644 (file)
@@ -35,6 +35,6 @@ function outline_report_extend_navigation($navigation, $course, $context) {
     global $CFG, $OUTPUT;
     if (has_capability('coursereport/outline:view', $context)) {
         $url = new moodle_url($CFG->wwwroot.'/course/report/outline/index.php', array('id'=>$course->id));
-        $navigation->add(get_string( 'activityreport' ), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/report'));
+        $navigation->add(get_string( 'activityreport' ), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/report'));
     }
 }
\ No newline at end of file
index dd00251..22464ab 100644 (file)
@@ -35,6 +35,6 @@ function participation_report_extend_navigation($navigation, $course, $context)
     global $CFG, $OUTPUT;
     if (has_capability('coursereport/participation:view', $context)) {
         $url = new moodle_url($CFG->wwwroot.'/course/report/participation/index.php', array('id'=>$course->id));
-        $navigation->add(get_string('participationreport'), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/report'));
+        $navigation->add(get_string('participationreport'), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/report'));
     }
 }
\ No newline at end of file
index 8318a60..b2c5ff3 100644 (file)
@@ -198,7 +198,7 @@ foreach($activities as $activity) {
         print '<th scope="col" class="'.$activity->datepassedclass.'">'.
             '<a href="'.$CFG->wwwroot.'/mod/'.$activity->modname.
             '/view.php?id='.$activity->id.'">'.
-            '<img src="'.$OUTPUT->old_icon_url('icon', $activity->modname).'/icon.gif" alt="'.
+            '<img src="'.$OUTPUT->pix_url('icon', $activity->modname).'/icon.gif" alt="'.
             get_string('modulename',$activity->modname).'" /> <span class="completion-activityname">'.
             format_string($activity->name).'</span></a>';
         if($activity->completionexpected) {
@@ -267,7 +267,7 @@ foreach($progress->users as $user) {
             print $sep.csv_quote($describe).$sep.csv_quote($date);
         } else {
             print '<td class="completion-progresscell '.$activity->datepassedclass.'">'.
-                '<img src="'.$OUTPUT->old_icon_url('i/'.$completionicon).
+                '<img src="'.$OUTPUT->pix_url('i/'.$completionicon).
                 '" alt="'.$describe.'" title="'.$fulldescribe.'" /></td>';
         }
     }
index 9eef33d..9ac96ca 100644 (file)
@@ -35,6 +35,6 @@ function progress_report_extend_navigation($navigation, $course, $context) {
     global $CFG, $OUTPUT;
     if (has_capability('coursereport/progress:view', $context)) {
         $url = new moodle_url($CFG->wwwroot.'/course/report/progress/index.php', array('course'=>$course->id));
-        $navigation->add(get_string('completionreport','completion'), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/report'));
+        $navigation->add(get_string('completionreport','completion'), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/report'));
     }
 }
\ No newline at end of file
index b9702d0..c886d38 100644 (file)
@@ -87,7 +87,7 @@ function stats_report_extend_navigation($navigation, $course, $context) {
     if (has_capability('coursereport/stats:view', $context)) {
         if (!empty($CFG->enablestats)) {
             $url = new moodle_url($CFG->wwwroot.'/course/report/stats/index.php', array('id'=>$course->id));
-            $navigation->add(get_string('stats'), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/report'));
+            $navigation->add(get_string('stats'), $url, navigation_node::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/report'));
         }
     }
 }
\ No newline at end of file
index 6ed85ae..2778c7d 100644 (file)
@@ -125,9 +125,9 @@ foreach ($cms as $cm) {
 
     $extra = empty($cm->extra) ? '' : $cm->extra;
     if (!empty($cm->icon)) {
-        $icon = '<img src="'.$OUTPUT->old_icon_url($cm->icon).'" class="activityicon" alt="" /> ';
+        $icon = '<img src="'.$OUTPUT->pix_url($cm->icon).'" class="activityicon" alt="" /> ';
     } else {
-        $icon = '<img src="'.$OUTPUT->old_icon_url('icon', $cm->modname).'" class="activityicon" alt="" /> ';
+        $icon = '<img src="'.$OUTPUT->pix_url('icon', $cm->modname).'" class="activityicon" alt="" /> ';
     }
 
     $class = $cm->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed
index 38bedc5..011209c 100644 (file)
                 // checks whether user can update course settings
                 if (has_capability('moodle/course:update', $coursecontext)) {
                     echo "<a title=\"".get_string("settings")."\" href=\"$CFG->wwwroot/course/edit.php?id=$course->id\">\n<img".
-                        " src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"".get_string("settings")."\" /></a>\n ";
+                        " src=\"" . $OUTPUT->pix_url('t/edit') . "\" class=\"iconsmall\" alt=\"".get_string("settings")."\" /></a>\n ";
                 }
 
                 // 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="'.$OUTPUT->old_icon_url('i/roles') . '" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
+                    echo '<img src="'.$OUTPUT->pix_url('i/roles') . '" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
                 }
 
                 // checks whether user can delete course
                 if (has_capability('moodle/course:delete', $coursecontext)) {
                     echo "<a title=\"".get_string("delete")."\" href=\"delete.php?id=$course->id\">\n<img".
-                        " src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"".get_string("delete")."\" /></a>\n ";
+                        " src=\"" . $OUTPUT->pix_url('t/delete') . "\" class=\"iconsmall\" alt=\"".get_string("delete")."\" /></a>\n ";
                 }
 
                 // checks whether user can change visibility
                 if (has_capability('moodle/course:visibility', $coursecontext)) {
                     if (!empty($course->visible)) {
                         echo "<a title=\"".get_string("hide")."\" href=\"search.php?search=$encodedsearch&amp;perpage=$perpage&amp;page=$page&amp;hide=$course->id&amp;sesskey=".sesskey()."\">\n<img".
-                            " src=\"" . $OUTPUT->old_icon_url('t/hide') . "\" class=\"iconsmall\" alt=\"".get_string("hide")."\" /></a>\n ";
+                            " src=\"" . $OUTPUT->pix_url('t/hide') . "\" class=\"iconsmall\" alt=\"".get_string("hide")."\" /></a>\n ";
                     } else {
                         echo "<a title=\"".get_string("show")."\" href=\"search.php?search=$encodedsearch&amp;perpage=$perpage&amp;page=$page&amp;show=$course->id&amp;sesskey=".sesskey()."\">\n<img".
-                            " src=\"" . $OUTPUT->old_icon_url('t/show') . "\" class=\"iconsmall\" alt=\"".get_string("show")."\" /></a>\n ";
+                            " src=\"" . $OUTPUT->pix_url('t/show') . "\" class=\"iconsmall\" alt=\"".get_string("show")."\" /></a>\n ";
                     }
                 }
 
                 // checks whether user can do site backup
                 if (has_capability('moodle/site:backup', $coursecontext)) {
                     echo "<a title=\"".get_string("backup")."\" href=\"../backup/backup.php?id=$course->id\">\n<img".
-                        " src=\"" . $OUTPUT->old_icon_url('t/backup') . "\" class=\"iconsmall\" alt=\"".get_string("backup")."\" /></a>\n ";
+                        " src=\"" . $OUTPUT->pix_url('t/backup') . "\" class=\"iconsmall\" alt=\"".get_string("backup")."\" /></a>\n ";
                 }
 
                 // checks whether user can do restore
                 if (has_capability('moodle/site:restore', $coursecontext)) {
                     echo "<a title=\"".get_string("restore")."\" href=\"../files/index.php?id=$course->id&amp;wdir=/backupdata\">\n<img".
-                        " src=\"" . $OUTPUT->old_icon_url('t/restore') . "\" class=\"iconsmall\" alt=\"".get_string("restore")."\" /></a>\n ";
+                        " src=\"" . $OUTPUT->pix_url('t/restore') . "\" class=\"iconsmall\" alt=\"".get_string("restore")."\" /></a>\n ";
                 }
 
                 echo "</td>\n</tr>\n";
index 1293ae2..9d673ff 100644 (file)
@@ -367,7 +367,7 @@ echo $OUTPUT->footer();
 function print_outline_row($mod, $instance, $result) {
     global $OUTPUT;
 
-    $image = "<img src=\"" . $OUTPUT->old_icon_url('icon', $mod->modname) . "\" class=\"icon\" alt=\"$mod->modfullname\" />";
+    $image = "<img src=\"" . $OUTPUT->pix_url('icon', $mod->modname) . "\" class=\"icon\" alt=\"$mod->modfullname\" />";
 
     echo "<tr>";
     echo "<td valign=\"top\">$image</td>";
index a41cfe1..449bde5 100644 (file)
@@ -388,11 +388,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="'.$OUTPUT->old_icon_url('i/guest') . '" /></a>&nbsp;&nbsp;';
+        $str .= '<img class="accessicon" alt="'.$strallowguests.'" src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/key') . '" /></a>';
+        $str .= '<img class="accessicon" alt="'.$strrequireskey.'" src="'.$OUTPUT->pix_url('i/key') . '" /></a>';
     }
 
     return $str;
index dd84fc0..9569301 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="'.$OUTPUT->old_icon_url('f/parent') . '" 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->pix_url('f/parent') . '" class="icon" alt="" />&nbsp;'.get_string('parentfolder').'</a>';
     echo '</div>';
 }
 
@@ -150,16 +150,16 @@ foreach ($files as $file) {
             $dirname = explode('/', trim($filepath, '/'));
             $dirname = array_pop($dirname);
             echo '<div class="folder">';
-            echo "<a href=\"draftfiles.php?itemid=$itemid&amp;filepath=$filepath&amp;subdirs=$subdirs&amp;maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->old_icon_url('f/folder') . "\" class=\"icon\" alt=\"$strfolder\" />&nbsp;".s($dirname)."</a> ";
-            echo "<a href=\"draftfiles.php?itemid=$itemid&amp;filepath=$filepath&amp;delete=$filenameurl&amp;subdirs=$subdirs&amp;maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>";
+            echo "<a href=\"draftfiles.php?itemid=$itemid&amp;filepath=$filepath&amp;subdirs=$subdirs&amp;maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->pix_url('f/folder') . "\" class=\"icon\" alt=\"$strfolder\" />&nbsp;".s($dirname)."</a> ";
+            echo "<a href=\"draftfiles.php?itemid=$itemid&amp;filepath=$filepath&amp;delete=$filenameurl&amp;subdirs=$subdirs&amp;maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->pix_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>";
             echo '</div>';
         }
 
     } else {
         $viewurl = file_encode_url("$CFG->wwwroot/draftfile.php", "/$contextid/user_draft/$itemid".$filepath.$filename, false, false);
         echo '<div class="file">';
-        echo "<a href=\"$viewurl\"><img src=\"" . $OUTPUT->old_icon_url(file_mimetype_icon($mimetype)) . "\" class=\"icon\" alt=\"$strfile\" />&nbsp;".s($filename)." ($filesize)</a> ";
-        echo "<a href=\"draftfiles.php?itemid=$itemid&amp;filepath=$filepath&amp;delete=$filenameurl&amp;subdirs=$subdirs&amp;maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>";;
+        echo "<a href=\"$viewurl\"><img src=\"" . $OUTPUT->pix_url(file_mimetype_icon($mimetype)) . "\" class=\"icon\" alt=\"$strfile\" />&nbsp;".s($filename)." ($filesize)</a> ";
+        echo "<a href=\"draftfiles.php?itemid=$itemid&amp;filepath=$filepath&amp;delete=$filenameurl&amp;subdirs=$subdirs&amp;maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->pix_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>";;
         echo '</div>';
     }
 }
index 42868b1..4d9e480 100644 (file)
@@ -254,7 +254,7 @@ function displaydir($file_info) {
 
         echo "<tr class=\"folder\">";
         print_cell();
-        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('left', '<a href="index.php?'.$params.'"><img src="'.$OUTPUT->pix_url('f/parent') . '" class="icon" alt="" />&nbsp;'.get_string('parentfolder').'</a>', 'name');
         print_cell();
         print_cell();
         print_cell();
@@ -279,11 +279,11 @@ function displaydir($file_info) {
 
                 echo "<tr class=\"folder\">";
                 print_cell();
-                print_cell("left", "<a href=\"index.php?$params\"><img src=\"" . $OUTPUT->old_icon_url('f/folder') . "\" class=\"icon\" alt=\"$strfolder\" />&nbsp;".s($filename)."</a>", 'name');
+                print_cell("left", "<a href=\"index.php?$params\"><img src=\"" . $OUTPUT->pix_url('f/folder') . "\" class=\"icon\" alt=\"$strfolder\" />&nbsp;".s($filename)."</a>", 'name');
                 print_cell("right", $filesize, 'size');
                 print_cell("right", $filedate, 'date');
                 if ($parentwritable) {
-                    print_cell("right", "<a href=\"index.php?$params&amp;sesskey=".sesskey()."&amp;delete=1\"><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>", 'command');
+                    print_cell("right", "<a href=\"index.php?$params&amp;sesskey=".sesskey()."&amp;delete=1\"><img src=\"" . $OUTPUT->pix_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>", 'command');
                 } else {
                     print_cell();
                 }
@@ -292,13 +292,13 @@ function displaydir($file_info) {
             } else {
 
                 if ($downloadurl = $child_info->get_url(true)) {
-                    $downloadurl = "&nbsp;<a href=\"$downloadurl\" title=\"" . get_string('downloadfile') . "\"><img src=\"" . $OUTPUT->old_icon_url('t/down') . "\" class=\"iconsmall\" alt=\"$strdownload\" /></a>";
+                    $downloadurl = "&nbsp;<a href=\"$downloadurl\" title=\"" . get_string('downloadfile') . "\"><img src=\"" . $OUTPUT->pix_url('t/down') . "\" class=\"iconsmall\" alt=\"$strdownload\" /></a>";
                 } else {
                     $downloadurl = '';
                 }
 
                 if ($viewurl = $child_info->get_url()) {
-                    $link = html_link::make($viewurl, "display", "<img src=\"" . $OUTPUT->old_icon_url('t/preview') . "\" class=\"iconsmall\" alt=\"$strfile\" />&nbsp;");
+                    $link = html_link::make($viewurl, "display", "<img src=\"" . $OUTPUT->pix_url('t/preview') . "\" class=\"iconsmall\" alt=\"$strfile\" />&nbsp;");
                     $link->add_action(new popup_action('click', $link->url, 'display', array('height' => 480, 'width' => 640)));
                     $viewurl = "&nbsp;".$OUTPUT->link($link);
                 } else {
@@ -309,11 +309,11 @@ function displaydir($file_info) {
 
                 echo "<tr class=\"file\">";
                 print_cell();
-                print_cell("left", "<img src=\"" . $OUTPUT->old_icon_url(file_mimetype_icon($mimetype)) . "\" class=\"icon\" alt=\"$strfile\" />&nbsp;".s($filename).$downloadurl.$viewurl, 'name');
+                print_cell("left", "<img src=\"" . $OUTPUT->pix_url(file_mimetype_icon($mimetype)) . "\" class=\"icon\" alt=\"$strfile\" />&nbsp;".s($filename).$downloadurl.$viewurl, 'name');
                 print_cell("right", $filesize, 'size');
                 print_cell("right", $filedate, 'date');
                 if ($parentwritable) {
-                    print_cell("right", "<a href=\"index.php?$params&amp;sesskey=".sesskey()."&amp;delete=1\"><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>", 'command');
+                    print_cell("right", "<a href=\"index.php?$params&amp;sesskey=".sesskey()."&amp;delete=1\"><img src=\"" . $OUTPUT->pix_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>", 'command');
                 } else {
                     print_cell();
                 }
index a3c0764..e25c0a9 100755 (executable)
@@ -137,7 +137,7 @@ class grade_edit_tree {
             if ($this->element_deletable($element)) {
                 $actionicon = new moodle_action_icon();
                 $actionicon->link->url = new moodle_url('index.php', array('id' => $COURSE->id, 'action' => 'delete', 'eid' => $eid, 'sesskey' => sesskey()));
-                $actionicon->image->src = $OUTPUT->old_icon_url('t/delete');
+                $actionicon->image->src = $OUTPUT->pix_url('t/delete');
                 $actionicon->image->alt = get_string('delete');
                 $actionicon->image->title = get_string('delete');
                 $actionicon->image->add_class('iconsmall');
@@ -146,7 +146,7 @@ class grade_edit_tree {
 
             $actionicon = new moodle_action_icon();
             $actionicon->link->url = new moodle_url('index.php', array('id' => $COURSE->id, 'action' => 'moveselect', 'eid' => $eid, 'sesskey' => sesskey()));
-            $actionicon->image->src = $OUTPUT->old_icon_url('t/move');
+            $actionicon->image->src = $OUTPUT->pix_url('t/move');
             $actionicon->image->alt = get_string('move');
             $actionicon->image->title = get_string('move');
             $actionicon->image->add_class('iconsmall');
@@ -224,7 +224,7 @@ class grade_edit_tree {
                         $moveicon->link->url->params($first);
                     }
                     $moveicon->image->add_class('movetarget');
-                    $moveicon->image->src = $OUTPUT->old_icon_url('movehere');
+                    $moveicon->image->src = $OUTPUT->pix_url('movehere');
                     $moveicon->image->alt = $strmovehere;
                     $moveicon->image->title = $strmovehere;
 
index ae43b83..84f0f24 100644 (file)
@@ -61,13 +61,13 @@ if ($keys) {
         $icon->image->add_class('iconsmall');
 
         $editicon = clone($icon);
-        $editicon->image->src = $OUTPUT->old_icon_url('t/edit');
+        $editicon->image->src = $OUTPUT->pix_url('t/edit');
         $editicon->image->title = $stredit;
         $editicon->image->alt = $stredit;
         $buttons = $OUTPUT->action_icon($editicon);
 
         $deleteicon = clone($icon);
-        $deleteicon->image->src = $OUTPUT->old_icon_url('t/delete');
+        $deleteicon->image->src = $OUTPUT->pix_url('t/delete');
         $deleteicon->image->title = $strdelete;
         $deleteicon->image->alt = $strdelete;
         $deleteicon->link->url->param('delete', 1);
index b450292..8d6ff0f 100644 (file)
@@ -58,13 +58,13 @@ if ($keys = $DB->get_records_select('user_private_key', "script='grade/import' A
         $icon->image->add_class('iconsmall');
 
         $editicon = clone($icon);
-        $editicon->image->src = $OUTPUT->old_icon_url('t/edit');
+        $editicon->image->src = $OUTPUT->pix_url('t/edit');
         $editicon->image->title = $stredit;
         $editicon->image->alt = $stredit;
         $buttons = $OUTPUT->action_icon($editicon);
 
         $deleteicon = clone($icon);
-        $deleteicon->image->src = $OUTPUT->old_icon_url('t/delete');
+        $deleteicon->image->src = $OUTPUT->pix_url('t/delete');
         $deleteicon->image->title = $strdelete;
         $deleteicon->image->alt = $strdelete;
         $deleteicon->link->url->param('delete', 1);
index 8453e5a..6eff54f 100644 (file)
@@ -1222,7 +1222,7 @@ class grade_structure {
 
                 if ($element['object']->is_calculated()) {
                     $strcalc = get_string('calculatedgrade', 'grades');
-                    return '<img src="'.$OUTPUT->old_icon_url('i/calc') . '" class="icon itemicon" title="'.
+                    return '<img src="'.$OUTPUT->pix_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)) {
@@ -1234,18 +1234,18 @@ class grade_structure {
                             case GRADE_AGGREGATE_WEIGHTED_MEAN2:
                             case GRADE_AGGREGATE_EXTRACREDIT_MEAN:
                                 $stragg = get_string('aggregation', 'grades');
-                                return '<img src="'.$OUTPUT->old_icon_url('i/agg_mean') . '" ' .
+                                return '<img src="'.$OUTPUT->pix_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="'.$OUTPUT->old_icon_url('i/agg_sum') . '" ' .
+                                return '<img src="'.$OUTPUT->pix_url('i/agg_sum') . '" ' .
                                         'class="icon itemicon" title="'.s($stragg).'" alt="'.s($stragg).'"/>';
                         }
                     }
 
                 } else if ($element['object']->itemtype == 'mod') {
                     $strmodname = get_string('modulename', $element['object']->itemmodule);
-                    return '<img src="'.$OUTPUT->old_icon_url('icon',
+                    return '<img src="'.$OUTPUT->pix_url('icon',
                             $element['object']->itemmodule) . '" ' .
                             'class="icon itemicon" title="' .s($strmodname).
                             '" alt="' .s($strmodname).'"/>';
@@ -1253,12 +1253,12 @@ class grade_structure {
                 } else if ($element['object']->itemtype == 'manual') {
                     if ($element['object']->is_outcome_item()) {
                         $stroutcome = get_string('outcome', 'grades');
-                        return '<img src="'.$OUTPUT->old_icon_url('i/outcomes') . '" ' .
+                        return '<img src="'.$OUTPUT->pix_url('i/outcomes') . '" ' .
                                 'class="icon itemicon" title="'.s($stroutcome).
                                 '" alt="'.s($stroutcome).'"/>';
                     } else {
                         $strmanual = get_string('manualitem', 'grades');
-                        return '<img src="'.$OUTPUT->old_icon_url('t/manual_item') . '" '.
+                        return '<img src="'.$OUTPUT->pix_url('t/manual_item') . '" '.
                                 'class="icon itemicon" title="'.s($strmanual).
                                 '" alt="'.s($strmanual).'"/>';
                     }
@@ -1267,7 +1267,7 @@ class grade_structure {
 
             case 'category':
                 $strcat = get_string('category', 'grades');
-                return '<img src="'.$OUTPUT->old_icon_url('f/folder') . '" class="icon itemicon" ' .
+                return '<img src="'.$OUTPUT->pix_url('f/folder') . '" class="icon itemicon" ' .
                         'title="'.s($strcat).'" alt="'.s($strcat).'" />';
         }
 
@@ -1459,7 +1459,7 @@ class grade_structure {
             $url = $gpr->add_url_params($url);
             $editicon = new moodle_action_icon();
             $editicon->link->url = $url;
-            $editicon->image->src = $OUTPUT->old_icon_url('t/edit');
+            $editicon->image->src = $OUTPUT->pix_url('t/edit');
             $editicon->image->alt = $stredit;
             $editicon->image->title = $stredit;
             $editicon->image->add_class('iconsmall');
@@ -1508,13 +1508,13 @@ class grade_structure {
             }
 
             $hideicon->link->url->param('action', 'show');
-            $hideicon->image->src = $OUTPUT->old_icon_url('t/' . $icon);
+            $hideicon->image->src = $OUTPUT->pix_url('t/' . $icon);
             $hideicon->image->alt = $strshow;
             $hideicon->image->title = $tooltip;
 
         } else {
             $hideicon->link->url->param('action', 'hide');
-            $hideicon->image->src = $OUTPUT->old_icon_url('t/hide');
+            $hideicon->image->src = $OUTPUT->pix_url('t/hide');
             $hideicon->image->alt = $strhide;
             $hideicon->image->title = $strhide;
         }
@@ -1553,7 +1553,7 @@ class grade_structure {
             $strnonunlockable = get_string('nonunlockableverbose', 'grades', $strparamobj);
 
             $lockicon = new html_image();
-            $lockicon->image->src = $OUTPUT->old_icon_url('t/unlock_gray');
+            $lockicon->image->src = $OUTPUT->pix_url('t/unlock_gray');
             $lockicon->image->alt = s($strnonunlockable);
             $lockicon->image->title = s($strnonunlockable);
             $lockicon->image->add_class('iconsmall');
@@ -1575,7 +1575,7 @@ class grade_structure {
             }
             $lockicon->link->url->param('action', 'unlock');
             $lockicon->link->add_class('lock');
-            $lockicon->image->src = $OUTPUT->old_icon_url('t/'.$icon);
+            $lockicon->image->src = $OUTPUT->pix_url('t/'.$icon);
             $lockicon->image->alt = $strunlock;
             $lockicon->image->title = $tooltip;
             $action  = $OUTPUT->action_icon($lockicon);
@@ -1588,7 +1588,7 @@ class grade_structure {
 
             $lockicon->link->url->param('action', 'lock');
             $lockicon->link->add_class('lock');
-            $lockicon->image->src = $OUTPUT->old_icon_url('t/lock');
+            $lockicon->image->src = $OUTPUT->pix_url('t/lock');
             $lockicon->image->alt = $strlock;
             $lockicon->image->title = $strlock;
             $action  = $OUTPUT->action_icon($lockicon);
@@ -1633,7 +1633,7 @@ class grade_structure {
                         array('courseid' => $this->courseid, 'id' => $object->id));
 
                 $calcicon->link->url = $gpr->add_url_params($calcicon->link->url);
-                $calcicon->image->src = $OUTPUT->old_icon_url($icon);
+                $calcicon->image->src = $OUTPUT->pix_url($icon);
                 $calcicon->add_class('iconsmall');
                 $calcicon->alt = $streditcalculation;
                 $calcicon->title = $streditcalculation;
@@ -2267,7 +2267,7 @@ function grade_button($type, $courseid, $object) {
         $icon->link->url = new moodle_url('edit.php', array('courseid' => $courseid, 'id' => $object->id));
     }
 
-    $icon->image->src = $OUTPUT->old_icon_url('t/'.$type);
+    $icon->image->src = $OUTPUT->pix_url('t/'.$type);
     $icon->image->add_class('iconsmall');
     $icon->image->title = ${'str'.$type};
     $icon->image->alt = ${'str'.$type};
index 4919e84..c81df24 100644 (file)
@@ -503,7 +503,7 @@ class grade_report_grader extends grade_report {
         $string = ${'str' . $showhide};
 
         $toggleicon = new moodle_action_icon();
-        $toggleicon->image->src = $OUTPUT->old_icon_url($imagename);
+        $toggleicon->image->src = $OUTPUT->pix_url($imagename);
         $toggleicon->image->add_class('iconsmall');
         $toggleicon->alt = $string;
         $toggleicon->title = $string;
@@ -617,7 +617,7 @@ class grade_report_grader extends grade_report {
                 $userreporticon = new moodle_action_icon();
                 $userreporticon->link->url = new moodle_url($CFG->wwwroot.'/grade/report/user/index.php', array('userid' => $user->id, 'id' => $this->course->id));
                 $userreporticon->image->add_class('iconsmall');
-                $userreporticon->image->src = $OUTPUT->old_icon_url('t/grades');
+                $userreporticon->image->src = $OUTPUT->pix_url('t/grades');
                 $userreporticon->image->alt = $strgradesforuser;
                 $userreportcell->text = $OUTPUT->action_icon($userreporticon);
                 $userrow->cells[] = $userreportcell;
@@ -1417,15 +1417,15 @@ class grade_report_grader extends grade_report {
             $contractexpandicon = new moodle_action_icon();
             $contractexpandicon->link->url = new moodle_url($this->gpr->get_return_url(null, array('target'=>$element['eid'], 'action'=>'switch_minus', 'sesskey'=>sesskey())));
             $contractexpandicon->image->add_class('iconsmall');
-            $contractexpandicon->image->src = $OUTPUT->old_icon_url('t/switch_minus');
+            $contractexpandicon->image->src = $OUTPUT->pix_url('t/switch_minus');
             $contractexpandicon->image->alt = $strswitchminus;
 
             if (in_array($element['object']->id, $this->collapsed['aggregatesonly'])) {
-                $contractexpandicon->image->src = $OUTPUT->old_icon_url('t/switch_plus');
+                $contractexpandicon->image->src = $OUTPUT->pix_url('t/switch_plus');
                 $contractexpandicon->image->alt = $strswitchplus;
                 $contractexpandicon->link->url->param('action', 'switch_plus');
             } elseif (in_array($element['object']->id, $this->collapsed['gradesonly'])) {
-                $contractexpandicon->image->src = $OUTPUT->old_icon_url('t/switch_whole');
+                $contractexpandicon->image->src = $OUTPUT->pix_url('t/switch_whole');
                 $contractexpandicon->image->alt = $strswitchwhole;
                 $contractexpandicon->link->url->param('action', 'switch_whole');
             }
index f6caadd..9d78791 100644 (file)
@@ -82,11 +82,11 @@ if ($groupings = $DB->get_records('groupings', array('courseid'=>$course->id), '
         $line[2] = $DB->count_records('course_modules', array('course'=>$course->id, 'groupingid'=>$grouping->id));
 
         $buttons  = "<a title=\"$stredit\" href=\"grouping.php?id=$grouping->id\"><img".
-                    " src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
+                    " src=\"" . $OUTPUT->pix_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
         $buttons .= "<a title=\"$strdelete\" href=\"grouping.php?id=$grouping->id&amp;delete=1\"><img".
-                    " src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
+                    " src=\"" . $OUTPUT->pix_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
         $buttons .= "<a title=\"$strmanagegrping\" href=\"assign.php?id=$grouping->id\"><img".
-                    " src=\"" . $OUTPUT->old_icon_url('i/group') . "\" class=\"icon\" alt=\"$strmanagegrping\" /></a> ";
+                    " src=\"" . $OUTPUT->pix_url('i/group') . "\" class=\"icon\" alt=\"$strmanagegrping\" /></a> ";
 
         $line[3] = $buttons;
         $data[] = $line;
index 68a167c..1cfc7dd 100644 (file)
--- a/index.php
+++ b/index.php
             if ($editing) {
                 $streditsummary = get_string('editsummary');
                 echo "<a title=\"$streditsummary\" ".
-                     " href=\"course/editsection.php?id=$section->id\"><img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" ".
+                     " href=\"course/editsection.php?id=$section->id\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" ".
                      " class=\"iconsmall\" alt=\"$streditsummary\" /></a><br /><br />";
             }
 
index 11dbdb9..c36cf14 100644 (file)
@@ -4755,14 +4755,14 @@ class admin_setting_manageauths extends admin_setting {
             // hide/show link
             if (in_array($auth, $authsenabled)) {
                 $hideshow = "<a href=\"$url&amp;action=disable&amp;auth=$auth\">";
-                $hideshow .= "<img src=\"" . $OUTPUT->old_icon_url('i/hide') . "\" class=\"icon\" alt=\"disable\" /></a>";
+                $hideshow .= "<img src=\"" . $OUTPUT->pix_url('i/hide') . "\" class=\"icon\" alt=\"disable\" /></a>";
                 // $hideshow = "<a href=\"$url&amp;action=disable&amp;auth=$auth\"><input type=\"checkbox\" checked /></a>";
                 $enabled = true;
                 $displayname = "<span>$name</span>";
             }
             else {
                 $hideshow = "<a href=\"$url&amp;action=enable&amp;auth=$auth\">";
-                $hideshow .= "<img src=\"" . $OUTPUT->old_icon_url('i/show') . "\" class=\"icon\" alt=\"enable\" /></a>";
+                $hideshow .= "<img src=\"" . $OUTPUT->pix_url('i/show') . "\" class=\"icon\" alt=\"enable\" /></a>";
                 // $hideshow = "<a href=\"$url&amp;action=enable&amp;auth=$auth\"><input type=\"checkbox\" /></a>";
                 $enabled = false;
                 $displayname = "<span class=\"dimmed_text\">$name</span>";
@@ -4773,17 +4773,17 @@ class admin_setting_manageauths extends admin_setting {
             if ($enabled) {
                 if ($updowncount > 1) {
                     $updown .= "<a href=\"$url&amp;action=up&amp;auth=$auth\">";
-                    $updown .= "<img src=\"" . $OUTPUT->old_icon_url('t/up') . "\" alt=\"up\" /></a>&nbsp;";
+                    $updown .= "<img src=\"" . $OUTPUT->pix_url('t/up') . "\" alt=\"up\" /></a>&nbsp;";
                 }
                 else {
-                    $updown .= "<img src=\"" . $OUTPUT->old_icon_url('spacer.gif') . "\" class=\"icon\" alt=\"\" />&nbsp;";
+                    $updown .= "<img src=\"" . $OUTPUT->pix_url('spacer.gif') . "\" class=\"icon\" alt=\"\" />&nbsp;";
                 }
                 if ($updowncount < $authcount) {
                     $updown .= "<a href=\"$url&amp;action=down&amp;auth=$auth\">";
-                    $updown .= "<img src=\"" . $OUTPUT->old_icon_url('t/down') . "\" alt=\"down\" /></a>";
+                    $updown .= "<img src=\"" . $OUTPUT->pix_url('t/down') . "\" alt=\"down\" /></a>";
                 }
                 else {
-                    $updown .= "<img src=\"" . $OUTPUT->old_icon_url('spacer.gif') . "\" class=\"icon\" alt=\"\" />";
+                    $updown .= "<img src=\"" . $OUTPUT->pix_url('spacer.gif') . "\" class=\"icon\" alt=\"\" />";
                 }
                 ++ $updowncount;
             }
@@ -4919,14 +4919,14 @@ class admin_setting_manageeditors extends admin_setting {
         // hide/show link
             if (in_array($editor, $active_editors)) {
                 $hideshow = "<a href=\"$url&amp;action=disable&amp;editor=$editor\">";
-                $hideshow .= "<img src=\"" . $OUTPUT->old_icon_url('i/hide') . "\" class=\"icon\" alt=\"disable\" /></a>";
+                $hideshow .= "<img src=\"" . $OUTPUT->pix_url('i/hide') . "\" class=\"icon\" alt=\"disable\" /></a>";
                 // $hideshow = "<a href=\"$url&amp;action=disable&amp;editor=$editor\"><input type=\"checkbox\" checked /></a>";
                 $enabled = true;
                 $displayname = "<span>$name</span>";
             }
             else {
                 $hideshow = "<a href=\"$url&amp;action=enable&amp;editor=$editor\">";
-                $hideshow .= "<img src=\"" . $OUTPUT->old_icon_url('i/show') . "\" class=\"icon\" alt=\"enable\" /></a>";
+                $hideshow .= "<img src=\"" . $OUTPUT->pix_url('i/show') . "\" class=\"icon\" alt=\"enable\" /></a>";
                 // $hideshow = "<a href=\"$url&amp;action=enable&amp;editor=$editor\"><input type=\"checkbox\" /></a>";
                 $enabled = false;
                 $displayname = "<span class=\"dimmed_text\">$name</span>";
@@ -4937,17 +4937,17 @@ class admin_setting_manageeditors extends admin_setting {
             if ($enabled) {
                 if ($updowncount > 1) {
                     $updown .= "<a href=\"$url&amp;action=up&amp;editor=$editor\">";
-                    $updown .= "<img src=\"" . $OUTPUT->old_icon_url('t/up') . "\" alt=\"up\" /></a>&nbsp;";
+                    $updown .= "<img src=\"" . $OUTPUT->pix_url('t/up') . "\" alt=\"up\" /></a>&nbsp;";
                 }
                 else {
-                    $updown .= "<img src=\"" . $OUTPUT->old_icon_url('spacer.gif') . "\" class=\"icon\" alt=\"\" />&nbsp;";
+                    $updown .= "<img src=\"" . $OUTPUT->pix_url('spacer.gif') . "\" class=\"icon\" alt=\"\" />&nbsp;";
                 }
                 if ($updowncount < $editorcount) {
                     $updown .= "<a href=\"$url&amp;action=down&amp;editor=$editor\">";
-                    $updown .= "<img src=\"" . $OUTPUT->old_icon_url('t/down') . "\" alt=\"down\" /></a>";
+                    $updown .= "<img src=\"" . $OUTPUT->pix_url('t/down') . "\" alt=\"down\" /></a>";
                 }
                 else {
-                    $updown .= "<img src=\"" . $OUTPUT->old_icon_url('spacer.gif') . "\" class=\"icon\" alt=\"\" />";
+                    $updown .= "<img src=\"" . $OUTPUT->pix_url('spacer.gif') . "\" class=\"icon\" alt=\"\" />";
                 }
                 ++ $updowncount;
             }
@@ -5123,13 +5123,13 @@ class admin_setting_manageportfolio extends admin_setting {
 
         foreach ($instances as $i) {
             $row = '';
-            $row .= '<a href="' . $this->baseurl . '&edit=' . $i->get('id') . '"><img src="' . $OUTPUT->old_icon_url('t/edit') . '" alt="' . get_string('edit') . '" /></a>' . "\n";
-            $row .= '<a href="' . $this->baseurl . '&delete=' .  $i->get('id') . '"><img src="' . $OUTPUT->old_icon_url('t/delete') . '" alt="' . get_string('delete') . '" /></a>' . "\n";
+            $row .= '<a href="' . $this->baseurl . '&edit=' . $i->get('id') . '"><img src="' . $OUTPUT->pix_url('t/edit') . '" alt="' . get_string('edit') . '" /></a>' . "\n";
+            $row .= '<a href="' . $this->baseurl . '&delete=' .  $i->get('id') . '"><img src="' . $OUTPUT->pix_url('t/delete') . '" alt="' . get_string('delete') . '" /></a>' . "\n";
             if (array_key_exists($i->get('plugin'), $insane) || array_key_exists($i->get('id'), $insaneinstances)) {
-                $row .=  '<img src="' . $OUTPUT->old_icon_url('t/show') . '" alt="' . get_string('hidden', 'portfolio') . '" />' . "\n";
+                $row .=  '<img src="' . $OUTPUT->pix_url('t/show') . '" alt="' . get_string('hidden', 'portfolio') . '" />' . "\n";
             } else {
                 $row .= ' <a href="' . $this->baseurl . '&hide=' . $i->get('id') . '"><img src="' .
-                    $OUTPUT->old_icon_url('t/' . ($i->get('visible') ? 'hide' : 'show')) . '" alt="' . get_string($i->get('visible') ? 'hide' : 'show') . '" /></a>' . "\n";
+                    $OUTPUT->pix_url('t/' . ($i->get('visible') ? 'hide' : 'show')) . '" alt="' . get_string($i->get('visible') ? 'hide' : 'show') . '" /></a>' . "\n";
             }
             $table->data[] = array($i->get('name'), $i->get_name() . ' (' . $i->get('plugin') . ')', $row);
             if (!in_array($i->get('plugin'), $alreadyplugins)) {
@@ -6018,7 +6018,7 @@ class admin_setting_managerepository extends admin_setting {
 
             $hidetitle = $i->get_visible() ? get_string('clicktohide', 'repository') : get_string('clicktoshow', 'repository');
             $hiddenshow = ' <a href="' . $this->baseurl . '&amp;hide=' . $i->get_typename() . '">'
-                .'<img src="' . $OUTPUT->old_icon_url('i/' . ($i->get_visible() ? 'hide' : 'show')) . '"'
+                .'<img src="' . $OUTPUT->pix_url('i/' . ($i->get_visible() ? 'hide' : 'show')) . '"'
                 .' alt="' . $hidetitle . '" '
                 .' title="' . $hidetitle . '" />'
                 .'</a>' . "\n";
@@ -6030,14 +6030,14 @@ class admin_setting_managerepository extends admin_setting {
             $spacer->width = 15;
             if ($updowncount > 1) {
                 $updown .= "<a href=\"$this->baseurl&amp;move=up&amp;type=".$i->get_typename()."\">";
-                $updown .= "<img src=\"" . $OUTPUT->old_icon_url('t/up') . "\" alt=\"up\" /></a>&nbsp;";
+                $updown .= "<img src=\"" . $OUTPUT->pix_url('t/up') . "\" alt=\"up\" /></a>&nbsp;";
             }
             else {
                 $updown .= $OUTPUT->spacer($spacer);
             }
             if ($updowncount < count($instances)) {
                 $updown .= "<a href=\"$this->baseurl&amp;move=down&amp;type=".$i->get_typename()."\">";
-                $updown .= "<img src=\"" . $OUTPUT->old_icon_url('t/down') . "\" alt=\"down\" /></a>";
+                $updown .= "<img src=\"" . $OUTPUT->pix_url('t/down') . "\" alt=\"down\" /></a>";
             }
             else {
                 $updown .= $OUTPUT->spacer($spacer);
@@ -6381,11 +6381,11 @@ class admin_setting_managewebserviceprotocols extends admin_setting {
             // hide/show link
             if (in_array($protocol, $active_protocols)) {
                 $hideshow = "<a href=\"$url&amp;action=disable&amp;webservice=$protocol\">";
-                $hideshow .= "<img src=\"" . $OUTPUT->old_icon_url('i/hide') . "\" class=\"icon\" alt=\"$strdisable\" /></a>";
+                $hideshow .= "<img src=\"" . $OUTPUT->pix_url('i/hide') . "\" class=\"icon\" alt=\"$strdisable\" /></a>";
                 $displayname = "<span>$name</span>";
             } else {
                 $hideshow = "<a href=\"$url&amp;action=enable&amp;webservice=$protocol\">";
-                $hideshow .= "<img src=\"" . $OUTPUT->old_icon_url('i/show') . "\" class=\"icon\" alt=\"$strenable\" /></a>";
+                $hideshow .= "<img src=\"" . $OUTPUT->pix_url('i/show') . "\" class=\"icon\" alt=\"$strenable\" /></a>";
                 $displayname = "<span class=\"dimmed_text\">$name</span>";
             }
 
index efd25a3..6789fe9 100644 (file)
@@ -41,7 +41,7 @@ function setup_core_javascript(page_requirements_manager $requires) {
     $config = array(
         'wwwroot' => $CFG->httpswwwroot, // Yes, really. See above.
         'sesskey' => sesskey(),
-        'loadingicon' => $OUTPUT->old_icon_url('i/loading_small', 'moodle', false),
+        'loadingicon' => $OUTPUT->pix_url('i/loading_small', 'moodle')->out_raw(),
         'themerev' => theme_get_revision(),
         'theme' => $PAGE->theme->name,
     );
@@ -1363,22 +1363,22 @@ class jsportal {
         $output .= "    main.portal.strings['resource']='".get_string('resource')."';\n";
         $output .= "    main.portal.strings['activity']='".get_string('activity')."';\n";
         $output .= "    main.portal.strings['sesskey']='".sesskey()."';\n";
-        $output .= "    main.portal.icons['spacerimg']='".$OUTPUT->old_icon_url('spaces')."';\n";
-        $output .= "    main.portal.icons['marker']='".$OUTPUT->old_icon_url('i/marker')."';\n";
-        $output .= "    main.portal.icons['ihide']='".$OUTPUT->old_icon_url('i/hide')."';\n";
-        $output .= "    main.portal.icons['move_2d']='".$OUTPUT->old_icon_url('i/move_2d')."';\n";
-        $output .= "    main.portal.icons['show']='".$OUTPUT->old_icon_url('t/show')."';\n";
-        $output .= "    main.portal.icons['hide']='".$OUTPUT->old_icon_url('t/hide')."';\n";
-        $output .= "    main.portal.icons['delete']='".$OUTPUT->old_icon_url('t/delete')."';\n";
-        $output .= "    main.portal.icons['groupn']='".$OUTPUT->old_icon_url('t/groupn')."';\n";
-        $output .= "    main.portal.icons['groups']='".$OUTPUT->old_icon_url('t/groups')."';\n";
-        $output .= "    main.portal.icons['groupv']='".$OUTPUT->old_icon_url('t/groupv')."';\n";
+        $output .= "    main.portal.icons['spacerimg']='".$OUTPUT->pix_url('spaces')."';\n";
+        $output .= "    main.portal.icons['marker']='".$OUTPUT->pix_url('i/marker')."';\n";
+        $output .= "    main.portal.icons['ihide']='".$OUTPUT->pix_url('i/hide')."';\n";
+        $output .= "    main.portal.icons['move_2d']='".$OUTPUT->pix_url('i/move_2d')."';\n";
+        $output .= "    main.portal.icons['show']='".$OUTPUT->pix_url('t/show')."';\n";
+        $output .= "    main.portal.icons['hide']='".$OUTPUT->pix_url('t/hide')."';\n";
+        $output .= "    main.portal.icons['delete']='".$OUTPUT->pix_url('t/delete')."';\n";
+        $output .= "    main.portal.icons['groupn']='".$OUTPUT->pix_url('t/groupn')."';\n";
+        $output .= "    main.portal.icons['groups']='".$OUTPUT->pix_url('t/groups')."';\n";
+        $output .= "    main.portal.icons['groupv']='".$OUTPUT->pix_url('t/groupv')."';\n";
         if (right_to_left()) {
-            $output .= "    main.portal.icons['backwards']='".$OUTPUT->old_icon_url('t/right')."';\n";
-            $output .= "    main.portal.icons['forwards']='".$OUTPUT->old_icon_url('t/left')."';\n";
+            $output .= "    main.portal.icons['backwards']='".$OUTPUT->pix_url('t/right')."';\n";
+            $output .= "    main.portal.icons['forwards']='".$OUTPUT->pix_url('t/left')."';\n";
         } else {
-            $output .= "    main.portal.icons['backwards']='".$OUTPUT->old_icon_url('t/left')."';\n";
-            $output .= "    main.portal.icons['forwards']='".$OUTPUT->old_icon_url('t/right')."';\n";
+            $output .= "    main.portal.icons['backwards']='".$OUTPUT->pix_url('t/left')."';\n";
+            $output .= "    main.portal.icons['forwards']='".$OUTPUT->pix_url('t/right')."';\n";
         }
 
         $output .= "    onloadobj.load();\n";
index 3913232..c07f13e 100644 (file)
@@ -41,7 +41,7 @@ function min_optional_param($name, $default, $type) {
         $value = $_GET[$name];
 
     } else if (isset($_GET['amp;'.$name])) {
-        // very, very, very ugly hack, unforunately $OUTPUT->old_icon_url() is not used properly in javascript code :-(
+        // very, very, very ugly hack, unforunately $OUTPUT->pix_url() is not used properly in javascript code :-(
         $value = $_GET['amp;'.$name];
     }
     switch($type) {
index b19f26f..6d683ca 100644 (file)
@@ -2869,7 +2869,7 @@ function print_arrow($direction='up', $strsort=null, $return=false) {
         $strsort  = get_string('sort' . $sortdir, 'grades');
     }
 
-    $return = ' <img src="'.$OUTPUT->old_icon_url('t/' . $direction) . '" alt="'.$strsort.'" /> ';
+    $return = ' <img src="'.$OUTPUT->pix_url('t/' . $direction) . '" alt="'.$strsort.'" /> ';
 
     if ($return) {
         return $return;
index 3e69967..24f7e74 100644 (file)
@@ -566,7 +566,7 @@ function file_get_draft_area_files($draftitemid, $filepath = '/') {
 
             $icon = mimeinfo_from_type('icon', $file->get_mimetype());
             $icon = str_replace('.gif', '', $icon);
-            $item->icon = $OUTPUT->old_icon_url('f/' . $icon);
+            $item->icon = $OUTPUT->pix_url('f/' . $icon);
 
             if ($icon == 'zip') {
                 $item->type = 'zip';
@@ -576,7 +576,7 @@ function file_get_draft_area_files($draftitemid, $filepath = '/') {
 
             if ($file->is_directory()) {
                 $item->filesize = 0;
-                $item->icon = $OUTPUT->old_icon_url('f/folder');
+                $item->icon = $OUTPUT->pix_url('f/folder');
                 $item->type = 'folder';
                 $foldername = explode('/', trim($item->filepath, '/'));
                 $item->fullname = trim(array_pop($foldername), '/');
@@ -1275,12 +1275,12 @@ function mimeinfo_from_icon($element, $icon, $all=false) {
 /**
  * Returns the relative icon path for a given mime type
  *
- * This function should be used in conjuction with $OUTPUT->old_icon_url to produce
+ * This function should be used in conjuction with $OUTPUT->pix_url to produce
  * a return the full path to an icon.
  *
  * <code>
  * $mimetype = 'image/jpg';
- * $icon = $OUTPUT->old_icon_url(file_mimetype_icon($mimetype));
+ * $icon = $OUTPUT->pix_url(file_mimetype_icon($mimetype));
  * echo '<img src="'.$icon.'" alt="'.$mimetype.'" />';
  * </code>
  *
@@ -1303,12 +1303,12 @@ function file_mimetype_icon($mimetype, $size=null) {
 /**
  * Returns the relative icon path for a given file name
  *
- * This function should be used in conjuction with $OUTPUT->old_icon_url to produce
+ * This function should be used in conjuction with $OUTPUT->pix_url to produce
  * a return the full path to an icon.
  *
  * <code>
  * $filename = 'jpg';
- * $icon = $OUTPUT->old_icon_url(file_extension_icon($filename));
+ * $icon = $OUTPUT->pix_url(file_extension_icon($filename));
  * echo '<img src="'.$icon.'" alt="blah" />';
  * </code>
  *
index aaec045..8fbff35 100644 (file)
@@ -62,7 +62,7 @@ class MoodleQuickForm_modgrade extends MoodleQuickForm_select{
                     $grades[$i] = $i;
                 }
                 $this->load($grades);
-                $linkobject = '<span class="helplink"><img height="17" width="17" alt="'.$strscales.'" src="'.$OUTPUT->old_icon_url('help') . '" /></span>';
+                $linkobject = '<span class="helplink"><img height="17" width="17" alt="'.$strscales.'" src="'.$OUTPUT->pix_url('help') . '" /></span>';
                 $this->setHelpButton(array('/course/scales.php?id='. $COURSE->id .'&amp;list=true', 'ratingscales',
                                      $linkobject, 400, 500, $strscales, 'none', true), 'link_to_popup_window');
                 return $result;
index dfdb9bd..77f6858 100644 (file)
@@ -1090,9 +1090,9 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
         }else {
             $this->updateAttributes(array('class'=>'mform'));
         }
-        $this->_reqHTML = '<img class="req" title="'.get_string('requiredelement', 'form').'" alt="'.get_string('requiredelement', 'form').'" src="'.$OUTPUT->old_icon_url('req') .'" />';
-        $this->_advancedHTML = '<img class="adv" title="'.get_string('advancedelement', 'form').'" alt="'.get_string('advancedelement', 'form').'" src="'.$OUTPUT->old_icon_url('adv') .'" />';
-        $this->setRequiredNote(get_string('somefieldsrequired', 'form', '<img alt="'.get_string('requiredelement', 'form').'" src="'.$OUTPUT->old_icon_url('req') .'" />'));
+        $this->_reqHTML = '<img class="req" title="'.get_string('requiredelement', 'form').'" alt="'.get_string('requiredelement', 'form').'" src="'.$OUTPUT->pix_url('req') .'" />';
+        $this->_advancedHTML = '<img class="adv" title="'.get_string('advancedelement', 'form').'" alt="'.get_string('advancedelement', 'form').'" src="'.$OUTPUT->pix_url('adv') .'" />';
+        $this->setRequiredNote(get_string('somefieldsrequired', 'form', '<img alt="'.get_string('requiredelement', 'form').'" src="'.$OUTPUT->pix_url('req') .'" />'));
         //(Help file doesn't add anything) helpbutton('requiredelement', get_string('requiredelement', 'form'), 'moodle', true, false, '', true));
     }
 
index 07fa60c..8a19595 100644 (file)
@@ -325,7 +325,7 @@ class google_docs {
                     'url' => "{$gdoc->link[0]->attributes()->href}",
                     'source' => $source,
                     'date'   => usertime(strtotime($gdoc->updated)),
-                    'thumbnail' => $OUTPUT->old_icon_url(file_extension_icon($title, 32))
+                    'thumbnail' => $OUTPUT->pix_url(file_extension_icon($title, 32))
                 );
             }
         }
index 3e2cfd8..b9e57c2 100644 (file)
@@ -603,12 +603,12 @@ class list_item {
     function image_icon($action, $url, $icon) {
         global $OUTPUT;
         return '<a title="' . $action .'" href="'.$url.'">
-                <img src="' . $OUTPUT->old_icon_url('t/'.$icon) . '" class="iconsmall" alt="' . $action. '" /></a> ';
+                <img src="' . $OUTPUT->pix_url('t/'.$icon) . '" class="iconsmall" alt="' . $action. '" /></a> ';
     }
 
     function image_spacer() {
         global $OUTPUT;
-        return '<img src="' . $OUTPUT->old_icon_url('spacer') . '" class="iconsmall" alt="" />';
+        return '<img src="' . $OUTPUT->pix_url('spacer') . '" class="iconsmall" alt="" />';
     }
 
     /**
index 5cbebc9..997f09f 100644 (file)
@@ -135,7 +135,7 @@ class navigation_node {
      * $properties['text'] = 'This is a new nav item';
      * $properties['short'] = 'This is a new nav item';
      * $properties['action'] = moodle_url($CFG->wwwroot.'/course/category.php');
-     * $properties['icon'] = $OUTPUT->old_icon_url('i/course');
+     * $properties['icon'] = $OUTPUT->pix_url('i/course');
      * $properties['type'] = navigation_node::TYPE_COURSE;
      * $properties['key'] = 'newitem';
      * $PAGE->navigation->newitem = $properties;
@@ -1092,7 +1092,7 @@ class global_navigation extends navigation_node {
             $icon = null;
             if (!in_array($module->modname, $resources)) {
                 if ($module->icon=='') {
-                    $icon = $OUTPUT->old_icon_url('icon', $module->modname);
+                    $icon = $OUTPUT->pix_url('icon', $module->modname);
                 }
                 $url = new moodle_url($CFG->wwwroot.'/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
                 $type = navigation_node::TYPE_ACTIVITY;
@@ -1103,7 +1103,7 @@ class global_navigation extends navigation_node {
                     $url = new moodle_url('/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
                 }
                 if ($module->icon!=='') {
-                    $icon = $OUTPUT->old_icon_url(preg_replace('#\.(png|gif)$#i','',$module->icon));
+                    $icon = $OUTPUT->pix_url(preg_replace('#\.(png|gif)$#i','',$module->icon));
                 }
             }
             $this->add_to_path($keys, $module->id, $module->name, $module->name, $type, $url, $icon);
@@ -1154,7 +1154,7 @@ class global_navigation extends navigation_node {
             $icon = null;
             if (!in_array($module->modname, $resources)) {
                 if ($module->icon=='') {
-                    $icon = $OUTPUT->old_icon_url('icon', $module->modname);
+                    $icon = $OUTPUT->pix_url('icon', $module->modname);
                 }
                 $url = new moodle_url($CFG->wwwroot.'/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
                 $type = navigation_node::TYPE_ACTIVITY;
@@ -1165,7 +1165,7 @@ class global_navigation extends navigation_node {
                     $url = new moodle_url($CFG->wwwroot.'/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
                 }
                 if ($module->icon!=='') {
-                    $icon = $OUTPUT->old_icon_url(preg_replace('#\.(png|gif)$#i','',$module->icon));
+                    $icon = $OUTPUT->pix_url(preg_replace('#\.(png|gif)$#i','',$module->icon));
                 }
             }
             $path = $keys;
@@ -1364,7 +1364,7 @@ class global_navigation extends navigation_node {
                     $category = $this->find_child($categoryid);
                 }
                 if ($category!==false) {
-                    $coursekey = $category->add($course->fullname, $url, self::TYPE_COURSE, $course->shortname, $course->id, $OUTPUT->old_icon_url('i/course'));
+                    $coursekey = $category->add($course->fullname, $url, self::TYPE_COURSE, $course->shortname, $course->id, $OUTPUT->pix_url('i/course'));
                     if (!$course->visible) {
                         $category->get($course->id)->hidden = true;
                     }
@@ -1404,7 +1404,7 @@ class global_navigation extends navigation_node {
                 return;
             }
             $url = new moodle_url($CFG->wwwroot.'/course/view.php', array('id'=>$course->id));
-            $keys[] = $this->add_to_path($keys, $course->id, $course->fullname, $course->shortname, self::TYPE_COURSE, $url, $OUTPUT->old_icon_url('i/course'));
+            $keys[] = $this->add_to_path($keys, $course->id, $course->fullname, $course->shortname, self::TYPE_COURSE, $url, $OUTPUT->pix_url('i/course'));
             $currentcourse = $this->find_child($course->id, self::TYPE_COURSE);
             if ($currentcourse!==false){
                 $currentcourse->make_active();
@@ -1419,7 +1419,7 @@ class global_navigation extends navigation_node {
                     if ($participants) {
                         $participants->mainnavonly = true;
                         $url = new moodle_url($CFG->wwwroot.'/user/index.php?id='.$course->id);
-                        $participants->add(get_string('participantslist'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/users'));
+                        $participants->add(get_string('participantslist'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/users'));
 
                         require_once($CFG->dirroot.'/blog/lib.php');
 
@@ -1446,7 +1446,7 @@ class global_navigation extends navigation_node {
 
                 // View course reports
                 if (has_capability('moodle/site:viewreports', $this->context)) { // basic capability for listing of reports
-                    $reportkey = $currentcourse->add(get_string('reports'), new moodle_url($CFG->wwwroot.'/course/report.php', array('id'=>$course->id)), self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/stats'));
+                    $reportkey = $currentcourse->add(get_string('reports'), new moodle_url($CFG->wwwroot.'/course/report.php', array('id'=>$course->id)), self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/stats'));
                     $reportnav = $currentcourse->get($reportkey);
                     if ($reportnav) {
                         $coursereports = get_plugin_list('coursereport');
@@ -2026,7 +2026,7 @@ class limited_global_navigation extends global_navigation {
             $icon = null;
             if (!in_array($module->modname, $resources)) {
                 if ($module->icon=='') {
-                    $icon = $OUTPUT->old_icon_url('icon', $module->modname);
+                    $icon = $OUTPUT->pix_url('icon', $module->modname);
                 }
                 $url = new moodle_url($CFG->wwwroot.'/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
                 $type = navigation_node::TYPE_ACTIVITY;
@@ -2037,7 +2037,7 @@ class limited_global_navigation extends global_navigation {
                     $url = new moodle_url($CFG->wwwroot.'/mod/'.$module->modname.'/view.php', array('id'=>$module->id));
                 }
                 if ($module->icon!=='') {
-                    $icon = $OUTPUT->old_icon_url(preg_replace('#\.(png|gif)$#i','',$module->icon));
+                    $icon = $OUTPUT->pix_url(preg_replace('#\.(png|gif)$#i','',$module->icon));
                 }
             }
             $this->add_to_path($keys, $module->id, $module->name, $module->name, $type, $url, $icon);
@@ -2428,7 +2428,7 @@ class settings_navigation extends navigation_node {
             $realuser = session_get_realuser();
             // Add the informative return to original user link
             $url = new moodle_url($CFG->wwwroot.'/course/loginas.php',array('id'=>$this->page->course->id, 'return'=>1,'sesskey'=>sesskey()));
-            $this->add(get_string('returntooriginaluser', 'moodle', fullname($realuser, true)), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('t/left'));
+            $this->add(get_string('returntooriginaluser', 'moodle', fullname($realuser, true)), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('t/left'));
         }
 
         // Make sure the first child doesnt have proceed with hr set to true
@@ -2553,7 +2553,7 @@ class settings_navigation extends navigation_node {
                     $this->load_administration_settings($reference, $branch);
                 }
             } else {
-                $reference->icon = $OUTPUT->old_icon_url('i/settings');
+                $reference->icon = $OUTPUT->pix_url('i/settings');
             }
         }
     }
@@ -2657,7 +2657,7 @@ class settings_navigation extends navigation_node {
                 $url->param('edit', 'on');
                 $editstring = get_string('turneditingon');
             }
-            $coursenode->add($editstring, $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/edit'));
+            $coursenode->add($editstring, $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/edit'));
 
             if ($this->page->user_is_editing()) {
                 // Add `add` resources|activities branches
@@ -2740,16 +2740,16 @@ class settings_navigation extends navigation_node {
 
             // Add the course settings link
             $url = new moodle_url($CFG->wwwroot.'/course/edit.php', array('id'=>$course->id));
-            $coursenode->add(get_string('settings'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/settings'));
+            $coursenode->add(get_string('settings'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/settings'));
         }
 
         // Add assign or override roles if allowed
         if (has_capability('moodle/role:assign', $course->context)) {
             $url = new moodle_url($CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php', array('contextid'=>$course->context->id));
-            $coursenode->add(get_string('assignroles', 'role'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/roles'));
+            $coursenode->add(get_string('assignroles', 'role'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/roles'));
         } else if (get_overridable_roles($course->context, ROLENAME_ORIGINAL)) {
             $url = new moodle_url($CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php', array('contextid'=>$course->context->id));
-            $coursenode->add(get_string('overridepermissions', 'role'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/roles'));
+            $coursenode->add(get_string('overridepermissions', 'role'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/roles'));
         }
 
         // Add view grade report is permitted
@@ -2771,22 +2771,22 @@ class settings_navigation extends navigation_node {
         }
         if ($reportavailable) {
             $url = new moodle_url($CFG->wwwroot.'/grade/report/index.php', array('id'=>$course->id));
-            $coursenode->add(get_string('grades'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/grades'));
+            $coursenode->add(get_string('grades'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/grades'));
         }
 
         //  Add outcome if permitted
         if (!empty($CFG->enableoutcomes) && has_capability('moodle/course:update', $course->context)) {
             $url = new moodle_url($CFG->wwwroot.'/grade/edit/outcome/course.php', array('id'=>$course->id));
-            $coursenode->add(get_string('outcomes', 'grades'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/outcomes'));
+            $coursenode->add(get_string('outcomes', 'grades'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/outcomes'));
         }
 
         // Add meta course links
         if ($course->metacourse) {
             if (has_capability('moodle/course:managemetacourse', $course->context)) {
                 $url = new moodle_url($CFG->wwwroot.'/course/importstudents.php', array('id'=>$course->id));
-                $coursenode->add(get_string('childcourses'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/course'));
+                $coursenode->add(get_string('childcourses'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/course'));
             } else if (has_capability('moodle/role:assign', $course->context)) {
-                $key = $coursenode->add(get_string('childcourses'), null,  self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/course'));
+                $key = $coursenode->add(get_string('childcourses'), null,  self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/course'));
                 $coursenode->get($key)->hidden = true;;
             }
         }
@@ -2794,31 +2794,31 @@ class settings_navigation extends navigation_node {
         // Manage groups in this course
         if (($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $course->context)) {
             $url = new moodle_url($CFG->wwwroot.'/group/index.php', array('id'=>$course->id));
-            $coursenode->add(get_string('groups'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/group'));
+            $coursenode->add(get_string('groups'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/group'));
         }
 
         // Backup this course
         if (has_capability('moodle/site:backup', $course->context)) {
             $url = new moodle_url($CFG->wwwroot.'/backup/backup.php', array('id'=>$course->id));
-            $coursenode->add(get_string('backup'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/backup'));
+            $coursenode->add(get_string('backup'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/backup'));
         }
 
         // Restore to this course
         if (has_capability('moodle/site:restore', $course->context)) {
             $url = new moodle_url($CFG->wwwroot.'/files/index.php', array('id'=>$course->id, 'wdir'=>'/backupdata'));
-            $coursenode->add(get_string('restore'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/restore'));
+            $coursenode->add(get_string('restore'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/restore'));
         }
 
         // Import data from other courses
         if (has_capability('moodle/site:import', $course->context)) {
             $url = new moodle_url($CFG->wwwroot.'/course/import.php', array('id'=>$course->id));
-            $coursenode->add(get_string('import'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/restore'));
+            $coursenode->add(get_string('import'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/restore'));
         }
 
         // Reset this course
         if (has_capability('moodle/course:reset', $course->context)) {
             $url = new moodle_url($CFG->wwwroot.'/course/reset.php', array('id'=>$course->id));
-            $coursenode->add(get_string('reset'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/return'));
+            $coursenode->add(get_string('reset'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/return'));
         }
 
         // Manage questions
@@ -2836,7 +2836,7 @@ class settings_navigation extends navigation_node {
         }
         if (isset($questionlink)) {
             $url = new moodle_url($questionlink, array('courseid'=>$course->id));
-            $coursenode->add(get_string('questions','quiz'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/questions'));
+            $coursenode->add(get_string('questions','quiz'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/questions'));
         }
 
         // Repository Instances
@@ -2844,25 +2844,25 @@ class settings_navigation extends navigation_node {
         $editabletypes = repository::get_editable_types($this->context);
         if (has_capability('moodle/course:update', $this->context) && !empty($editabletypes)) {
             $url = new moodle_url($CFG->wwwroot.'/repository/manage_instances.php', array('contextid'=>$this->context->id));
-            $coursenode->add(get_string('repositories'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/repository'));
+            $coursenode->add(get_string('repositories'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/repository'));
         }
 
         // Manage files
         if (has_capability('moodle/course:managefiles', $this->context)) {
             $url = new moodle_url($CFG->wwwroot.'/files/index.php', array('id'=>$course->id));
-            $coursenode->add(get_string('files'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/files'));
+            $coursenode->add(get_string('files'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/files'));
         }
 
         // Authorize hooks
         if ($course->enrol == 'authorize' || (empty($course->enrol) && $CFG->enrol == 'authorize')) {
             require_once($CFG->dirroot.'/enrol/authorize/const.php');
             $url = new moodle_url($CFG->wwwroot.'/enrol/authorize/index.php', array('course'=>$course->id));
-            $coursenode->add(get_string('payments'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/payment'));
+            $coursenode->add(get_string('payments'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/payment'));
             if (has_capability('enrol/authorize:managepayments', $this->page->context)) {
                 $cnt = $DB->count_records('enrol_authorize', array('status'=>AN_STATUS_AUTH, 'courseid'=>$course->id));
                 if ($cnt) {
                     $url = new moodle_url($CFG->wwwroot.'/enrol/authorize/index.php', array('course'=>$course->id,'status'=>AN_STATUS_AUTH));
-                    $coursenode->add(get_string('paymentpending', 'moodle', $cnt), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/payment'));
+                    $coursenode->add(get_string('paymentpending', 'moodle', $cnt), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/payment'));
                 }
             }
         }
@@ -2871,17 +2871,17 @@ class settings_navigation extends navigation_node {
         if (empty($course->metacourse)) {
             if (has_capability('moodle/legacy:guest', $this->context, NULL, false)) {   // Are a guest now
                 $url = new moodle_url($CFG->wwwroot.'/course/enrol.php', array('id'=>$course->id));
-                $coursenode->add(get_string('enrolme', '', format_string($course->shortname)), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/user'));
+                $coursenode->add(get_string('enrolme', '', format_string($course->shortname)), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/user'));
             } else if (has_capability('moodle/role:unassignself', $this->context, NULL, false) && get_user_roles($this->context, 0, false)) {  // Have some role
                 $url = new moodle_url($CFG->wwwroot.'/course/unenrol.php', array('id'=>$course->id));
-                $coursenode->add(get_string('unenrolme', '', format_string($course->shortname)), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/user'));
+                $coursenode->add(get_string('unenrolme', '', format_string($course->shortname)), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/user'));
             }
         }
 
         // Link to the user own profile (except guests)
         if (!isguestuser() and isloggedin()) {
             $url = new moodle_url($CFG->wwwroot.'/user/view.php', array('id'=>$USER->id, 'course'=>$course->id));
-            $coursenode->add(get_string('profile'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/user'));
+            $coursenode->add(get_string('profile'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/user'));
         }
 
         // Switch roles
@@ -2911,7 +2911,7 @@ class settings_navigation extends navigation_node {
             $SESSION->returnurl = serialize($returnurl);
             foreach ($roles as $key=>$name) {
                 $url = new moodle_url($CFG->wwwroot.'/course/switchrole.php', array('id'=>$course->id,'sesskey'=>sesskey(), 'switchrole'=>$key, 'returnurl'=>'1'));
-                $this->get($switchroleskey)->add($name, $url, self::TYPE_SETTING, null, $key, $OUTPUT->old_icon_url('i/roles'));
+                $this->get($switchroleskey)->add($name, $url, self::TYPE_SETTING, null, $key, $OUTPUT->pix_url('i/roles'));
             }
         }
         // Return we are done
@@ -3236,17 +3236,17 @@ class settings_navigation extends navigation_node {
                 $url->param('edit', 'on');
                 $editstring = get_string('turneditingon');
             }
-            $this->get($frontpage)->add($editstring, $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/edit'));
+            $this->get($frontpage)->add($editstring, $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/edit'));
 
             // Add the course settings link
             $url = new moodle_url($CFG->wwwroot.'/admin/settings.php', array('section'=>'frontpagesettings'));
-            $this->get($frontpage)->add(get_string('settings'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/settings'));
+            $this->get($frontpage)->add(get_string('settings'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/settings'));
         }
 
         //Participants
         if (has_capability('moodle/site:viewparticipants', $course->context)) {
             $url = new moodle_url($CFG->wwwroot.'/user/index.php?contextid='.$course->context->id);
-            $this->get($frontpage)->add(get_string('participants'), $url, self::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/users'));
+            $this->get($frontpage)->add(get_string('participants'), $url, self::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/users'));
         }
     }
 
index 0ea7661..39c1a30 100644 (file)
@@ -1923,7 +1923,7 @@ class moodle_user_picture extends moodle_html_component {
             $this->image->src = new moodle_url(get_file_url($this->user->id.'/'.$file.'.jpg', null, 'user'));
         } else { // Print default user pictures (use theme version if available)
             $this->add_class('defaultuserpic');
-            $this->image->src = $OUTPUT->old_icon_url('u/' . $file);
+            $this->image->src = $OUTPUT->pix_url('u/' . $file);
         }
 
         if ($this->alttext) {
@@ -2040,7 +2040,7 @@ class moodle_help_icon extends labelled_html_component {
             if ($image instanceof moodle_url) {
                 $this->image->src = $image->out();
             } else if ($image === true) {
-                $this->image->src = $OUTPUT->old_icon_url('help');
+                $this->image->src = $OUTPUT->pix_url('help');
             } else if (is_string($image)) {
                 $this->image->src = $image;
             }
@@ -2056,7 +2056,7 @@ class moodle_help_icon extends labelled_html_component {
             if (!($this->image instanceof html_image)) {
                 $this->image = new html_image();
             }
-            $this->image->src = $OUTPUT->old_icon_url('help');
+            $this->image->src = $OUTPUT->pix_url('help');
         }
 
         parent::prepare();
@@ -2233,7 +2233,7 @@ class block_contents extends moodle_html_component {
     /**
      * A (possibly empty) array of editing controls. Each element of this array
      * should be an array('url' => $url, 'icon' => $icon, 'caption' => $caption).
-     * $icon is the icon name. Fed to $OUTPUT->old_icon_url.
+     * $icon is the icon name. Fed to $OUTPUT->pix_url.
      * @var array
      */
     public $controls = array();
index 213d175..d89da02 100644 (file)
@@ -149,12 +149,6 @@ class renderer_base {
         return $classes;
     }
 
-    /** OBSOLETED: to be removed soon */
-    public function old_icon_url($iconname, $component='moodle', $escaped=true) {
-        $url = $this->page->theme->pix_url($iconname, $component);
-        return $url->out(false, array(), $escaped);
-    }
-
     /**
      * Return the moodle_url for an image
      *
index 0558866..849f62c 100644 (file)
@@ -341,11 +341,11 @@ class portfolio_add_button {
             break;
             case PORTFOLIO_ADD_ICON_FORM:
                 $formoutput .= $selectoutput;
-                $formoutput .= "\n" . '<input type="image" src="' . $OUTPUT->old_icon_url('t/portfolio') . '" alt=' . $addstr .'" />';
+                $formoutput .= "\n" . '<input type="image" src="' . $OUTPUT->pix_url('t/portfolio') . '" alt=' . $addstr .'" />';
                 $formoutput .= "\n" . '</form>';
             break;
             case PORTFOLIO_ADD_ICON_LINK:
-                $linkoutput .= '"><img src="' . $OUTPUT->old_icon_url('t/portfolio') . '" alt=' . $addstr .'" /></a>';
+                $linkoutput .= '"><img src="' . $OUTPUT->pix_url('t/portfolio') . '" alt=' . $addstr .'" /></a>';
             break;
             case PORTFOLIO_ADD_TEXT_LINK:
                 $linkoutput .= '">' . $addstr .'</a>';
index fdeaaab..617881c 100644 (file)
@@ -1468,7 +1468,7 @@ function question_get_feedback_image($fraction, $selected=true) {
         $size = 'small';
     }
     $class = question_get_feedback_class($fraction);
-    return '<img src="' . $OUTPUT->old_icon_url('i/' . $icons[$class] . '_' . $size) .
+    return '<img src="' . $OUTPUT->pix_url('i/' . $icons[$class] . '_' . $size) .
             '" alt="' . get_string($class, 'quiz') . '" class="icon" />';
 }
 
@@ -2099,8 +2099,8 @@ function question_init_qengine_js() {
     global $CFG, $PAGE, $OUTPUT;
     $config = array(
         'actionurl' => $CFG->wwwroot . '/question/toggleflag.php',
-        'flagicon' => $OUTPUT->old_icon_url('i/flagged'),
-        'unflagicon' => $OUTPUT->old_icon_url('i/unflagged'),
+        'flagicon' => $OUTPUT->pix_url('i/flagged'),
+        'unflagicon' => $OUTPUT->pix_url('i/unflagged'),
         'flagtooltip' => get_string('clicktoflag', 'question'),
         'unflagtooltip' => get_string('clicktounflag', 'question'),
         'flaggedalt' => get_string('flagged', 'question'),
index b9858b3..93abb3b 100644 (file)
@@ -42,7 +42,7 @@ function rss_get_link($courseid, $userid, $modulename, $id, $tooltiptext='') {
     }
 
     $rsspath = rss_get_url($courseid, $userid, $modulename, $id);
-    $rsspix = $OUTPUT->old_icon_url('i/rss');
+    $rsspix = $OUTPUT->pix_url('i/rss');
 
     return '<a href="'. $rsspath .'"><img src="'. $rsspix .'" title="'. strip_tags($tooltiptext) .'" alt="'.get_string('rss').'" /></a>';
 
@@ -214,7 +214,7 @@ function rss_standard_header($title = NULL, $link = NULL, $description = NULL) {
        */
 
         //write image info
-        $rsspix = $OUTPUT->old_icon_url('i/rsssitelogo');
+        $rsspix = $OUTPUT->pix_url('i/rsssitelogo');
 
         //write the info
         $result .= rss_start_tag('image', 2, true);
index 3956e6e..7dd5c26 100644 (file)
@@ -1025,11 +1025,11 @@ class flexible_table {
             if($this->is_collapsible) {
                 if(!empty($this->sess->collapse[$column])) {
                     // some headers contain < br/> tags, do not include in title
-                    $icon_hide = ' <a href="'.$this->baseurl.$this->request[TABLE_VAR_SHOW].'='.$column.'"><img src="'.$OUTPUT->old_icon_url('t/switch_plus') . '" title="'.get_string('show').' '.strip_tags($this->headers[$index]).'" alt="'.get_string('show').'" /></a>';
+                    $icon_hide = ' <a href="'.$this->baseurl.$this->request[TABLE_VAR_SHOW].'='.$column.'"><img src="'.$OUTPUT->pix_url('t/switch_plus') . '" title="'.get_string('show').' '.strip_tags($this->headers[$index]).'" alt="'.get_string('show').'" /></a>';
                 }
                 else if($this->headers[$index] !== NULL) {
                     // some headers contain < br/> tags, do not include in title
-                    $icon_hide = ' <a href="'.$this->baseurl.$this->request[TABLE_VAR_HIDE].'='.$column.'"><img src="'.$OUTPUT->old_icon_url('t/switch_minus') . '" title="'.get_string('hide').' '.strip_tags($this->headers[$index]).'" alt="'.get_string('hide').'" /></a>';
+                    $icon_hide = ' <a href="'.$this->baseurl.$this->request[TABLE_VAR_HIDE].'='.$column.'"><img src="'.$OUTPUT->pix_url('t/switch_minus') . '" title="'.get_string('hide').' '.strip_tags($this->headers[$index]).'" alt="'.get_string('hide').'" /></a>';
                 }
             }
 
@@ -1048,22 +1048,22 @@ class flexible_table {
                     if($primary_sort_column == 'firstname') {
                         $lsortorder = get_string('asc');
                         if($primary_sort_order == SORT_ASC) {
-                            $icon_sort_first = ' <img src="'.$OUTPUT->old_icon_url('t/down') . '" alt="'.get_string('asc').'" />';
+                            $icon_sort_first = ' <img src="'.$OUTPUT->pix_url('t/down') . '" alt="'.get_string('asc').'" />';
                             $fsortorder = get_string('asc');
                         }
                         else {
-                            $icon_sort_first = ' <img src="'.$OUTPUT->old_icon_url('t/up') . '" alt="'.get_string('desc').'" />';
+                            $icon_sort_first = ' <img src="'.$OUTPUT->pix_url('t/up') . '" alt="'.get_string('desc').'" />';
                             $fsortorder = get_string('desc');
                         }
                     }
                     else if($primary_sort_column == 'lastname') {
                         $fsortorder = get_string('asc');
                         if($primary_sort_order == SORT_ASC) {
-                            $icon_sort_last = ' <img src="'.$OUTPUT->old_icon_url('t/down') . '" alt="'.get_string('asc').'" />';
+                            $icon_sort_last = ' <img src="'.$OUTPUT->pix_url('t/down') . '" alt="'.get_string('asc').'" />';
                             $lsortorder = get_string('asc');
                         }
                         else {
-                            $icon_sort_last = ' <img src="'.$OUTPUT->old_icon_url('t/up') . '" alt="'.get_string('desc').'" />';
+                            $icon_sort_last = ' <img src="'.$OUTPUT->pix_url('t/up') . '" alt="'.get_string('desc').'" />';
                             $lsortorder = get_string('desc');
                         }
                     } else {
@@ -1083,11 +1083,11 @@ class flexible_table {
                 if($this->is_sortable($column)) {
                     if($primary_sort_column == $column) {
                         if($primary_sort_order == SORT_ASC) {
-                            $icon_sort = ' <img src="'.$OUTPUT->old_icon_url('t/down') . '" alt="'.get_string('asc').'" />';
+                            $icon_sort = ' <img src="'.$OUTPUT->pix_url('t/down') . '" alt="'.get_string('asc').'" />';
                             $localsortorder = get_string('asc');
                         }
                         else {
-                            $icon_sort = ' <img src="'.$OUTPUT->old_icon_url('t/up') . '" alt="'.get_string('desc').'" />';
+                            $icon_sort = ' <img src="'.$OUTPUT->pix_url('t/up') . '" alt="'.get_string('desc').'" />';
                             $localsortorder = get_string('desc');
                         }
                     } else {
index dc9d70f..41f4c90 100644 (file)
@@ -1025,7 +1025,7 @@ function print_upgrade_reload($url) {
 
     echo "<br />";
     echo '<div class="continuebutton">';
-    echo '<a href="'.$url.'" title="'.get_string('reload').'" ><img src="'.$OUTPUT->old_icon_url('i/reload') . '" alt="" /> '.get_string('reload').'</a>';
+    echo '<a href="'.$url.'" title="'.get_string('reload').'" ><img src="'.$OUTPUT->pix_url('i/reload') . '" alt="" /> '.get_string('reload').'</a>';
     echo '</div><br />';
 }
 
index bb22e1a..9a5d1af 100644 (file)
@@ -478,7 +478,7 @@ class moodle_url {
      * @return string
      */
     public function __toString() {
-        $this->out(false, null, true);
+        return $this->out(false, null, true);
     }
 
     /**
@@ -508,6 +508,15 @@ class moodle_url {
         return $uri;
     }
 
+    /**
+     * Returns url in raw form without any escaping,
+     * useful especially when including urls and images in javascript.
+     * @return string
+     */
+    public function out_raw() {
+        $this->out(false, null, false);
+    }
+
     /**
      * Return a URL relative to $CFG->wwwroot.
      *
@@ -1560,7 +1569,7 @@ function replace_smilies(&$text) {
             $alttext = get_string($image, 'pix');
             $alttext = preg_replace('/^\[\[(.*)\]\]$/', '$1', $alttext); /// Clean alttext in case there isn't lang string for it.
             $e[$lang][] = $emoticon;
-            $img[$lang][] = '<img alt="'. $alttext .'" width="15" height="15" src="'. $OUTPUT->old_icon_url('s/' . $image) . '" />';
+            $img[$lang][] = '<img alt="'. $alttext .'" width="15" height="15" src="'. $OUTPUT->pix_url('s/' . $image) . '" />';
         }
     }
 
@@ -1608,7 +1617,7 @@ function get_emoticons_list_for_help_file() {
     $output = '<ul id="emoticonlist">';
     foreach ($items as $item) {
         $item = explode('{:}', $item);
-        $output .= '<li><img src="' . $OUTPUT->old_icon_url('s/' . $item[1]) . '" alt="' .
+        $output .= '<li><img src="' . $OUTPUT->pix_url('s/' . $item[1]) . '" alt="' .
                 $item[0] . '" /><code>' . $item[0] . '</code></li>';
     }
     $output .= '</ul>';
@@ -2124,7 +2133,7 @@ function print_collapsible_region_start($classes, $id, $caption, $userpref = fal
     $output .= '</div><div id="' . $id . '_inner" class="collapsibleregioninner">';
     $PAGE->requires->js_function_call('new collapsible_region',
             array($id, $userpref, get_string('clicktohideshow'),
-            $OUTPUT->old_icon_url('t/collapsed'), $OUTPUT->old_icon_url('t/expanded')));
+            $OUTPUT->pix_url('t/collapsed'), $OUTPUT->pix_url('t/expanded')));
 
     if ($return) {
         return $output;
@@ -2480,7 +2489,7 @@ function navmenulist($course, $sections, $modinfo, $strsection, $strjumpto, $wid
         $class = 'activity '.$mod->modname;
         $class .= ($cmid == $mod->id) ? ' selected' : '';
         $menu[] = '<li class="'.$class.'">'.
-                  '<img src="'.$OUTPUT->old_icon_url('icon', $mod->modname) . '" alt="" />'.
+                  '<img src="'.$OUTPUT->pix_url('icon', $mod->modname) . '" alt="" />'.
                   '<a href="'.$CFG->wwwroot.'/mod/'.$url.'">'.$mod->name.'</a></li>';
     }
 
@@ -2527,7 +2536,7 @@ function print_grade_menu($courseid, $name, $current, $includenograde=true, $ret
     }
     $output .= $OUTPUT->select(html_select::make($grades, $name, $current, false));
 
-    $linkobject = '<span class="helplink"><img class="iconhelp" alt="'.$strscales.'" src="'.$OUTPUT->old_icon_url('help') . '" /></span>';
+    $linkobject = '<span class="helplink"><img class="iconhelp" alt="'.$strscales.'" src="'.$OUTPUT->pix_url('help') . '" /></span>';
     $link = html_link::make('/course/scales.php?id='. $courseid .'&list=true', $linkobject);
     $link->add_action(new popup_action('click', $link->url, 'ratingscales', array('height' => 400, 'width' => 500)));
     $link->title = $strscales;
@@ -2618,7 +2627,7 @@ function editorhelpbutton(){
     $alttag = join (', ', $titles);
 
     $paramstring = join('&', $urlparams);
-    $linkobject = '<img alt="'.$alttag.'" class="iconhelp" src="'.$OUTPUT->old_icon_url('help') . '" />';
+    $linkobject = '<img alt="'.$alttag.'" class="iconhelp" src="'.$OUTPUT->pix_url('help') . '" />';
     $link = html_link::make(s('/lib/form/editorhelp.php?'.$paramstring), $linkobject);
     $link->add_action(new popup_action('click', $link->url, 'popup', array('height' => 400, 'width' => 500)));
     $link->title = $alttag;
@@ -2646,7 +2655,7 @@ function emoticonhelpbutton($form, $field, $return = false) {
     $SESSION->inserttextform = $form;
     $SESSION->inserttextfield = $field;
     $helpicon = moodle_help_icon::make('emoticons2', get_string('helpemoticons'), 'moodle', true);
-    $helpicon->image->src = $OUTPUT->old_icon_url('s/smiley');
+    $helpicon->image->src = $OUTPUT->pix_url('s/smiley');
     $helpicon->image->add_class('emoticon');
     $helpicon->style = "margin-left:3px; padding-right:1px;width:15px;height:15px;";
     $help = $OUTPUT->help_icon($helpicon);
index a62fec3..9ab1f2a 100644 (file)
@@ -605,7 +605,7 @@ function message_contact_link($userid, $linktype='add', $return=false, $script="
     $output = '<span class="'.$linktype.'">'.
               '<a href="'.$script.'&amp;'.$command.'='.$userid.
               '&amp;sesskey='.sesskey().'" title="'.s($string).'">'.
-              '<img src="'.$OUTPUT->old_icon_url($icon).'" class="iconsmall" alt="'.s($alttext).'" />'.
+              '<img src="'.$OUTPUT->pix_url($icon).'" class="iconsmall" alt="'.s($alttext).'" />'.
               $text.'</a></span>';
 
     if ($return) {
@@ -636,9 +636,9 @@ function message_history_link($userid1, $userid2=0, $returnstr=false, $keywords=
     }
 
     if ($linktext == 'icon') {  // Icon only
-        $fulllink = '<img src="'.$OUTPUT->old_icon_url('t/log') . '" class="iconsmall" alt="'.$strmessagehistory.'" />';
+        $fulllink = '<img src="'.$OUTPUT->pix_url('t/log') . '" class="iconsmall" alt="'.$strmessagehistory.'" />';
     } else if ($linktext == 'both') {  // Icon and standard name
-        $fulllink = '<img src="'.$OUTPUT->old_icon_url('t/log') . '" class="iconsmall" alt="" />';
+        $fulllink = '<img src="'.$OUTPUT->pix_url('t/log') . '" class="iconsmall" alt="" />';
         $fulllink .= '&nbsp;'.$strmessagehistory;
     } else if ($linktext) {    // Custom name
         $fulllink = $linktext;
index 151627f..0f6688a 100644 (file)
@@ -1811,7 +1811,7 @@ class assignment_base {
                 $found = true;
                 $mimetype = $file->get_mimetype();
                 $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/assignment_submission/'.$userid.'/'.$filename);
-                $output .= '<a href="'.$path.'" ><img src="'.$OUTPUT->old_icon_url(file_mimetype_icon($mimetype)).'" class="icon" alt="'.$mimetype.'" />'.s($filename).'</a>';
+                $output .= '<a href="'.$path.'" ><img src="'.$OUTPUT->pix_url(file_mimetype_icon($mimetype)).'" class="icon" alt="'.$mimetype.'" />'.s($filename).'</a>';
                 if ($this->portfolio_exportable() && has_capability('mod/assignment:exportownsubmission', $this->context)) {
                     $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id, 'fileid' => $file->get_id()), '/mod/assignment/locallib.php');
                     $button->set_format_by_file($file);
@@ -2897,7 +2897,7 @@ function assignment_print_recent_mod_activity($activity, $courseid, $detail, $mo
     if ($detail) {
         $modname = $modnames[$activity->type];
         echo '<div class="title">';
-        echo "<img src=\"" . $OUTPUT->old_icon_url('icon', 'assignment') . "\" ".
+        echo "<img src=\"" . $OUTPUT->pix_url('icon', 'assignment') . "\" ".
              "class=\"icon\" alt=\"$modname\">";
         echo "<a href=\"$CFG->wwwroot/mod/assignment/view.php?id={$activity->cmid}\">{$activity->name}</a>";
         echo '</div>';
index 72e3bd7..f8bc868 100644 (file)
@@ -198,7 +198,7 @@ class assignment_online extends assignment_base {
         $popup = $OUTPUT->link($link);
 
         $output = '<div class="files">'.
-                  '<img src="'.$OUTPUT->old_icon_url('f/html') . '" class="icon" alt="html" />'.
+                  '<img src="'.$OUTPUT->pix_url('f/html') . '" class="icon" alt="html" />'.
                   $popup .
                   '</div>';
                   return $output;
@@ -217,7 +217,7 @@ class assignment_online extends assignment_base {
         $popup = $OUTPUT->link($link);
 
         $output = '<div class="files">'.
-                  '<img align="middle" src="'.$OUTPUT->old_icon_url('f/html') . '" height="16" width="16" alt="html" />'.
+                  '<img align="middle" src="'.$OUTPUT->pix_url('f/html') . '" height="16" width="16" alt="html" />'.
                   $popup .
                   '</div>';
 
index 056cfcb..6fd015f 100644 (file)
@@ -291,7 +291,7 @@ class assignment_upload extends assignment_base {
                 $found = true;
                 $mimetype = $file->get_mimetype();
                 $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/assignment_submission/'.$userid.'/'.$filename);
-                $output .= '<a href="'.$path.'" ><img class="icon" src="'.$OUTPUT->old_icon_url(file_mimetype_icon($mimetype)).'" alt="'.$mimetype.'" />'.s($filename).'</a>&nbsp;';
+                $output .= '<a href="'.$path.'" ><img class="icon" src="'.$OUTPUT->pix_url(file_mimetype_icon($mimetype)).'" alt="'.$mimetype.'" />'.s($filename).'</a>&nbsp;';
 
             }
 
@@ -350,13 +350,13 @@ class assignment_upload extends assignment_base {
                 $filename = $file->get_filename();
                 $mimetype = $file->get_mimetype();
                 $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/assignment_submission/'.$userid.'/'.$filename);
-                $output .= '<a href="'.$path.'" ><img src="'.$OUTPUT->old_icon_url(file_mimetype_icon($mimetype)).'" class="icon" alt="'.$mimetype.'" />'.s($filename).'</a>';
+                $output .= '<a href="'.$path.'" ><img src="'.$OUTPUT->pix_url(file_mimetype_icon($mimetype)).'" class="icon" alt="'.$mimetype.'" />'.s($filename).'</a>';
 
                 if ($candelete) {
                     $delurl  = "$CFG->wwwroot/mod/assignment/delete.php?id={$this->cm->id}&amp;file=".rawurlencode($filename)."&amp;userid={$submission->userid}&amp;mode=$mode&amp;offset=$offset";
 
                     $output .= '<a href="'.$delurl.'">&nbsp;'
-                              .'<img title="'.$strdelete.'" src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="" /></a> ';
+                              .'<img title="'.$strdelete.'" src="'.$OUTPUT->pix_url('t/delete') . '" class="iconsmall" alt="" /></a> ';
                 }
 
                 if (has_capability('mod/assignment:exportownsubmission', $this->context)) {
@@ -412,13 +412,13 @@ class assignment_upload extends assignment_base {
                 $mimetype = $file->get_mimetype();
                 $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/assignment_response/'.$userid.'/'.$filename);
 
-                $output .= '<a href="'.$path.'" ><img src="'.$OUTPUT->old_icon_url(file_mimetype_icon($mimetype)).'" alt="'.$mimetype.'" />'.$filename.'</a>';
+                $output .= '<a href="'.$path.'" ><img src="'.$OUTPUT->pix_url(file_mimetype_icon($mimetype)).'" alt="'.$mimetype.'" />'.$filename.'</a>';
 
                 if ($candelete) {
                     $delurl  = "$CFG->wwwroot/mod/assignment/delete.php?id={$this->cm->id}&amp;file=".rawurlencode($filename)."&amp;userid=$userid&amp;mode=$mode&amp;offset=$offset&amp;action=response";
 
                     $output .= '<a href="'.$delurl.'">&nbsp;'
-                              .'<img title="'.$strdelete.'" src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt=""/></a> ';
+                              .'<img title="'.$strdelete.'" src="'.$OUTPUT->pix_url('t/delete') . '" class="iconsmall" alt=""/></a> ';
                 }
 
                 $output .= '&nbsp;';
@@ -1090,7 +1090,7 @@ class assignment_upload extends assignment_base {
                     $filename = $file->get_filename();
                     $mimetype = $file->get_mimetype();
                     $link = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/assignment_submission/'.$USER->id.'/'.$filename);
-                    $node->get($filekey)->add($filename, $link, navigation_node::TYPE_SETTING, null, null, $OUTPUT->old_icon_url(file_mimetype_icon($mimetype)));
+                    $node->get($filekey)->add($filename, $link, navigation_node::TYPE_SETTING, null, null, $OUTPUT->pix_url(file_mimetype_icon($mimetype)));
                 }
             }
         }
index fde72dd..cd8240d 100644 (file)
@@ -22,7 +22,7 @@ class assignment_uploadsingle extends assignment_base {
                 $found = true;
                 $mimetype = $file->get_mimetype();
                 $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/assignment_submission/'.$userid.'/'.$filename);
-                $output .= '<a href="'.$path.'" ><img class="icon" src="'.$OUTPUT->old_icon_url(file_mimetype_icon($mimetype)).'" alt="'.$mimetype.'" />'.s($filename).'</a><br />';
+                $output .= '<a href="'.$path.'" ><img class="icon" src="'.$OUTPUT->pix_url(file_mimetype_icon($mimetype)).'" alt="'.$mimetype.'" />'.s($filename).'</a><br />';
             }
         }
 
@@ -214,7 +214,7 @@ class assignment_uploadsingle extends assignment_base {
                     $filename = $file->get_filename();
                     $mimetype = $file->get_mimetype();
                     $link = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/assignment_submission/'.$USER->id.'/'.$filename);
-                    $node->get($filekey)->add($filename, $link, navigation_node::TYPE_SETTING, null, null, $OUTPUT->old_icon_url(file_mimetype_icon($mimetype)));
+                    $node->get($filekey)->add($filename, $link, navigation_node::TYPE_SETTING, null, null, $OUTPUT->pix_url(file_mimetype_icon($mimetype)));
                 }
             }
         }
index 1b2b4ad..b19b74c 100644 (file)
@@ -1268,7 +1268,7 @@ function chat_extend_navigation($navigation, $course, $module, $cm) {
         foreach ($links as $link) {
             $link->add_action(new popup_action('click', $link->url, 'chat'.$course->id.$cm->instance.$currentgroup, array('height' => 500, 'width' => 700)));
             $link->title = get_string('modulename', 'chat');
-            $navigation->add($link->title, $link, navigation_node::TYPE_ACTIVITY, null ,null, $OUTPUT->old_icon_url('c/group'));
+            $navigation->add($link->title, $link, navigation_node::TYPE_ACTIVITY, null ,null, $OUTPUT->pix_url('c/group'));
         }
     }
 
@@ -1278,7 +1278,7 @@ function chat_extend_navigation($navigation, $course, $module, $cm) {
         $users = $navigation->get($userskey);
         foreach ($chatusers as $chatuser) {
             $userlink = new moodle_url($CFG->wwwroot.'/user/view.php', array('id'=>$chatuser->id,'course'=>$course->id));
-            $users->add(fullname($chatuser).' '.format_time(time() - $chatuser->lastmessageping), $userlink, navigation_node::TYPE_USER, null, null, $OUTPUT->old_icon_url('c/user'));
+            $users->add(fullname($chatuser).' '.format_time(time() - $chatuser->lastmessageping), $userlink, navigation_node::TYPE_USER, null, null, $OUTPUT->pix_url('c/user'));
         }
     }
 }
index 1dd9bf4..23cfce6 100755 (executable)
@@ -290,10 +290,10 @@ if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) {          ///
                 shorten_text($field->field->description, 30),
 
                 '<a href="field.php?d='.$data->id.'&amp;mode=display&amp;fid='.$field->field->id.'&amp;sesskey='.sesskey().'">'.
-                '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.get_string('edit').'" title="'.get_string('edit').'" /></a>'.
+                '<img src="'.$OUTPUT->pix_url('t/edit') . '" class="iconsmall" alt="'.get_string('edit').'" title="'.get_string('edit').'" /></a>'.
                 '&nbsp;'.
                 '<a href="field.php?d='.$data->id.'&amp;mode=delete&amp;fid='.$field->field->id.'&amp;sesskey='.sesskey().'">'.
-                '<img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>'
+                '<img src="'.$OUTPUT->pix_url('t/delete') . '" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>'
 
                 );
             }
index b449385..b7c46cb 100755 (executable)
@@ -60,7 +60,7 @@ class data_field_file extends data_field_base {
             // Print icon if file already exists
             $browser = get_file_browser();
             $src     = file_encode_url($CFG->wwwroot.'/pluginfile.php', $this->context->id.'/data_content/'.$content->id.'/'.$file->get_filename());
-            $str .= '<img src="'.$OUTPUT->old_icon_url(file_mimetype_icon($file->get_mimetype())).'" class="icon" alt="'.$file->get_mimetype().'" />'.
+            $str .= '<img src="'.$OUTPUT->pix_url(file_mimetype_icon($file->get_mimetype())).'" class="icon" alt="'.$file->get_mimetype().'" />'.
                     '<a href="'.$src.'" >'.s($file->get_filename()).'</a>';
         }
         return $str;
@@ -121,7 +121,7 @@ class data_field_file extends data_field_base {
         $width  = $this->field->param1 ? ' width  = "'.s($this->field->param1).'" ':' ';
         $height = $this->field->param2 ? ' height = "'.s($this->field->param2).'" ':' ';
 
-        $str = '<img src="'.$OUTPUT->old_icon_url(file_mimetype_icon($file->get_mimetype())).'" height="16" width="16" alt="'.$file->get_mimetype().'" />&nbsp;'.
+        $str = '<img src="'.$OUTPUT->pix_url(file_mimetype_icon($file->get_mimetype())).'" height="16" width="16" alt="'.$file->get_mimetype().'" />&nbsp;'.
                '<a href="'.$src.'" >'.s($name).'</a>';
         return $str;
     }
index 5b229ee..d9bc28f 100755 (executable)
@@ -430,7 +430,7 @@ class data_field_base {     // Base class for Database Field Types (see field/*/
         global $OUTPUT;
 
         $str = '<a href="field.php?d='.$this->data->id.'&amp;fid='.$this->field->id.'&amp;mode=display&amp;sesskey='.sesskey().'">';
-        $str .= '<img src="'.$OUTPUT->old_icon_url('/field/' . $this->type . '/icon', 'data') . '" ';
+        $str .= '<img src="'.$OUTPUT->pix_url('/field/' . $this->type . '/icon', 'data') . '" ';
         $str .= 'height="'.$this->iconheight.'" width="'.$this->iconwidth.'" alt="'.$this->type.'" title="'.$this->type.'" /></a>';
         return $str;
     }
@@ -1223,9 +1223,9 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
         $patterns[]='##delete##';
         if (has_capability('mod/data:manageentries', $context) or data_isowner($record->id)) {
             $replacement[] = '<a href="'.$CFG->wwwroot.'/mod/data/edit.php?d='
-                             .$data->id.'&amp;rid='.$record->id.'&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.get_string('edit').'" title="'.get_string('edit').'" /></a>';
+                             .$data->id.'&amp;rid='.$record->id.'&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->pix_url('t/edit') . '" class="iconsmall" alt="'.get_string('edit').'" title="'.get_string('edit').'" /></a>';
             $replacement[] = '<a href="'.$CFG->wwwroot.'/mod/data/view.php?d='
-                             .$data->id.'&amp;delete='.$record->id.'&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>';
+                             .$data->id.'&amp;delete='.$record->id.'&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->pix_url('t/delete') . '" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>';
         } else {
             $replacement[] = '';
             $replacement[] = '';
@@ -1236,7 +1236,7 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
             $moreurl .= '&amp;filter=1';
         }
         $patterns[]='##more##';
-        $replacement[] = '<a href="' . $moreurl . '"><img src="' . $OUTPUT->old_icon_url('i/search') . '" class="iconsmall" alt="' . get_string('more', 'data') . '" title="' . get_string('more', 'data') . '" /></a>';
+        $replacement[] = '<a href="' . $moreurl . '"><img src="' . $OUTPUT->pix_url('i/search') . '" class="iconsmall" alt="' . get_string('more', 'data') . '" title="' . get_string('more', 'data') . '" /></a>';
 
         $patterns[]='##moreurl##';
         $replacement[] = $moreurl;
@@ -1268,7 +1268,7 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
 
         $patterns[]='##approve##';
         if (has_capability('mod/data:approve', $context) && ($data->approval) && (!$record->approved)){
-            $replacement[] = '<span class="approve"><a href="'.$CFG->wwwroot.'/mod/data/view.php?d='.$data->id.'&amp;approve='.$record->id.'&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('i/approve') . '" class="icon" alt="'.get_string('approve').'" /></a></span>';
+            $replacement[] = '<span class="approve"><a href="'.$CFG->wwwroot.'/mod/data/view.php?d='.$data->id.'&amp;approve='.$record->id.'&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->pix_url('i/approve') . '" class="icon" alt="'.get_string('approve').'" /></a></span>';
         } else {
             $replacement[] = '';
         }
index d53a7ac..6d3bf2a 100644 (file)
@@ -394,7 +394,7 @@ foreach ($presets as $id => $preset) {
     $dellink = '';
     if ($preset->userid > 0 and ($preset->userid == $USER->id || has_capability('mod/data:manageuserpresets', $context))) {
         $dellink = '&nbsp;<a href="preset.php?d='.$data->id.'&amp;action=confirmdelete&amp;fullname='.$fullname.'&amp;sesskey='.sesskey().'">'.
-                   '<img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.$strdelete.' '.$desc.'" /></a>';
+                   '<img src="'.$OUTPUT->pix_url('t/delete') . '" class="iconsmall" alt="'.$strdelete.' '.$desc.'" /></a>';
     }
 
     echo '<input type="radio" name="fullname" id="usepreset'.$i.'" value="'.$fullname.'" /><label for="usepreset'.$i++.'">'.$desc.'</label>'.$dellink.'<br />';
index 739a40c..4ebfdfb 100644 (file)
@@ -116,7 +116,7 @@ if($shoulddelete == 1) {
             echo '<tr><td align="center">'.$template->name.'</td>';
             echo '<td align="center">';
             echo '<form action="'.$ME.'" method="post">';
-            echo '<input title="'.get_string('delete_template','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/delete') . '" hspace="1" height="11" width="11" border="0" />';
+            echo '<input title="'.get_string('delete_template','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/delete') . '" hspace="1" height="11" width="11" border="0" />';
             echo '<input type="hidden" name="deletetempl" value="'.$template->id.'" />';
             echo '<input type="hidden" name="shoulddelete" value="1" />';
             echo '<input type="hidden" name="id" value="'.$id.'" />';
index 86575a8..3e081b7 100644 (file)
@@ -234,11 +234,11 @@ if($do_show == 'edit') {
                 echo '<td>';
                 $buttonlink = $ME.'?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&movehere='.$moveposition);
                 echo '<a title="'.get_string('move_here','feedback').'" href="'.$buttonlink.'">
-                        <img class="movetarget" alt="'.get_string('move_here','feedback').'" src="'.$OUTPUT->old_icon_url('movehere') . '" />
+                        <img class="movetarget" alt="'.get_string('move_here','feedback').'" src="'.$OUTPUT->pix_url('movehere') . '" />
                       </a>';
 
                     // echo '<form action="'.$ME.'" method="post"><fieldset>';
-                    // echo '<input title="'.get_string('move_here','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('movehere') . '" hspace="1" height="16" width="80" border="0" />';
+                    // echo '<input title="'.get_string('move_here','feedback').'" type="image" src="'.$OUTPUT->pix_url('movehere') . '" hspace="1" height="16" width="80" border="0" />';
                     // echo '<input type="hidden" name="movehere" value="'.$moveposition.'" />';
                     // feedback_edit_print_default_form_values($id, $do_show);
                     // echo '</fieldset></form>';
@@ -270,12 +270,12 @@ if($do_show == 'edit') {
             if($feedbackitem->position > 1){
                 $buttonlink = $ME.'?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&moveupitem='.$feedbackitem->id);
                 echo '<a class="icon up" title="'.get_string('moveup_item','feedback').'" href="'.$buttonlink.'">
-                        <img alt="'.get_string('moveup_item','feedback').'" src="'.$OUTPUT->old_icon_url('t/up') . '" />
+                        <img alt="'.get_string('moveup_item','feedback').'" src="'.$OUTPUT->pix_url('t/up') . '" />
                       </a>';
                 //print the button to move-up the item
                 // echo '<form action="'.$ME.'" method="post"><fieldset>';
-                // ///////echo '<input title="'.get_string('moveup_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/up') . '" hspace="1" height="11" width="11" border="0" />';
-                // echo '<input class="feedback_moveup_button" title="'.get_string('moveup_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/up') . '" />';
+                // ///////echo '<input title="'.get_string('moveup_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/up') . '" hspace="1" height="11" width="11" border="0" />';
+                // echo '<input class="feedback_moveup_button" title="'.get_string('moveup_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/up') . '" />';
                 // echo '<input type="hidden" name="moveupitem" value="'.$feedbackitem->id.'" />';
                 // feedback_edit_print_default_form_values($id, $do_show);
                 // echo '</fieldset></form>';
@@ -287,12 +287,12 @@ if($do_show == 'edit') {
             if($feedbackitem->position < $lastposition - 1){
                 $buttonlink = $ME.'?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&movedownitem='.$feedbackitem->id);
                 echo '<a class="icon down" title="'.get_string('movedown_item','feedback').'" href="'.$buttonlink.'">
-                        <img alt="'.get_string('movedown_item','feedback').'" src="'.$OUTPUT->old_icon_url('t/down') . '" />
+                        <img alt="'.get_string('movedown_item','feedback').'" src="'.$OUTPUT->pix_url('t/down') . '" />
                       </a>';
                 //print the button to move-down the item
                 // echo '<form action="'.$ME.'" method="post"><fieldset>';
-                // echo '<input title="'.get_string('movedown_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/down') . '" hspace="1" height="11" width="11" border="0" />';
-                // echo '<input class="feedback_movedown_button" title="'.get_string('movedown_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/down') . '" />';
+                // echo '<input title="'.get_string('movedown_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/down') . '" hspace="1" height="11" width="11" border="0" />';
+                // echo '<input class="feedback_movedown_button" title="'.get_string('movedown_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/down') . '" />';
                 // echo '<input type="hidden" name="movedownitem" value="'.$feedbackitem->id.'" />';
                 // feedback_edit_print_default_form_values($id, $do_show);
                 // echo '</fieldset></form>';
@@ -303,11 +303,11 @@ if($do_show == 'edit') {
             echo '<td>';
                 $buttonlink = $ME.'?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&moveitem='.$feedbackitem->id);
                 echo '<a class="editing_move" title="'.get_string('move_item','feedback').'" href="'.$buttonlink.'">
-                        <img alt="'.get_string('move_item','feedback').'" src="'.$OUTPUT->old_icon_url('t/move') . '" />
+                        <img alt="'.get_string('move_item','feedback').'" src="'.$OUTPUT->pix_url('t/move') . '" />
                       </a>';
                 // echo '<form action="'.$ME.'" method="post"><fieldset>';
-                // echo '<input title="'.get_string('move_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/move') . '" hspace="1" height="11" width="11" border="0" />';
-                // echo '<input class="feedback_move_button" title="'.get_string('move_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/move') . '" />';
+                // echo '<input title="'.get_string('move_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/move') . '" hspace="1" height="11" width="11" border="0" />';
+                // echo '<input class="feedback_move_button" title="'.get_string('move_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/move') . '" />';
                 // echo '<input type="hidden" name="moveitem" value="'.$feedbackitem->id.'" />';
                 // feedback_edit_print_default_form_values($id, $do_show);
                 // echo '</fieldset></form>';
@@ -317,11 +317,11 @@ if($do_show == 'edit') {
             if($feedbackitem->typ != 'pagebreak') {
                 $buttonlink = 'edit_item.php?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&itemid='.$feedbackitem->id.'&typ='.$feedbackitem->typ);
                 echo '<a class="editing_update" title="'.get_string('edit_item','feedback').'" href="'.$buttonlink.'">
-                        <img alt="'.get_string('edit_item','feedback').'" src="'.$OUTPUT->old_icon_url('t/edit') . '" />
+                        <img alt="'.get_string('edit_item','feedback').'" src="'.$OUTPUT->pix_url('t/edit') . '" />
                       </a>';
                 // echo '<form action="edit_item.php" method="post"><fieldset>';
-                // echo '<input title="'.get_string('edit_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/edit') . '" hspace="1" height="11" width="11" border="0" />';
-                // echo '<input class="feedback_edit_button" title="'.get_string('edit_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/edit') . '" />';
+                // echo '<input title="'.get_string('edit_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/edit') . '" hspace="1" height="11" width="11" border="0" />';
+                // echo '<input class="feedback_edit_button" title="'.get_string('edit_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/edit') . '" />';
                 // echo '<input type="hidden" name="itemid" value="'.$feedbackitem->id.'" />';
                 // echo '<input type="hidden" name="typ" value="'.$feedbackitem->typ.'" />';
                 // feedback_edit_print_default_form_values($id, $do_show);
@@ -360,11 +360,11 @@ if($do_show == 'edit') {
             echo '<td>';
                 $buttonlink = 'delete_item.php?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&deleteitem='.$feedbackitem->id);
                 echo '<a class="icon delete" title="'.get_string('delete_item','feedback').'" href="'.$buttonlink.'">
-                        <img alt="'.get_string('delete_item','feedback').'" src="'.$OUTPUT->old_icon_url('t/delete') . '" />
+                        <img alt="'.get_string('delete_item','feedback').'" src="'.$OUTPUT->pix_url('t/delete') . '" />
                       </a>';
             //print the button to drop the item
             // echo '<form action="delete_item.php" method="post"><fieldset>';
-            // echo '<input class="feedback_delete_button" title="'.get_string('delete_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/delete') . '" />';
+            // echo '<input class="feedback_delete_button" title="'.get_string('delete_item','feedback').'" type="image" src="'.$OUTPUT->pix_url('t/delete') . '" />';
             // echo '<input type="hidden" name="deleteitem" value="'.$feedbackitem->id.'" />';
             // feedback_edit_print_default_form_values($id, $do_show);
             // echo '</fieldset></form>';
@@ -376,10 +376,10 @@ if($do_show == 'edit') {
                     echo '<td>';
                         $buttonlink = $ME.'?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&movehere='.$moveposition);
                         echo '<a title="'.get_string('move_here','feedback').'" href="'.$buttonlink.'">
-                                <img class="movetarget" alt="'.get_string('move_here','feedback').'" src="'.$OUTPUT->old_icon_url('movehere') . '" />
+                                <img class="movetarget" alt="'.get_string('move_here','feedback').'" src="'.$OUTPUT->pix_url('movehere') . '" />
                               </a>';
                         // echo '<form action="'.$ME.'" method="post"><fieldset>';
-                        // echo '<input class="feedback_movehere_button" title="'.get_string('move_here','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('movehere') . '" />';
+                        // echo '<input class="feedback_movehere_button" title="'.get_string('move_here','feedback').'" type="image" src="'.$OUTPUT->pix_url('movehere') . '" />';
                         // echo '<input type="hidden" name="movehere" value="'.$moveposition.'" />';
                         // feedback_edit_print_default_form_values($id, $do_show);
                         // echo '</fieldset></form>';
index f0bd6cf..23a5e52 100644 (file)
@@ -329,7 +329,7 @@ function feedback_print_recent_mod_activity($activity, $courseid, $detail, $modn
     if ($detail) {
         $modname = $modnames[$activity->type];
         echo '<div class="title">';
-        echo "<img src=\"" . $OUTPUT->old_icon_url('icon', $activity->type) . "\" ".
+        echo "<img src=\"" . $OUTPUT->pix_url('icon', $activity->type) . "\" ".
              "class=\"icon\" alt=\"$modname\" />";
         echo "<a href=\"$CFG->wwwroot/mod/feedback/view.php?id={$activity->cmid}\">{$activity->name}</a>";
         echo '</div>';
index cdeae91..97c2c23 100644 (file)
@@ -118,7 +118,7 @@ if($coursemap = feedback_get_courses_from_sitecourse_map($feedback->id)) {
     $table->setup();
 
     foreach ($coursemap as $cmap) {
-        $table->add_data(array('<a href="'.htmlspecialchars('unmapcourse.php?id='.$id.'&cmapid='.$cmap->id).'"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" alt="Delete" /></a> ('.$cmap->shortname.') '.$cmap->fullname));
+        $table->add_data(array('<a href="'.htmlspecialchars('unmapcourse.php?id='.$id.'&cmapid='.$cmap->id).'"><img src="'.$OUTPUT->pix_url('t/delete') . '" alt="Delete" /></a> ('.$cmap->shortname.') '.$cmap->fullname));
     }
 
     $table->print_html();
index 711b6c6..0b0285e 100644 (file)
@@ -81,8 +81,8 @@ function folder_get_file_link($file, $folder, $context) {
     $path        = '/'.$context->id.'/folder_content/'.$folder->revision.$file->get_filepath().$file->get_filename();
     $viewurl     = file_encode_url($urlbase, $path, false);
     $downloadurl = file_encode_url($urlbase, $path, true);
-    $downicon    = $OUTPUT->old_icon_url('t/down');
-    $mimeicon    = $OUTPUT->old_icon_url(file_mimetype_icon($file->get_mimetype()));
+    $downicon    = $OUTPUT->pix_url('t/down');
+    $mimeicon    = $OUTPUT->pix_url(file_mimetype_icon($file->get_mimetype()));
 
     $downloadurl = "&nbsp;<a href=\"$downloadurl\" title=\"" . get_string('downloadfile') . "\"><img src=\"$downicon\" class=\"iconsmall\" alt=\"$strdownload\" /></a>";
     return "<a href=\"$viewurl\" title=\"\"><img src=\"$mimeicon\" class=\"icon\" alt=\"$strfile\" />&nbsp;".s($file->get_filename()).'</a>'.$downloadurl;
index 447269e..834e639 100644 (file)
@@ -198,7 +198,7 @@ if ($generalforums) {
                 } else if ($unread = forum_tp_count_forum_unread_posts($cm, $course)) {
                         $unreadlink = '<span class="unread"><a href="view.php?f='.$forum->id.'">'.$unread.'</a>';
                     $unreadlink .= '<a title="'.$strmarkallread.'" href="markposts.php?f='.
-                                   $forum->id.'&amp;mark=read"><img src="'.$OUTPUT->old_icon_url('t/clear') . '" alt="'.$strmarkallread.'" /></a></span>';
+                                   $forum->id.'&amp;mark=read"><img src="'.$OUTPUT->pix_url('t/clear') . '" alt="'.$strmarkallread.'" /></a></span>';
                 } else {
                     $unreadlink = '<span class="read">0</span>';
                 }
@@ -325,7 +325,7 @@ if ($course->id != SITEID) {    // Only real courses have learning forums
                     } else if ($unread = forum_tp_count_forum_unread_posts($cm, $course)) {
                         $unreadlink = '<span class="unread"><a href="view.php?f='.$forum->id.'">'.$unread.'</a>';
                         $unreadlink .= '<a title="'.$strmarkallread.'" href="markposts.php?f='.
-                                       $forum->id.'&amp;mark=read"><img src="'.$OUTPUT->old_icon_url('t/clear') . '" alt="'.$strmarkallread.'" /></a></span>';
+                                       $forum->id.'&amp;mark=read"><img src="'.$OUTPUT->pix_url('t/clear') . '" alt="'.$strmarkallread.'" /></a></span>';
                     } else {
                         $unreadlink = '<span class="read">0</span>';
                     }
index 6d7d805..b337187 100644 (file)
@@ -3708,7 +3708,7 @@ function forum_print_discussion_header(&$post, $forum, $group=-1, $datestring=""
                     echo '</a>';
                     echo '<a title="'.$strmarkalldread.'" href="'.$CFG->wwwroot.'/mod/forum/markposts.php?f='.
                          $forum->id.'&amp;d='.$post->discussion.'&amp;mark=read&amp;returnpage=view.php">' .
-                         '<img src="'.$OUTPUT->old_icon_url('t/clear') . '" class="iconsmall" alt="'.$strmarkalldread.'" /></a>';
+                         '<img src="'.$OUTPUT->pix_url('t/clear') . '" class="iconsmall" alt="'.$strmarkalldread.'" /></a>';
                     echo '</span>';
                 } else {
                     echo '<span class="read">';
@@ -4354,7 +4354,7 @@ function forum_print_attachments($post, $cm, $type) {
         foreach ($files as $file) {
             $filename = $file->get_filename();
             $mimetype = $file->get_mimetype();
-            $iconimage = '<img src="'.$OUTPUT->old_icon_url(file_mimetype_icon($mimetype)).'" class="icon" alt="'.$mimetype.'" />';
+            $iconimage = '<img src="'.$OUTPUT->pix_url(file_mimetype_icon($mimetype)).'" class="icon" alt="'.$mimetype.'" />';
             $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$context->id.'/forum_attachment/'.$post->id.'/'.$filename);
 
             if ($type == 'html') {
@@ -5651,7 +5651,7 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=-1, $di
                     echo '&nbsp;<a title="'.get_string('markallread', 'forum').
                          '" href="'.$CFG->wwwroot.'/mod/forum/markposts.php?f='.
                          $forum->id.'&amp;mark=read&amp;returnpage=view.php">'.
-                         '<img src="'.$OUTPUT->old_icon_url('t/clear') . '" class="iconsmall" alt="'.get_string('markallread', 'forum').'" /></a>';
+                         '<img src="'.$OUTPUT->pix_url('t/clear') . '" class="iconsmall" alt="'.get_string('markallread', 'forum').'" /></a>';
                 }
                 echo '</th>';
             }
@@ -5886,7 +5886,7 @@ function forum_print_discussion($course, $cm, $forum, $discussion, $post, $mode,
             echo '<div class="ratingsubmit">';
             echo '<input type="submit" id="forumpostratingsubmit" value="'.get_string('sendinratings', 'forum').'" />';
             if (ajaxenabled() && !empty($CFG->forum_ajaxrating)) { /// AJAX enabled, standard submission form
-                $PAGE->requires->js_function_call('add_menu_listeners', array($OUTPUT->old_icon_url('i/loading_small')))->on_dom_ready();
+                $PAGE->requires->js_function_call('add_menu_listeners', array($OUTPUT->pix_url('i/loading_small')))->on_dom_ready();
             }
             if ($forum->scale < 0) {
                 if ($scale = $DB->get_record("scale", array("id" => abs($forum->scale)))) {
@@ -6199,7 +6199,7 @@ function forum_print_recent_mod_activity($activity, $courseid, $detail, $modname
     echo '<div class="title">';
     if ($detail) {
         $aname = s($activity->name);
-        echo "<img src=\"" . $OUTPUT->old_icon_url('icon', $activity->type) . "\" ".
+        echo "<img src=\"" . $OUTPUT->pix_url('icon', $activity->type) . "\" ".
              "class=\"icon\" alt=\"{$aname}\" />";
     }
     echo "<a href=\"$CFG->wwwroot/mod/forum/discuss.php?d={$activity->content->discussion}"
@@ -7991,7 +7991,7 @@ function forum_extend_navigation($navref, $course, $module, $cm) {
     $navref->get($discussionkey)->mainnavonly = true;
 
     foreach ($discussions as $discussion) {
-        $icon = $OUTPUT->old_icon_url('i/feedback');
+        $icon = $OUTPUT->pix_url('i/feedback');
         $url = new moodle_url($CFG->wwwroot.'/mod/forum/discuss.php', array('d'=>$discussion->discussion));
         $navref->get($discussionkey)->add($discussion->subject, $url, navigation_node::TYPE_SETTING, null, null, $icon);
     }
@@ -8019,7 +8019,7 @@ function forum_extend_navigation($navref, $course, $module, $cm) {
         $recentkey = $navref->add(get_string('recentactivity').' ('.count($recentposts).')');
         $navref->get($recentkey)->mainnavonly = true;
         foreach ($recentposts as $post) {
-            $icon = $OUTPUT->old_icon_url('i/feedback');
+            $icon = $OUTPUT->pix_url('i/feedback');
             $url = new moodle_url($CFG->wwwroot.'/mod/forum/discuss.php', array('d'=>$post->content->discussion));
             $title = $post->content->subject."\n".userdate($post->timestamp, get_string('strftimerecent', 'langconfig'))."\n".$post->user->firstname.' '.$post->user->lastname;
             $navref->get($recentkey)->add($title, $url, navigation_node::TYPE_SETTING, null, null, $icon);
@@ -8141,7 +8141,7 @@ function forum_extend_settings_navigation($settingsnav, $module=null) {
             $userid = $USER->id;
         }
         $url = new moodle_url(rss_get_url($PAGE->course->id, $userid, "forum", $forumobject->id));
-        $forum->add($string, $url, settings_navigation::TYPE_SETTING, null, null, $OUTPUT->old_icon_url('i/rss'));
+        $forum->add($string, $url, settings_navigation::TYPE_SETTING, null, null, $OUTPUT->pix_url('i/rss'));
     }
 
     return $forumkey;
index 40bd32c..a2bfa24 100644 (file)
@@ -220,8 +220,8 @@ if ( $action ) {
                </td>
                <td style="width:10%" align="center"><b>
                <?php
-                echo "<a href=\"editcategories.php?id=$cm->id&amp;action=delete&amp;mode=cat&amp;hook=$category->id\"><img  alt=\"" . get_string("delete") . "\"src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" /></a> ";
-                echo "<a href=\"editcategories.php?id=$cm->id&amp;action=edit&amp;mode=cat&amp;hook=$category->id\"><img  alt=\"" . get_string("edit") . "\" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" /></a>";
+                echo "<a href=\"editcategories.php?id=$cm->id&amp;action=delete&amp;mode=cat&amp;hook=$category->id\"><img  alt=\"" . get_string("delete") . "\"src=\"" . $OUTPUT->pix_url('t/delete') . "\" class=\"iconsmall\" /></a> ";
+                echo "<a href=\"editcategories.php?id=$cm->id&amp;action=edit&amp;mode=cat&amp;hook=$category->id\"><img  alt=\"" . get_string("edit") . "\" src=\"" . $OUTPUT->pix_url('t/edit') . "\" class=\"iconsmall\" /></a>";
                ?>
                </b></td>
              </tr>
index d58adfd..af4f0c1 100644 (file)
@@ -953,14 +953,14 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
             $mainglossary = $DB->get_record('glossary', array('mainglossary'=>1,'course'=>$course->id));
             if ( $mainglossary ) {  // if there is a main glossary defined, allow to export the current entry
                 $output = true;
-                $return .= ' <a title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$entry->id.'&amp;prevmode='.$mode.'&amp;hook='.urlencode($hook).'"><img src="'.$OUTPUT->old_icon_url('export', 'glossary').'" class="iconsmall" alt="'.get_string('exporttomainglossary','glossary').$altsuffix.'" /></a>';
+                $return .= ' <a title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$entry->id.'&amp;prevmode='.$mode.'&amp;hook='.urlencode($hook).'"><img src="'.$OUTPUT->pix_url('export', 'glossary').'" class="iconsmall" alt="'.get_string('exporttomainglossary','glossary').$altsuffix.'" /></a>';
             }
         }
 
         if ( $entry->sourceglossaryid ) {
-            $icon = $OUTPUT->old_icon_url('minus', 'glossary');   // graphical metaphor (minus) for deleting an imported entry
+            $icon = $OUTPUT->pix_url('minus', 'glossary');   // graphical metaphor (minus) for deleting an imported entry
         } else {
-            $icon = $OUTPUT->old_icon_url('t/delete');
+            $icon = $OUTPUT->pix_url('t/delete');
         }
 
         //Decide if an entry is editable:
@@ -973,7 +973,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
             $return .= $icon;
             $return .= "\" class=\"iconsmall\" alt=\"" . get_string("delete") .$altsuffix."\" /></a> ";
 
-            $return .= " <a title=\"" . get_string("edit") . "\" href=\"edit.php?cmid=$cm->id&amp;id=$entry->id&amp;mode=$mode&amp;hook=".urlencode($hook)."\"><img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"" . get_string("edit") .$altsuffix. "\" /></a>";
+            $return .= " <a title=\"" . get_string("edit") . "\" href=\"edit.php?cmid=$cm->id&amp;id=$entry->id&amp;mode=$mode&amp;hook=".urlencode($hook)."\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" class=\"iconsmall\" alt=\"" . get_string("edit") .$altsuffix. "\" /></a>";
         } elseif ( $importedentry ) {
             $return .= " <font size=\"-1\">" . get_string("exportedentry","glossary") . "</font>";
         }
@@ -1105,7 +1105,7 @@ function  glossary_print_entry_approval($cm, $entry, $mode, $align="right", $ins
         if ($insidetable) {
             echo '<table class="glossaryapproval" align="'.$align.'"><tr><td align="'.$align.'">';
         }
-        echo '<a title="'.get_string('approve','glossary').'" href="approve.php?eid='.$entry->id.'&amp;mode='.$mode.'&amp;sesskey='.sesskey().'"><img align="'.$align.'" src="'.$OUTPUT->old_icon_url('i/approve') . '" style="border:0px; width:34px; height:34px" alt="'.get_string('approve','glossary').'" /></a>';
+        echo '<a title="'.get_string('approve','glossary').'" href="approve.php?eid='.$entry->id.'&amp;mode='.$mode.'&amp;sesskey='.sesskey().'"><img align="'.$align.'" src="'.$OUTPUT->pix_url('i/approve') . '" style="border:0px; width:34px; height:34px" alt="'.get_string('approve','glossary').'" /></a>';
         if ($insidetable) {
             echo '</td></tr></table>';
         }
@@ -1271,7 +1271,7 @@ function glossary_print_attachments($entry, $cm, $type=NULL, $align="left") {
         foreach ($files as $file) {
             $filename = $file->get_filename();
             $mimetype = $file->get_mimetype();
-            $iconimage = '<img src="'.$OUTPUT->old_icon_url(file_mimetype_icon($mimetype)).'" class="icon" alt="'.$mimetype.'" />';
+            $iconimage = '<img src="'.$OUTPUT->pix_url(file_mimetype_icon($mimetype)).'" class="icon" alt="'.$mimetype.'" />';
             $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$context->id.'/glossary_attachment/'.$entry->id.'/'.$filename);
 
             if ($type == 'html') {
@@ -1643,7 +1643,7 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
              $neworder = '&amp;sortorder=asc';
              $newordertitle = get_string('changeto', 'glossary', $asc);
          }
-         $icon = " <img src=\"".$OUTPUT->old_icon_url($sortorder, 'glossary')."\" class=\"icon\" alt=\"$newordertitle\" />";
+         $icon = " <img src=\"".$OUTPUT->pix_url($sortorder, 'glossary')."\" class=\"icon\" alt=\"$newordertitle\" />";
      } else {
          if ( $sortkey != 'CREATION' and $sortkey != 'UPDATE' and
                $sortkey != 'FIRSTNAME' and $sortkey != 'LASTNAME' ) {
@@ -1652,7 +1652,7 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
          } else {
              $newordertitle = $desc;
              $neworder = '&amp;sortorder=desc';
-             $icon = ' <img src="'.$OUTPUT->old_icon_url('asc', 'glossary').'" class="icon" alt="'.$newordertitle.'" />';
+             $icon = ' <img src="'.$OUTPUT->pix_url('asc', 'glossary').'" class="icon" alt="'.$newordertitle.'" />';
          }
      }
      $ficon     = '';
index 4f16a8c..1467818 100644 (file)
@@ -314,7 +314,7 @@ if ($showcommonelements) {
         if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) {
 //                print_box_start('printicon');
             echo '<span class="wrap printicon">';
-            echo " <a title =\"". get_string("printerfriendly","glossary") ."\" href=\"print.php?id=$cm->id&amp;mode=$mode&amp;hook=".urlencode($hook)."&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;offset=$offset\"><img class=\"icon\" src=\"".$OUTPUT->old_icon_url('print', 'glossary')."\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
+            echo " <a title =\"". get_string("printerfriendly","glossary") ."\" href=\"print.php?id=$cm->id&amp;mode=$mode&amp;hook=".urlencode($hook)."&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;offset=$offset\"><img class=\"icon\" src=\"".$OUTPUT->pix_url('print', 'glossary')."\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
             echo '</span>';
 //                print_box_end();
         }
index 8e6ed88..f0d6dab 100644 (file)
                     // Show the zoom boxes
                     if ($displaysection==$hotpot->section) {
                         $strshowall = get_string('showall'.$course->format);
-                        $printsection .= '<br /><a href="index.php?id='.$course->id.'&amp;section=all" title="'.$strshowall.'"><img src="'.$OUTPUT->old_icon_url('i/all') . '" style="height:25px; width:16px; border:0px" alt="'.$strshowall.'" /></a><br />';
+                        $printsection .= '<br /><a href="index.php?id='.$course->id.'&amp;section=all" title="'.$strshowall.'"><img src="'.$OUTPUT->pix_url('i/all') . '" style="height:25px; width:16px; border:0px" alt="'.$strshowall.'" /></a><br />';
                     } else {
                         $strshowone = get_string('showonly'.preg_replace('|s$|', '', $course->format, 1), '', $hotpot->section);
-                        $printsection .=  '<br /><a href="index.php?id='.$course->id.'&amp;section='.$hotpot->section.'" title="'.$strshowone.'"><img src="'.$OUTPUT->old_icon_url('i/one') . '" class="icon" alt="'.$strshowone.'" /></a><br />';
+                        $printsection .=  '<br /><a href="index.php?id='.$course->id.'&amp;section='.$hotpot->section.'" title="'.$strshowone.'"><img src="'.$OUTPUT->pix_url('i/one') . '" class="icon" alt="'.$strshowone.'" /></a><br />';
                     }
                 }
             }
index 2bb4635..f050675 100644 (file)
@@ -1267,7 +1267,7 @@ function hotpot_print_recent_mod_activity($activity, $course, $detail=false) {
 
     if ($detail) {
         // activity icon
-        $src = "" . $OUTPUT->old_icon_url('icon', $activity->type) . "";
+        $src = "" . $OUTPUT->pix_url('icon', $activity->type) . "";
         print '<img src="'.$src.'" class="icon" alt="'.$activity->type.'" /> ';
 
         // link to activity
index 1fc3489..6953fbf 100644 (file)
@@ -452,16 +452,16 @@ class moodle_mod_lesson_renderer extends moodle_renderer_base {
 
         if ($printmove) {
             $printmovehtml = new moodle_url($CFG->wwwroot.'/mod/lesson/lesson.php', array('id'=>$this->page->cm->id, 'action'=>'move', 'pageid'=>$page->id, 'sesskey'=>sesskey()));
-            $actions[] = html_link::make($printmovehtml, '<img src="'.$this->output->old_icon_url('t/move').'" class="iconsmall" alt="'.get_string('move').'" />');
+            $actions[] = html_link::make($printmovehtml, '<img src="'.$this->output->pix_url('t/move').'" class="iconsmall" alt="'.get_string('move').'" />');
         }
         $url = new moodle_url($CFG->wwwroot.'/mod/lesson/editpage.php', array('id'=>$this->page->cm->id, 'pageid'=>$page->id, 'edit'=>1));
-        $actions[] = html_link::make($url, '<img src="'.$this->output->old_icon_url('t/edit').'" class="iconsmall" alt="'.get_string('update').'" />');
+        $actions[] = html_link::make($url, '<img src="'.$this->output->pix_url('t/edit').'" class="iconsmall" alt="'.get_string('update').'" />');
 
         $url = new moodle_url($CFG->wwwroot.'/mod/lesson/view.php', array('id'=>$this->page->cm->id, 'pageid'=>$page->id));
-        $actions[] = html_link::make($url, '<img src="'.$this->output->old_icon_url('t/preview').'" class="iconsmall" alt="'.get_string('preview').'" />');
+        $actions[] = html_link::make($url, '<img src="'.$this->output->pix_url('t/preview').'" class="iconsmall" alt="'.get_string('preview').'" />');
 
         $url = new moodle_url($CFG->wwwroot.'/mod/lesson/lesson.php', array('id'=>$this->page->cm->id, 'action'=>'confirmdelete', 'pageid'=>$page->id, 'sesskey'=>sesskey()));
-        $actions[] = html_link::make($url, '<img src="'.$this->output->old_icon_url('t/delete').'" class="iconsmall" alt="'.get_string('delete').'" />');
+        $actions[] = html_link::make($url, '<img src="'.$this->output->pix_url('t/delete').'" class="iconsmall" alt="'.get_string('delete').'" />');
 
         if ($printaddpage) {
             $options = array();
index 96e1ac7..8290d41 100644 (file)
@@ -431,7 +431,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete = true,
                     echo '<div class="quizpagedelete">';
                     echo '<a title="' . get_string('removeemptypage', 'quiz') . '" href="' .
                             $pageurl->out_action(array('deleteemptypage' => $i - 1)) .
-                            '"><img src="' . $OUTPUT->old_icon_url('t/delete') . '" ' .
+                            '"><img src="' . $OUTPUT->pix_url('t/delete') . '" ' .
                             'class="iconsmall" alt="' . $strremove . '" /></a>';
                     echo '</div>';
                 }
@@ -492,7 +492,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete = true,
                     }
                     echo "<a title=\"$strmoveup\" href=\"" .
                             $pageurl->out_action(array('up' => $question->id)) . "\"><img
-                             src=\"" . $OUTPUT->old_icon_url('t/up') . "\" class=\"iconsmall
+                             src=\"" . $OUTPUT->pix_url('t/up') . "\" class=\"iconsmall
                             $upbuttonclass\" alt=\"$strmoveup\" /></a>";
                 }
 
@@ -501,7 +501,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete = true,
                 if (!$hasattempts) {
                     echo "<a title=\"$strmovedown\" href=\"" .
                             $pageurl->out_action(array('down' => $question->id)) . "\"><img
-                            src=\"" . $OUTPUT->old_icon_url('t/down') . "\" class=\"iconsmall\"" .
+                            src=\"" . $OUTPUT->pix_url('t/down') . "\" class=\"iconsmall\"" .
                             " alt=\"$strmovedown\" /></a>";
                 }
             }
@@ -510,7 +510,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete = true,
                 if (!$hasattempts) {