mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-19690 - first 53 $CFG->pixpath to $OUTPUT->old_icon_url
This commit is contained in:
parent
3aaa27f4cd
commit
4096752d1d
@ -32,7 +32,7 @@
|
||||
echo '<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->'
|
||||
. '<table class="generaltable">';
|
||||
|
||||
$icon = "<img src=\"$CFG->pixpath/i/course.gif\"".
|
||||
$icon = "<img src=\"" . $OUTPUT->old_icon_url('i/course') . "\"".
|
||||
" class=\"icon\" alt=\"".get_string("course")."\" />";
|
||||
|
||||
foreach ($courses as $course) {
|
||||
|
@ -232,11 +232,11 @@
|
||||
|
||||
if ($module->visible) {
|
||||
$visible = "<a href=\"modules.php?hide=$module->name&sesskey=".sesskey()."\" title=\"$strhide\">".
|
||||
"<img src=\"$CFG->pixpath/i/hide.gif\" class=\"icon\" alt=\"$strhide\" /></a>";
|
||||
"<img src=\"" . $OUTPUT->old_icon_url('i/hide') . "\" class=\"icon\" alt=\"$strhide\" /></a>";
|
||||
$class = "";
|
||||
} else {
|
||||
$visible = "<a href=\"modules.php?show=$module->name&sesskey=".sesskey()."\" title=\"$strshow\">".
|
||||
"<img src=\"$CFG->pixpath/i/show.gif\" class=\"icon\" alt=\"$strshow\" /></a>";
|
||||
"<img src=\"" . $OUTPUT->old_icon_url('i/show') . "\" class=\"icon\" alt=\"$strshow\" /></a>";
|
||||
$class = " class=\"dimmed_text\"";
|
||||
}
|
||||
if ($module->name == "forum") {
|
||||
|
@ -13,7 +13,7 @@ class block_course_list extends block_list {
|
||||
}
|
||||
|
||||
function get_content() {
|
||||
global $CFG, $USER, $DB;
|
||||
global $CFG, $USER, $DB, $OUTPUT;
|
||||
|
||||
if($this->content !== NULL) {
|
||||
return $this->content;
|
||||
@ -24,7 +24,7 @@ class block_course_list extends block_list {
|
||||
$this->content->icons = array();
|
||||
$this->content->footer = '';
|
||||
|
||||
$icon = "<img src=\"$CFG->pixpath/i/course.gif\"".
|
||||
$icon = "<img src=\"" . $OUTPUT->old_icon_url('i/course') . "\"".
|
||||
" class=\"icon\" alt=\"".get_string("coursecategory")."\" />";
|
||||
|
||||
$adminseesall = true;
|
||||
|
@ -13,7 +13,7 @@ class block_course_summary extends block_base {
|
||||
}
|
||||
|
||||
function get_content() {
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
if($this->content !== NULL) {
|
||||
return $this->content;
|
||||
@ -33,7 +33,7 @@ class block_course_summary extends block_base {
|
||||
} else {
|
||||
$editpage = $CFG->wwwroot.'/course/edit.php?id='.$this->page->course->id;
|
||||
}
|
||||
$this->content->text .= "<div class=\"editbutton\"><a href=\"$editpage\"><img src=\"$CFG->pixpath/t/edit.gif\" alt=\"".get_string('edit')."\" /></a></div>";
|
||||
$this->content->text .= "<div class=\"editbutton\"><a href=\"$editpage\"><img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" alt=\"".get_string('edit')."\" /></a></div>";
|
||||
}
|
||||
$this->content->footer = '';
|
||||
|
||||
|
@ -38,7 +38,7 @@ class block_tags extends block_base {
|
||||
|
||||
function get_content() {
|
||||
|
||||
global $CFG, $SITE, $USER, $SCRIPT;
|
||||
global $CFG, $SITE, $USER, $SCRIPT, $OUTPUT;
|
||||
|
||||
if (empty($CFG->usetags)) {
|
||||
$this->content->text = '';
|
||||
@ -231,6 +231,7 @@ class block_tags extends block_base {
|
||||
$arrowtitle = get_string('arrowtitle', $tagslang);
|
||||
$coursetaghelpbutton = helpbutton('addtags', 'adding tags', $tagslang, TRUE, FALSE, '', TRUE);
|
||||
$sesskey = sesskey();
|
||||
$arrowright = $OUTPUT->old_icon_url('t/arrow_left');
|
||||
$this->content->footer .= <<<EOT
|
||||
<hr />
|
||||
<form action="{$CFG->wwwroot}/tag/coursetags_add.php" method="post" id="coursetag"
|
||||
@ -252,7 +253,7 @@ class block_tags extends block_base {
|
||||
</div>
|
||||
<div class="coursetag_form_input3" id="coursetag_sug_btn">
|
||||
<a title="$arrowtitle">
|
||||
<img src="$CFG->pixpath/t/arrow_left.gif" width="10" height="10" alt="enter" onclick="ctags_setKeywords()" />
|
||||
<img src="$arrowright" width="10" height="10" alt="enter" onclick="ctags_setKeywords()" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,11 +41,11 @@
|
||||
print_box_start('generalbox icons');
|
||||
if ($course->guest) {
|
||||
$strallowguests = get_string('allowguests');
|
||||
echo "<div><img alt=\"\" class=\"icon guest\" src=\"$CFG->pixpath/i/guest.gif\" /> $strallowguests</div>";
|
||||
echo "<div><img alt=\"\" class=\"icon guest\" src=\"" . $OUTPUT->old_icon_url('i/guest') . "\" /> $strallowguests</div>";
|
||||
}
|
||||
if ($course->password) {
|
||||
$strrequireskey = get_string('requireskey');
|
||||
echo "<div><img alt=\"\" class=\"icon key\" src=\"$CFG->pixpath/i/key.gif\" /> $strrequireskey</div>";
|
||||
echo "<div><img alt=\"\" class=\"icon key\" src=\"" . $OUTPUT->old_icon_url('i/key') . "\" /> $strrequireskey</div>";
|
||||
}
|
||||
print_box_end();
|
||||
}
|
||||
|
@ -150,8 +150,8 @@ foreach ($files as $file) {
|
||||
$dirname = explode('/', trim($filepath, '/'));
|
||||
$dirname = array_pop($dirname);
|
||||
echo '<div class="folder">';
|
||||
echo "<a href=\"draftfiles.php?itemid=$itemid&filepath=$filepath&subdirs=$subdirs&maxbytes=$maxbytes\"><img src=\"$CFG->pixpath/f/folder.gif\" class=\"icon\" alt=\"$strfolder\" /> ".s($dirname)."</a> ";
|
||||
echo "<a href=\"draftfiles.php?itemid=$itemid&filepath=$filepath&delete=$filenameurl&subdirs=$subdirs&maxbytes=$maxbytes\"><img src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a>";
|
||||
echo "<a href=\"draftfiles.php?itemid=$itemid&filepath=$filepath&subdirs=$subdirs&maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->old_icon_url('f/folder') . "\" class=\"icon\" alt=\"$strfolder\" /> ".s($dirname)."</a> ";
|
||||
echo "<a href=\"draftfiles.php?itemid=$itemid&filepath=$filepath&delete=$filenameurl&subdirs=$subdirs&maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>";
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ foreach ($files as $file) {
|
||||
$viewurl = file_encode_url("$CFG->wwwroot/draftfile.php", "/$contextid/user_draft/$itemid".$filepath.$filename, false, false);
|
||||
echo '<div class="file">';
|
||||
echo "<a href=\"$viewurl\"><img src=\"$CFG->pixpath/f/$icon\" class=\"icon\" alt=\"$strfile\" /> ".s($filename)." ($filesize)</a> ";
|
||||
echo "<a href=\"draftfiles.php?itemid=$itemid&filepath=$filepath&delete=$filenameurl&subdirs=$subdirs&maxbytes=$maxbytes\"><img src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a>";;
|
||||
echo "<a href=\"draftfiles.php?itemid=$itemid&filepath=$filepath&delete=$filenameurl&subdirs=$subdirs&maxbytes=$maxbytes\"><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>";;
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
@ -283,11 +283,11 @@ function displaydir($file_info) {
|
||||
|
||||
echo "<tr class=\"folder\">";
|
||||
print_cell();
|
||||
print_cell("left", "<a href=\"index.php?$params\"><img src=\"$CFG->pixpath/f/folder.gif\" class=\"icon\" alt=\"$strfolder\" /> ".s($filename)."</a>", 'name');
|
||||
print_cell("left", "<a href=\"index.php?$params\"><img src=\"" . $OUTPUT->old_icon_url('f/folder') . "\" class=\"icon\" alt=\"$strfolder\" /> ".s($filename)."</a>", 'name');
|
||||
print_cell("right", $filesize, 'size');
|
||||
print_cell("right", $filedate, 'date');
|
||||
if ($parentwritable) {
|
||||
print_cell("right", "<a href=\"index.php?$params&sesskey=".sesskey()."&delete=1\"><img src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a>", 'command');
|
||||
print_cell("right", "<a href=\"index.php?$params&sesskey=".sesskey()."&delete=1\"><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>", 'command');
|
||||
} else {
|
||||
print_cell();
|
||||
}
|
||||
@ -297,14 +297,14 @@ function displaydir($file_info) {
|
||||
|
||||
$icon = mimeinfo_from_type("icon", $mimetype);
|
||||
if ($downloadurl = $child_info->get_url(true)) {
|
||||
$downloadurl = " <a href=\"$downloadurl\" title=\"" . get_string('downloadfile') . "\"><img src=\"$CFG->pixpath/t/down.gif\" class=\"iconsmall\" alt=\"$strdownload\" /></a>";
|
||||
$downloadurl = " <a href=\"$downloadurl\" title=\"" . get_string('downloadfile') . "\"><img src=\"" . $OUTPUT->old_icon_url('t/down') . "\" class=\"iconsmall\" alt=\"$strdownload\" /></a>";
|
||||
} else {
|
||||
$downloadurl = '';
|
||||
}
|
||||
|
||||
if ($viewurl = $child_info->get_url()) {
|
||||
$viewurl = " ".link_to_popup_window ($viewurl, "display",
|
||||
"<img src=\"$CFG->pixpath/t/preview.gif\" class=\"iconsmall\" alt=\"$strfile\" /> ",
|
||||
"<img src=\"" . $OUTPUT->old_icon_url('t/preview') . "\" class=\"iconsmall\" alt=\"$strfile\" /> ",
|
||||
480, 640, get_string('viewfileinpopup'), null, true);
|
||||
} else {
|
||||
$viewurl = '';
|
||||
@ -318,7 +318,7 @@ function displaydir($file_info) {
|
||||
print_cell("right", $filesize, 'size');
|
||||
print_cell("right", $filedate, 'date');
|
||||
if ($parentwritable) {
|
||||
print_cell("right", "<a href=\"index.php?$params&sesskey=".sesskey()."&delete=1\"><img src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a>", 'command');
|
||||
print_cell("right", "<a href=\"index.php?$params&sesskey=".sesskey()."&delete=1\"><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a>", 'command');
|
||||
} else {
|
||||
print_cell();
|
||||
}
|
||||
|
@ -170,10 +170,10 @@ if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) {
|
||||
|
||||
$buttons = "";
|
||||
$buttons .= "<a title=\"$stredit\" href=\"edit.php?courseid=$courseid&id=$outcome->id\"><img".
|
||||
" src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
if ($outcome->can_delete()) {
|
||||
$buttons .= "<a title=\"$strdelete\" href=\"index.php?id=$courseid&outcomeid=$outcome->id&action=delete&sesskey=".sesskey()."\"><img".
|
||||
" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
}
|
||||
$line[] = $buttons;
|
||||
|
||||
@ -225,11 +225,11 @@ if ($outcomes = grade_outcome::fetch_all_global()) {
|
||||
$buttons = "";
|
||||
if (has_capability('moodle/grade:manage', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
$buttons .= "<a title=\"$stredit\" href=\"edit.php?courseid=$courseid&id=$outcome->id\"><img".
|
||||
" src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
}
|
||||
if (has_capability('moodle/grade:manage', get_context_instance(CONTEXT_SYSTEM)) and $outcome->can_delete()) {
|
||||
$buttons .= "<a title=\"$strdelete\" href=\"index.php?id=$courseid&outcomeid=$outcome->id&action=delete&sesskey=".sesskey()."\"><img".
|
||||
" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
}
|
||||
$line[] = $buttons;
|
||||
|
||||
|
@ -103,10 +103,10 @@ if ($courseid and $scales = grade_scale::fetch_all_local($courseid)) {
|
||||
|
||||
$buttons = "";
|
||||
$buttons .= "<a title=\"$stredit\" href=\"edit.php?courseid=$courseid&id=$scale->id\"><img".
|
||||
" src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
if (!$used) {
|
||||
$buttons .= "<a title=\"$strdelete\" href=\"index.php?id=$courseid&scaleid=$scale->id&action=delete&sesskey=".sesskey()."\"><img".
|
||||
" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
}
|
||||
$line[] = $buttons;
|
||||
$data[] = $line;
|
||||
@ -132,11 +132,11 @@ if ($scales = grade_scale::fetch_all_global()) {
|
||||
$buttons = "";
|
||||
if (has_capability('moodle/course:managescales', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
$buttons .= "<a title=\"$stredit\" href=\"edit.php?courseid=$courseid&id=$scale->id\"><img".
|
||||
" src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
}
|
||||
if (!$used and has_capability('moodle/course:managescales', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
$buttons .= "<a title=\"$strdelete\" href=\"index.php?id=$courseid&scaleid=$scale->id&action=delete&sesskey=".sesskey()."\"><img".
|
||||
" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
}
|
||||
$line[] = $buttons;
|
||||
$data[] = $line;
|
||||
|
@ -52,9 +52,9 @@ if ($keys) {
|
||||
$line[2] = empty($key->validuntil) ? get_string('always') : userdate($key->validuntil);
|
||||
|
||||
$buttons = "<a title=\"$stredit\" href=\"key.php?id=$key->id\"><img".
|
||||
" src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
$buttons .= "<a title=\"$strdelete\" href=\"key.php?id=$key->id&delete=1\"><img".
|
||||
" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
|
||||
$line[3] = $buttons;
|
||||
$data[] = $line;
|
||||
|
@ -52,9 +52,9 @@ if ($keys = $DB->get_records_select('user_private_key', "script='grade/import' A
|
||||
$line[2] = empty($key->validuntil) ? get_string('always') : userdate($key->validuntil);
|
||||
|
||||
$buttons = "<a title=\"$stredit\" href=\"key.php?id=$key->id\"><img".
|
||||
" src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
$buttons .= "<a title=\"$strdelete\" href=\"key.php?id=$key->id&delete=1\"><img".
|
||||
" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
|
||||
$line[3] = $buttons;
|
||||
$data[] = $line;
|
||||
|
@ -57,11 +57,11 @@ if ($groupings = $DB->get_records('groupings', array('courseid'=>$course->id), '
|
||||
$line[2] = $DB->count_records('course_modules', array('course'=>$course->id, 'groupingid'=>$grouping->id));
|
||||
|
||||
$buttons = "<a title=\"$stredit\" href=\"grouping.php?id=$grouping->id\"><img".
|
||||
" src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
|
||||
$buttons .= "<a title=\"$strdelete\" href=\"grouping.php?id=$grouping->id&delete=1\"><img".
|
||||
" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
|
||||
$buttons .= "<a title=\"$strmanagegrping\" href=\"assign.php?id=$grouping->id\"><img".
|
||||
" src=\"$CFG->pixpath/i/group.gif\" class=\"icon\" alt=\"$strmanagegrping\" /></a> ";
|
||||
" src=\"" . $OUTPUT->old_icon_url('i/group') . "\" class=\"icon\" alt=\"$strmanagegrping\" /></a> ";
|
||||
|
||||
$line[3] = $buttons;
|
||||
$data[] = $line;
|
||||
|
@ -162,7 +162,7 @@
|
||||
if ($editing) {
|
||||
$streditsummary = get_string('editsummary');
|
||||
echo "<a title=\"$streditsummary\" ".
|
||||
" href=\"course/editsection.php?id=$section->id\"><img src=\"$CFG->pixpath/t/edit.gif\" ".
|
||||
" href=\"course/editsection.php?id=$section->id\"><img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" ".
|
||||
" class=\"iconsmall\" alt=\"$streditsummary\" /></a><br /><br />";
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element {
|
||||
}
|
||||
|
||||
function _get_draftfiles($draftid, $suffix) {
|
||||
global $USER, $CFG;
|
||||
global $USER, $OUTPUT;
|
||||
$html = '';
|
||||
if (!$context = get_context_instance(CONTEXT_USER, $USER->id)) {
|
||||
}
|
||||
@ -121,8 +121,8 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element {
|
||||
$icon = mimeinfo_from_type('icon', $mimetype);
|
||||
$viewurl = file_encode_url("$CFG->wwwroot/draftfile.php", "/$contextid/user_draft/$draftid".$filepath.$filename, false, false);
|
||||
$html .= '<li>';
|
||||
$html .= "<a href=\"$viewurl\"><img src=\"$CFG->pixpath/f/$icon\" class=\"icon\" /> ".s($filename)." ($filesize)</a> ";
|
||||
$html .= "<a href=\"###\" onclick='rm_file(".$file->get_itemid().", \"".$filename."\", this)'><img src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" /></a>";;
|
||||
$html .= "<a href=\"$viewurl\"><img src=\"" . $OUTPUT->old_icon_url('f/' . $icon) . "\" class=\"icon\" /> ".s($filename)." ($filesize)</a> ";
|
||||
$html .= "<a href=\"###\" onclick='rm_file(".$file->get_itemid().", \"".$filename."\", this)'><img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" /></a>";;
|
||||
$html .= '</li>';
|
||||
}
|
||||
$html .= '</ul>';
|
||||
|
@ -382,7 +382,7 @@ class theme_config {
|
||||
* @return string the URL for that icon.
|
||||
*/
|
||||
public function old_icon_url($iconname) {
|
||||
return $this->if->old_icon_url($iconname);
|
||||
return $this->get_icon_finder()->old_icon_url($iconname);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -396,7 +396,7 @@ class theme_config {
|
||||
* @return string the URL for that icon.
|
||||
*/
|
||||
public function mod_icon_url($iconname, $module) {
|
||||
return $this->if->mod_icon_url($iconname, $module);
|
||||
return $this->get_icon_finder()->mod_icon_url($iconname, $module);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -902,7 +902,7 @@ function glossary_print_entry_aliases($course, $cm, $glossary, $entry,$mode='',
|
||||
* @return string|void
|
||||
*/
|
||||
function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$hook='', $type = 'print') {
|
||||
global $USER, $CFG, $DB;
|
||||
global $USER, $CFG, $DB, $OUTPUT;
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
@ -940,7 +940,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
|
||||
if ( $entry->sourceglossaryid ) {
|
||||
$icon = "minus.gif"; // graphical metaphor (minus) for deleting an imported entry
|
||||
} else {
|
||||
$icon = "$CFG->pixpath/t/delete.gif";
|
||||
$icon = $OUTPUT->old_icon_url('t/delete');
|
||||
}
|
||||
|
||||
//Decide if an entry is editable:
|
||||
@ -953,7 +953,7 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
|
||||
$return .= $icon;
|
||||
$return .= "\" class=\"iconsmall\" alt=\"" . get_string("delete") .$altsuffix."\" /></a> ";
|
||||
|
||||
$return .= " <a title=\"" . get_string("edit") . "\" href=\"edit.php?cmid=$cm->id&id=$entry->id&mode=$mode&hook=".urlencode($hook)."\"><img src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"" . get_string("edit") .$altsuffix. "\" /></a>";
|
||||
$return .= " <a title=\"" . get_string("edit") . "\" href=\"edit.php?cmid=$cm->id&id=$entry->id&mode=$mode&hook=".urlencode($hook)."\"><img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"" . get_string("edit") .$altsuffix. "\" /></a>";
|
||||
} elseif ( $importedentry ) {
|
||||
$return .= " <font size=\"-1\">" . get_string("exportedentry","glossary") . "</font>";
|
||||
}
|
||||
@ -1720,7 +1720,7 @@ function glossary_sort_entries ( $entry0, $entry1 ) {
|
||||
* @param object $comment
|
||||
*/
|
||||
function glossary_print_comment($course, $cm, $glossary, $entry, $comment) {
|
||||
global $CFG, $USER, $DB;
|
||||
global $CFG, $USER, $DB, $OUTPUT;
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
@ -1757,11 +1757,11 @@ function glossary_print_comment($course, $cm, $glossary, $entry, $comment) {
|
||||
$ineditperiod = ((time() - $comment->timemodified < $CFG->maxeditingtime) || $glossary->editalways);
|
||||
if ( ($glossary->allowcomments && $ineditperiod && $USER->id == $comment->userid) || has_capability('mod/glossary:managecomments', $context)) {
|
||||
echo "<a href=\"comment.php?id=$comment->id&action=edit\"><img
|
||||
alt=\"" . get_string("edit") . "\" src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" /></a> ";
|
||||
alt=\"" . get_string("edit") . "\" src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" /></a> ";
|
||||
}
|
||||
if ( ($glossary->allowcomments && $USER->id == $comment->userid) || has_capability('mod/glossary:managecomments', $context) ) {
|
||||
echo "<a href=\"comment.php?id=$comment->id&action=delete\"><img
|
||||
alt=\"" . get_string("delete") . "\" src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" /></a>";
|
||||
alt=\"" . get_string("delete") . "\" src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" /></a>";
|
||||
}
|
||||
|
||||
echo '</div></td></tr>';
|
||||
|
@ -469,7 +469,7 @@ function lesson_print_time_remaining($starttime, $maxtime, $return = false) {
|
||||
* @return mixed boolean/string
|
||||
**/
|
||||
function lesson_print_page_actions($cmid, $page, $printmove, $printaddpage = false, $return = false) {
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cmid);
|
||||
$actions = array();
|
||||
@ -477,16 +477,16 @@ function lesson_print_page_actions($cmid, $page, $printmove, $printaddpage = fal
|
||||
if (has_capability('mod/lesson:edit', $context)) {
|
||||
if ($printmove) {
|
||||
$actions[] = "<a title=\"".get_string('move')."\" href=\"$CFG->wwwroot/mod/lesson/lesson.php?id=$cmid&action=move&pageid=$page->id\">
|
||||
<img src=\"$CFG->pixpath/t/move.gif\" class=\"iconsmall\" alt=\"".get_string('move')."\" /></a>\n";
|
||||
<img src=\"" . $OUTPUT->old_icon_url('t/move') . "\" class=\"iconsmall\" alt=\"".get_string('move')."\" /></a>\n";
|
||||
}
|
||||
$actions[] = "<a title=\"".get_string('update')."\" href=\"$CFG->wwwroot/mod/lesson/lesson.php?id=$cmid&action=editpage&pageid=$page->id\">
|
||||
<img src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"".get_string('update')."\" /></a>\n";
|
||||
<img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"".get_string('update')."\" /></a>\n";
|
||||
|
||||
$actions[] = "<a title=\"".get_string('preview')."\" href=\"$CFG->wwwroot/mod/lesson/view.php?id=$cmid&pageid=$page->id\">
|
||||
<img src=\"$CFG->pixpath/t/preview.gif\" class=\"iconsmall\" alt=\"".get_string('preview')."\" /></a>\n";
|
||||
<img src=\"" . $OUTPUT->old_icon_url('t/preview') . "\" class=\"iconsmall\" alt=\"".get_string('preview')."\" /></a>\n";
|
||||
|
||||
$actions[] = "<a title=\"".get_string('delete')."\" href=\"$CFG->wwwroot/mod/lesson/lesson.php?id=$cmid&sesskey=".sesskey()."&action=confirmdelete&pageid=$page->id\">
|
||||
<img src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"".get_string('delete')."\" /></a>\n";
|
||||
<img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" class=\"iconsmall\" alt=\"".get_string('delete')."\" /></a>\n";
|
||||
|
||||
if ($printaddpage) {
|
||||
// Add page drop-down
|
||||
|
@ -285,7 +285,7 @@ function quiz_move_question_down($layout, $questionid) {
|
||||
function quiz_print_question_list($quiz, $pageurl, $allowdelete = true,
|
||||
$reordertool = false, $quiz_qbanktool = false,
|
||||
$hasattempts = false) {
|
||||
global $USER, $CFG, $QTYPES, $DB;
|
||||
global $USER, $CFG, $QTYPES, $DB, $OUTPUT;
|
||||
$strorder = get_string('order');
|
||||
$strquestionname = get_string('questionname', 'quiz');
|
||||
$strgrade = get_string('grade');
|
||||
@ -492,7 +492,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete = true,
|
||||
}
|
||||
echo "<a title=\"$strmoveup\" href=\"" .
|
||||
$pageurl->out_action(array('up' => $question->id)) . "\"><img
|
||||
src=\"$CFG->pixpath/t/up.gif\" class=\"iconsmall
|
||||
src=\"" . $OUTPUT->old_icon_url('t/up') . "\" class=\"iconsmall
|
||||
$upbuttonclass\" alt=\"$strmoveup\" /></a>";
|
||||
}
|
||||
|
||||
@ -501,7 +501,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete = true,
|
||||
if (!$hasattempts) {
|
||||
echo "<a title=\"$strmovedown\" href=\"" .
|
||||
$pageurl->out_action(array('down' => $question->id)) . "\"><img
|
||||
src=\"$CFG->pixpath/t/down.gif\" class=\"iconsmall\"" .
|
||||
src=\"" . $OUTPUT->old_icon_url('t/down') . "\" class=\"iconsmall\"" .
|
||||
" alt=\"$strmovedown\" /></a>";
|
||||
}
|
||||
}
|
||||
@ -510,7 +510,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete = true,
|
||||
if (!$hasattempts) {
|
||||
echo "<a title=\"$strremove\" href=\"" .
|
||||
$pageurl->out_action(array('remove' => $question->id)) . "\">
|
||||
<img src=\"$CFG->pixpath/t/delete.gif\" " .
|
||||
<img src=\"" . $OUTPUT->old_icon_url('t/delete') . "\" " .
|
||||
"class=\"iconsmall\" alt=\"$strremove\" /></a>";
|
||||
}
|
||||
}
|
||||
|
@ -834,7 +834,7 @@ function quiz_question_edit_button($cmid, $question, $returnurl, $contentbeforei
|
||||
* @return the HTML for a preview question icon.
|
||||
*/
|
||||
function quiz_question_preview_button($quiz, $question, $label = false) {
|
||||
global $CFG, $COURSE;
|
||||
global $CFG, $COURSE, $OUTPUT;
|
||||
if (!question_has_capability_on($question, 'use', $question->category)) {
|
||||
return '';
|
||||
}
|
||||
@ -855,7 +855,7 @@ function quiz_question_preview_button($quiz, $question, $label = false) {
|
||||
|
||||
// Build the icon.
|
||||
return link_to_popup_window('/question/preview.php?id=' . $question->id . '&quizid=' . $quiz->id, 'questionpreview',
|
||||
"<img src=\"$CFG->pixpath/t/preview.gif\" class=\"iconsmall\" alt=\"$strpreviewquestion\" /> $strpreviewlabel",
|
||||
"<img src=\"" . $OUTPUT->old_icon_url('t/preview') . "\" class=\"iconsmall\" alt=\"$strpreviewquestion\" /> $strpreviewlabel",
|
||||
0, 0, $strpreviewquestion, QUESTION_PREVIEW_POPUP_OPTIONS, true);
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,10 @@ if (has_capability('mod/quiz:viewreports', $context)) {
|
||||
}
|
||||
if (has_capability('mod/quiz:preview', $context)) {
|
||||
$strpreview = get_string('preview', 'quiz');
|
||||
$row[] = new tabobject('preview', "$CFG->wwwroot/mod/quiz/startattempt.php?cmid=$cm->id&sesskey=" . sesskey(), "<img src=\"$CFG->pixpath/t/preview.gif\" class=\"iconsmall\" alt=\"$strpreview\" /> $strpreview", $strpreview);
|
||||
$row[] = new tabobject('preview', "$CFG->wwwroot/mod/quiz/startattempt.php?cmid=$cm->id&sesskey=" . sesskey(), "<img src=\"" . $OUTPUT->old_icon_url('t/preview') . "\" class=\"iconsmall\" alt=\"$strpreview\" /> $strpreview", $strpreview);
|
||||
}
|
||||
if (has_capability('mod/quiz:manage', $context)) {
|
||||
$row[] = new tabobject('edit', "$CFG->wwwroot/mod/quiz/edit.php?cmid=$cm->id", "<img src=\"$CFG->pixpath/t/edit.gif\" class=\"iconsmall\" alt=\"$stredit\" /> $stredit",$stredit);
|
||||
$row[] = new tabobject('edit', "$CFG->wwwroot/mod/quiz/edit.php?cmid=$cm->id", "<img src=\"" . $OUTPUT->old_icon_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /> $stredit",$stredit);
|
||||
}
|
||||
|
||||
if ($currenttab == 'info' && count($row) == 1) {
|
||||
|
@ -277,8 +277,8 @@ class embedded_cloze_qtype extends default_questiontype {
|
||||
}
|
||||
|
||||
function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options) {
|
||||
global $QTYPES, $CFG, $USER, $OUTPUT;
|
||||
|
||||
global $QTYPES, $CFG, $USER;
|
||||
$readonly = empty($options->readonly) ? '' : 'readonly="readonly"';
|
||||
$disabled = empty($options->readonly) ? '' : 'disabled="disabled"';
|
||||
$formatoptions = new stdClass;
|
||||
@ -456,7 +456,7 @@ class embedded_cloze_qtype extends default_questiontype {
|
||||
echo "<input $style $readonly $popup name=\"$inputname\"";
|
||||
echo " type=\"text\" value=\"".s($response)."\" ".$styleinfo." /> ";
|
||||
if (!empty($feedback) && !empty($USER->screenreader)) {
|
||||
echo "<img src=\"$CFG->pixpath/i/feedback.gif\" alt=\"$feedback\" />";
|
||||
echo "<img src=\"" . $OUTPUT->old_icon_url('i/feedback') . "\" alt=\"$feedback\" />";
|
||||
}
|
||||
echo $feedbackimg;
|
||||
break;
|
||||
@ -483,7 +483,7 @@ class embedded_cloze_qtype extends default_questiontype {
|
||||
echo $outputoptions;
|
||||
echo '</select></span>';
|
||||
if (!empty($feedback) && !empty($USER->screenreader)) {
|
||||
echo "<img src=\"$CFG->pixpath/i/feedback.gif\" alt=\"$feedback\" />";
|
||||
echo "<img src=\"" . $OUTPUT->old_icon_url('i/feedback') . "\" alt=\"$feedback\" />";
|
||||
}
|
||||
echo $feedbackimg;
|
||||
}else if ($wrapped->options->layout == 1 || $wrapped->options->layout == 2){
|
||||
|
@ -141,7 +141,7 @@ print_header_simple($title, '', $nav, '', '', false);
|
||||
</div>
|
||||
<div class="coursetag_edit_input3" id="coursetag_sug_btn">
|
||||
<a title="$arrowtitle">
|
||||
<img src="$CFG->pixpath/t/arrow_left.gif" width="10" height="10" alt="enter" onclick="ctags_setKeywords()" />
|
||||
<img src="" . $OUTPUT->old_icon_url('t/arrow_left') . "" width="10" height="10" alt="enter" onclick="ctags_setKeywords()" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user