mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
fixed some incorrect strtolower() calls that were breaking non ascii languages MDL-6135
This commit is contained in:
parent
6a8b20b790
commit
57f1b91497
@ -284,7 +284,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
//Calculate the backup word
|
||||
//Take off some characters in the filename !!
|
||||
$takeoff = array(" ", ":", "/", "\\", "|");
|
||||
$backup_word = str_replace($takeoff,"_",strtolower(get_string("backupfilename")));
|
||||
$backup_word = str_replace($takeoff,"_",moodle_strtolower(get_string("backupfilename")));
|
||||
//If non-translated, use "backup"
|
||||
if (substr($backup_word,0,1) == "[") {
|
||||
$backup_word= "backup";
|
||||
@ -307,7 +307,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
//The backup word
|
||||
$backup_name = $backup_word."-";
|
||||
//The shortname
|
||||
$backup_name .= strtolower($backup_shortname)."-";
|
||||
$backup_name .= moodle_strtolower($backup_shortname)."-";
|
||||
//The date format
|
||||
$backup_name .= userdate(time(),$backup_date_format,99,false);
|
||||
//The extension
|
||||
|
@ -437,7 +437,7 @@ function schedule_backup_course_configure($course,$starttime = 0) {
|
||||
//Calculate the backup word
|
||||
//Take off some characters in the filename !!
|
||||
$takeoff = array(" ", ":", "/", "\\", "|");
|
||||
$backup_word = str_replace($takeoff,"_",strtolower(get_string("backupfilename")));
|
||||
$backup_word = str_replace($takeoff,"_",moodle_strtolower(get_string("backupfilename")));
|
||||
//If non-translated, use "backup"
|
||||
if (substr($backup_word,0,1) == "[") {
|
||||
$backup_word= "backup";
|
||||
@ -460,7 +460,7 @@ function schedule_backup_course_configure($course,$starttime = 0) {
|
||||
//The backup word
|
||||
$backup_name = $backup_word."-";
|
||||
//The shortname
|
||||
$backup_name .= strtolower($backup_shortname)."-";
|
||||
$backup_name .= moodle_strtolower($backup_shortname)."-";
|
||||
//The date format
|
||||
$backup_name .= userdate(time(),$backup_date_format,99,false);
|
||||
//The extension
|
||||
@ -471,7 +471,7 @@ function schedule_backup_course_configure($course,$starttime = 0) {
|
||||
//Calculate the string to match the keep preference
|
||||
$keep_name = $backup_word."-";
|
||||
//The shortname
|
||||
$keep_name .= strtolower($backup_shortname)."-";
|
||||
$keep_name .= moodle_strtolower($backup_shortname)."-";
|
||||
//And finally, clean everything
|
||||
$keep_name = clean_filename($keep_name);
|
||||
|
||||
|
@ -1820,7 +1820,7 @@
|
||||
//Process contacts
|
||||
if ($contactcount) {
|
||||
if (!defined('RESTORE_SILENTLY')) {
|
||||
echo '<li>'.strtolower(get_string('contacts','message')).'</li>';
|
||||
echo '<li>'.moodle_strtolower(get_string('contacts','message')).'</li>';
|
||||
}
|
||||
$counter = 0;
|
||||
while ($counter < $contactcount) {
|
||||
|
@ -432,7 +432,7 @@
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options,"restrictmodules",$form->restrictmodules,"","togglemodules(this.selectedIndex);","");
|
||||
?> </td><td> <?php p(strtolower(get_string('to'))); ?> </td><td>
|
||||
?> </td><td> <?php p(moodle_strtolower(get_string('to'))); ?> </td><td>
|
||||
<select name="allowedmods[]" id="allowedmods" multiple="multiple" size="10" <?php echo ((empty($form->restrictmodules)) ? "disabled=\"disabled\"" : ""); ?>>
|
||||
<?php
|
||||
$mods = get_records("modules");
|
||||
|
@ -4,7 +4,7 @@
|
||||
if ($teacher) {
|
||||
$teachername = "<a href=\"../user/view.php?id=$teacher->id&course=".SITEID."\">".fullname($teacher)."</a>.";
|
||||
} else {
|
||||
$teachername = get_string('yourteacher', '', strtolower($course->teacher));
|
||||
$teachername = get_string('yourteacher', '', $course->teacher);
|
||||
}
|
||||
print_string('enrolmentkeyfrom', '', $teachername);
|
||||
?>
|
||||
|
@ -255,13 +255,13 @@ function filter_remove_duplicates($linkarray) {
|
||||
if ($filterobject->casesensitive) {
|
||||
$exists = in_array($filterobject->phrase, $concepts);
|
||||
} else {
|
||||
$exists = in_array(strtolower($filterobject->phrase), $lconcepts);
|
||||
$exists = in_array(moodle_strtolower($filterobject->phrase), $lconcepts);
|
||||
}
|
||||
|
||||
if (!$exists) {
|
||||
$cleanlinks[] = $filterobject;
|
||||
$concepts[] = $filterobject->phrase;
|
||||
$lconcepts[] = strtolower($filterobject->phrase);
|
||||
$lconcepts[] = moodle_strtolower($filterobject->phrase);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1582,7 +1582,7 @@ function get_import_export_formats( $type ) {
|
||||
function default_export_filename($course,$category) {
|
||||
//Take off some characters in the filename !!
|
||||
$takeoff = array(" ", ":", "/", "\\", "|");
|
||||
$export_word = str_replace($takeoff,"_",strtolower(get_string("exportfilename","quiz")));
|
||||
$export_word = str_replace($takeoff,"_",moodle_strtolower(get_string("exportfilename","quiz")));
|
||||
//If non-translated, use "export"
|
||||
if (substr($export_word,0,1) == "[") {
|
||||
$export_word= "export";
|
||||
@ -1608,9 +1608,9 @@ function default_export_filename($course,$category) {
|
||||
//The export word
|
||||
$export_name = $export_word."-";
|
||||
//The shortname
|
||||
$export_name .= strtolower($export_shortname)."-";
|
||||
$export_name .= moodle_strtolower($export_shortname)."-";
|
||||
//The category name
|
||||
$export_name .= strtolower($export_categoryname)."-";
|
||||
$export_name .= moodle_strtolower($export_categoryname)."-";
|
||||
//The date format
|
||||
$export_name .= userdate(time(),$export_date_format,99,false);
|
||||
//The extension - no extension, supplied by format
|
||||
|
@ -1988,7 +1988,7 @@ function highlight($needle, $haystack, $case=0,
|
||||
*/
|
||||
function highlightfast($needle, $haystack) {
|
||||
|
||||
$parts = explode(strtolower($needle), strtolower($haystack));
|
||||
$parts = explode(moodle_strtolower($needle), moodle_strtolower($haystack));
|
||||
|
||||
$pos = 0;
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
<td align="right"><b><?php print_string('forumtype', 'forum')?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
$student = strtolower($course->student);
|
||||
$student = $course->student;
|
||||
require_once("$CFG->dirroot/mod/forum/lib.php");
|
||||
asort($FORUM_TYPES);
|
||||
if (! $form->type) {
|
||||
|
@ -99,9 +99,9 @@
|
||||
|
||||
$attemptoptions = array();
|
||||
$attemptoptions[0] = get_string("attemptsunlimited", "quiz");
|
||||
$attemptoptions[1] = "1 ".strtolower(get_string("attempt", "quiz"));
|
||||
$attemptoptions[1] = "1 ".moodle_strtolower(get_string("attempt", "quiz"));
|
||||
for ($i=2;$i<=6;$i++) {
|
||||
$attemptoptions[$i] = "$i ".strtolower(get_string("attempts", "quiz"));
|
||||
$attemptoptions[$i] = "$i ".moodle_strtolower(get_string("attempts", "quiz"));
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -114,9 +114,9 @@
|
||||
|
||||
$attemptoptions = array();
|
||||
$attemptoptions[0] = get_string("attemptsunlimited", "quiz");
|
||||
$attemptoptions[1] = "1 ".strtolower(get_string("attempt", "quiz"));
|
||||
$attemptoptions[1] = "1 ".moodle_strtolower(get_string("attempt", "quiz"));
|
||||
for ($i=2;$i<=6;$i++) {
|
||||
$attemptoptions[$i] = "$i ".strtolower(get_string("attempts", "quiz"));
|
||||
$attemptoptions[$i] = "$i ".moodle_strtolower(get_string("attempts", "quiz"));
|
||||
}
|
||||
|
||||
//enforced time delay between quiz attempts add-on
|
||||
|
@ -353,7 +353,7 @@
|
||||
echo "</center>";
|
||||
}
|
||||
|
||||
$teacher = strtolower($course->teacher);
|
||||
$teacher = $course->teacher;
|
||||
if (!has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
|
||||
$teacheronly = '('.get_string('teacheronly', '', $teacher).')';
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user