Moodle

Custom l_breadcrumb.gif and r_breadcrumb.gif breaks button images

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: STABLE backlog
  • Labels:
    None
  • Environment:
    Windows Server 2003 RC2, Apache 2.2.2, MySQL, PHP 5.1.4
  • Affected Branches:
    MOODLE_19_STABLE

Description

We use a custom image for the arrows in our breadcrumb trail at http://moodle.midkent.ac.uk by adding this to the config.php in the theme folder:

$THEME->rarrow = '<img src="' . $CFG->wwwroot .'/theme/midkent/pix/r_breadcrumb.gif' . '">';
$THEME->larrow = '<img src="' . $CFG->wwwroot .'/theme/midkent/pix/l_breadcrumb.gif' . '">';

This works fine, but it now breaks the Add and Remove buttons on pages like Assign Roles because it's trying to add the <img src to the value of an input. I have rectified this by hard-coding the arrow character, but I think ideally it should be another customisable image in the theme.

The button width was also restricted by the class, so I have removed that. This could have been changed, but it's probably used elsewhere.

My code now looks like this:

/admin/roles/assign.html: Line 48
<p>
<input name="add" id="add" type="submit" value="<?php echo '◄   '.get_string('add').'   '; ?>" title="<?php print_string('add'); ?>" />
<br />
<input name="remove" id="remove" type="submit" value="<?php echo '► '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
</p>

Activity

Hide
Red Morris added a comment -

I've noticed today that it also breaks the quiz editing page (mod/quiz/edit.php)

Show
Red Morris added a comment - I've noticed today that it also breaks the quiz editing page (mod/quiz/edit.php)
Hide
Eloy Lafuente (stronk7) added a comment -

Assigning to Nicolas... I think that if we need two different images/settings we should do that... or perhaps the $THEME->rarrow and larrow settings aren't supposed to support images (but chars) ? Need clarification, for sure.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Assigning to Nicolas... I think that if we need two different images/settings we should do that... or perhaps the $THEME->rarrow and larrow settings aren't supposed to support images (but chars) ? Need clarification, for sure. Ciao
Hide
Tim Hunt added a comment -

$THEME->rarrow and larrow must be characters for exactly this reason. Perhaps we should provide an alternative for use where images are an option.

Show
Tim Hunt added a comment - $THEME->rarrow and larrow must be characters for exactly this reason. Perhaps we should provide an alternative for use where images are an option.
Hide
Red Morris added a comment -

The problem for us is that the same setting applies to the navbar. As we're trying to emulate our external website in Moodle we have to use the same image.

Can we separate the two? So we have two settings (well 4 actually) in config.php. One for button characters, one for navbar seperators?

Show
Red Morris added a comment - The problem for us is that the same setting applies to the navbar. As we're trying to emulate our external website in Moodle we have to use the same image. Can we separate the two? So we have two settings (well 4 actually) in config.php. One for button characters, one for navbar seperators?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: