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) {
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") {
}
function get_content() {
- global $CFG, $USER, $DB;
+ global $CFG, $USER, $DB, $OUTPUT;
if($this->content !== NULL) {
return $this->content;
$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;
}
function get_content() {
- global $CFG;
+ global $CFG, $OUTPUT;
if($this->content !== NULL) {
return $this->content;
} 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 = '';
function get_content() {
- global $CFG, $SITE, $USER, $SCRIPT;
+ global $CFG, $SITE, $USER, $SCRIPT, $OUTPUT;
if (empty($CFG->usetags)) {
$this->content->text = '';
$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"
</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>
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();
}
$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>';
}
$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>';
}
}
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();
}
$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 = '';
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();
}
$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;
$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;
$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;
$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;
$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;
$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;
$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;
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 />";
}
}
function _get_draftfiles($draftid, $suffix) {
- global $USER, $CFG;
+ global $USER, $OUTPUT;
$html = '';
if (!$context = get_context_instance(CONTEXT_USER, $USER->id)) {
}
$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>';
* @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);
}
/**
* @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);
}
/**
* @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);
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:
$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>";
}
* @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);
$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>';
* @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();
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
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');
}
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>";
}
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>";
}
}
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>";
}
}
* @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 '';
}
// 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);
}
}
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) {
}
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;
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;
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){
</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>