From: tjhunt Date: Thu, 2 Jul 2009 11:09:15 +0000 (+0000) Subject: MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f2a1963c434c016411f2e2022c98de191446d542;p=moodle.git MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url --- diff --git a/lib/adminlib.php b/lib/adminlib.php index 0b4582f76b..9d51420d12 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -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 .= '' . get_string('edit') . '' . "\n"; - $row .= '' . get_string('delete') . '' . "\n"; + $row .= '' . get_string('edit') . '' . "\n"; + $row .= '' . get_string('delete') . '' . "\n"; if (array_key_exists($i->get('plugin'), $insane) || array_key_exists($i->get('id'), $insaneinstances)) { - $row .= '' . get_string('hidden', 'portfolio') . '' . "\n"; + $row .= '' . get_string('hidden', 'portfolio') . '' . "\n"; } else { $row .= ' ' . get_string($i->get('visible') ? 'hide' : 'show') . '' . "\n"; diff --git a/lib/portfoliolib.php b/lib/portfoliolib.php index 4bd415dea4..1600e6be33 100644 --- a/lib/portfoliolib.php +++ b/lib/portfoliolib.php @@ -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" . ''; + $formoutput .= "\n" . ''; $formoutput .= "\n" . ''; break; case PORTFOLIO_ADD_ICON_LINK: - $linkoutput .= '"> . $addstr .'; + $linkoutput .= '"> . $addstr .'; break; case PORTFOLIO_ADD_TEXT_LINK: $linkoutput .= '">' . $addstr .''; @@ -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; diff --git a/lib/rsslib.php b/lib/rsslib.php index ca49068dd0..27a5fc486b 100644 --- a/lib/rsslib.php +++ b/lib/rsslib.php @@ -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 ''.get_string('rss').''; @@ -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 = ''. - ''. get_string('edit').' '. + ''. get_string('edit').' '. ''. - ''. get_string('delete').''; + ''. get_string('delete').''; } else { $feedicons = ''; diff --git a/lib/tablelib.php b/lib/tablelib.php index e2da1e4257..2891b4f50b 100644 --- a/lib/tablelib.php +++ b/lib/tablelib.php @@ -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 ''; 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 = ' '.get_string('show').''; + $icon_hide = ' '.get_string('show').''; } else if($this->headers[$index] !== NULL) { // some headers contain < br/> tags, do not include in title - $icon_hide = ' '.get_string('hide').''; + $icon_hide = ' '.get_string('hide').''; } } @@ -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 = ' '.get_string('asc').''; + $icon_sort_first = ' '.get_string('asc').''; $fsortorder = get_string('asc'); } else { - $icon_sort_first = ' '.get_string('desc').''; + $icon_sort_first = ' '.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 = ' '.get_string('asc').''; + $icon_sort_last = ' '.get_string('asc').''; $lsortorder = get_string('asc'); } else { - $icon_sort_last = ' '.get_string('desc').''; + $icon_sort_last = ' '.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 = ' '.get_string('asc').''; + $icon_sort = ' '.get_string('asc').''; $localsortorder = get_string('asc'); } else { - $icon_sort = ' '.get_string('desc').''; + $icon_sort = ' '.get_string('desc').''; $localsortorder = get_string('desc'); } } else { diff --git a/lib/upgradelib.php b/lib/upgradelib.php index ba0ca846a1..18ea138b0a 100644 --- a/lib/upgradelib.php +++ b/lib/upgradelib.php @@ -795,11 +795,11 @@ function upgrade_setup_debug($starting) { * @global object */ function print_upgrade_reload($url) { - global $CFG; + global $OUTPUT; echo "
"; echo '
'; - echo ' '.get_string('reload').''; + echo ' '.get_string('reload').''; echo '

'; } diff --git a/lib/weblib.php b/lib/weblib.php index 98028b0470..56c52ea156 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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&user=0&date=0&id='. $course->id.'&modid='.$selectmod->id.'">'. - ''.$logstext.''."\n".''; + ''.$logstext.''."\n".''; } 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 = ''; + $imagetext = ''; $help = helpbutton('emoticons2', get_string('helpemoticons'), 'moodle', true, true, '', true, $imagetext); if (!$return){ echo $help; diff --git a/message/lib.php b/message/lib.php index 9bd4edd941..074bea693d 100644 --- a/message/lib.php +++ b/message/lib.php @@ -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 = ''.$strmessagehistory.''; + $fulllink = ''.$strmessagehistory.''; } else if ($linktext == 'both') { // Icon and standard name - $fulllink = ''; + $fulllink = ''; $fulllink .= ' '.$strmessagehistory; } else if ($linktext) { // Custom name $fulllink = $linktext; diff --git a/mod/assignment/type/online/assignment.class.php b/mod/assignment/type/online/assignment.class.php index 58c1a8e42d..d5cd9d2b18 100644 --- a/mod/assignment/type/online/assignment.class.php +++ b/mod/assignment/type/online/assignment.class.php @@ -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 = '
'. - 'html'. + 'html'. link_to_popup_window ('/mod/assignment/type/online/file.php?id='.$this->cm->id.'&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 = '
'. - 'html'. + 'html'. link_to_popup_window ('/mod/assignment/type/online/file.php?id='.$this->cm->id.'&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). diff --git a/mod/assignment/type/upload/assignment.class.php b/mod/assignment/type/upload/assignment.class.php index bea3647740..57357f9a03 100644 --- a/mod/assignment/type/upload/assignment.class.php +++ b/mod/assignment/type/upload/assignment.class.php @@ -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}&file=".rawurlencode($filename)."&userid={$submission->userid}&mode=$mode&offset=$offset"; $output .= ' ' - .' '; + .' '; } 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}&file=".rawurlencode($filename)."&userid=$userid&mode=$mode&offset=$offset&action=response"; $output .= ' ' - .' '; + .' '; } $output .= ' '; diff --git a/mod/data/field.php b/mod/data/field.php index c6d67941e3..b02673394c 100755 --- a/mod/data/field.php +++ b/mod/data/field.php @@ -265,10 +265,10 @@ shorten_text($field->field->description, 30), ''. - ''.get_string('edit').''. + ''.get_string('edit').''. ' '. ''. - ''.get_string('delete').'' + ''.get_string('delete').'' ); } diff --git a/mod/data/lib.php b/mod/data/lib.php index 9a9328beb4..36027e0e4a 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -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[] = ''.get_string('edit').''; + .$data->id.'&rid='.$record->id.'&sesskey='.sesskey().'">'.get_string('edit').''; $replacement[] = ''.get_string('delete').''; + .$data->id.'&delete='.$record->id.'&sesskey='.sesskey().'">'.get_string('delete').''; } else { $replacement[] = ''; $replacement[] = ''; @@ -1211,7 +1211,7 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r $moreurl .= '&filter=1'; } $patterns[]='##more##'; - $replacement[] = '' . get_string('more', 'data') . ''; + $replacement[] = '' . get_string('more', 'data') . ''; $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[] = ''.get_string('approve').''; + $replacement[] = ''.get_string('approve').''; } else { $replacement[] = ''; } diff --git a/mod/data/preset.php b/mod/data/preset.php index 78e02748c4..3c35da69af 100644 --- a/mod/data/preset.php +++ b/mod/data/preset.php @@ -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 = ' '. - ''.$strdelete.' '.$desc.''; + ''.$strdelete.' '.$desc.''; } echo ''.$dellink.'
'; diff --git a/mod/feedback/delete_template.php b/mod/feedback/delete_template.php index af312fe804..8ede610a6b 100644 --- a/mod/feedback/delete_template.php +++ b/mod/feedback/delete_template.php @@ -110,7 +110,7 @@ echo ''.$template->name.''; echo ''; echo '
'; - echo ''; + echo ''; echo ''; echo ''; echo ''; diff --git a/mod/feedback/edit.php b/mod/feedback/edit.php index 68135a408b..b3ee402c05 100644 --- a/mod/feedback/edit.php +++ b/mod/feedback/edit.php @@ -271,12 +271,12 @@ if($feedbackitem->position > 1){ $buttonlink = $ME.'?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&moveupitem='.$feedbackitem->id); echo ' - '.get_string('moveup_item','feedback').' + '.get_string('moveup_item','feedback').' '; //print the button to move-up the item // echo '
'; - // ///////echo ''; - // echo ''; + // ///////echo ''; + // echo ''; // echo ''; // feedback_edit_print_default_form_values($id, $do_show); // echo '
'; @@ -288,12 +288,12 @@ if($feedbackitem->position < $lastposition - 1){ $buttonlink = $ME.'?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&movedownitem='.$feedbackitem->id); echo ' - '.get_string('movedown_item','feedback').' + '.get_string('movedown_item','feedback').' '; //print the button to move-down the item // echo '
'; - // echo ''; - // echo ''; + // echo ''; + // echo ''; // echo ''; // feedback_edit_print_default_form_values($id, $do_show); // echo '
'; @@ -304,11 +304,11 @@ echo ''; $buttonlink = $ME.'?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&moveitem='.$feedbackitem->id); echo ' - '.get_string('move_item','feedback').' + '.get_string('move_item','feedback').' '; // echo '
'; - // echo ''; - // echo ''; + // echo ''; + // echo ''; // echo ''; // feedback_edit_print_default_form_values($id, $do_show); // echo '
'; @@ -318,11 +318,11 @@ if($feedbackitem->typ != 'pagebreak') { $buttonlink = 'edit_item.php?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&itemid='.$feedbackitem->id.'&typ='.$feedbackitem->typ); echo ' - '.get_string('edit_item','feedback').' + '.get_string('edit_item','feedback').' '; // echo '
'; - // echo ''; - // echo ''; + // echo ''; + // echo ''; // echo ''; // echo ''; // feedback_edit_print_default_form_values($id, $do_show); @@ -361,11 +361,11 @@ echo ''; $buttonlink = 'delete_item.php?'.htmlspecialchars(feedback_edit_get_default_query($id, $do_show).'&deleteitem='.$feedbackitem->id); echo ' - '.get_string('delete_item','feedback').' + '.get_string('delete_item','feedback').' '; //print the button to drop the item // echo '
'; - // echo ''; + // echo ''; // echo ''; // feedback_edit_print_default_form_values($id, $do_show); // echo '
'; diff --git a/mod/feedback/mapcourse.php b/mod/feedback/mapcourse.php index 4bae07453b..6ddf810ea7 100644 --- a/mod/feedback/mapcourse.php +++ b/mod/feedback/mapcourse.php @@ -128,7 +128,7 @@ $table->setup(); foreach ($coursemap as $cmap) { - $table->add_data(array('Delete ('.$cmap->shortname.') '.$cmap->fullname)); + $table->add_data(array('Delete ('.$cmap->shortname.') '.$cmap->fullname)); } $table->print_html(); diff --git a/mod/forum/index.php b/mod/forum/index.php index 5c10e99edd..ee846b628d 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -172,7 +172,7 @@ } else if ($unread = forum_tp_count_forum_unread_posts($cm, $course)) { $unreadlink = ''.$unread.''; $unreadlink .= ''.$strmarkallread.''; + $forum->id.'&mark=read">'.$strmarkallread.''; } else { $unreadlink = '0'; } @@ -294,7 +294,7 @@ } else if ($unread = forum_tp_count_forum_unread_posts($cm, $course)) { $unreadlink = ''.$unread.''; $unreadlink .= ''.$strmarkallread.''; + $forum->id.'&mark=read">'.$strmarkallread.''; } else { $unreadlink = '0'; } diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 7ecb3a46fb..71b41abd93 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -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 ''; echo '' . - ''.$strmarkalldread.''; + ''.$strmarkalldread.''; echo ''; } else { echo ''; @@ -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 ' '. - ''.get_string('markallread', 'forum').''; + ''.get_string('markallread', 'forum').''; } echo ''; } diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 92206dbf84..383ff2912b 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -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 '
'; } - echo ''.get_string('approve','glossary').''; + echo ''.get_string('approve','glossary').''; if ($insidetable) { echo '
'; } diff --git a/mod/hotpot/index.php b/mod/hotpot/index.php index 8f7d04aebf..4c98db711a 100644 --- a/mod/hotpot/index.php +++ b/mod/hotpot/index.php @@ -308,10 +308,10 @@ // Show the zoom boxes if ($displaysection==$hotpot->section) { $strshowall = get_string('showall'.$course->format); - $printsection .= '
'.$strshowall.'
'; + $printsection .= '
'.$strshowall.'
'; } else { $strshowone = get_string('showonly'.preg_replace('|s$|', '', $course->format, 1), '', $hotpot->section); - $printsection .= '
'.$strshowone.'
'; + $printsection .= '
'.$strshowone.'
'; } } } diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index 45e0015c67..e092004e47 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -431,7 +431,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete = true, echo '
'; echo '' . $strremove . ''; echo '
'; } diff --git a/mod/quiz/summary.php b/mod/quiz/summary.php index bd0677937c..467a68d4ff 100644 --- a/mod/quiz/summary.php +++ b/mod/quiz/summary.php @@ -88,7 +88,7 @@ foreach ($attemptobj->get_question_iterator() as $number => $question) { } $flag = ''; if ($attemptobj->is_question_flagged($question->id)) { - $flag = ' ' .
+        $flag = ' <img src=old_icon_url('i/flagged') . '" alt="' . get_string('flagged', 'question') . '" class="questionflag" />'; } $row = array('' . $number . $flag . '', diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php index 529ac12481..ad3b9f99ab 100755 --- a/mod/scorm/locallib.php +++ b/mod/scorm/locallib.php @@ -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 .= ''. ''. - ''.$strupdate.''; + ''.$strupdate.'
'; } $headertext .= ''; // Display report link diff --git a/question/editlib.php b/question/editlib.php index 901d436efb..194a327699 100644 --- a/question/editlib.php +++ b/question/editlib.php @@ -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 ' ' . get_string('desc') . ''; + return ' ' . get_string('desc') . ''; } else { - return ' ' . get_string('asc') . ''; + return ' ' . 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', - ' ' . $this->strpreview . '', + ' ' . $this->strpreview . '', 0, 0, $this->strpreview, QUESTION_PREVIEW_POPUP_OPTIONS); } } diff --git a/question/type/questiontype.php b/question/type/questiontype.php index b2c9b235bc..ba8dc3ef69 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -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 = '' . $stredit . ''; + $linktext = '' . $stredit . ''; if (!empty($cmoptions->thispageurl)) { /// The module allow editing in the same window, print an ordinary link. diff --git a/repository/alfresco/repository.class.php b/repository/alfresco/repository.class.php index b75189c13b..4399649751 100755 --- a/repository/alfresco/repository.class.php +++ b/repository/alfresco/repository.class.php @@ -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, diff --git a/repository/draft/repository.class.php b/repository/draft/repository.class.php index 614d2ebc23..87b0506170 100755 --- a/repository/draft/repository.class.php +++ b/repository/draft/repository.class.php @@ -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; } diff --git a/repository/filepicker.php b/repository/filepicker.php index d7841554cc..49220a103a 100755 --- a/repository/filepicker.php +++ b/repository/filepicker.php @@ -246,7 +246,7 @@ default: if ($file->get_filename()!='.') { $drafturl = $CFG->httpswwwroot.'/draftfile.php/'.$context->id.'/user_draft/'.$itemid.'/'.$file->get_filename(); echo '
  • '.$file->get_filename().' '; - echo '
  • '; + echo ''; } } echo ''; diff --git a/repository/filesystem/repository.class.php b/repository/filesystem/repository.class.php index c015f183d8..bda865687f 100644 --- a/repository/filesystem/repository.class.php +++ b/repository/filesystem/repository.class.php @@ -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 ); } diff --git a/repository/lib.php b/repository/lib.php index d1a2823869..d46b70a4b3 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -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()) { diff --git a/repository/local/repository.class.php b/repository/local/repository.class.php index 3eafcd7d8a..63a858cd55 100755 --- a/repository/local/repository.class.php +++ b/repository/local/repository.class.php @@ -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; } diff --git a/repository/mahara/repository.class.php b/repository/mahara/repository.class.php index ca82023c87..a2d341ab82 100644 --- a/repository/mahara/repository.class.php +++ b/repository/mahara/repository.class.php @@ -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'])) { diff --git a/repository/s3/repository.class.php b/repository/s3/repository.class.php index 4807a80caa..69aa46e52e 100644 --- a/repository/s3/repository.class.php +++ b/repository/s3/repository.class.php @@ -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; diff --git a/repository/webdav/repository.class.php b/repository/webdav/repository.class.php index 638ac368fe..0706dca6b7 100644 --- a/repository/webdav/repository.class.php +++ b/repository/webdav/repository.class.php @@ -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, diff --git a/user/index.php b/user/index.php index 8f3a589549..f604cc24a3 100644 --- a/user/index.php +++ b/user/index.php @@ -313,7 +313,7 @@ echo '

    '.$group->name; if (has_capability('moodle/course:managegroups', $context)) { echo ' '; - echo ''.get_string('editgroupprofile').''; + echo ''.get_string('editgroupprofile').''; echo ''; } echo '

    '; @@ -611,13 +611,13 @@ $heading .= ": $a->number"; if (user_can_assign($context, $roleid)) { $heading .= ' '; - $heading .= ''; + $heading .= ''; } print_heading($heading, 'center', 3); } else { if ($course->id != SITEID && has_capability('moodle/role:assign', $context)) { $editlink = ' '; - $editlink .= ''; + $editlink .= ''; } else { $editlink = ''; } diff --git a/user/message.html b/user/message.html index 23331fd572..c0ac6c7aa6 100644 --- a/user/message.html +++ b/user/message.html @@ -60,7 +60,7 @@ $error = get_string('emailempty'); } if (!empty($error)) { - echo ''.$error.''; + echo ''.$error.''; unset($error); } echo ''; diff --git a/user/pix.php b/user/pix.php index 457bb0f3b0..bcea1e4702 100644 --- a/user/pix.php +++ b/user/pix.php @@ -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')); ?> diff --git a/user/portfolio.php b/user/portfolio.php index 327165e4cd..2d79dd24d1 100644 --- a/user/portfolio.php +++ b/user/portfolio.php @@ -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() - ? '' . get_string('configure') . '' : '') . + ? '' . get_string('configure') . '' : '') . ' ' . get_string($visible ? 'hide' : 'show') . '
    ' ); } diff --git a/user/profile/index.php b/user/profile/index.php index d71fa051dd..a3bd68c058 100644 --- a/user/profile/index.php +++ b/user/profile/index.php @@ -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 = ''.$stredit.' '; + $editstr = ''.$stredit.' '; /// Delete /// Can only delete the last category if there are no fields in it if ( ($categorycount > 1) or ($fieldcount == 0) ) { $editstr .= ''.$strdelete.' '; + $editstr .= '">'.$strdelete.' '; } else { $editstr .= ' '; } /// Move up if ($category->sortorder > 1) { - $editstr .= ''.$strmoveup.' '; + $editstr .= ''.$strmoveup.' '; } else { $editstr .= ' '; } /// Move down if ($category->sortorder < $categorycount) { - $editstr .= ''.$strmovedown.' '; + $editstr .= ''.$strmovedown.' '; } else { $editstr .= ' '; } @@ -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 = ''.$stredit.' '; + $editstr = ''.$stredit.' '; /// Delete $editstr .= ''.$strdelete.' '; + $editstr .= '">'.$strdelete.' '; /// Move up if ($field->sortorder > 1) { - $editstr .= ''.$strmoveup.' '; + $editstr .= ''.$strmoveup.' '; } else { $editstr .= ' '; } /// Move down if ($field->sortorder < $fieldcount) { - $editstr .= ''.$strmovedown.' '; + $editstr .= ''.$strmovedown.' '; } else { $editstr .= ' '; }