* @return string XHTML to display the control
*/
public function output_html($data, $query='') {
- global $CFG;
+ global $CFG, $OUTPUT;
$output = print_box_start('generalbox','',true);
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";
if ($this->alreadyexporting) {
return $this->already_exporting($format, $addstr);
}
- global $CFG, $COURSE;
+ global $CFG, $COURSE, $OUTPUT;
if (!$this->is_renderable()) {
return;
}
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>';
}
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;
*/
function rss_get_link($courseid, $userid, $modulename, $id, $tooltiptext='') {
- global $CFG, $USER;
+ global $OUTPUT;
static $pixpath = '';
static $rsspath = '';
}
$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>';
* @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');
|| ($feed->shared && $managesharedfeeds) ) {
$feedicons = '<a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php?id='. $courseid .'&act=rssedit&rssid='. $feed->id .'&shared='.$feed->shared.'&blogid='. $blogid .'">'.
- '<img src="'. $CFG->pixpath .'/t/edit.gif" alt="'. get_string('edit').'" title="'. get_string('edit') .'" /></a> '.
+ '<img src="'. $OUTPUT->old_icon_url('t/edit') . '" alt="'. get_string('edit').'" title="'. get_string('edit') .'" /></a> '.
'<a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php?id='. $courseid .'&act=delfeed&rssid='. $feed->id.'&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 = '';
* 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) {
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>';
}
}
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 {
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 {
* @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 />';
}
* @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)) {
$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.'">'.
- '<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) {
*/
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;
}
function message_history_link($userid1, $userid2=0, $returnstr=false, $keywords='', $position='', $linktext='') {
- global $USER, $CFG;
+ global $USER, $CFG, $OUTPUT;
static $strmessagehistory;
}
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 .= ' '.$strmessagehistory;
} else if ($linktext) { // Custom name
$fulllink = $linktext;
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.'&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).
}
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.'&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).
* @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);
$delurl = "$CFG->wwwroot/mod/assignment/delete.php?id={$this->cm->id}&file=".rawurlencode($filename)."&userid={$submission->userid}&mode=$mode&offset=$offset";
$output .= '<a href="'.$delurl.'"> '
- .'<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)) {
}
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);
$delurl = "$CFG->wwwroot/mod/assignment/delete.php?id={$this->cm->id}&file=".rawurlencode($filename)."&userid=$userid&mode=$mode&offset=$offset&action=response";
$output .= '<a href="'.$delurl.'"> '
- .'<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 .= ' ';
shorten_text($field->field->description, 30),
'<a href="field.php?d='.$data->id.'&mode=display&fid='.$field->field->id.'&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>'.
' '.
'<a href="field.php?d='.$data->id.'&mode=delete&fid='.$field->field->id.'&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>'
);
}
* @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);
$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.'&rid='.$record->id.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/edit.gif" class="iconsmall" alt="'.get_string('edit').'" title="'.get_string('edit').'" /></a>';
+ .$data->id.'&rid='.$record->id.'&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.'&delete='.$record->id.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/delete.gif" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>';
+ .$data->id.'&delete='.$record->id.'&sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" alt="'.get_string('delete').'" title="'.get_string('delete').'" /></a>';
} else {
$replacement[] = '';
$replacement[] = '';
$moreurl .= '&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;
$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.'&approve='.$record->id.'&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.'&approve='.$record->id.'&sesskey='.sesskey().'"><img src="'.$OUTPUT->old_icon_url('i/approve') . '" class="icon" alt="'.get_string('approve').'" /></a></span>';
} else {
$replacement[] = '';
}
$dellink = '';
if ($preset->userid > 0 and ($preset->userid == $USER->id || has_capability('mod/data:manageuserpresets', $context))) {
$dellink = ' <a href="preset.php?d='.$data->id.'&action=confirmdelete&fullname='.$fullname.'&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 />';
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.'" />';
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>';
$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();
} 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.'&mark=read"><img src="'.$CFG->pixpath.'/t/clear.gif" alt="'.$strmarkallread.'" /></a></span>';
+ $forum->id.'&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.'&mark=read"><img src="'.$CFG->pixpath.'/t/clear.gif" alt="'.$strmarkallread.'" /></a></span>';
+ $forum->id.'&mark=read"><img src="'.$OUTPUT->old_icon_url('t/clear') . '" alt="'.$strmarkallread.'" /></a></span>';
} else {
$unreadlink = '<span class="read">0</span>';
}
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;
echo '</a>';
echo '<a title="'.$strmarkalldread.'" href="'.$CFG->wwwroot.'/mod/forum/markposts.php?f='.
$forum->id.'&d='.$post->discussion.'&mark=read&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">';
*/
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)) {
echo ' <a title="'.get_string('markallread', 'forum').
'" href="'.$CFG->wwwroot.'/mod/forum/markposts.php?f='.
$forum->id.'&mark=read&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>';
}
* @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.'&eid='.$entry->id.'&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.'&eid='.$entry->id.'&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>';
}
// Show the zoom boxes
if ($displaysection==$hotpot->section) {
$strshowall = get_string('showall'.$course->format);
- $printsection .= '<br /><a href="index.php?id='.$course->id.'&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.'&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.'&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.'&section='.$hotpot->section.'" title="'.$strshowone.'"><img src="'.$OUTPUT->old_icon_url('i/one') . '" class="icon" alt="'.$strshowone.'" /></a><br />';
}
}
}
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>';
}
}
$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>',
}
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');
$path = $CFG->wwwroot.'/course';
$headertext .= '<span class="commands">'.
'<a title="'.$strupdate.'" href="'.$path.'/mod.php?update='.$cm->id.'&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
* @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') . '" />';
}
}
}
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);
}
}
* @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')) {
/// 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.
{
$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,
'size' => 0,
'date' => '',
'source'=> $file->get_id(),
- 'thumbnail' => $CFG->pixpath .'/f/text-32.png'
+ 'thumbnail' => $OUTPUT->old_icon_url('f/text-32')
);
$list[] = $node;
}
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&itemid='.$itemid.'&ctx_id='.$ctx_id.'&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&itemid='.$itemid.'&ctx_id='.$ctx_id.'&title='.$file->get_filename().'"><img src="'.$OUTPUT->old_icon_url('t/delete') . '" class="iconsmall" /></a></li>';
}
}
echo '</ul>';
$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
);
}
'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()) {
'size' => 0,
'date' => '',
'source'=> $file->get_id(),
- 'thumbnail' => $CFG->pixpath .'/f/text-32.png'
+ 'thumbnail' => $OUTPUT->old_icon_url('f/text-32')
);
$list[] = $node;
}
'date' => '',
'path' => 'draft',
'children'=>array(),
- 'thumbnail' => $CFG->pixpath .'/f/folder-32.png'
+ 'thumbnail' => $OUTPUT->old_icon_url('f/folder-32') . ''
);
$list[] = $node;
}
'date' => '',
'path' => $params,
'children'=>array(),
- 'thumbnail' => $CFG->pixpath .'/f/folder-32.png'
+ 'thumbnail' => $OUTPUT->old_icon_url('f/folder-32') . ''
);
$list[] = $node;
} else {
'size' => 0,
'date' => '',
'source'=> $params,
- 'thumbnail' => $CFG->pixpath .'/f/text-32.png'
+ 'thumbnail' => $OUTPUT->old_icon_url('f/text-32') . ''
);
$list[] = $node;
}
$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'])) {
$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;
}
$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,
echo '<h3>'.$group->name;
if (has_capability('moodle/course:managegroups', $context)) {
echo ' <a title="'.get_string('editgroupprofile').'" href="'.$CFG->wwwroot.'/group/group.php?id='.$group->id.'&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.'&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 = '';
}
$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>';
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
}
// picture was deleted - use default instead
- redirect($CFG->pixpath.'/u/f1.png');
+ redirect($OUTPUT->old_icon_url('u/f1'));
?>
$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 />'
);
}
* @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');
$fieldcount = $DB->count_records('user_info_field', array('categoryid'=>$category->id));
/// Edit
- $editstr = '<a title="'.$stredit.'" href="index.php?id='.$category->id.'&action=editcategory"><img src="'.$CFG->pixpath.'/t/edit.gif" alt="'.$stredit.'" class="iconsmall" /></a> ';
+ $editstr = '<a title="'.$stredit.'" href="index.php?id='.$category->id.'&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.'&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.'&action=movecategory&dir=up&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/up.gif" alt="'.$strmoveup.'" class="iconsmall" /></a> ';
+ $editstr .= '<a title="'.$strmoveup.'" href="index.php?id='.$category->id.'&action=movecategory&dir=up&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.'&action=movecategory&dir=down&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/down.gif" alt="'.$strmovedown.'" class="iconsmall" /></a> ';
+ $editstr .= '<a title="'.$strmovedown.'" href="index.php?id='.$category->id.'&action=movecategory&dir=down&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" /> ';
}
* @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');
$datacount = $DB->count_records('user_info_data', array('fieldid'=>$field->id));
/// Edit
- $editstr = '<a title="'.$stredit.'" href="index.php?id='.$field->id.'&action=editfield"><img src="'.$CFG->pixpath.'/t/edit.gif" alt="'.$stredit.'" class="iconsmall" /></a> ';
+ $editstr = '<a title="'.$stredit.'" href="index.php?id='.$field->id.'&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.'&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.'&action=movefield&dir=up&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/up.gif" alt="'.$strmoveup.'" class="iconsmall" /></a> ';
+ $editstr .= '<a title="'.$strmoveup.'" href="index.php?id='.$field->id.'&action=movefield&dir=up&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.'&action=movefield&dir=down&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/t/down.gif" alt="'.$strmovedown.'" class="iconsmall" /></a> ';
+ $editstr .= '<a title="'.$strmovedown.'" href="index.php?id='.$field->id.'&action=movefield&dir=down&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" /> ';
}