]> git.mjollnir.org Git - moodle.git/commitdiff
fixed some incorrect strtolower() calls that were breaking non ascii languages MDL...
authorskodak <skodak>
Sat, 7 Oct 2006 20:47:54 +0000 (20:47 +0000)
committerskodak <skodak>
Sat, 7 Oct 2006 20:47:54 +0000 (20:47 +0000)
12 files changed:
backup/backup_form.html
backup/backup_scheduled.php
backup/restorelib.php
course/edit.html
enrol/manual/enrol.html
lib/filterlib.php
lib/questionlib.php
lib/weblib.php
mod/forum/mod.html
mod/quiz/config.html
mod/quiz/mod.html
user/edit.php

index 179fe986a81108ee4739a5c6ef4bcff8a3f917ef..9d6bfd9aa884bb13870cdf35e498d79ada096629 100644 (file)
@@ -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
index a695c50ffb8835be7da312bac74a0601911bc024..5bb9c5a36a20ed55d2b74335455abdd304121bf6 100644 (file)
@@ -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);
  
index 988e40ed1e13d3d0e35cf425b78b2260785ca55e..f50172269b28ea4bca38b72abf239e7ae6271bcb 100644 (file)
                     //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) {
index 7b3abc8a9d688aced8dd52b21a12a439d4ea4ddc..766c3ef49aaef71cf2a24146db382c84a9fbb005 100644 (file)
     $options[0] = get_string("no");
     $options[1] = get_string("yes");
     choose_from_menu($options,"restrictmodules",$form->restrictmodules,"","togglemodules(this.selectedIndex);","");
-?>&nbsp;</td><td>&nbsp;<?php p(strtolower(get_string('to'))); ?>&nbsp;</td><td>&nbsp;
+?>&nbsp;</td><td>&nbsp;<?php p(moodle_strtolower(get_string('to'))); ?>&nbsp;</td><td>&nbsp;
     <select name="allowedmods[]" id="allowedmods" multiple="multiple" size="10" <?php echo ((empty($form->restrictmodules)) ? "disabled=\"disabled\"" : ""); ?>>
     <?php
     $mods = get_records("modules");
index c3f563d45cbb73f12359d78fd132c5fe4104d81a..1c359f74da5d232abf9e0b30f472e75c48fb253e 100644 (file)
@@ -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);
  ?>
index a57070367c75826fe7c6ab5fbac0d1185fb8a4ce..3b47146d9345247d34e2b175d0d7b087f53b1b72 100644 (file)
@@ -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);
         }
     }
 
index 9b4494c0ce6b63b7a8bf238f151ecec91a14eb2e..e67a442074d2e21763c35652d8c41f6fec7617bd 100644 (file)
@@ -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
index 01043854ade400633328c674d42ad1f0453a9983..be2e6842fdf1c92a453ef7a9b2566e121d8e9e8c 100644 (file)
@@ -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;
 
index f4bd05840c7d58c1a29bdba6fd3d225e5ff33725..b5378dce77533f8f608b8bf441cc576c89f7b58e 100644 (file)
@@ -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) {
index 695289e579cdfcbcdb8bc21d2b6ed9575afc8dca..96b7fda3c6016674d11fdb89b8ed3e1210bfbc34 100644 (file)
@@ -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"));
     }
 
 ?>
index 1a9fcb2acb6ca3170b04af873ecb93c43433da34..eceb7f6f4fb236bb7a341690b407ca79ffe40cdb 100644 (file)
 
     $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
index ce62bf236f6984c4cb8b3db49da3bc33401ff885..312a9205910f7cbf6b5b8da691500d955b4edd76 100644 (file)
         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 {