}
if ($remote) {
echo '</select>';
- echo '<br /><input type="submit" value="'.$THEME->larrow.' '.get_string('install','admin').'" />';
+ echo '<br /><input type="submit" value="'.$OUTPUT->larrow().' '.get_string('install','admin').'" />';
}
echo '</fieldset>';
echo '</form>';
<?php
+
+//TODO: this code needs to be redesigned, see MDL-21137
+
admin_externalpage_print_header();
echo $OUTPUT->heading(get_string('themes'));
$original_theme = fullclone($THEME);
<?php
// Allows the admin to configure services for remote hosts
+die;
+//TODO: this code needs to be redesigned, see MDL-21137
+
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
</td>
<td id="buttonscell">
<div id="addcontrols">
- <input name="add" id="add" type="submit" value="<?php echo $THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
+ <input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
<?php print_collapsible_region_start('', 'assignoptions', get_string('enrolmentoptions', 'role'),
'assignoptionscollapse', true); ?>
</div>
<div id="removecontrols">
- <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').' '.$THEME->rarrow; ?>" title="<?php print_string('remove'); ?>" />
+ <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').' '.$OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" />
</div>
</td>
<td id="potentialcell">
</td>
<td id="buttonscell">
<div id="addcontrols">
- <input name="add" id="add" type="submit" value="<?php echo $THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
+ <input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
</div>
<div id="removecontrols">
- <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').' '.$THEME->rarrow; ?>" title="<?php print_string('remove'); ?>" />
+ <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').' '.$OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" />
</div>
</td>
<td id="potentialcell">
</select></td>
<td valign="top">
<p class="arrow_button">
- <input name="add" id="add" type="submit" value="<?php echo ' '.$THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
+ <input name="add" id="add" type="submit" value="<?php echo ' '.$OUTPUT->larrow().' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
<br />
- <input name="remove" id="remove" type="submit" value="<?php echo ' '.$THEME->rarrow.' '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
+ <input name="remove" id="remove" type="submit" value="<?php echo ' '.$OUTPUT->rarrow().' '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
</p>
</td>
<td valign="top">
?>
<td>
<p class="arrow_button">
- <input name="add" id="add" type="submit" value="<?php echo ' '.$THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
+ <input name="add" id="add" type="submit" value="<?php echo ' '.$OUTPUT->larrow().' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
<br />
- <input name="remove" id="remove" type="submit" value="<?php echo ' '.$THEME->rarrow.' '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
+ <input name="remove" id="remove" type="submit" value="<?php echo ' '.$OUTPUT->rarrow().' '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
</p>
</td>
<?php } ?>
<td valign="top">
<p class="arrow_button">
- <input name="add" id="add" type="submit" value="<?php echo ' '.$THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
+ <input name="add" id="add" type="submit" value="<?php echo ' '.$OUTPUT->larrow().' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
<br />
- <input name="remove" id="remove" type="submit" value="<?php echo ' '.$THEME->rarrow.' '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
+ <input name="remove" id="remove" type="submit" value="<?php echo ' '.$OUTPUT->rarrow().' '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
</p>
</td>
<td valign="top">
</td>
<td id='buttonscell'>
<p class="arrow_button">
- <input name="add" id="add" type="submit" value="<?php echo $THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
- <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').' '.$THEME->rarrow; ?>" title="<?php print_string('remove'); ?>" />
+ <input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
+ <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').' '.$OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" />
</p>
</td>
<td id='potentialcell'>
* @return string HTML code
*/
protected function render_page_layout($layoutfile) {
- global $CFG, $SITE, $THEME, $USER;
+ global $CFG, $SITE, $USER;
// The next lines are a bit tricky. The point is, here we are in a method
// of a renderer class, and this object may, or may not, be the same as
// the global $OUTPUT object. When rendering the page layout file, we want to use
public function navbar() {
return $this->page->navbar->content();
}
+
+ /**
+ * Accessibility: Right arrow-like character is
+ * used in the breadcrumb trail, course navigation menu
+ * (previous/next activity), calendar, and search forum block.
+ * If the theme does not set characters, appropriate defaults
+ * are set automatically. Please DO NOT
+ * use < > » - these are confusing for blind users.
+ * @return string
+ */
+ public function rarrow() {
+ return $this->page->theme->rarrow;
+ }
+
+ /**
+ * Accessibility: Right arrow-like character is
+ * used in the breadcrumb trail, course navigation menu
+ * (previous/next activity), calendar, and search forum block.
+ * If the theme does not set characters, appropriate defaults
+ * are set automatically. Please DO NOT
+ * use < > » - these are confusing for blind users.
+ * @return string
+ */
+ public function larrow() {
+ return $this->page->theme->larrow;
+ }
}
* @return string HTML string.
*/
function link_arrow_right($text, $url='', $accesshide=false, $addclass='') {
- global $THEME;
+ global $OUTPUT; //TODO: move to output renderer
$arrowclass = 'arrow ';
if (! $url) {
$arrowclass .= $addclass;
}
- $arrow = '<span class="'.$arrowclass.'">'.$THEME->rarrow.'</span>';
+ $arrow = '<span class="'.$arrowclass.'">'.$OUTPUT->rarrow().'</span>';
$htmltext = '';
if ($text) {
$htmltext = '<span class="arrow_text">'.$text.'</span> ';
* @return string HTML string.
*/
function link_arrow_left($text, $url='', $accesshide=false, $addclass='') {
- global $THEME;
+ global $OUTPUT; // TODO: move to utput renderer
$arrowclass = 'arrow ';
if (! $url) {
$arrowclass .= $addclass;
}
- $arrow = '<span class="'.$arrowclass.'">'.$THEME->larrow.'</span>';
+ $arrow = '<span class="'.$arrowclass.'">'.$OUTPUT->larrow().'</span>';
$htmltext = '';
if ($text) {
$htmltext = ' <span class="arrow_text">'.$text.'</span>';
* Displays button in form with checkboxes for each question.
*/
function module_specific_buttons($cmid, $cmoptions) {
- global $THEME;
+ global $OUTPUT;
if ($cmoptions->hasattempts) {
$disabled = 'disabled="disabled" ';
} else {
$disabled = '';
}
$straddtoquiz = get_string('addtoquiz', 'quiz');
- $out = '<input type="submit" name="add" value="' . $THEME->larrow . ' ' . $straddtoquiz .
+ $out = '<input type="submit" name="add" value="' . $OUTPUT->larrow() . ' ' . $straddtoquiz .
'" ' . $disabled . "/>\n";
return $out;
}
* @param boolean $quiz_qbanktool Indicate to this function if the question bank window open
*/
function quiz_print_randomquestion(&$question, &$pageurl, &$quiz, $quiz_qbanktool) {
- global $DB, $QTYPES, $THEME, $OUTPUT;
+ global $DB, $QTYPES, $OUTPUT;
echo '<div class="quiz_randomquestion">';
if (!$category = $DB->get_record('question_categories', array('id' => $question->category))) {
echo ' ' . get_string('randomfromcategory', 'quiz') . '</div>';
$a = new stdClass;
- $a->arrow = $THEME->rarrow;
+ $a->arrow = $OUTPUT->rarrow();
$strshowcategorycontents = get_string('showcategorycontents', 'quiz', $a);
$openqbankurl = $pageurl->out(false, array('qbanktool' => 1,