diff --git a/course/delete.php b/course/delete.php
index 6089d217edc..0315e173689 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 e9e9507be21..b75e4b28eea 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 cc84841c81e..436ef6952be 100644
--- a/course/editsection.html
+++ b/course/editsection.html
@@ -1,12 +1,12 @@
diff --git a/course/editsection.php b/course/editsection.php index a4649c6f942..64437d7c9e7 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 dd978eaf034..9ff1ac24b0b 100644 --- a/course/enrol.html +++ b/course/enrol.html @@ -3,13 +3,14 @@
|
- This course requires an "enrolment key" - a one-time if ($teacher) { - echo "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); ?> |
@@ -19,7 +20,7 @@