]> git.mjollnir.org Git - moodle.git/commitdiff
If the language is the same as the site, then default to using the
authormoodler <moodler>
Sat, 23 Aug 2003 07:26:50 +0000 (07:26 +0000)
committermoodler <moodler>
Sat, 23 Aug 2003 07:26:50 +0000 (07:26 +0000)
same terminology as the site does

course/edit.php

index 6b2da9b826fea621f7115b1cf9acdf884ff0b3cc..9811b1c1e454d191fff266f9ad73286625862422 100644 (file)
             $form->startdate = time() + 3600 * 24;
             $form->fullname = get_string("defaultcoursefullname");
             $form->shortname = get_string("defaultcourseshortname");
-            $form->teacher = get_string("defaultcourseteacher");
-            $form->teachers = get_string("defaultcourseteachers");
-            $form->student = get_string("defaultcoursestudent");
-            $form->students = get_string("defaultcoursestudents");
             $form->summary = get_string("defaultcoursesummary");
             $form->format = "weeks";
             $form->password = "";
             $form->category = $category;
             $form->id = "";
             $form->visible = 1;
+
+            if (current_language() == $CFG->lang) {
+                $form->teacher  = $site->teacher;
+                $form->teachers = $site->teachers;
+                $form->student  = $site->student;
+                $form->students = $site->students;
+            } else {
+                $form->teacher = get_string("defaultcourseteacher");
+                $form->teachers = get_string("defaultcourseteachers");
+                $form->student = get_string("defaultcoursestudent");
+                $form->students = get_string("defaultcoursestudents");
+            }
         }
     }