]> git.mjollnir.org Git - moodle.git/commitdiff
MOre language updates
authormartin <martin>
Sun, 4 Aug 2002 02:10:00 +0000 (02:10 +0000)
committermartin <martin>
Sun, 4 Aug 2002 02:10:00 +0000 (02:10 +0000)
course/delete.php
course/edit.php
course/editsection.html
course/editsection.php
course/enrol.html
course/enrol.php
lang/en/moodle.php

index 6089d217edc8a386047cb3ffe131607ca6d16a56..0315e173689f1a99df7ef3b8b8a29ea30d239001 100644 (file)
         error("You must be an administrator to use this page.");
     }
 
+    $stradmin = get_string("admin");
+
     if (!$id) {
-           print_header("Delete a course", "Delete a course", 
-                     "<A HREF=\"$CFG->wwwroot/admin\">Admin</A> -> Delete a course");
+        $strdelete = get_string("deletecourse");
+           print_header($strdelete, $strdelete, "<A HREF=\"$CFG->wwwroot/admin\">$stradmin</A> -> $strdelete");
         if ($courses = get_records_sql("SELECT * from course WHERE category > 0 ORDER BY fullname")) {
-            print_heading("Choose a course to delete");
+            print_heading("choosecourse");
             print_simple_box_start("CENTER");
             foreach ($courses as $course) {
                 echo "<A HREF=\"delete.php?id=$course->id\">$course->fullname</A><BR>";
     }
 
     if (! $delete) {
-           print_header("Delete $course->shortname ?", "Delete $course->shortname ?", 
-                     "<A HREF=\"$CFG->wwwroot/admin\">Admin</A> -> Delete $course->shortname ?");
-        notice_yesno("Are you absolutely sure you want to completely delete this course and all the data it contains?<BR><BR>$course->fullname", "delete.php?id=$course->id&delete=".md5($course->timemodified), "delete.php");
+        $strdeletecheck = get_string("deletecheck", "", $course->shortname);
+        $strdeletecheckfull = get_string("deletecheckfull");
+           print_header($strdeletecheck, $strdeletecheck, 
+                     "<A HREF=\"$CFG->wwwroot/admin\">$stradmin</A> -> $strdeletecheck");
+        notice_yesno("$strdeletecheckfull<BR><BR>$course->fullname", 
+                     "delete.php?id=$course->id&delete=".md5($course->timemodified), 
+                     "delete.php");
         exit;
     }
 
     }
 
     // OK checks done, delete the course now.
-       print_header("Deleting $course->shortname", "Deleting $course->shortname", 
-                 "<A HREF=\"$CFG->wwwroot/admin\">Admin</A> -> Deleting $course->shortname");
-    print_heading("Deleting $course->fullname");
+    $strdeletingcheck = get_string("deletingcheck", "", $course->shortname);
+       print_header($strdeletingcheck, $strdeletingcheck, 
+                 "<A HREF=\"$CFG->wwwroot/admin\">$stradmin</A> -> $strdeletingcheck");
+    print_heading($strdeletingcheck);
 
+    $strdeleted = get_string("deleted");
     // First delete every instance of every module
 
     if ($allmods = get_records_sql("SELECT * FROM modules") ) {
@@ -74,7 +82,7 @@
                 }
 
             }
-            notify("Deleted $count instances of $modname");
+            notify("$strdeleted $count instances of $modname");
         } 
     } else {
         error("No modules are installed!");
     // Delete any user stuff
 
     if (delete_records("user_students", "course", $course->id)) {
-        notify("Deleted student enrolments");
+        notify("$strdeleted student enrolments");
     }
 
     if (delete_records("user_teachers", "course", $course->id)) {
-        notify("Deleted teachers");
+        notify("$strdeleted teachers");
     }
 
     // Delete logs
 
     if (delete_records("log", "course", $course->id)) {
-        notify("Deleted logs");
+        notify("$strdeleted logs");
     }
 
     // Delete any course stuff
 
     if (delete_records("course_sections", "course", $course->id)) {
-        notify("Deleted course sections");
+        notify("$strdeleted course sections");
     }
     if (delete_records("course_modules", "course", $course->id)) {
-        notify("Deleted course modules");
+        notify("$strdeleted course modules");
     }
     if (delete_records("course", "id", $course->id)) {
-        notify("Deleted the main course record");
+        notify("$strdeleted the main course record");
     }
 
-    print_heading("$course->shortname has been completely deleted");
+    print_heading( get_string("deletedcourse", "", $course->shortname) );
 
     print_continue("delete.php");
 
index e9e9507be2166bf673571e7f8340f8b4a509faa0..b75e4b28eea105bbadc35757fa01c1dff8750964 100644 (file)
@@ -38,7 +38,6 @@
 
         validate_form($course, $form, $err);
 
-
         if (count($err) == 0) {
 
             $form->timemodified = time();
@@ -46,7 +45,7 @@
             if ($course) {
                 if (update_record("course", $form)) {
                     add_to_log($course->id, "course", "update", "edit.php?id=$id", "");
-                           redirect("view.php?id=$course->id", "Changes saved");
+                           redirect("view.php?id=$course->id", get_string("changessaved"));
                 } else {
                     error("Serious Error! Could not update the course record! (id = $form->id)");
                 }
             $form = $course;
         } else {
             $form->startdate = time() + 3600 * 24;
-            $form->teacher = "Facilitator";
-            $form->student = "Student";
-            $form->fullname = "Course Fullname 101";
-            $form->shortname = "CF101";
-            $form->summary = "Write a concise and interesting paragraph here that explains what this course is about.";
+            $form->fullname = get_string("defaultcoursefullname");
+            $form->shortname = get_string("defaultcourseshortname");
+            $form->teacher = get_string("defaultcourseteacher");
+            $form->student = get_string("defaultcoursestudent");
+            $form->summary = get_string("defaultcoursesummary");
             $form->format = "weeks";
             $form->numsections = 10;
             $form->newsitems = 5;
 
     $form->categories = get_records_sql_menu("SELECT id,name FROM course_categories");
 
-    $editcoursesettings = get_string("editcoursesettings");
+    $streditcoursesettings = get_string("editcoursesettings");
+    $streditcoursesettings = get_string("editcoursesettings");
 
     if (isset($course)) {
-           print_header($editcoursesettings, "$course->fullname", 
+           print_header($streditcoursesettings, "$course->fullname", 
                      "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> 
-                      -> $editcoursesettings", $focus);
+                      -> $streditcoursesettings", $focus);
     } else {
-        print_header("Admin: Creating a new course", "$site->shortname: Administration",
-                     "<A HREF=\"$CFG->wwwroot/admin/\">Admin</A> 
-                      -> Create a new course", $focus);
+        print_header(get_string("addnewcourse"), get_string("addnewcourse"),
+                     "<A HREF=\"$CFG->wwwroot/admin/\">".get_string("admin")."</A> 
+                      -> ".get_string("addnewcourse"), $focus);
     }
 
     print_simple_box_start("center", "", "$THEME->cellheading");
-    print_heading($editcoursesettings);
+    print_heading($streditcoursesettings);
        include("edit.html");
     print_simple_box_end();
 
 function validate_form($course, &$form, &$err) {
 
     if (empty($form->fullname))
-        $err["fullname"] = "Missing full name";
+        $err["fullname"] = get_string("missingfullname");
 
     if (empty($form->shortname))
-        $err["shortname"] = "Missing short name";
+        $err["shortname"] = get_string("missingshortname");
 
     if (empty($form->summary))
-        $err["summary"] = "Missing summary";
+        $err["summary"] = get_string("missingsummary");
 
     if (empty($form->teacher))
-        $err["teacher"] = "Must choose something";
+        $err["teacher"] = get_string("missingteacher");
 
     if (empty($form->student))
-        $err["student"] = "Must choose something";
+        $err["student"] = get_string("missingstudent");
 
     if (! $form->category)
-        $err["category"] = "You need to choose a category";
+        $err["category"] = get_string("missingcategory");
 
     return;
 }
index cc84841c81ec1cc79c50007b8442c4c733243759..436ef6952bec800bdb80671f73fe89259eaed207 100644 (file)
@@ -1,12 +1,12 @@
 <BLOCKQUOTE>
 <FORM name="form" method="post" action="editsection.php">
-<P><B>Summary of <? echo "$sectionname $form->section"; ?></B></P>
+<P><B><? print_string("summaryof", "", "$sectionname $form->section") ?></B></P>
 <TEXTAREA NAME=summary COLS=60 ROWS=4 WRAP=virtual><?=$form->summary ?></TEXTAREA>
-<BR><FONT SIZE=1>(Maximum of 255 characters)</FONT>
+<BR><FONT SIZE=1>(<? print_string("maximumchars", "", "255") ?>)</FONT>
 <P>
 <INPUT type="hidden" name=id value="<?=$form->id ?>">
-<INPUT type="submit" value="Save all changes">
-<INPUT type="reset" value="Revert">
+<INPUT type="submit" value="<? print_string("savechanges") ?>">
+<INPUT type="reset" value="<? print_string("revert") ?>">
 </P>
 </FORM>
 </BLOCKQUOTE>
index a4649c6f9429dc91ab4263e23191777bce306f8d..64437d7c9e792f13cafe0b910426f2138c3a5adb 100644 (file)
@@ -43,8 +43,9 @@
     }
 
     $sectionname = $COURSE_SECTION[$course->format];
+    $stredit = get_string("edit", "", " $sectionname $section->section");
 
-    print_header("Edit $sectionname $section->section", "Edit $sectionname $section->section", "", "form.summary");
+    print_header($stredit, $stredit, "", "form.summary");
 
     include("editsection.html");
 
index dd978eaf034e79c380933e135c766383abdb51cf..9ff1ac24b0bf8d8f72466f23e9315af7bb22ab8c 100644 (file)
@@ -3,13 +3,14 @@
 <table cellpadding=20>\r
   <tr valign=top> \r
     <td>\r
-    <P ALIGN=CENTER>This course requires an "enrolment key" - a one-time<BR>\r
-       password that you should have got from \r
+    <P ALIGN=CENTER>\r
        <? if ($teacher) {\r
-           echo "<A HREF=\"../user/view.php?id=$teacher->id&course=$site->id\">$teacher->firstname $teacher->lastname.</A>";\r
-       } else {\r
-           echo "your teacher";\r
-       }\r
+              $teacher->fullname = "$teacher->firstname $teacher->lastname";\r
+              $teachername = "<A HREF=../user/view.php?id=$teacher->id&course=$site->id>$teacher->fullname</A>.";\r
+          } else {\r
+              $teachername = get_string("yourteacher", "", strtolower($course->teacher));\r
+          }\r
+          print_string("enrolmentkeyfrom", "", $teachername);\r
        ?>\r
        </P>\r
     </td>\r
@@ -19,7 +20,7 @@
       <form name="form" method="post" action="enrol.php">\r
         <table>\r
           <tr> \r
-            <td width=50% align=right><P>Enrolment Key:</P></td>\r
+            <td width=50% align=right><P><? print_string("enrolmentkey") ?>:</P></td>\r
             <td width=50% > \r
               <input type="password" name="password" size=20 value="<? p($password) ?>" >\r
               <input type="hidden" name="id" value="<? p($id) ?>" >\r
@@ -28,9 +29,9 @@
             <td width=50%>&nbsp;</td>\r
             <td width=50%> \r
               <table cellpadding=1 cellspacing=0><tr>\r
-              <td><input type=submit value=Login></form></td>\r
+              <td><input type=submit value="<? print_string("login") ?>"></form></td>\r
               <td><form action="<?=$CFG->wwwroot?>/" method=post>\r
-                  <input type=submit value=Cancel></form></td>\r
+                  <input type=submit value="<? print_string("cancel") ?>"></form></td>\r
               </tr></table>\r
 \r
             </td>\r
index e479a4a4fbc1280a7c8eb6477bf2ed79d0c911b2..6455e25d0cb4ddb116c17e5c4375bf838ce511d1 100644 (file)
 
     $teacher = get_teacher($course->id);
 
-    print_header("Login to $course->shortname", "Login to $course->shortname", "<A HREF=\".\">Courses</A> -> Login to $course->shortname", "form.password"); 
+    $strloginto = get_string("loginto", "", $course->shortname);
+    $strcourses = get_string("courses");
+
+    print_header($strloginto, $strloginto, "<A HREF=\".\">$strcourses</A> -> $strloginto", "form.password"); 
 
     print_course($course); 
 
index aeb1393a087090e6c13dac7ecb082371665b82a5..ec942b167ae2a633566869160b5724aa9b6f4daf 100644 (file)
@@ -13,10 +13,12 @@ $string[alphanumerical] = "Can only contain alphabetical letters or numbers";
 $string[alreadyconfirmed] = "Registration has already been confirmed";
 $string[assignteachers] = "Assign teachers";
 $string[availablecourses] = "Available Courses";
+$string[cancel] = "Cancel";
 $string[category] = "Category";
 $string[changepassword] = "Change password";
 $string[changedpassword] = "Changed password";
 $string[changessaved] = "Changes saved";
+$string[choosecourse] = "Choose a course";
 $string[city] = "City/town";
 $string[confirmed] = "Your registration has been confirmed";
 $string["continue"] = "Continue";
@@ -26,8 +28,19 @@ $string[courses] = "Courses";
 $string[createaccount] = "Create my new account";
 $string[createuserandpass] = "Create a new username and password to log in with";
 $string[currentlocaltime] = "your current local time";
+$string[defaultcoursefullname] = "Course Fullname 101";
+$string[defaultcourseshortname] = "CF101";
+$string[defaultcoursestudent] = "Student";
+$string[defaultcoursesummary] = "Write a concise and interesting paragraph here that explains what this course is about";
+$string[defaultcourseteacher] = "Facilitator";
 $string[delete] = "Delete";
+$string[deletecheck] = "Delete \$a ?";
+$string[deletecheckfull] = "Are you absolutely sure you want to completely delete this course and all the data it contains?";
 $string[deletecourse] = "Delete a course";
+$string[deleted] = "Deleted";
+$string[deletedcourse] = "\$a has been completely deleted";
+$string[deletingcourse] = "Deleting \$a";
+$string[edit] = "Edit \$a";
 $string[editcoursesettings] = "Edit course settings";
 $string[editmyprofile] = "Edit my profile";
 $string[edituser] = "Edit user accounts";
@@ -59,6 +72,8 @@ Cheers from the '\$a->sitename' administrator,
 $string[emailexists] = "This email address is already registered.";
 $string[emailmustbereal] = "Note: your email address must be a real one";
 $string[enrolmentkey] = "Enrolment key";
+$string[enrolmentkeyfrom] = "This course requires an 'enrolment key' - a one-time<BR>
+password that you should have got from \$a";
 $string[entercourse] = "Click to enter this course";
 $string[enteremailaddress] = "Enter in your email address to reset your 
    password and have the new password sent to you via email.";
@@ -89,6 +104,7 @@ $string[login] = "Login";
 $string[loginas] = "Login as";
 $string[loginguest] = "Login as a guest";
 $string[loginsite] = "Login to the site";
+$string[loginto] = "Login to \$a";
 $string[loginusing] = "Login using your username and password";
 $string[loginsteps] = "Hi! For full access to courses you'll need to take 
    a minute to create a new account for yourself on this web site.
@@ -110,13 +126,20 @@ $string[loginsteps] = "Hi! For full access to courses you'll need to take
    </OL>";
 $string[logout] = "Logout";
 $string[mainmenu] = "Main menu";
+$string[maximumchars] = "Maximum of \$a characters";
+$string[missingcategory] = "You need to choose a category";
 $string[missingcity] = "Missing city/town";
 $string[missingcountry] = "Missing country";
 $string[missingemail] = "Missing email address";
 $string[missingfirstname] = "Missing first name";
+$string[missingfullname] = "Missing full name";
 $string[missinglastname] = "Missing last name";
+$string[missingshortname] = "Missing short name";
 $string[missingnewpassword] = "Missing new password";
 $string[missingpassword] = "Missing password";
+$string[missingstudent] = "Must choose something";
+$string[missingsummary] = "Missing summary";
+$string[missingteacher] = "Must choose something";
 $string[missingusername] = "Missing username";
 $string[movedown] = "Move down";
 $string[moveup] = "Move up";
@@ -168,6 +191,8 @@ $string[passwordsenttext] = "
 $string[personalprofile] = "Personal profile";
 $string[phone] = "Phone";
 $string[returningtosite] = "Returning to this web site?";
+$string[revert] = "Revert";
+$string[savechanges] = "Save changes";
 $string[section] = "Section";
 $string[selectacountry] = "Select a country";
 $string[senddetails] = "Send my details via email";
@@ -182,6 +207,7 @@ $string[someallowguest] = "Some courses may allow guest access";
 $string[startdate] = "Course start date";
 $string[startsignup] = "Start now by creating a new account!";
 $string[summary] = "Summary";
+$string[summaryof] = "Summary of \$a";
 $string[supplyinfo] = "Please supply some information about yourself";
 $string[teacheronly] = "for the \$a only";
 $string[textformat] = "Plain text format";
@@ -213,5 +239,6 @@ $string[wordforstudent] = "Your word for Student";
 $string[wordforstudenteg] = "eg Student, Participant etc";
 $string[wrongpassword] = "Incorrect password for this username";
 $string[yes] = "Yes";
+$string[yourteacher] = "your \$a";
 
 ?>