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") ) {
}
}
- 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");
validate_form($course, $form, $err);
-
if (count($err) == 0) {
$form->timemodified = time();
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;
}
<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>
}
$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");
<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
<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
<td width=50%> </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
$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);
$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";
$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";
$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.";
$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.
</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";
$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";
$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";
$string[wordforstudenteg] = "eg Student, Participant etc";
$string[wrongpassword] = "Incorrect password for this username";
$string[yes] = "Yes";
+$string[yourteacher] = "your \$a";
?>