]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url
authortjhunt <tjhunt>
Thu, 2 Jul 2009 11:09:15 +0000 (11:09 +0000)
committertjhunt <tjhunt>
Thu, 2 Jul 2009 11:09:15 +0000 (11:09 +0000)
38 files changed:
lib/adminlib.php
lib/portfoliolib.php
lib/rsslib.php
lib/tablelib.php
lib/upgradelib.php
lib/weblib.php
message/lib.php
mod/assignment/type/online/assignment.class.php
mod/assignment/type/upload/assignment.class.php
mod/data/field.php
mod/data/lib.php
mod/data/preset.php
mod/feedback/delete_template.php
mod/feedback/edit.php
mod/feedback/mapcourse.php
mod/forum/index.php
mod/forum/lib.php
mod/glossary/lib.php
mod/hotpot/index.php
mod/quiz/editlib.php
mod/quiz/summary.php
mod/scorm/locallib.php
question/editlib.php
question/type/questiontype.php
repository/alfresco/repository.class.php
repository/draft/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/s3/repository.class.php
repository/webdav/repository.class.php
user/index.php
user/message.html
user/pix.php
user/portfolio.php
user/profile/index.php

index 0b4582f76b84ff1dce675da569bedd320f84da24..9d51420d123979e0174c69ac019d8c889ab6cf74 100644 (file)
@@ -4917,7 +4917,7 @@ class admin_setting_manageportfolio extends admin_setting {
      * @return string XHTML to display the control
      */
     public function output_html($data, $query='') {
-        global $CFG;
+        global $CFG, $OUTPUT;
 
         $output = print_box_start('generalbox','',true);
 
@@ -4944,10 +4944,10 @@ class admin_setting_manageportfolio extends admin_setting {
 
         foreach ($instances as $i) {
             $row = '';
-            $row .= '<a href="' . $this->baseurl . '&edit=' . $i->get('id') . '"><img src="' . $CFG->pixpath . '/t/edit.gif" alt="' . get_string('edit') . '" /></a>' . "\n";
-            $row .= '<a href="' . $this->baseurl . '&delete=' .  $i->get('id') . '"><img src="' . $CFG->pixpath . '/t/delete.gif" alt="' . get_string('delete') . '" /></a>' . "\n";
+            $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";
             if (array_key_exists($i->get('plugin'), $insane) || array_key_exists($i->get('id'), $insaneinstances)) {
-                $row .=  '<img src="' . $CFG->pixpath . '/t/show.gif" alt="' . get_string('hidden', 'portfolio') . '" />' . "\n";
+                $row .=  '<img src="' . $OUTPUT->old_icon_url('t/show') . '" alt="' . get_string('hidden', 'portfolio') . '" />' . "\n";
             } else {
                 $row .= ' <a href="' . $this->baseurl . '&hide=' . $i->get('id') . '"><img src="' . $CFG->pixpath . '/t/'
                     . ($i->get('visible') ? 'hide' : 'show') . '.gif" alt="' . get_string($i->get('visible') ? 'hide' : 'show') . '" /></a>' . "\n";
index 4bd415dea48ae4c79f31bc697a644a5f3ced135e..1600e6be33612a68385a29067834dea4b7b1731f 100644 (file)
@@ -201,7 +201,7 @@ class portfolio_add_button {
         if ($this->alreadyexporting) {
             return $this->already_exporting($format, $addstr);
         }
-        global $CFG, $COURSE;
+        global $CFG, $COURSE, $OUTPUT;
         if (!$this->is_renderable()) {
             return;
         }
@@ -268,11 +268,11 @@ class portfolio_add_button {
             break;
             case PORTFOLIO_ADD_ICON_FORM:
                 $formoutput .= $selectoutput;
-                $formoutput .= "\n" . '<input type="image" src="' . $CFG->pixpath . '/t/portfolio.gif" alt=' . $addstr .'" />';
+                $formoutput .= "\n" . '<input type="image" src="' . $OUTPUT->old_icon_url('t/portfolio') . '" alt=' . $addstr .'" />';
                 $formoutput .= "\n" . '</form>';
             break;
             case PORTFOLIO_ADD_ICON_LINK:
-                $linkoutput .= '"><img src="' . $CFG->pixpath . '/t/portfolio.gif" alt=' . $addstr .'" /></a>';
+                $linkoutput .= '"><img src="' . $OUTPUT->old_icon_url('t/portfolio') . '" alt=' . $addstr .'" /></a>';
             break;
             case PORTFOLIO_ADD_TEXT_LINK:
                 $linkoutput .= '">' . $addstr .'</a>';
@@ -338,9 +338,9 @@ class portfolio_add_button {
     }
 
     private function already_exporting($format, $addstr) {
-        global $CFG;
+        global $CFG, $OUTPUT;
         $url  = $CFG->wwwroot . '/portfolio/already.php';
-        $icon = $CFG->pixpath . '/t/portfoliono.gif';
+        $icon = $OUTPUT->old_icon_url('t/portfoliono') . '';
         $alt  = get_string('alreadyalt', 'portfolio');
         if (empty($format)) {
             $format = PORTFOLIO_ADD_FULL_FORM;
index ca49068dd04d1f7d7c4e0866db8b4ba9a5bebe21..27a5fc486b32b906a55491fb385dbdecd9d5457c 100644 (file)
@@ -31,7 +31,7 @@
  */
 function rss_get_link($courseid, $userid, $modulename, $id, $tooltiptext='') {
 
-    global $CFG, $USER;
+    global $OUTPUT;
 
     static $pixpath = '';
     static $rsspath = '';
@@ -43,7 +43,7 @@ function rss_get_link($courseid, $userid, $modulename, $id, $tooltiptext='') {
     }
 
     $rsspath = rss_get_url($courseid, $userid, $modulename, $id);
-    $rsspix = $CFG->pixpath .'/i/rss.gif';
+    $rsspix = $OUTPUT->old_icon_url('i/rss');
 
     return '<a href="'. $rsspath .'"><img src="'. $rsspix .'" title="'. strip_tags($tooltiptext) .'" alt="'.get_string('rss').'" /></a>';
 
@@ -415,7 +415,7 @@ define('SUBMITTERS_ADMIN_AND_TEACHER', 2);
  * @param object $context we need the context object to check what the user is allowed to do.
  */
 function rss_display_feeds($courseid, $userid, $rssid='', $context) {
-    global $USER, $CFG, $DB;
+    global $USER, $CFG, $DB, $OUTPUT;
     global $blogid; //hackish, but if there is a blogid it would be good to preserve it
 
     require_once($CFG->libdir.'/tablelib.php');
@@ -461,11 +461,11 @@ function rss_display_feeds($courseid, $userid, $rssid='', $context) {
                     || ($feed->shared && $managesharedfeeds) ) {
 
                 $feedicons = '<a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php?id='. $courseid .'&amp;act=rssedit&amp;rssid='. $feed->id .'&amp;shared='.$feed->shared.'&amp;blogid='. $blogid .'">'.
-                             '<img src="'. $CFG->pixpath .'/t/edit.gif" alt="'. get_string('edit').'" title="'. get_string('edit') .'" /></a>&nbsp;'.
+                             '<img src="'. $OUTPUT->old_icon_url('t/edit') . '" alt="'. get_string('edit').'" title="'. get_string('edit') .'" /></a>&nbsp;'.
 
                              '<a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php?id='. $courseid .'&amp;act=delfeed&amp;rssid='. $feed->id.'&amp;shared='.$feed->shared.'blogid='. $blogid .'"
                 onclick="return confirm(\''. get_string('deletefeedconfirm', 'block_rss_client') .'\');">'.
-                             '<img src="'. $CFG->pixpath .'/t/delete.gif" alt="'. get_string('delete').'" title="'. get_string('delete') .'" /></a>';
+                             '<img src="'. $OUTPUT->old_icon_url('t/delete') . '" alt="'. get_string('delete').'" title="'. get_string('delete') .'" /></a>';
             }
             else {
                 $feedicons = '';
index e2da1e4257f421481fcc4932d73797a1e692c181..2891b4f50bc4ae8aab777eefaf471b26519bdb14 100644 (file)
@@ -1008,7 +1008,7 @@ class flexible_table {
      * This function is not part of the public api.
      */
     function print_headers(){
-        global $CFG;
+        global $CFG, $OUTPUT;
 
         echo '<tr>';
         foreach($this->columns as $column => $index) {
@@ -1018,11 +1018,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="'.$CFG->pixpath.'/t/switch_plus.gif" 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->old_icon_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="'.$CFG->pixpath.'/t/switch_minus.gif" 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->old_icon_url('t/switch_minus') . '" title="'.get_string('hide').' '.strip_tags($this->headers[$index]).'" alt="'.get_string('hide').'" /></a>';
                 }
             }
 
@@ -1041,22 +1041,22 @@ class flexible_table {
                     if($primary_sort_column == 'firstname') {
                         $lsortorder = get_string('asc');
                         if($primary_sort_order == SORT_ASC) {
-                            $icon_sort_first = ' <img src="'.$CFG->pixpath.'/t/down.gif" alt="'.get_string('asc').'" />';
+                            $icon_sort_first = ' <img src="'.$OUTPUT->old_icon_url('t/down') . '" alt="'.get_string('asc').'" />';
                             $fsortorder = get_string('asc');
                         }
                         else {
-                            $icon_sort_first = ' <img src="'.$CFG->pixpath.'/t/up.gif" alt="'.get_string('desc').'" />';
+                            $icon_sort_first = ' <img src="'.$OUTPUT->old_icon_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="'.$CFG->pixpath.'/t/down.gif" alt="'.get_string('asc').'" />';
+                            $icon_sort_last = ' <img src="'.$OUTPUT->old_icon_url('t/down') . '" alt="'.get_string('asc').'" />';
                             $lsortorder = get_string('asc');
                         }
                         else {
-                            $icon_sort_last = ' <img src="'.$CFG->pixpath.'/t/up.gif" alt="'.get_string('desc').'" />';
+                            $icon_sort_last = ' <img src="'.$OUTPUT->old_icon_url('t/up') . '" alt="'.get_string('desc').'" />';
                             $lsortorder = get_string('desc');
                         }
                     } else {
@@ -1076,11 +1076,11 @@ class flexible_table {
                 if($this->is_sortable($column)) {
                     if($primary_sort_column == $column) {
                         if($primary_sort_order == SORT_ASC) {
-                            $icon_sort = ' <img src="'.$CFG->pixpath.'/t/down.gif" alt="'.get_string('asc').'" />';
+                            $icon_sort = ' <img src="'.$OUTPUT->old_icon_url('t/down') . '" alt="'.get_string('asc').'" />';
                             $localsortorder = get_string('asc');
                         }
                         else {
-                            $icon_sort = ' <img src="'.$CFG->pixpath.'/t/up.gif" alt="'.get_string('desc').'" />';
+                            $icon_sort = ' <img src="'.$OUTPUT->old_icon_url('t/up') . '" alt="'.get_string('desc').'" />';
                             $localsortorder = get_string('desc');
                         }
                     } else {
index ba0ca846a123f545f0be8588e5a2b918ac648b8c..18ea138b0a7610e24a072334f18d1df136571916 100644 (file)
@@ -795,11 +795,11 @@ function upgrade_setup_debug($starting) {
  * @global object
  */
 function print_upgrade_reload($url) {
-    global $CFG;
+    global $OUTPUT;
 
     echo "<br />";
     echo '<div class="continuebutton">';
-    echo '<a href="'.$url.'" title="'.get_string('reload').'" ><img src="'.$CFG->pixpath.'/i/reload.gif" alt="" /> '.get_string('reload').'</a>';
+    echo '<a href="'.$url.'" title="'.get_string('reload').'" ><img src="'.$OUTPUT->old_icon_url('i/reload') . '" alt="" /> '.get_string('reload').'</a>';
     echo '</div><br />';
 }
 
index 98028b0470b08252c33334a9fe23db280a8d2ae1..56c52ea156d374974ba7336c895460bb26698b13 100644 (file)
@@ -4091,7 +4091,7 @@ function update_categories_search_button($search,$page,$perpage) {
  * @return string
  */
 function navmenu($course, $cm=NULL, $targetwindow='self') {
-    global $CFG, $THEME, $USER, $DB;
+    global $CFG, $THEME, $USER, $DB, $OUTPUT;
     require_once($CFG->dirroot . '/course/lib.php'); // Required for get_fast_modinfo
 
     if (empty($THEME->navmenuwidth)) {
@@ -4204,7 +4204,7 @@ function navmenu($course, $cm=NULL, $targetwindow='self') {
                     $CFG->frametarget.'onclick="this.target=\''.$CFG->framename.'\';"'.' href="'.
                     $CFG->wwwroot.'/course/report/log/index.php?chooselog=1&amp;user=0&amp;date=0&amp;id='.
                        $course->id.'&amp;modid='.$selectmod->id.'">'.
-                    '<img class="icon log" src="'.$CFG->pixpath.'/i/log.gif" alt="'.$logstext.'" /></a>'."\n".'</li>';
+                    '<img class="icon log" src="'.$OUTPUT->old_icon_url('i/log') . '" alt="'.$logstext.'" /></a>'."\n".'</li>';
 
     }
     if ($backmod) {
@@ -4737,11 +4737,11 @@ function helpbutton($page, $title, $module='moodle', $image=true, $linktext=fals
  */
 function emoticonhelpbutton($form, $field, $return = false) {
 
-    global $CFG, $SESSION;
+    global $SESSION, $OUTPUT;
 
     $SESSION->inserttextform = $form;
     $SESSION->inserttextfield = $field;
-    $imagetext = '<img src="' . $CFG->pixpath . '/s/smiley.gif" alt="" class="emoticon" style="margin-left:3px; padding-right:1px;width:15px;height:15px;" />';
+    $imagetext = '<img src="' . $OUTPUT->old_icon_url('s/smiley') . '" alt="" class="emoticon" style="margin-left:3px; padding-right:1px;width:15px;height:15px;" />';
     $help = helpbutton('emoticons2', get_string('helpemoticons'), 'moodle', true, true, '', true, $imagetext);
     if (!$return){
         echo $help;
index 9bd4edd94139b338cc229889438bb075d0934fc5..074bea693de36a2a29695f828ad4d55acdfd58e9 100644 (file)
@@ -568,7 +568,7 @@ function message_contact_link($userid, $linktype='add', $return=false, $script="
 }
 
 function message_history_link($userid1, $userid2=0, $returnstr=false, $keywords='', $position='', $linktext='') {
-    global $USER, $CFG;
+    global $USER, $CFG, $OUTPUT;
 
     static $strmessagehistory;
 
@@ -587,9 +587,9 @@ function message_history_link($userid1, $userid2=0, $returnstr=false, $keywords=
     }
 
     if ($linktext == 'icon') {  // Icon only
-        $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" class="iconsmall" alt="'.$strmessagehistory.'" />';
+        $fulllink = '<img src="'.$OUTPUT->old_icon_url('t/log') . '" class="iconsmall" alt="'.$strmessagehistory.'" />';
     } else if ($linktext == 'both') {  // Icon and standard name
-        $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" class="iconsmall" alt="" />';
+        $fulllink = '<img src="'.$OUTPUT->old_icon_url('t/log') . '" class="iconsmall" alt="" />';
         $fulllink .= '&nbsp;'.$strmessagehistory;
     } else if ($linktext) {    // Custom name
         $fulllink = $linktext;
index 58c1a8e42d31b9e2fc4a279b4736ce8281b99792..d5cd9d2b18df8bddffa67471bfb91e71586e740b 100644 (file)
@@ -182,12 +182,12 @@ class assignment_online extends assignment_base {
 
 
     function print_student_answer($userid, $return=false){
-        global $CFG;
+        global $OUTPUT;
         if (!$submission = $this->get_submission($userid)) {
             return '';
         }
         $output = '<div class="files">'.
-                  '<img src="'.$CFG->pixpath.'/f/html.gif" class="icon" alt="html" />'.
+                  '<img src="'.$OUTPUT->old_icon_url('f/html') . '" class="icon" alt="html" />'.
                   link_to_popup_window ('/mod/assignment/type/online/file.php?id='.$this->cm->id.'&amp;userid='.
                   $submission->userid, 'file'.$userid, shorten_text(trim(strip_tags(format_text($submission->data1,$submission->data2))), 15), 450, 580,
                   get_string('submission', 'assignment'), 'none', true).
@@ -196,14 +196,14 @@ class assignment_online extends assignment_base {
     }
 
     function print_user_files($userid, $return=false) {
-        global $CFG;
+        global $OUTPUT;
 
         if (!$submission = $this->get_submission($userid)) {
             return '';
         }
 
         $output = '<div class="files">'.
-                  '<img align="middle" src="'.$CFG->pixpath.'/f/html.gif" height="16" width="16" alt="html" />'.
+                  '<img align="middle" src="'.$OUTPUT->old_icon_url('f/html') . '" height="16" width="16" alt="html" />'.
                   link_to_popup_window ('/mod/assignment/type/online/file.php?id='.$this->cm->id.'&amp;userid='.
                   $submission->userid, 'file'.$userid, shorten_text(trim(strip_tags(format_text($submission->data1,$submission->data2))), 15), 450, 580,
                   get_string('submission', 'assignment'), 'none', true).
index bea36477409d86e36f9a4c18dbfbdfee21ab4185..57357f9a033c643585964de2da971bfcb7a8c094 100644 (file)
@@ -308,7 +308,7 @@ class assignment_upload extends assignment_base {
      * @return string optional
      */
     function print_user_files($userid=0, $return=false) {
-        global $CFG, $USER;
+        global $CFG, $USER, $OUTPUT;
 
         $mode    = optional_param('mode', '', PARAM_ALPHA);
         $offset  = optional_param('offset', 0, PARAM_INT);
@@ -354,7 +354,7 @@ class assignment_upload extends assignment_base {
                     $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="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="" /></a> ';
+                              .'<img title="'.$strdelete.'" src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="" /></a> ';
                 }
 
                 if (has_capability('mod/assignment:exportownsubmission', $this->context)) {
@@ -390,7 +390,7 @@ class assignment_upload extends assignment_base {
     }
 
     function print_responsefiles($userid, $return=false) {
-        global $CFG, $USER;
+        global $CFG, $USER, $OUTPUT;
 
         $mode    = optional_param('mode', '', PARAM_ALPHA);
         $offset  = optional_param('offset', 0, PARAM_INT);
@@ -417,7 +417,7 @@ class assignment_upload extends assignment_base {
                     $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="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt=""/></a> ';
+                              .'<img title="'.$strdelete.'" src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt=""/></a> ';
                 }
 
                 $output .= '&nbsp;';
index c6d67941e32e64ca88318324df60ef3add993c6b..b02673394cee0f222da8ff116c9126b67bdf9c8d 100755 (executable)
                     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="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.get_string('edit').'" title="'.get_string('edit').'" /></a>'.
+                    '<img src="'.$OUTPUT->old_icon_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="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>'
+                    '<img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>'
 
                     );
                 }
index 9a9328beb44b2135ea38262bb9fd38a31a59ad15..36027e0e4a7d12f3598ef1f247086e1d273155cf 100755 (executable)
@@ -1155,7 +1155,7 @@ function data_get_participants($dataid) {
  * @return mixed
  */
 function data_print_template($template, $records, $data, $search='', $page=0, $return=false) {
-    global $CFG, $DB;
+    global $CFG, $DB, $OUTPUT;
     $cm = get_coursemodule_from_instance('data', $data->id);
     $context = get_context_instance(CONTEXT_MODULE, $cm->id);
 
@@ -1198,9 +1198,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="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.get_string('edit').'" title="'.get_string('edit').'" /></a>';
+                             .$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>';
             $replacement[] = '<a href="'.$CFG->wwwroot.'/mod/data/view.php?d='
-                             .$data->id.'&amp;delete='.$record->id.'&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>';
+                             .$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>';
         } else {
             $replacement[] = '';
             $replacement[] = '';
@@ -1211,7 +1211,7 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
             $moreurl .= '&amp;filter=1';
         }
         $patterns[]='##more##';
-        $replacement[] = '<a href="' . $moreurl . '"><img src="' . $CFG->pixpath . '/i/search.gif" class="iconsmall" alt="' . get_string('more', 'data') . '" title="' . get_string('more', 'data') . '" /></a>';
+        $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>';
 
         $patterns[]='##moreurl##';
         $replacement[] = $moreurl;
@@ -1242,7 +1242,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="'.$CFG->pixpath.'/i/approve.gif" 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->old_icon_url('i/approve') . '" class="icon" alt="'.get_string('approve').'" /></a></span>';
         } else {
             $replacement[] = '';
         }
index 78e02748c403a67465184153e636a4b52bad5a57..3c35da69afeb0fa4cfdfe57a6a19fac7ae4452e0 100644 (file)
@@ -357,7 +357,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="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.$strdelete.' '.$desc.'" /></a>';
+                   '<img src="'.$OUTPUT->old_icon_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 af312fe8045e5301ec25a025bd80308ed96c153a..8ede610a6bcdef66db236078bfc4260c3e598495 100644 (file)
                 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="'.$CFG->pixpath .'/t/delete.gif" hspace="1" height="11" width="11" border="0" />';
+                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 type="hidden" name="deletetempl" value="'.$template->id.'" />';
                 echo '<input type="hidden" name="shoulddelete" value="1" />';
                 echo '<input type="hidden" name="id" value="'.$id.'" />';
index 68135a408b49caa7e7896757e6ce290b3e2206cc..b3ee402c05f062a1785598e22b0190271c04d64b 100644 (file)
                 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="'.$CFG->pixpath .'/t/up.gif" />
+                            <img alt="'.get_string('moveup_item','feedback').'" src="'.$OUTPUT->old_icon_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="'.$CFG->pixpath .'/t/up.gif" hspace="1" height="11" width="11" border="0" />';
-                    // echo '<input class="feedback_moveup_button" title="'.get_string('moveup_item','feedback').'" type="image" src="'.$CFG->pixpath .'/t/up.gif" />';
+                    // ///////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 type="hidden" name="moveupitem" value="'.$feedbackitem->id.'" />';
                     // feedback_edit_print_default_form_values($id, $do_show);
                     // echo '</fieldset></form>';
                 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="'.$CFG->pixpath .'/t/down.gif" />
+                            <img alt="'.get_string('movedown_item','feedback').'" src="'.$OUTPUT->old_icon_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="'.$CFG->pixpath .'/t/down.gif" hspace="1" height="11" width="11" border="0" />';
-                    // echo '<input class="feedback_movedown_button" title="'.get_string('movedown_item','feedback').'" type="image" src="'.$CFG->pixpath .'/t/down.gif" />';
+                    // 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 type="hidden" name="movedownitem" value="'.$feedbackitem->id.'" />';
                     // feedback_edit_print_default_form_values($id, $do_show);
                     // echo '</fieldset></form>';
                 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="'.$CFG->pixpath .'/t/move.gif" />
+                            <img alt="'.get_string('move_item','feedback').'" src="'.$OUTPUT->old_icon_url('t/move') . '" />
                           </a>';
                     // echo '<form action="'.$ME.'" method="post"><fieldset>';
-                    // echo '<input title="'.get_string('move_item','feedback').'" type="image" src="'.$CFG->pixpath .'/t/move.gif" hspace="1" height="11" width="11" border="0" />';
-                    // echo '<input class="feedback_move_button" title="'.get_string('move_item','feedback').'" type="image" src="'.$CFG->pixpath .'/t/move.gif" />';
+                    // 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 type="hidden" name="moveitem" value="'.$feedbackitem->id.'" />';
                     // feedback_edit_print_default_form_values($id, $do_show);
                     // echo '</fieldset></form>';
                 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="'.$CFG->pixpath .'/t/edit.gif" />
+                            <img alt="'.get_string('edit_item','feedback').'" src="'.$OUTPUT->old_icon_url('t/edit') . '" />
                           </a>';
                     // echo '<form action="edit_item.php" method="post"><fieldset>';
-                    // echo '<input title="'.get_string('edit_item','feedback').'" type="image" src="'.$CFG->pixpath .'/t/edit.gif" hspace="1" height="11" width="11" border="0" />';
-                    // echo '<input class="feedback_edit_button" title="'.get_string('edit_item','feedback').'" type="image" src="'.$CFG->pixpath .'/t/edit.gif" />';
+                    // 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 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);
                 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="'.$CFG->pixpath .'/t/delete.gif" />
+                            <img alt="'.get_string('delete_item','feedback').'" src="'.$OUTPUT->old_icon_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="'.$CFG->pixpath .'/t/delete.gif" />';
+                // echo '<input class="feedback_delete_button" title="'.get_string('delete_item','feedback').'" type="image" src="'.$OUTPUT->old_icon_url('t/delete') . '" />';
                 // echo '<input type="hidden" name="deleteitem" value="'.$feedbackitem->id.'" />';
                 // feedback_edit_print_default_form_values($id, $do_show);
                 // echo '</fieldset></form>';
index 4bae07453bd71f19a0c1a22c7d187cbadc312ff6..6ddf810ea7839b8b68a2460e5900c8544ef1de6e 100644 (file)
         $table->setup();
     
         foreach ($coursemap as $cmap) {
-            $table->add_data(array('<a href="'.htmlspecialchars('unmapcourse.php?id='.$id.'&cmapid='.$cmap->id).'"><img src="'.$CFG->pixpath.'/t/delete.gif" alt="Delete" /></a> ('.$cmap->shortname.') '.$cmap->fullname));
+            $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->print_html();
index 5c10e99edd946691134713b710d6dfcbd1c78009..ee846b628d8057ef321635f3d9a53cce93626a90 100644 (file)
                     } 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="'.$CFG->pixpath.'/t/clear.gif" alt="'.$strmarkallread.'" /></a></span>';
+                                       $forum->id.'&amp;mark=read"><img src="'.$OUTPUT->old_icon_url('t/clear') . '" alt="'.$strmarkallread.'" /></a></span>';
                     } else {
                         $unreadlink = '<span class="read">0</span>';
                     }
                         } 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="'.$CFG->pixpath.'/t/clear.gif" alt="'.$strmarkallread.'" /></a></span>';
+                                           $forum->id.'&amp;mark=read"><img src="'.$OUTPUT->old_icon_url('t/clear') . '" alt="'.$strmarkallread.'" /></a></span>';
                         } else {
                             $unreadlink = '<span class="read">0</span>';
                         }
index 7ecb3a46fb747bf9bb739d678271ffef46922ae8..71b41abd93a25f301fdcffc926ecd3490645f1d2 100644 (file)
@@ -3582,7 +3582,7 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
 function forum_print_discussion_header(&$post, $forum, $group=-1, $datestring="",
                                         $cantrack=true, $forumtracked=true, $canviewparticipants=true, $modcontext=NULL) {
 
-    global $USER, $CFG;
+    global $USER, $CFG, $OUTPUT;
 
     static $rowcount;
     static $strmarkalldread;
@@ -3660,7 +3660,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="'.$CFG->pixpath.'/t/clear.gif" class="iconsmall" alt="'.$strmarkalldread.'" /></a>';
+                         '<img src="'.$OUTPUT->old_icon_url('t/clear') . '" class="iconsmall" alt="'.$strmarkalldread.'" /></a>';
                     echo '</span>';
                 } else {
                     echo '<span class="read">';
@@ -5416,7 +5416,7 @@ function forum_user_can_see_post($forum, $discussion, $post, $user=NULL, $cm=NUL
  */
 function forum_print_latest_discussions($course, $forum, $maxdiscussions=-1, $displayformat='plain', $sort='',
                                         $currentgroup=-1, $groupmode=-1, $page=-1, $perpage=100, $cm=NULL) {
-    global $CFG, $USER;
+    global $CFG, $USER, $OUTPUT;
 
     if (!$cm) {
         if (!$cm = get_coursemodule_from_instance('forum', $forum->id, $forum->course)) {
@@ -5572,7 +5572,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="'.$CFG->pixpath.'/t/clear.gif" class="iconsmall" alt="'.get_string('markallread', 'forum').'" /></a>';
+                         '<img src="'.$OUTPUT->old_icon_url('t/clear') . '" class="iconsmall" alt="'.get_string('markallread', 'forum').'" /></a>';
                 }
                 echo '</th>';
             }
index 92206dbf84aff52067c2dacfe0b0ff877728b4e3..383ff2912beca7560c8a9cf49bf8f2701f3b1c2e 100644 (file)
@@ -1084,13 +1084,13 @@ function glossary_print_entry_attachment($entry, $cm, $format=NULL, $align="righ
  * @param bool $insidetable
  */
 function  glossary_print_entry_approval($cm, $entry, $mode, $align="right", $insidetable=true) {
-    global $CFG;
+    global $CFG, $OUTPUT;
 
     if ($mode == 'approval' and !$entry->approved) {
         if ($insidetable) {
             echo '<table class="glossaryapproval" align="'.$align.'"><tr><td align="'.$align.'">';
         }
-        echo '<a title="'.get_string('approve','glossary').'" href="approve.php?id='.$cm->id.'&amp;eid='.$entry->id.'&amp;mode='.$mode.'"><img align="'.$align.'" src="'.$CFG->pixpath.'/i/approve.gif" style="border:0px; width:34px; height:34px" alt="'.get_string('approve','glossary').'" /></a>';
+        echo '<a title="'.get_string('approve','glossary').'" href="approve.php?id='.$cm->id.'&amp;eid='.$entry->id.'&amp;mode='.$mode.'"><img align="'.$align.'" src="'.$OUTPUT->old_icon_url('i/approve') . '" style="border:0px; width:34px; height:34px" alt="'.get_string('approve','glossary').'" /></a>';
         if ($insidetable) {
             echo '</td></tr></table>';
         }
index 8f7d04aebf602c3c61b64277abb24fd08211e0cc..4c98db711af8521cc68f4bbe2bcb4536490da75e 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="'.$CFG->pixpath.'/i/all.gif" 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->old_icon_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="'.$CFG->pixpath.'/i/one.gif" class="icon" alt="'.$strshowone.'" /></a><br />';
+                        $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 />';
                     }
                 }
             }
index 45e0015c675e9bcb820546ae45a42dc578fa4601..e092004e478cd543e7c2c0134c2caf533f28da5f 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="' . $CFG->pixpath . '/t/delete.gif" ' .
+                            '"><img src="' . $OUTPUT->old_icon_url('t/delete') . '" ' .
                             'class="iconsmall" alt="' . $strremove . '" /></a>';
                     echo '</div>';
                 }
index bd0677937c526e784c6059897a90add5c8a53ba5..467a68d4ff50d877755d9f4f9b8f7990185f8001 100644 (file)
@@ -88,7 +88,7 @@ foreach ($attemptobj->get_question_iterator() as $number => $question) {
     }
     $flag = '';
     if ($attemptobj->is_question_flagged($question->id)) {
-        $flag = ' <img src="' . $CFG->pixpath . '/i/flagged.png" alt="' .
+        $flag = ' <img src="' . $OUTPUT->old_icon_url('i/flagged') . '" alt="' .
                 get_string('flagged', 'question') . '" class="questionflag" />';
     }
     $row = array('<a href="' . $attemptobj->attempt_url($question->id) . '">' . $number . $flag . '</a>',
index 529ac124816a7cea49d05b014ab259b818848beb..ad3b9f99ab3fe38e2758ce49d47f05ee628652f1 100755 (executable)
@@ -665,7 +665,7 @@ function scorm_get_last_attempt($scormid, $userid) {
 }
 
 function scorm_course_format_display($user,$course) {
-    global $CFG, $DB, $PAGE;
+    global $CFG, $DB, $PAGE, $OUTPUT;
 
     $strupdate = get_string('update');
     $strmodule = get_string('modulename','scorm');
@@ -686,7 +686,7 @@ function scorm_course_format_display($user,$course) {
                 $path = $CFG->wwwroot.'/course';
                 $headertext .= '<span class="commands">'.
                         '<a title="'.$strupdate.'" href="'.$path.'/mod.php?update='.$cm->id.'&amp;sesskey='.sesskey().'">'.
-                        '<img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.$strupdate.'" /></a></span>';
+                        '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" class="iconsmall" alt="'.$strupdate.'" /></a></span>';
             }
             $headertext .= '</td>';
             // Display report link
index 901d436efb6113316f8e912d8e48b6ee88d28e8a..194a32769930c949e22532c07a6bbeaa11e4d21e 100644 (file)
@@ -239,11 +239,11 @@ abstract class question_bank_column_base {
      * @return string HTML image tag.
      */
     protected function get_sort_icon($reverse) {
-        global $CFG;
+        global $OUTPUT;
         if ($reverse) {
-            return ' <img src="' . $CFG->pixpath . '/t/up.gif" alt="' . get_string('desc') . '" />';
+            return ' <img src="' . $OUTPUT->old_icon_url('t/up') . '" alt="' . get_string('desc') . '" />';
         } else {
-            return ' <img src="' . $CFG->pixpath . '/t/down.gif" alt="' . get_string('asc') . '" />';
+            return ' <img src="' . $OUTPUT->old_icon_url('t/down') . '" alt="' . get_string('asc') . '" />';
         }
     }
 
@@ -623,10 +623,10 @@ class question_bank_preview_action_column extends question_bank_action_column_ba
     }
 
     protected function display_content($question, $rowclasses) {
-        global $CFG;
+        global $OUTPUT;
         if (question_has_capability_on($question, 'use')) {
             link_to_popup_window($this->qbank->preview_question_url($question->id), 'questionpreview',
-                    ' <img src="' . $CFG->pixpath . '/t/preview.gif" class="iconsmall" alt="' . $this->strpreview . '" />',
+                    ' <img src="' . $OUTPUT->old_icon_url('t/preview') . '" class="iconsmall" alt="' . $this->strpreview . '" />',
                     0, 0, $this->strpreview, QUESTION_PREVIEW_POPUP_OPTIONS);
         }
     }
index b2c9b235bcc286f8ed2bc964c3a32abe004e8f81..ba8dc3ef69b51233f8f127d7bd97fd8d78dc85dc 100644 (file)
@@ -1027,7 +1027,7 @@ class default_questiontype {
      * @return string the HTML of the link, or nothing it the currenty user is not allowed to edit.
      */
     function get_question_edit_link($question, $cmoptions, $options) {
-        global $CFG;
+        global $CFG, $OUTPUT;
 
     /// Is this user allowed to edit this question?
         if (!empty($options->noeditlink) || !question_has_capability_on($question, 'edit')) {
@@ -1046,7 +1046,7 @@ class default_questiontype {
 
     /// Work out the contents of the link.
         $stredit = get_string('edit');
-        $linktext = '<img src="' . $CFG->pixpath . '/t/edit.gif" alt="' . $stredit . '" />';
+        $linktext = '<img src="' . $OUTPUT->old_icon_url('t/edit') . '" alt="' . $stredit . '" />';
 
         if (!empty($cmoptions->thispageurl)) {
         /// The module allow editing in the same window, print an ordinary link.
index b75189c13bfbde829b860e4415521baf55c8002f..4399649751cd9acec27a8790fd87ec81fae38596 100755 (executable)
@@ -125,7 +125,7 @@ class repository_alfresco extends repository {
                 {
                     $ret['list'][] = array('title'=>$child->child->cm_name,
                         'path'=>$child->child->id,
-                        'thumbnail'=>$CFG->pixpath.'/f/folder-32.png',
+                        'thumbnail'=>$OUTPUT->old_icon_url('f/folder-32') . '',
                         'children'=>array());
                 } elseif ($child->child->type == $file_filter) {
                     $ret['list'][] = array('title'=>$child->child->cm_name,
index 614d2ebc23e20c6b3e6359a1e4a85502c876f321..87b0506170197764d67d2ef3886acb8a4d121627 100755 (executable)
@@ -51,7 +51,7 @@ class repository_draft extends repository {
                     'size' => 0,
                     'date' => '',
                     'source'=> $file->get_id(),
-                    'thumbnail' => $CFG->pixpath .'/f/text-32.png'
+                    'thumbnail' => $OUTPUT->old_icon_url('f/text-32')
                 );
                 $list[] = $node;
             }
index d7841554ccf347a4fcafab27d85cf3ea28899b8b..49220a103a41d4ceb73b1dd26452cffd5d741770 100755 (executable)
@@ -246,7 +246,7 @@ default:
             if ($file->get_filename()!='.') {
                 $drafturl = $CFG->httpswwwroot.'/draftfile.php/'.$context->id.'/user_draft/'.$itemid.'/'.$file->get_filename();
                 echo '<li><a href="'.$drafturl.'">'.$file->get_filename().'</a> ';
-                echo '<a href="'.$CFG->httpswwwroot.'/repository/filepicker.php?action=deletedraft&amp;itemid='.$itemid.'&amp;ctx_id='.$ctx_id.'&amp;title='.$file->get_filename().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" /></a></li>';
+                echo '<a href="'.$CFG->httpswwwroot.'/repository/filepicker.php?action=deletedraft&amp;itemid='.$itemid.'&amp;ctx_id='.$ctx_id.'&amp;title='.$file->get_filename().'"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" /></a></li>';
             }
         }
         echo '</ul>';
index c015f183d8d00ed7e54b303f8628ce20a70fd04a..bda865687f4ef03c23f1e62c9d9f921047c93407 100644 (file)
@@ -77,7 +77,7 @@ class repository_filesystem extends repository {
                         $list['list'][] = array(
                             'title' => $file,
                             'children' => array(),
-                            'thumbnail' => $CFG->pixpath .'/f/folder-32.png',
+                            'thumbnail' => $OUTPUT->old_icon_url('f/folder-32'),
                             'path' => $current_path
                             );
                     }
index d1a2823869961365556684f1e188a63c8ce97c88..d46b70a4b304dbf280b6412c13579ebacd55838d 100644 (file)
@@ -924,7 +924,7 @@ abstract class repository {
                     'size' => 0,
                     'date' => $filedate,
                     'path' => array_reverse($path),
-                    'thumbnail' => $CFG->pixpath .'/f/folder-32.png'
+                    'thumbnail' => $OUTPUT->old_icon_url('f/folder-32')
                 );
 
                 //if ($dynamicmode && $child->is_writable()) {
index 3eafcd7d8a64bb15033d1eac20eeedaa4346c986..63a858cd550b3892975f6a8735e593560448439c 100755 (executable)
@@ -65,7 +65,7 @@ class repository_local extends repository {
                         'size' => 0,
                         'date' => '',
                         'source'=> $file->get_id(),
-                        'thumbnail' => $CFG->pixpath .'/f/text-32.png'
+                        'thumbnail' => $OUTPUT->old_icon_url('f/text-32')
                     );
                     $list[] = $node;
                 }
@@ -96,7 +96,7 @@ class repository_local extends repository {
                 'date' => '',
                 'path' => 'draft',
                 'children'=>array(),
-                'thumbnail' => $CFG->pixpath .'/f/folder-32.png'
+                'thumbnail' => $OUTPUT->old_icon_url('f/folder-32') . ''
             );
             $list[] = $node;
         }
@@ -125,7 +125,7 @@ class repository_local extends repository {
                             'date' => '',
                             'path' => $params,
                             'children'=>array(),
-                            'thumbnail' => $CFG->pixpath .'/f/folder-32.png'
+                            'thumbnail' => $OUTPUT->old_icon_url('f/folder-32') . ''
                         );
                         $list[] = $node;
                     } else {
@@ -135,7 +135,7 @@ class repository_local extends repository {
                             'size' => 0,
                             'date' => '',
                             'source'=> $params,
-                            'thumbnail' => $CFG->pixpath .'/f/text-32.png'
+                            'thumbnail' => $OUTPUT->old_icon_url('f/text-32') . ''
                         );
                         $list[] = $node;
                     }
index ca82023c87bc3723dd394ac316fa0f1e12299f27..a2d341ab821a1f9fe6f0936bb9117207c3a73d10 100644 (file)
@@ -207,7 +207,7 @@ class repository_mahara extends repository {
         $list = array();
          if (!empty($filesandfolders['folders'])) {
             foreach ($filesandfolders['folders'] as $folder) {
-                $list[] =  array('path'=>$folder['id'], 'title'=>$folder['title'], 'date'=>$folder['mtime'], 'size'=>'0', 'children'=>array(), 'thumbnail' => $CFG->pixpath .'/f/folder.gif');
+                $list[] =  array('path'=>$folder['id'], 'title'=>$folder['title'], 'date'=>$folder['mtime'], 'size'=>'0', 'children'=>array(), 'thumbnail' => $OUTPUT->old_icon_url('f/folder'));
             }
         }
         if (!empty($filesandfolders['files'])) {
index 4807a80caa0cda033c5bccaecc3c5d42664916c5..69aa46e52e1720bade285389e34b65f29f550b67 100644 (file)
@@ -32,7 +32,7 @@ class repository_s3 extends repository {
                 $folder = array(
                     'title' => $bucket,
                     'children' => array(),
-                    'thumbnail'=>$CFG->pixpath.'/f/folder-32.png',
+                    'thumbnail'=>$OUTPUT->old_icon_url('f/folder-32'),
                     'path'=>$bucket
                     );
                 $tree[] = $folder;
index 638ac368fe6c279c4a47652afbf8abf5c1ff5b2c..0706dca6b735f880f50fed89e654c7599fb13c05 100644 (file)
@@ -109,7 +109,7 @@ class repository_webdav extends repository {
                     }
                     $ret['list'][] = array(
                         'title'=>$title,
-                        'thumbnail'=>$CFG->pixpath.'/f/folder-32.png',
+                        'thumbnail'=>$OUTPUT->old_icon_url('f/folder-32'),
                         'children'=>array(),
                         'date'=>$filedate,
                         'size'=>0,
index 8f3a58954938c2d3ce820ba4cb8dca64a0103026..f604cc24a3483e4c881462c817853406a213130a 100644 (file)
                 echo '<h3>'.$group->name;
                 if (has_capability('moodle/course:managegroups', $context)) {
                     echo '&nbsp;<a title="'.get_string('editgroupprofile').'" href="'.$CFG->wwwroot.'/group/group.php?id='.$group->id.'&amp;courseid='.$group->courseid.'">';
-                    echo '<img src="'.$CFG->pixpath.'/t/edit.gif" alt="'.get_string('editgroupprofile').'" />';
+                    echo '<img src="'.$OUTPUT->old_icon_url('t/edit') . '" alt="'.get_string('editgroupprofile').'" />';
                     echo '</a>';
                 }
                 echo '</h3>';
         $heading .= ": $a->number";
         if (user_can_assign($context, $roleid)) {
             $heading .= ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?roleid='.$roleid.'&amp;contextid='.$context->id.'">';
-            $heading .= '<img src="'.$CFG->pixpath.'/i/edit.gif" class="icon" alt="" /></a>';
+            $heading .= '<img src="'.$OUTPUT->old_icon_url('i/edit') . '" class="icon" alt="" /></a>';
         }
         print_heading($heading, 'center', 3);
     } else {
         if ($course->id != SITEID && has_capability('moodle/role:assign', $context)) {
             $editlink  = ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">';
-            $editlink .= '<img src="'.$CFG->pixpath.'/i/edit.gif" class="icon" alt="" /></a>';
+            $editlink .= '<img src="'.$OUTPUT->old_icon_url('i/edit') . '" class="icon" alt="" /></a>';
         } else {
             $editlink = '';
         }
index 23331fd572eb8f899fbefc0b80653998edad6d3d..c0ac6c7aa6b1aade8179ee940666ddb351c8c0e5 100644 (file)
@@ -60,7 +60,7 @@
                 $error = get_string('emailempty');
             }
             if (!empty($error)) {
-                echo '<img src="'.$CFG->pixpath.'/t/emailno.gif" alt="'.$error.'" title="'.$error.'"/>';
+                echo '<img src="'.$OUTPUT->old_icon_url('t/emailno') . '" alt="'.$error.'" title="'.$error.'"/>';
                 unset($error);
             }
             echo '</td><td><input type="submit" onClick="this.form.deluser.value='.$user->id.';" value="' . get_string('remove') . '" /></td></tr>';
index 457bb0f3b078c45b3a5726e130bffb354f982042..bcea1e4702614fa118d03a46a906d6f4a1e952d8 100644 (file)
@@ -9,7 +9,7 @@
     if (!empty($CFG->forcelogin) and !isloggedin()) {
         // protect images if login required and not logged in;
         // do not use require_login() because it is expensive and not suitable here anyway
-        redirect($CFG->pixpath.'/u/f1.png');
+        redirect($OUTPUT->old_icon_url('u/f1'));
     }
 
     // disable moodle specific debug messages
@@ -32,5 +32,5 @@
     }
 
     // picture was deleted - use default instead
-    redirect($CFG->pixpath.'/u/f1.png');
+    redirect($OUTPUT->old_icon_url('u/f1'));
 ?>
index 327165e4cd6b5bcb8bc07b1ad990717a7abe45cf..2d79dd24d1291259265b93ca910de4ac5d08bfb9 100644 (file)
@@ -89,7 +89,7 @@ if ($display) {
         $visible = $i->get_user_config('visible', $USER->id);
         $table->data[] = array($i->get('name'), $i->get('plugin'),
             ($i->has_user_config()
-                ?  '<a href="' . $baseurl . '?config=' . $i->get('id') . '"><img src="' . $CFG->pixpath . '/t/edit.gif" alt="' . get_string('configure') . '" /></a>' : '') .
+                ?  '<a href="' . $baseurl . '?config=' . $i->get('id') . '"><img src="' . $OUTPUT->old_icon_url('t/edit') . '" alt="' . get_string('configure') . '" /></a>' : '') .
                    ' <a href="' . $baseurl . '?hide=' . $i->get('id') . '"><img src="' . $CFG->pixpath . '/t/' . (($visible) ? 'hide' : 'show') . '.gif" alt="' . get_string($visible ? 'hide' : 'show') . '" /></a><br />'
         );
     }
index d71fa051dd6682b6cbf8119f235048ee0931f5ef..a3bd68c058a57b566f1a4f91a93c3d68140b46df 100644 (file)
@@ -159,7 +159,7 @@ die;
  * @return  string   the icon string
  */
 function profile_category_icons ($category) {
-    global $CFG, $USER, $DB;
+    global $CFG, $USER, $DB, $OUTPUT;
 
     $strdelete   = get_string('delete');
     $strmoveup   = get_string('moveup');
@@ -170,27 +170,27 @@ function profile_category_icons ($category) {
     $fieldcount    = $DB->count_records('user_info_field', array('categoryid'=>$category->id));
 
     /// Edit
-    $editstr = '<a title="'.$stredit.'" href="index.php?id='.$category->id.'&amp;action=editcategory"><img src="'.$CFG->pixpath.'/t/edit.gif" alt="'.$stredit.'" class="iconsmall" /></a> ';
+    $editstr = '<a title="'.$stredit.'" href="index.php?id='.$category->id.'&amp;action=editcategory"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" alt="'.$stredit.'" class="iconsmall" /></a> ';
 
     /// Delete
     /// Can only delete the last category if there are no fields in it
     if ( ($categorycount > 1) or ($fieldcount == 0) ) {
         $editstr .= '<a title="'.$strdelete.'" href="index.php?id='.$category->id.'&amp;action=deletecategory';
-        $editstr .= '"><img src="'.$CFG->pixpath.'/t/delete.gif" alt="'.$strdelete.'" class="iconsmall" /></a> ';
+        $editstr .= '"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" alt="'.$strdelete.'" class="iconsmall" /></a> ';
     } else {
         $editstr .= '<img src="'.$CFG->pixpath.'/spacer.gif" alt="" class="iconsmall" /> ';
     }
 
     /// Move up
     if ($category->sortorder > 1) {
-        $editstr .= '<a title="'.$strmoveup.'" href="index.php?id='.$category->id.'&amp;action=movecategory&amp;dir=up&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/up.gif" alt="'.$strmoveup.'" class="iconsmall" /></a> ';
+        $editstr .= '<a title="'.$strmoveup.'" href="index.php?id='.$category->id.'&amp;action=movecategory&amp;dir=up&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/up') . '" alt="'.$strmoveup.'" class="iconsmall" /></a> ';
     } else {
         $editstr .= '<img src="'.$CFG->pixpath.'/spacer.gif" alt="" class="iconsmall" /> ';
     }
 
     /// Move down
     if ($category->sortorder < $categorycount) {
-        $editstr .= '<a title="'.$strmovedown.'" href="index.php?id='.$category->id.'&amp;action=movecategory&amp;dir=down&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/down.gif" alt="'.$strmovedown.'" class="iconsmall" /></a> ';
+        $editstr .= '<a title="'.$strmovedown.'" href="index.php?id='.$category->id.'&amp;action=movecategory&amp;dir=down&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/down') . '" alt="'.$strmovedown.'" class="iconsmall" /></a> ';
     } else {
         $editstr .= '<img src="'.$CFG->pixpath.'/spacer.gif" alt="" class="iconsmall" /> ';
     }
@@ -204,7 +204,7 @@ function profile_category_icons ($category) {
  * @return  string   the icon string
  */
 function profile_field_icons($field) {
-    global $CFG, $USER, $DB;
+    global $CFG, $USER, $DB, $OUTPUT;
 
     if (empty($str)) {
         $strdelete   = get_string('delete');
@@ -217,22 +217,22 @@ function profile_field_icons($field) {
     $datacount  = $DB->count_records('user_info_data', array('fieldid'=>$field->id));
 
     /// Edit
-    $editstr = '<a title="'.$stredit.'" href="index.php?id='.$field->id.'&amp;action=editfield"><img src="'.$CFG->pixpath.'/t/edit.gif" alt="'.$stredit.'" class="iconsmall" /></a> ';
+    $editstr = '<a title="'.$stredit.'" href="index.php?id='.$field->id.'&amp;action=editfield"><img src="'.$OUTPUT->old_icon_url('t/edit') . '" alt="'.$stredit.'" class="iconsmall" /></a> ';
 
     /// Delete
     $editstr .= '<a title="'.$strdelete.'" href="index.php?id='.$field->id.'&amp;action=deletefield';
-    $editstr .= '"><img src="'.$CFG->pixpath.'/t/delete.gif" alt="'.$strdelete.'" class="iconsmall" /></a> ';
+    $editstr .= '"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" alt="'.$strdelete.'" class="iconsmall" /></a> ';
 
     /// Move up
     if ($field->sortorder > 1) {
-        $editstr .= '<a title="'.$strmoveup.'" href="index.php?id='.$field->id.'&amp;action=movefield&amp;dir=up&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/up.gif" alt="'.$strmoveup.'" class="iconsmall" /></a> ';
+        $editstr .= '<a title="'.$strmoveup.'" href="index.php?id='.$field->id.'&amp;action=movefield&amp;dir=up&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/up') . '" alt="'.$strmoveup.'" class="iconsmall" /></a> ';
      } else {
         $editstr .= '<img src="'.$CFG->pixpath.'/spacer.gif" alt="" class="iconsmall" /> ';
     }
 
     /// Move down
     if ($field->sortorder < $fieldcount) {
-        $editstr .= '<a title="'.$strmovedown.'" href="index.php?id='.$field->id.'&amp;action=movefield&amp;dir=down&amp;sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/down.gif" alt="'.$strmovedown.'" class="iconsmall" /></a> ';
+        $editstr .= '<a title="'.$strmovedown.'" href="index.php?id='.$field->id.'&amp;action=movefield&amp;dir=down&amp;sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/down') . '" alt="'.$strmovedown.'" class="iconsmall" /></a> ';
     } else {
         $editstr .= '<img src="'.$CFG->pixpath.'/spacer.gif" alt="" class="iconsmall" /> ';
     }