From: tjhunt Date: Thu, 2 Jul 2009 10:53:31 +0000 (+0000) Subject: MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6b608f8f50672cd4cfc7ca60def9abfa754673d5;p=moodle.git MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url --- diff --git a/admin/blocks.php b/admin/blocks.php index aa5a0c3078..a34f89079b 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -182,10 +182,10 @@ if ($blocks[$blockid]->visible) { $visible = ''. - ''.$strhide.''; + ''.$strhide.''; } else { $visible = ''. - ''.$strshow.''; + ''.$strshow.''; $class = ' class="dimmed_text"'; // Leading space required! } if ($blockobject->instance_allow_multiple()) { diff --git a/admin/lang.php b/admin/lang.php index 1a5c68a32b..c6142f6601 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -608,9 +608,9 @@ if (LANG_DISPLAY_MISSING_LINKS) { $missingtarget = ''; $missingnext = ''. - ''.$strnext.''; + ''.$strnext.''; $missingprev = ''. - ''.$strprev.''; + ''.$strprev.''; } } else { // the string is translated in the pack being processed @@ -621,9 +621,9 @@ if (LANG_DISPLAY_MISSING_LINKS) { $missingtarget = ''; $missingnext = ''. - ''.$strnext.''; + ''.$strnext.''; $missingprev = ''. - ''.$strprev.''; + ''.$strprev.''; } } } diff --git a/admin/roles/usersroles.php b/admin/roles/usersroles.php index 2859e7a77c..60c7290c7d 100644 --- a/admin/roles/usersroles.php +++ b/admin/roles/usersroles.php @@ -159,7 +159,7 @@ print_box_end(); print_footer($course); function print_report_tree($contextid, $contexts, $systemcontext, $fullname) { - global $CFG; + global $CFG, $OUTPUT; // Only compute lang strings, etc once. static $stredit = null, $strcheckpermissions, $globalroleassigner, $assignurl, $checkurl; @@ -207,9 +207,9 @@ function print_report_tree($contextid, $contexts, $systemcontext, $fullname) { $strcheck = get_string('checkuserspermissionshere', 'role', $a); } echo ' ' . $stredit . ' '; + $OUTPUT->old_icon_url('t/edit') . '" alt="' . $stredit . '" /> '; echo ' ' . $strcheckpermissions . ' '; + $OUTPUT->old_icon_url('t/preview') . '" alt="' . $strcheckpermissions . '" /> '; echo "

\n"; } } diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index 5432733a98..9b0cddfc93 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -7,7 +7,7 @@ class block_admin extends block_list { } function get_content() { - global $CFG, $USER, $DB; + global $CFG, $USER, $DB, $OUTPUT; if ($this->content !== NULL) { return $this->content; @@ -33,7 +33,7 @@ class block_admin extends block_list { /// Course editing on/off if ($course->id !== SITEID and has_capability('moodle/course:update', $context)) { - $this->content->icons[]=''; + $this->content->icons[]=''; if ($this->page->user_is_editing()) { $this->content->items[]=''.get_string('turneditingoff').''; } else { @@ -41,17 +41,17 @@ class block_admin extends block_list { } $this->content->items[]=''.get_string('settings').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Assign roles to the course if ($course->id != SITEID) { if (has_capability('moodle/role:assign', $context)) { $this->content->items[]=''.get_string('assignroles', 'role').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } else if (get_overridable_roles($context, ROLENAME_ORIGINAL)) { $this->content->items[]=''.get_string('overridepermissions', 'role').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } } @@ -76,7 +76,7 @@ class block_admin extends block_list { if ($reportavailable) { $this->content->items[]=''.get_string('grades').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } } @@ -84,7 +84,7 @@ class block_admin extends block_list { if (!empty($CFG->enableoutcomes)) { if ($course->id!==SITEID and has_capability('moodle/course:update', $context)) { $this->content->items[]=''.get_string('outcomes', 'grades').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } } @@ -93,11 +93,11 @@ class block_admin extends block_list { if (has_capability('moodle/course:managemetacourse', $context)) { $strchildcourses = get_string('childcourses'); $this->content->items[]=''.$strchildcourses.''; - $this->content->icons[]=''; + $this->content->icons[]=''; } else if (has_capability('moodle/role:assign', $context)) { $strchildcourses = get_string('childcourses'); $this->content->items[]=''.$strchildcourses.''; - $this->content->icons[]=''; + $this->content->icons[]=''; } } @@ -106,37 +106,37 @@ class block_admin extends block_list { if (($course->id!==SITEID) && ($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $context)) { $strgroups = get_string('groups'); $this->content->items[]=''.$strgroups.''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Backup this course if ($course->id!==SITEID and has_capability('moodle/site:backup', $context)) { $this->content->items[]=''.get_string('backup').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Restore to this course if ($course->id !== SITEID and has_capability('moodle/site:restore', $context)) { $this->content->items[]=''.get_string('restore').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Import data from other courses if ($course->id !== SITEID and has_capability('moodle/site:import', $context)) { $this->content->items[]=''.get_string('import').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Reset this course if ($course->id!==SITEID and has_capability('moodle/course:reset', $context)) { $this->content->items[]=''.get_string('reset').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// View course reports if ($course->id !== SITEID and has_capability('moodle/site:viewreports', $context)) { // basic capability for listing of reports $this->content->items[]=''.get_string('reports').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Manage questions @@ -162,7 +162,7 @@ class block_admin extends block_list { if ($questionlink) { $this->content->items[]=''.get_string('questions', 'quiz').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } } @@ -171,13 +171,13 @@ class block_admin extends block_list { $editabletypes = repository::get_editable_types($context); if ($course->id !== SITEID && has_capability('moodle/course:update', $context) && !empty($editabletypes)) { $this->content->items[]=''.get_string('repositories').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Manage files if ($course->id !== SITEID and has_capability('moodle/course:managefiles', $context)) { $this->content->items[]=''.get_string('files').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Authorize hooks @@ -190,24 +190,24 @@ class block_admin extends block_list { } } $this->content->items[] = $paymenturl; - $this->content->icons[] = ''; + $this->content->icons[] = ''; } /// Unenrol link if (empty($course->metacourse) && ($course->id!==SITEID)) { if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now $this->content->items[]=''.get_string('enrolme', '', format_string($course->shortname)).''; - $this->content->icons[]=''; + $this->content->icons[]=''; } else if (has_capability('moodle/role:unassignself', $context, NULL, false) and get_user_roles($context, $USER->id, false)) { // Have some role $this->content->items[]=''.get_string('unenrolme', '', format_string($course->shortname)).''; - $this->content->icons[]=''; + $this->content->icons[]=''; } } /// Link to the user own profile (except guests) if (!isguestuser() and isloggedin()) { $this->content->items[]=''.get_string('profile').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } return $this->content; diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php index 79551eb24a..c6aee6266e 100644 --- a/blocks/admin_tree/block_admin_tree.php +++ b/blocks/admin_tree/block_admin_tree.php @@ -33,11 +33,11 @@ class block_admin_tree extends block_base { } function open_folder($visiblename) { - global $CFG; + global $OUTPUT; $strfolderopened = s(get_string('folderopened')); $this->tempcontent .= '
'; - $this->tempcontent .= ''.$strfolderopened.' '; + $this->tempcontent .= ''.$strfolderopened.' '; $this->tempcontent .= $visiblename.'
'."\n"; $this->currentdepth++; $this->divcounter++; @@ -55,7 +55,7 @@ class block_admin_tree extends block_base { } function build_tree (&$content) { - global $CFG; + global $CFG, $OUTPUT; if ($content instanceof admin_settingpage) { // show hidden pages in tree if hidden page active if ($content->check_access() and (($content->name == $this->section) or !$content->is_hidden())) { @@ -63,7 +63,7 @@ class block_admin_tree extends block_base { if ($content->is_hidden()) { $class .= ' hidden'; } - $this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$CFG->pixpath.'/i/item.gif', $class); + $this->create_item($content->visiblename, $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section='.$content->name,$OUTPUT->old_icon_url('i/item'), $class); } } else if ($content instanceof admin_externalpage) { // show hidden pages in tree if hidden page active @@ -77,7 +77,7 @@ class block_admin_tree extends block_base { if ($content->is_hidden()) { $class .= ' hidden'; } - $this->create_item($content->visiblename, $content->url, $CFG->pixpath.'/i/item.gif', $class); + $this->create_item($content->visiblename, $content->url, $OUTPUT->old_icon_url('i/item'), $class); } } else if ($content instanceof admin_category) { if ($content->check_access() and !$content->is_hidden()) { diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index c3f6612704..1099800cff 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -109,14 +109,14 @@ class block_course_list extends block_list { } function get_remote_courses() { - global $CFG, $USER; + global $CFG, $USER, $OUTPUT; if (!is_enabled_auth('mnet')) { // no need to query anything remote related return; } - $icon = ''.get_string('course').''; + $icon = ''.get_string('course').''; // only for logged in users! if (!isloggedin() || isguest()) { diff --git a/blocks/loancalc/block_loancalc.php b/blocks/loancalc/block_loancalc.php index 7018725e74..95f28e9c88 100644 --- a/blocks/loancalc/block_loancalc.php +++ b/blocks/loancalc/block_loancalc.php @@ -9,9 +9,9 @@ class block_loancalc extends block_base { } function get_content() { - global $CFG; + global $CFG, $OUTPUT; - $calc = $CFG->pixpath.'/i/calc.gif'; + $calc = $OUTPUT->old_icon_url('i/calc'); $this->content->text = '