Issue Details (XML | Word | Printable)

Key: MDL-17335
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Tim Hunt
Reporter: Olli Savolainen
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-17284

Alphabetize lang/en_utf8/quiz.php

Created: 21/Nov/08 01:59 AM   Updated: 25/Nov/08 11:39 AM
Return to search
Issue 613 of 1966 issue(s)
<< Previous | MDL-17335 | Next >>
Component/s: Languages
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Olli Savolainen and Tim Hunt
Security Level: None
Resolved date: 23/Nov/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
By Tim's request.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Olli Savolainen added a comment - 21/Nov/08 02:08 AM
I would do it like this but I find no way of confirming this still is not screwing something up (just added the htmlspecialchars call).

ksort($string,SORT_STRING);
foreach($string as $k=>$v){
$current=str_replace("'","\'",$v);
$current=htmlspecialchars($current,ENT_NOQUOTES)
echo "$"."string['$k'] = '".$current."';\n";
}


Olli Savolainen added a comment - 24/Nov/08 06:54 PM
I had a flash in a dream, or something like it, that you could just remove the ksort and run the script, and then run a diff of the result of that, to confirm the script does not screw up anything in the strings themselves. But then, I guess you had a solution already.

Tim Hunt added a comment - 25/Nov/08 11:39 AM
Well, thanks to Australian television being so bad, I sorted the file by hand on my laptop (then use the unix sort command to find my own errors!) I know, I could have switched the TV off ...