Moodle

Review the language files, and fix all the places we are using < and > as arrows in language strings

Details

  • Type: Task Task
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0.8
  • Component/s: Accessibility, Language
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

This is bad for screen-reader users.

If I can find an effective regex, and I can be bothered, I might go beyond the quiz.

Issue Links

Activity

Hide
Tim Hunt added a comment -

We seem to be OK on <. I checked with the regexp

<(?!?[pP][hH][pP])(?!.*>)

which finds unmatched < that are not part of an open PHP tag. There are about a dozen in the lang files, all of which are HTML tags in help files wrapped over two lines, except for string addrandom1 in quiz.php, which is no longer used anywhere.

Show
Tim Hunt added a comment - We seem to be OK on <. I checked with the regexp <(?!?[pP][hH][pP])(?!.*>) which finds unmatched < that are not part of an open PHP tag. There are about a dozen in the lang files, all of which are HTML tags in help files wrapped over two lines, except for string addrandom1 in quiz.php, which is no longer used anywhere.
Hide
Tim Hunt added a comment -

There are bad > characters in

admin.php string importlangreminder
editor.php string cutpastemozilla
enrol_authroize.php strings logindesc,

They should be replaced by $THEME->rarrow, after calling check_theme_arrows(). This is an accessibility thing.

The quiz string Move to >> is no longer used anywhere.

I have fixed the one genuine occurrence in quiz.php.

Show
Tim Hunt added a comment - There are bad > characters in admin.php string importlangreminder editor.php string cutpastemozilla enrol_authroize.php strings logindesc, They should be replaced by $THEME->rarrow, after calling check_theme_arrows(). This is an accessibility thing. The quiz string Move to >> is no longer used anywhere. I have fixed the one genuine occurrence in quiz.php.
Hide
Tim Hunt added a comment -

Reassigning, to let the people who maintain those bits of the code fix the remaining occurrences.

Show
Tim Hunt added a comment - Reassigning, to let the people who maintain those bits of the code fix the remaining occurrences.
Hide
Olli Savolainen added a comment - - edited

Tim, in revision 1.73 you seem to have added the following in /mod/quiz/editlib.php, around line 831:

$a = new stdClass;
$a->catname = '<strong>' . $category->name . '</strong>';
$a->arrow = $THEME->rarrow;
echo get_string('addnewquestionsqbank','quiz', $a);

This seems to cause the following in function get_string(), breaking the UI:

Catchable fatal error: Object of class stdClass could not be converted to string in /home/olli/workspace/moodle2cvs/lib/moodlelib.php(5435) : eval()'d code on line 1

I am not familiar with this way of using get_string, so I don't know how to fix it.

Show
Olli Savolainen added a comment - - edited Tim, in revision 1.73 you seem to have added the following in /mod/quiz/editlib.php, around line 831: $a = new stdClass; $a->catname = '<strong>' . $category->name . '</strong>'; $a->arrow = $THEME->rarrow; echo get_string('addnewquestionsqbank','quiz', $a); This seems to cause the following in function get_string(), breaking the UI: Catchable fatal error: Object of class stdClass could not be converted to string in /home/olli/workspace/moodle2cvs/lib/moodlelib.php(5435) : eval()'d code on line 1 I am not familiar with this way of using get_string, so I don't know how to fix it.
Hide
Tim Hunt added a comment -

Did you CVS-update everything? (In particular, including the language file) It works for me, but I did change the lang string. (Since it is a very recently introduce string, that is OK.)

Show
Tim Hunt added a comment - Did you CVS-update everything? (In particular, including the language file) It works for me, but I did change the lang string. (Since it is a very recently introduce string, that is OK.)
Hide
Olli Savolainen added a comment -

Oh, I guess it was my bad. Sorry for the disturbance.

Show
Olli Savolainen added a comment - Oh, I guess it was my bad. Sorry for the disturbance.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: