MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url

This commit is contained in:
tjhunt 2009-07-02 11:09:15 +00:00
parent 6b608f8f50
commit f2a1963c43
38 changed files with 114 additions and 114 deletions

View 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";

View 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;

View 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 = '';

View 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 {

View 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 />';
}

View 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;

View 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;

View 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).

View 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;';

View File

@ -265,10 +265,10 @@
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>'
);
}

View File

@ -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[] = '';
}

View 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 />';

View File

@ -110,7 +110,7 @@
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.'" />';

View File

@ -271,12 +271,12 @@
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>';
@ -288,12 +288,12 @@
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>';
@ -304,11 +304,11 @@
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>';
@ -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 '<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);
@ -361,11 +361,11 @@
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>';

View File

@ -128,7 +128,7 @@
$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();

View File

@ -172,7 +172,7 @@
} 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>';
}
@ -294,7 +294,7 @@
} 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>';
}

View 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>';
}

View 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>';
}

View File

@ -308,10 +308,10 @@
// 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 />';
}
}
}

View 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>';
}

View 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>',

View File

@ -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

View 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);
}
}

View 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.

View File

@ -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,

View File

@ -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;
}

View File

@ -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>';

View 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
);
}

View 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()) {

View File

@ -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;
}

View 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'])) {

View 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;

View 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,

View File

@ -313,7 +313,7 @@
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>';
@ -611,13 +611,13 @@
$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 = '';
}

View 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>';

View 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'));
?>

View 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 />'
);
}

View 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" /> ';
}