@@ -877,7 +879,7 @@ class core_files_renderer extends plugin_renderer_base {
return '
-
+ ' . $this->pix_icon('i/loading_small', '') . '
';
}
diff --git a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js
index 1f36fe30e5f..81f03933b08 100644
--- a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js
+++ b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js
@@ -29,7 +29,6 @@ Y.extend(AUTOLINKER, Y.Base, {
// display a progress indicator
var title = '',
content = Y.Node.create('
' +
- '
' +
'
'),
o = new Y.Overlay({
headerContent: title,
@@ -37,6 +36,13 @@ Y.extend(AUTOLINKER, Y.Base, {
}),
fullurl,
cfg;
+
+ window.require(['core/templates'], function(Templates) {
+ Templates.renderPix('i/loading', 'core').then(function(html) {
+ content.append(html);
+ });
+ });
+
self.overlay = o;
o.render(Y.one(document.body));
diff --git a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js
index c2fdc14318e..c0608af5ced 100644
--- a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js
+++ b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js
@@ -1 +1 @@
-YUI.add("moodle-filter_glossary-autolinker",function(e,t){var n="Glossary filter autolinker",r="width",i="height",s="menubar",o="location",u="scrollbars",a="resizable",f="toolbar",l="status",c="directories",h="fullscreen",p="dependent",d;d=function(){d.superclass.constructor.apply(this,arguments)},e.extend(d,e.Base,{overlay:null,alertpanels:{},initializer:function(){var t=this;require(["core/event"],function(n){e.delegate("click",function(r){r.preventDefault();var i="",s=e.Node.create('
'+"
"),o=new e.Overlay({headerContent:i,bodyContent:s}),u,a;t.overlay=o,o.render(e.one(document.body)),u=this.getAttribute("href").replace("showentry.php","showentry_ajax.php"),a={method:"get",context:t,on:{success:function(e,t){this.display_callback(t.responseText,n)},failure:function(e,t){var n=t.statusText;M.cfg.developerdebug&&(t.statusText+=" ("+u+")"),new M.core.exception({message:n})}}},e.io(u,a)},e.one(document.body),"a.glossary.autolink.concept")})},display_callback:function(t,n){var r,i,s,o,u,a;try{r=e.JSON.parse(t);if(r.success){this.overlay.hide();for(i in r.entries)u=r.entries[i].definition+r.entries[i].attachments,s=new M.core.alert({title:r.entries[i].concept,draggable:!0,message:u,modal:!1,yesLabel:M.util.get_string("ok","moodle")}),n.notifyFilterContentUpdated(s.get("boundingBox").getDOMNode()),e.Node.one("#id_yuialertconfirm-"+s.get("COUNT")).focus(),o="#moodle-dialogue-"+s.get("COUNT"),s.on("complete",this._deletealertpanel,this,o),e.Object.isEmpty(this.alertpanels)||(a=this._getLatestWindowPosition(),e.Node.one(o).setXY([a[0]+10,a[1]+10])),this.alertpanels[o]=e.Node.one(o).getXY();return!0}r.error&&new M.core.ajaxException(r)}catch(f){new M.core.exception(f)}return!1},_getLatestWindowPosition:function(){var t=[0,0];return e.Object.each(this.alertpanels,function(e){e[0]>t[0]&&(t=e)}),t},_deletealertpanel:function(e,t){delete this.alertpanels[t]}},{NAME:n,ATTRS:{url:{validator:e.Lang.isString,value:M.cfg.wwwroot+"/mod/glossary/showentry.php"},name:{validator:e.Lang.isString,value:"glossaryconcept"},options:{getter:function(){return{width:this.get(r),height:this.get(i),menubar:this.get(s),location:this.get(o),scrollbars:this.get(u),resizable:this.get(a),toolbar:this.get(f),status:this.get(l),directories:this.get(c),fullscreen:this.get(h),dependent:this.get(p)}},readOnly:!0},width:{value:600},height:{value:450},menubar:{value:!1},location:{value:!1},scrollbars:{value:!0},resizable:{value:!0},toolbar:{value:!0},status:{value:!0},directories:{value:!1},fullscreen:{value:!1},dependent:{value:!0}}}),M.filter_glossary=M.filter_glossary||{},M.filter_glossary.init_filter_autolinking=function(e){return new d(e)}},"@VERSION@",{requires:["base","node","io-base","json-parse","event-delegate","overlay","moodle-core-event","moodle-core-notification-alert","moodle-core-notification-exception","moodle-core-notification-ajaxexception"]});
+YUI.add("moodle-filter_glossary-autolinker",function(e,t){var n="Glossary filter autolinker",r="width",i="height",s="menubar",o="location",u="scrollbars",a="resizable",f="toolbar",l="status",c="directories",h="fullscreen",p="dependent",d;d=function(){d.superclass.constructor.apply(this,arguments)},e.extend(d,e.Base,{overlay:null,alertpanels:{},initializer:function(){var t=this;require(["core/event"],function(n){e.delegate("click",function(r){r.preventDefault();var i="",s=e.Node.create('
'),o=new e.Overlay({headerContent:i,bodyContent:s}),u,a;window.require(["core/templates"],function(e){e.renderPix("i/loading","core").then(function(e){s.append(e)})}),t.overlay=o,o.render(e.one(document.body)),u=this.getAttribute("href").replace("showentry.php","showentry_ajax.php"),a={method:"get",context:t,on:{success:function(e,t){this.display_callback(t.responseText,n)},failure:function(e,t){var n=t.statusText;M.cfg.developerdebug&&(t.statusText+=" ("+u+")"),new M.core.exception({message:n})}}},e.io(u,a)},e.one(document.body),"a.glossary.autolink.concept")})},display_callback:function(t,n){var r,i,s,o,u,a;try{r=e.JSON.parse(t);if(r.success){this.overlay.hide();for(i in r.entries)u=r.entries[i].definition+r.entries[i].attachments,s=new M.core.alert({title:r.entries[i].concept,draggable:!0,message:u,modal:!1,yesLabel:M.util.get_string("ok","moodle")}),n.notifyFilterContentUpdated(s.get("boundingBox").getDOMNode()),e.Node.one("#id_yuialertconfirm-"+s.get("COUNT")).focus(),o="#moodle-dialogue-"+s.get("COUNT"),s.on("complete",this._deletealertpanel,this,o),e.Object.isEmpty(this.alertpanels)||(a=this._getLatestWindowPosition(),e.Node.one(o).setXY([a[0]+10,a[1]+10])),this.alertpanels[o]=e.Node.one(o).getXY();return!0}r.error&&new M.core.ajaxException(r)}catch(f){new M.core.exception(f)}return!1},_getLatestWindowPosition:function(){var t=[0,0];return e.Object.each(this.alertpanels,function(e){e[0]>t[0]&&(t=e)}),t},_deletealertpanel:function(e,t){delete this.alertpanels[t]}},{NAME:n,ATTRS:{url:{validator:e.Lang.isString,value:M.cfg.wwwroot+"/mod/glossary/showentry.php"},name:{validator:e.Lang.isString,value:"glossaryconcept"},options:{getter:function(){return{width:this.get(r),height:this.get(i),menubar:this.get(s),location:this.get(o),scrollbars:this.get(u),resizable:this.get(a),toolbar:this.get(f),status:this.get(l),directories:this.get(c),fullscreen:this.get(h),dependent:this.get(p)}},readOnly:!0},width:{value:600},height:{value:450},menubar:{value:!1},location:{value:!1},scrollbars:{value:!0},resizable:{value:!0},toolbar:{value:!0},status:{value:!0},directories:{value:!1},fullscreen:{value:!1},dependent:{value:!0}}}),M.filter_glossary=M.filter_glossary||{},M.filter_glossary.init_filter_autolinking=function(e){return new d(e)}},"@VERSION@",{requires:["base","node","io-base","json-parse","event-delegate","overlay","moodle-core-event","moodle-core-notification-alert","moodle-core-notification-exception","moodle-core-notification-ajaxexception"]});
diff --git a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js
index 1f36fe30e5f..81f03933b08 100644
--- a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js
+++ b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js
@@ -29,7 +29,6 @@ Y.extend(AUTOLINKER, Y.Base, {
// display a progress indicator
var title = '',
content = Y.Node.create('
' +
- '
' +
'
'),
o = new Y.Overlay({
headerContent: title,
@@ -37,6 +36,13 @@ Y.extend(AUTOLINKER, Y.Base, {
}),
fullurl,
cfg;
+
+ window.require(['core/templates'], function(Templates) {
+ Templates.renderPix('i/loading', 'core').then(function(html) {
+ content.append(html);
+ });
+ });
+
self.overlay = o;
o.render(Y.one(document.body));
diff --git a/filter/glossary/yui/src/autolinker/js/autolinker.js b/filter/glossary/yui/src/autolinker/js/autolinker.js
index 564c6ee3b43..8aea8fdfa41 100644
--- a/filter/glossary/yui/src/autolinker/js/autolinker.js
+++ b/filter/glossary/yui/src/autolinker/js/autolinker.js
@@ -27,7 +27,6 @@ Y.extend(AUTOLINKER, Y.Base, {
// display a progress indicator
var title = '',
content = Y.Node.create('
' +
- '
' +
'
'),
o = new Y.Overlay({
headerContent: title,
@@ -35,6 +34,13 @@ Y.extend(AUTOLINKER, Y.Base, {
}),
fullurl,
cfg;
+
+ window.require(['core/templates'], function(Templates) {
+ Templates.renderPix('i/loading', 'core').then(function(html) {
+ content.append(html);
+ });
+ });
+
self.overlay = o;
o.render(Y.one(document.body));
diff --git a/grade/grading/renderer.php b/grade/grading/renderer.php
index 562406141ab..de6adabc6a6 100644
--- a/grade/grading/renderer.php
+++ b/grade/grading/renderer.php
@@ -64,7 +64,7 @@ class core_grading_renderer extends plugin_renderer_base {
*/
public function management_action_icon(moodle_url $url, $text, $icon) {
- $img = html_writer::empty_tag('img', array('src' => $this->output->pix_url($icon), 'class' => 'action-icon'));
+ $img = $this->output->pix_icon($icon, '');
$txt = html_writer::tag('div', $text, array('class' => 'action-text'));
return html_writer::link($url, $img . $txt, array('class' => 'action'));
}
@@ -93,7 +93,7 @@ class core_grading_renderer extends plugin_renderer_base {
*/
public function pick_action_icon(moodle_url $url, $text, $icon = '', $class = '') {
- $img = html_writer::empty_tag('img', array('src' => $this->output->pix_url($icon), 'class' => 'action-icon'));
+ $img = $this->output->pix_icon($icon, '');
$txt = html_writer::tag('div', $text, array('class' => 'action-text'));
return html_writer::link($url, $img . $txt, array('class' => 'action '.$class));
}
diff --git a/grade/report/grader/lib.php b/grade/report/grader/lib.php
index 8d7eb1391ce..b69e31022ac 100644
--- a/grade/report/grader/lib.php
+++ b/grade/report/grader/lib.php
@@ -736,8 +736,8 @@ class grade_report_grader extends grade_report {
if (empty($suspendedstring)) {
$suspendedstring = get_string('userenrolmentsuspended', 'grades');
}
- $usercell->text .= html_writer::empty_tag('img', array('src'=>$OUTPUT->pix_url('i/enrolmentsuspended'), 'title'=>$suspendedstring,
- 'alt'=>$suspendedstring, 'class'=>'usersuspendedicon'));
+ $icon = $OUTPUT->pix_icon('i/enrolmentsuspended', $suspendedstring);
+ $usercell->text .= html_writer::tag('span', $icon, array('class'=>'usersuspendedicon'));
}
$userrow->cells[] = $usercell;
diff --git a/index.php b/index.php
index 0c9e490d2ac..a07a735b742 100644
--- a/index.php
+++ b/index.php
@@ -169,9 +169,9 @@ if (!empty($CFG->customfrontpageinclude)) {
if ($editing && has_capability('moodle/course:update', $context)) {
$streditsummary = get_string('editsummary');
- echo "
id\">pix_url('t/edit') . "\" ".
- " class=\"iconsmall\" alt=\"$streditsummary\" />";
+ echo "
id\">" . $OUTPUT->pix_icon('t/edit', $streditsummary) .
+ "";
}
$courserenderer = $PAGE->get_renderer('core', 'course');
diff --git a/lib/adminlib.php b/lib/adminlib.php
index 28aafd6ce96..81d6d2b16b5 100644
--- a/lib/adminlib.php
+++ b/lib/adminlib.php
@@ -5947,13 +5947,13 @@ class admin_setting_manageenrols extends admin_setting {
if (isset($active_enrols[$enrol])) {
$aurl = new moodle_url($url, array('action'=>'disable', 'enrol'=>$enrol));
$hideshow = "
";
- $hideshow .= "pix_url('t/hide') . "\" class=\"iconsmall\" alt=\"$strdisable\" />";
+ $hideshow .= $OUTPUT->pix_icon('t/hide', $strdisable) . '';
$enabled = true;
$displayname = $name;
} else if (isset($enrols_available[$enrol])) {
$aurl = new moodle_url($url, array('action'=>'enable', 'enrol'=>$enrol));
$hideshow = "
";
- $hideshow .= "pix_url('t/show') . "\" class=\"iconsmall\" alt=\"$strenable\" />";
+ $hideshow .= $OUTPUT->pix_icon('t/show', $strenable) . '';
$enabled = false;
$displayname = $name;
$class = 'dimmed_text';
@@ -5974,16 +5974,16 @@ class admin_setting_manageenrols extends admin_setting {
if ($updowncount > 1) {
$aurl = new moodle_url($url, array('action'=>'up', 'enrol'=>$enrol));
$updown .= "
";
- $updown .= "pix_url('t/up') . "\" alt=\"$strup\" class=\"iconsmall\" /> ";
+ $updown .= $OUTPUT->pix_icon('t/up', $strup) . ' ';
} else {
- $updown .= "
pix_url('spacer') . "\" class=\"iconsmall\" alt=\"\" /> ";
+ $updown .= $OUTPUT->spacer() . ' ';
}
if ($updowncount < $enrolcount) {
$aurl = new moodle_url($url, array('action'=>'down', 'enrol'=>$enrol));
$updown .= "
";
- $updown .= "pix_url('t/down') . "\" alt=\"$strdown\" class=\"iconsmall\" />";
+ $updown .= $OUTPUT->pix_icon('t/down', $strdown) . ' ';
} else {
- $updown .= "
pix_url('spacer') . "\" class=\"iconsmall\" alt=\"\" />";
+ $updown .= $OUTPUT->spacer() . ' ';
}
++$updowncount;
}
@@ -6508,15 +6508,13 @@ class admin_setting_manageauths extends admin_setting {
// hide/show link
if (in_array($auth, $authsenabled)) {
$hideshow = "
";
- $hideshow .= "pix_url('t/hide') . "\" class=\"iconsmall\" alt=\"disable\" />";
- // $hideshow = "
";
+ $hideshow .= $OUTPUT->pix_icon('t/hide', get_string('disable')) . '';
$enabled = true;
$displayname = $name;
}
else {
$hideshow = "
";
- $hideshow .= "pix_url('t/show') . "\" class=\"iconsmall\" alt=\"enable\" />";
- // $hideshow = "
";
+ $hideshow .= $OUTPUT->pix_icon('t/show', get_string('enable')) . '';
$enabled = false;
$displayname = $name;
$class = 'dimmed_text';
@@ -6529,17 +6527,17 @@ class admin_setting_manageauths extends admin_setting {
if ($enabled) {
if ($updowncount > 1) {
$updown .= "
";
- $updown .= "pix_url('t/up') . "\" alt=\"up\" class=\"iconsmall\" /> ";
+ $updown .= $OUTPUT->pix_icon('t/up', get_string('moveup')) . ' ';
}
else {
- $updown .= "
pix_url('spacer') . "\" class=\"iconsmall\" alt=\"\" /> ";
+ $updown .= $OUTPUT->spacer() . ' ';
}
if ($updowncount < $authcount) {
$updown .= "
";
- $updown .= "pix_url('t/down') . "\" alt=\"down\" class=\"iconsmall\" />";
+ $updown .= $OUTPUT->pix_icon('t/down', get_string('movedown')) . ' ';
}
else {
- $updown .= "
pix_url('spacer') . "\" class=\"iconsmall\" alt=\"\" />";
+ $updown .= $OUTPUT->spacer() . ' ';
}
++ $updowncount;
}
@@ -6696,15 +6694,13 @@ class admin_setting_manageeditors extends admin_setting {
$class = '';
if (in_array($editor, $active_editors)) {
$hideshow = "
";
- $hideshow .= "pix_url('t/hide') . "\" class=\"iconsmall\" alt=\"disable\" />";
- // $hideshow = "
";
+ $hideshow .= $OUTPUT->pix_icon('t/hide', get_string('disable')) . '';
$enabled = true;
$displayname = $name;
}
else {
$hideshow = "
";
- $hideshow .= "pix_url('t/show') . "\" class=\"iconsmall\" alt=\"enable\" />";
- // $hideshow = "
";
+ $hideshow .= $OUTPUT->pix_icon('t/show', get_string('enable')) . '';
$enabled = false;
$displayname = $name;
$class = 'dimmed_text';
@@ -6715,17 +6711,17 @@ class admin_setting_manageeditors extends admin_setting {
if ($enabled) {
if ($updowncount > 1) {
$updown .= "
";
- $updown .= "pix_url('t/up') . "\" alt=\"up\" class=\"iconsmall\" /> ";
+ $updown .= $OUTPUT->pix_icon('t/up', get_string('moveup')) . ' ';
}
else {
- $updown .= "
pix_url('spacer') . "\" class=\"iconsmall\" alt=\"\" /> ";
+ $updown .= $OUTPUT->spacer() . ' ';
}
if ($updowncount < $editorcount) {
$updown .= "
";
- $updown .= "pix_url('t/down') . "\" alt=\"down\" class=\"iconsmall\" />";
+ $updown .= $OUTPUT->pix_icon('t/down', get_string('movedown')) . ' ';
}
else {
- $updown .= "
pix_url('spacer') . "\" class=\"iconsmall\" alt=\"\" />";
+ $updown .= $OUTPUT->spacer() . ' ';
}
++ $updowncount;
}
@@ -6875,14 +6871,14 @@ class admin_setting_manageantiviruses extends admin_setting {
if (in_array($antivirus, $activeantiviruses)) {
$hideshowurl = $baseurl;
$hideshowurl->params(array('action' => 'disable', 'antivirus' => $antivirus));
- $hideshowimg = html_writer::img($OUTPUT->pix_url('t/hide'), 'disable', array('class' => 'iconsmall'));
+ $hideshowimg = $OUTPUT->pix_icon('t/hide', get_string('disable'));
$hideshow = html_writer::link($hideshowurl, $hideshowimg);
$enabled = true;
$displayname = $name;
} else {
$hideshowurl = $baseurl;
$hideshowurl->params(array('action' => 'enable', 'antivirus' => $antivirus));
- $hideshowimg = html_writer::img($OUTPUT->pix_url('t/show'), 'enable', array('class' => 'iconsmall'));
+ $hideshowimg = $OUTPUT->pix_icon('t/show', get_string('enable'));
$hideshow = html_writer::link($hideshowurl, $hideshowimg);
$enabled = false;
$displayname = $name;
@@ -6895,18 +6891,18 @@ class admin_setting_manageantiviruses extends admin_setting {
if ($updowncount > 1) {
$updownurl = $baseurl;
$updownurl->params(array('action' => 'up', 'antivirus' => $antivirus));
- $updownimg = html_writer::img($OUTPUT->pix_url('t/up'), 'up', array('class' => 'iconsmall'));
+ $updownimg = $OUTPUT->pix_icon('t/up', get_string('moveup'));
$updown = html_writer::link($updownurl, $updownimg);
} else {
- $updown .= html_writer::img($OUTPUT->pix_url('spacer'), '', array('class' => 'iconsmall'));
+ $updownimg = $OUTPUT->spacer();
}
if ($updowncount < $antiviruscount) {
$updownurl = $baseurl;
$updownurl->params(array('action' => 'down', 'antivirus' => $antivirus));
- $updownimg = html_writer::img($OUTPUT->pix_url('t/down'), 'down', array('class' => 'iconsmall'));
+ $updownimg = $OUTPUT->pix_icon('t/down', get_string('movedown'));
$updown = html_writer::link($updownurl, $updownimg);
} else {
- $updown .= html_writer::img($OUTPUT->pix_url('spacer'), '', array('class' => 'iconsmall'));
+ $updownimg = $OUTPUT->spacer();
}
++ $updowncount;
}
@@ -7012,14 +7008,14 @@ class admin_setting_managelicenses extends admin_setting {
if ($value->enabled == 1) {
$hideshow = html_writer::link($url.'&action=disable&license='.$value->shortname,
- html_writer::tag('img', '', array('src'=>$OUTPUT->pix_url('t/hide'), 'class'=>'iconsmall', 'alt'=>'disable')));
+ $OUTPUT->pix_icon('t/hide', get_string('disable')));
} else {
$hideshow = html_writer::link($url.'&action=enable&license='.$value->shortname,
- html_writer::tag('img', '', array('src'=>$OUTPUT->pix_url('t/show'), 'class'=>'iconsmall', 'alt'=>'enable')));
+ $OUTPUT->pix_icon('t/show', get_string('enable')));
}
if ($value->shortname == $CFG->sitedefaultlicense) {
- $displayname .= ' '.html_writer::tag('img', '', array('src'=>$OUTPUT->pix_url('t/locked'), 'class'=>'iconsmall', 'alt'=>get_string('default'), 'title'=>get_string('default')));
+ $displayname .= ' '.$OUTPUT->pix_icon('t/locked', get_string('default'));
$hideshow = '';
}
@@ -8623,14 +8619,14 @@ class admin_setting_managerepository extends admin_setting {
if ($updowncount > 1) {
$updown .= "
baseurl&action=moveup&repos=".$typename."\">";
- $updown .= "pix_url('t/up') . "\" alt=\"up\" class=\"iconsmall\" /> ";
+ $updown .= $OUTPUT->pix_icon('t/up', get_string('moveup')) . ' ';
}
else {
$updown .= $spacer;
}
if ($updowncount < $totalrepositorytypes) {
$updown .= "
baseurl&action=movedown&repos=".$typename."\">";
- $updown .= "pix_url('t/down') . "\" alt=\"down\" class=\"iconsmall\" />";
+ $updown .= $OUTPUT->pix_icon('t/down', get_string('movedown')) . ' ';
}
else {
$updown .= $spacer;
@@ -9424,11 +9420,11 @@ class admin_setting_managewebserviceprotocols extends admin_setting {
// hide/show link
if (in_array($protocol, $active_protocols)) {
$hideshow = "
";
- $hideshow .= "pix_url('t/hide') . "\" class=\"iconsmall\" alt=\"$strdisable\" />";
+ $hideshow .= $OUTPUT->pix_icon('t/hide', $strdisable) . '';
$displayname = "
$name";
} else {
$hideshow = "
";
- $hideshow .= "pix_url('t/show') . "\" class=\"iconsmall\" alt=\"$strenable\" />";
+ $hideshow .= $OUTPUT->pix_icon('t/show', $strenable) . '';
$displayname = "
$name";
}
diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php
index 55124fb8317..84068b03c4a 100644
--- a/lib/deprecatedlib.php
+++ b/lib/deprecatedlib.php
@@ -1077,7 +1077,7 @@ function print_arrow($direction='up', $strsort=null, $return=false) {
$strsort = get_string('sort' . $sortdir, 'grades');
}
- $return = '
';
+ $return = ' ' . $OUTPUT->pix_icon('t/' . $direction, $strsort) . ' ';
if ($return) {
return $return;
@@ -5043,7 +5043,7 @@ function message_contact_link($userid, $linktype='add', $return=false, $script=n
$iconpath = 't/addcontact';
}
- $img = '
';
+ $img = $OUTPUT->pix_icon($iconpath, $safealttext);
}
$output = '
'.
@@ -5116,9 +5116,9 @@ function message_history_link($userid1, $userid2, $return=false, $keywords='', $
}
if ($linktext == 'icon') { // Icon only
- $fulllink = '';
+ $fulllink = $OUTPUT->pix_icon('t/messages', $strmessagehistory);
} else if ($linktext == 'both') { // Icon and standard name
- $fulllink = '';
+ $fulllink = $OUTPUT->pix_icon('t/messages', '');
$fulllink .= ' '.$strmessagehistory;
} else if ($linktext) { // Custom name
$fulllink = $linktext;
diff --git a/lib/editor/tinymce/adminlib.php b/lib/editor/tinymce/adminlib.php
index 684a9140faa..181e53b4e76 100644
--- a/lib/editor/tinymce/adminlib.php
+++ b/lib/editor/tinymce/adminlib.php
@@ -143,12 +143,12 @@ class tiynce_subplugins_settings extends admin_setting {
$displayname = html_writer::tag('span', $name, array('class'=>'error'));
} else if ($plugininfo->is_enabled()) {
$url = new moodle_url('/lib/editor/tinymce/subplugins.php', array('sesskey'=>sesskey(), 'return'=>'settings', 'disable'=>$name));
- $hideshow = html_writer::empty_tag('img', array('src'=>$OUTPUT->pix_url('t/hide'), 'class'=>'iconsmall', 'alt'=>$strdisable));
+ $hideshow = $OUTPUT->pix_icon('t/hide', $strdisable);
$hideshow = html_writer::link($url, $hideshow);
$displayname = $namestr;
} else {
$url = new moodle_url('/lib/editor/tinymce/subplugins.php', array('sesskey'=>sesskey(), 'return'=>'settings', 'enable'=>$name));
- $hideshow = html_writer::empty_tag('img', array('src'=>$OUTPUT->pix_url('t/show'), 'class'=>'iconsmall', 'alt'=>$strenable));
+ $hideshow = $OUTPUT->pix_icon('t/show', $strenable);
$hideshow = html_writer::link($url, $hideshow);
$displayname = $namestr;
$class = 'dimmed_text';
diff --git a/lib/filelib.php b/lib/filelib.php
index bebbe77eee1..f9ddae50c14 100644
--- a/lib/filelib.php
+++ b/lib/filelib.php
@@ -690,11 +690,11 @@ function file_get_drafarea_files($draftitemid, $filepath = '/') {
if ($file->is_directory()) {
$item->filesize = 0;
- $item->icon = $OUTPUT->pix_url(file_folder_icon(24))->out(false);
+ $item->icon = $OUTPUT->image_url(file_folder_icon(24))->out(false);
$item->type = 'folder';
$foldername = explode('/', trim($item->filepath, '/'));
$item->fullname = trim(array_pop($foldername), '/');
- $item->thumbnail = $OUTPUT->pix_url(file_folder_icon(90))->out(false);
+ $item->thumbnail = $OUTPUT->image_url(file_folder_icon(90))->out(false);
} else {
// do NOT use file browser here!
$item->mimetype = get_mimetype_description($file);
@@ -705,8 +705,8 @@ function file_get_drafarea_files($draftitemid, $filepath = '/') {
}
$itemurl = moodle_url::make_draftfile_url($draftitemid, $item->filepath, $item->filename);
$item->url = $itemurl->out();
- $item->icon = $OUTPUT->pix_url(file_file_icon($file, 24))->out(false);
- $item->thumbnail = $OUTPUT->pix_url(file_file_icon($file, 90))->out(false);
+ $item->icon = $OUTPUT->image_url(file_file_icon($file, 24))->out(false);
+ $item->thumbnail = $OUTPUT->image_url(file_file_icon($file, 90))->out(false);
if ($imageinfo = $file->get_imageinfo()) {
$item->realthumbnail = $itemurl->out(false, array('preview' => 'thumb', 'oid' => $file->get_timemodified()));
$item->realicon = $itemurl->out(false, array('preview' => 'tinyicon', 'oid' => $file->get_timemodified()));
@@ -1450,7 +1450,8 @@ function mimeinfo($element, $filename) {
foreach ($filenames as $filename) {
foreach ($iconpostfixes as $size => $postfix) {
$fullname = $CFG->dirroot.'/pix/f/'.$filename.$postfix;
- if ($iconsize >= $size && (file_exists($fullname.'.png') || file_exists($fullname.'.gif'))) {
+ if ($iconsize >= $size &&
+ (file_exists($fullname.'.svg') || file_exists($fullname.'.png') || file_exists($fullname.'.gif'))) {
return $filename.$postfix;
}
}
@@ -1508,7 +1509,7 @@ function mimeinfo_from_type($element, $mimetype) {
* Usage:
*
* // $file - instance of stored_file or file_info
- * $icon = $OUTPUT->pix_url(file_file_icon($file))->out();
+ * $icon = $OUTPUT->image_url(file_file_icon($file))->out();
* echo html_writer::empty_tag('img', array('src' => $icon, 'alt' => get_mimetype_description($file)));
*
* or
@@ -1557,12 +1558,12 @@ function file_file_icon($file, $size = null) {
*
* Usage:
*
- * $icon = $OUTPUT->pix_url(file_folder_icon())->out();
+ * $icon = $OUTPUT->image_url(file_folder_icon())->out();
* echo html_writer::empty_tag('img', array('src' => $icon));
*
* or
*
- * echo $OUTPUT->pix_icon(file_folder_icon(32));
+ * echo $OUTPUT->pix_icon(file_folder_icon(32), '');
*
*
* @param int $iconsize The size of the icon. Defaults to 16 can also be 24, 32, 48, 64, 72, 80, 96, 128, 256
@@ -1588,12 +1589,12 @@ function file_folder_icon($iconsize = null) {
/**
* Returns the relative icon path for a given mime type
*
- * This function should be used in conjunction with $OUTPUT->pix_url to produce
+ * This function should be used in conjunction with $OUTPUT->image_url to produce
* a return the full path to an icon.
*
*
* $mimetype = 'image/jpg';
- * $icon = $OUTPUT->pix_url(file_mimetype_icon($mimetype))->out();
+ * $icon = $OUTPUT->image_url(file_mimetype_icon($mimetype))->out();
* echo html_writer::empty_tag('img', array('src' => $icon, 'alt' => get_mimetype_description($mimetype)));
*
*
@@ -1611,12 +1612,12 @@ function file_mimetype_icon($mimetype, $size = NULL) {
/**
* Returns the relative icon path for a given file name
*
- * This function should be used in conjunction with $OUTPUT->pix_url to produce
+ * This function should be used in conjunction with $OUTPUT->image_url to produce
* a return the full path to an icon.
*
*
* $filename = '.jpg';
- * $icon = $OUTPUT->pix_url(file_extension_icon($filename))->out();
+ * $icon = $OUTPUT->image_url(file_extension_icon($filename))->out();
* echo html_writer::empty_tag('img', array('src' => $icon, 'alt' => '...'));
*
*
@@ -4088,7 +4089,7 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
// also if login is required for profile images and is not logged in or guest
// do not use require_login() because it is expensive and not suitable here anyway
$theme = theme_config::load($themename);
- redirect($theme->pix_url('u/'.$filename, 'moodle')); // intentionally not cached
+ redirect($theme->image_url('u/'.$filename, 'moodle')); // intentionally not cached
}
if (!$file = $fs->get_file($context->id, 'user', 'icon', 0, '/', $filename.'.png')) {
diff --git a/lib/formslib.php b/lib/formslib.php
index a4bdf528472..d13625cd20f 100644
--- a/lib/formslib.php
+++ b/lib/formslib.php
@@ -1486,8 +1486,8 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
}else {
$this->updateAttributes(array('class'=>'mform'));
}
- $this->_reqHTML = '';
- $this->_advancedHTML = '';
+ $this->_reqHTML = '' . $OUTPUT->pix_icon('req', get_string('requiredelement', 'form')) . '';
+ $this->_advancedHTML = '' . $OUTPUT->pix_icon('adv', get_string('advancedelement', 'form')) . '';
$this->setRequiredNote(get_string('somefieldsrequired', 'form', $OUTPUT->pix_icon('req', get_string('requiredelement', 'form'))));
}
diff --git a/lib/googleapi.php b/lib/googleapi.php
index 1c2be1d99f9..3d2a3fe8523 100644
--- a/lib/googleapi.php
+++ b/lib/googleapi.php
@@ -131,7 +131,7 @@ class google_docs {
'url' => "{$gdoc->link[0]->attributes()->href}",
'source' => $source,
'date' => strtotime($gdoc->updated),
- 'thumbnail' => (string) $OUTPUT->pix_url(file_extension_icon($title, 32))
+ 'thumbnail' => (string) $OUTPUT->image_url(file_extension_icon($title, 32))
);
}
core_date::set_default_server_timezone();
diff --git a/lib/listlib.php b/lib/listlib.php
index 9cc815b1107..354c38fbb96 100644
--- a/lib/listlib.php
+++ b/lib/listlib.php
@@ -594,13 +594,13 @@ abstract class list_item {
public function image_icon($action, $url, $icon) {
global $OUTPUT;
- return '
- ';
+ return '' .
+ $OUTPUT->pix_icon('t/' . $icon, $action) . ' ';
}
public function image_spacer() {
global $OUTPUT;
- return '';
+ return $OUTPUT->spacer();
}
/**
diff --git a/lib/modinfolib.php b/lib/modinfolib.php
index f6f9a13428c..f8a06616dc2 100644
--- a/lib/modinfolib.php
+++ b/lib/modinfolib.php
@@ -1381,18 +1381,18 @@ class cm_info implements IteratorAggregate {
} else if (!empty($this->icon)) {
if (substr($this->icon, 0, 4) === 'mod/') {
list($modname, $iconname) = explode('/', substr($this->icon, 4), 2);
- $icon = $output->pix_url($iconname, $modname);
+ $icon = $output->image_url($iconname, $modname);
} else {
if (!empty($this->iconcomponent)) {
// Icon has specified component
- $icon = $output->pix_url($this->icon, $this->iconcomponent);
+ $icon = $output->image_url($this->icon, $this->iconcomponent);
} else {
// Icon does not have specified component, use default
- $icon = $output->pix_url($this->icon);
+ $icon = $output->image_url($this->icon);
}
}
} else {
- $icon = $output->pix_url('icon', $this->modname);
+ $icon = $output->image_url('icon', $this->modname);
}
return $icon;
}
@@ -2356,19 +2356,19 @@ class cached_cm_info {
/**
* Name of icon for this activity. Normally, this should be used together with $iconcomponent
- * to define the icon, as per pix_url function.
+ * to define the icon, as per image_url function.
* For backward compatibility, if this value is of the form 'mod/forum/icon' then an icon
* within that module will be used.
* @see cm_info::get_icon_url()
- * @see renderer_base::pix_url()
+ * @see renderer_base::image_url()
* @var string
*/
public $icon;
/**
- * Component for icon for this activity, as per pix_url; leave blank to use default 'moodle'
+ * Component for icon for this activity, as per image_url; leave blank to use default 'moodle'
* component
- * @see renderer_base::pix_url()
+ * @see renderer_base::image_url()
* @var string
*/
public $iconcomponent;
diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php
index 6f93fa52fb9..9ed4ac816ac 100644
--- a/lib/outputcomponents.php
+++ b/lib/outputcomponents.php
@@ -359,7 +359,7 @@ class user_picture implements renderable {
$size = (int)$this->size;
}
- $defaulturl = $renderer->pix_url('u/'.$filename); // default image
+ $defaulturl = $renderer->image_url('u/'.$filename); // default image
if ((!empty($CFG->forcelogin) and !isloggedin()) ||
(!empty($CFG->forceloginforprofileimage) && (!isloggedin() || isguestuser()))) {
@@ -682,7 +682,7 @@ class pix_icon implements renderable, templatable {
}
}
- $attributes['src'] = $output->pix_url($this->pix, $this->component)->out(false);
+ $attributes['src'] = $output->image_url($this->pix, $this->component)->out(false);
$templatecontext = array();
foreach ($attributes as $name => $value) {
$templatecontext[] = array('name' => $name, 'value' => $value);
@@ -3149,7 +3149,7 @@ class block_contents {
/**
* @var array A (possibly empty) array of editing controls. Each element of
* this array should be an array('url' => $url, 'icon' => $icon, 'caption' => $caption).
- * $icon is the icon name. Fed to $OUTPUT->pix_url.
+ * $icon is the icon name. Fed to $OUTPUT->image_url.
*/
public $controls = array();
diff --git a/lib/outputlib.php b/lib/outputlib.php
index 169c3ec761d..db753acb1e6 100644
--- a/lib/outputlib.php
+++ b/lib/outputlib.php
@@ -1572,7 +1572,7 @@ class theme_config {
$replaced[$match[0]] = true;
$imagename = $match[2];
$component = rtrim($match[1], '|');
- $imageurl = $this->pix_url($imagename, $component)->out(false);
+ $imageurl = $this->image_url($imagename, $component)->out(false);
// we do not need full url because the image.php is always in the same dir
$imageurl = preg_replace('|^http.?://[^/]+|', '', $imageurl);
$css = str_replace($match[0], $imageurl, $css);
diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php
index 0be6043ca77..94df7fdda62 100644
--- a/lib/outputrenderers.php
+++ b/lib/outputrenderers.php
@@ -955,13 +955,13 @@ class core_renderer extends renderer_base {
// Special case for site home page - please do not remove
return '';
+ ' ';
} else if (!empty($CFG->target_release) && $CFG->target_release != $CFG->release) {
// Special case for during install/upgrade.
return '