From e20217b3f366d65f2cc839cffbeccd7289e689d3 Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 4 Aug 2002 02:10:00 +0000 Subject: [PATCH] MOre language updates --- course/delete.php | 42 ++++++++++++++++++++++++----------------- course/edit.php | 40 +++++++++++++++++++-------------------- course/editsection.html | 8 ++++---- course/editsection.php | 3 ++- course/enrol.html | 19 ++++++++++--------- course/enrol.php | 5 ++++- lang/en/moodle.php | 27 ++++++++++++++++++++++++++ 7 files changed, 92 insertions(+), 52 deletions(-) diff --git a/course/delete.php b/course/delete.php index 6089d217ed..0315e17368 100644 --- a/course/delete.php +++ b/course/delete.php @@ -11,11 +11,13 @@ error("You must be an administrator to use this page."); } + $stradmin = get_string("admin"); + if (!$id) { - print_header("Delete a course", "Delete a course", - "wwwroot/admin\">Admin -> Delete a course"); + $strdelete = get_string("deletecourse"); + print_header($strdelete, $strdelete, "wwwroot/admin\">$stradmin -> $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 "id\">$course->fullname
"; @@ -34,9 +36,13 @@ } if (! $delete) { - print_header("Delete $course->shortname ?", "Delete $course->shortname ?", - "wwwroot/admin\">Admin -> Delete $course->shortname ?"); - notice_yesno("Are you absolutely sure you want to completely delete this course and all the data it contains?

$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, + "wwwroot/admin\">$stradmin -> $strdeletecheck"); + notice_yesno("$strdeletecheckfull

$course->fullname", + "delete.php?id=$course->id&delete=".md5($course->timemodified), + "delete.php"); exit; } @@ -45,10 +51,12 @@ } // OK checks done, delete the course now. - print_header("Deleting $course->shortname", "Deleting $course->shortname", - "wwwroot/admin\">Admin -> Deleting $course->shortname"); - print_heading("Deleting $course->fullname"); + $strdeletingcheck = get_string("deletingcheck", "", $course->shortname); + print_header($strdeletingcheck, $strdeletingcheck, + "wwwroot/admin\">$stradmin -> $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!"); @@ -83,32 +91,32 @@ // 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"); diff --git a/course/edit.php b/course/edit.php index e9e9507be2..b75e4b28ee 100644 --- a/course/edit.php +++ b/course/edit.php @@ -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)"); } @@ -81,11 +80,11 @@ $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; @@ -95,20 +94,21 @@ $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", "wwwroot/course/view.php?id=$course->id\">$course->shortname - -> $editcoursesettings", $focus); + -> $streditcoursesettings", $focus); } else { - print_header("Admin: Creating a new course", "$site->shortname: Administration", - "wwwroot/admin/\">Admin - -> Create a new course", $focus); + print_header(get_string("addnewcourse"), get_string("addnewcourse"), + "wwwroot/admin/\">".get_string("admin")." + -> ".get_string("addnewcourse"), $focus); } print_simple_box_start("center", "", "$THEME->cellheading"); - print_heading($editcoursesettings); + print_heading($streditcoursesettings); include("edit.html"); print_simple_box_end(); @@ -121,22 +121,22 @@ 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; } diff --git a/course/editsection.html b/course/editsection.html index cc84841c81..436ef6952b 100644 --- a/course/editsection.html +++ b/course/editsection.html @@ -1,12 +1,12 @@
-

Summary of section"; ?>

+

section") ?>

-
(Maximum of 255 characters) +
()

- - +"> +">

diff --git a/course/editsection.php b/course/editsection.php index a4649c6f94..64437d7c9e 100644 --- a/course/editsection.php +++ b/course/editsection.php @@ -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"); diff --git a/course/enrol.html b/course/enrol.html index dd978eaf03..9ff1ac24b0 100644 --- a/course/enrol.html +++ b/course/enrol.html @@ -3,13 +3,14 @@ @@ -19,7 +20,7 @@
-

This course requires an "enrolment key" - a one-time
- password that you should have got from +

id&course=$site->id\">$teacher->firstname $teacher->lastname."; - } else { - echo "your teacher"; - } + $teacher->fullname = "$teacher->firstname $teacher->lastname"; + $teachername = "id&course=$site->id>$teacher->fullname."; + } else { + $teachername = get_string("yourteacher", "", strtolower($course->teacher)); + } + print_string("enrolmentkeyfrom", "", $teachername); ?>

- + diff --git a/course/enrol.php b/course/enrol.php index e479a4a4fb..6455e25d0c 100644 --- a/course/enrol.php +++ b/course/enrol.php @@ -81,7 +81,10 @@ $teacher = get_teacher($course->id); - print_header("Login to $course->shortname", "Login to $course->shortname", "Courses -> Login to $course->shortname", "form.password"); + $strloginto = get_string("loginto", "", $course->shortname); + $strcourses = get_string("courses"); + + print_header($strloginto, $strloginto, "$strcourses -> $strloginto", "form.password"); print_course($course); diff --git a/lang/en/moodle.php b/lang/en/moodle.php index aeb1393a08..ec942b167a 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -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
+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 "; $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"; ?> -- 2.39.5

Enrolment Key:

:

@@ -28,9 +29,9 @@   - + + ">
">
-