From: martin Date: Sun, 2 Jun 2002 08:10:50 +0000 (+0000) Subject: Added per-course config and use of a word for "student" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5e69314dcae11124746e9b1c608b1c7b59891881;p=moodle.git Added per-course config and use of a word for "student" --- diff --git a/course/edit.html b/course/edit.html index d6c47823b6..d528f3b0a6 100644 --- a/course/edit.html +++ b/course/edit.html @@ -41,9 +41,15 @@ -

Word used to refer
to your role: +

Word for teacher: - + (eg Teacher, Tutor, Facilitator etc) + + + +

Word for student: + + (eg Student, Participant etc) diff --git a/course/edit.php b/course/edit.php index 876bd79f03..cde0501a0c 100644 --- a/course/edit.php +++ b/course/edit.php @@ -21,6 +21,10 @@ if (!isadmin()) { error("Only administrators can use this page"); } + + if (! $site = get_record("course", "category", 0)) { + redirect("$CFG->wwwroot/admin/"); + } } @@ -79,6 +83,13 @@ } else { $ts = getdate(time() + 3600 * 24); $te = getdate(time() + 3600 * 24 * 7 * 16); + $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->format = 0; + $form->category = 1; } $form->startday = $ts[mday]; @@ -88,15 +99,6 @@ $form->endday = $te[mday]; $form->endmonth = $te[mon]; $form->endyear = $te[year]; - - if (!$course) { - $form->teacher = "Facilitator"; - $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->format = 0; - $form->category = 1; - } } for ($i=1;$i<=31;$i++) { @@ -113,15 +115,14 @@ //$form->owners = get_records_sql_menu("SELECT u.id, CONCAT(u.firstname, " ", u.lastname) FROM users u, teachers t WHERE t.user = u.id"); - if (isadmin()) { - print_header("Admin: Creating a new course", "$CFG->sitename: Administration", - "wwwroot/admin/\">Admin - -> Create a new course", $focus); - - } else { + if (isset($course)) { print_header("Edit course settings", "$course->fullname", "wwwroot/course/view.php?id=$course->id\">$course->shortname -> Edit course settings", $focus); + } else { + print_header("Admin: Creating a new course", "$site->shortname: Administration", + "wwwroot/admin/\">Admin + -> Create a new course", $focus); } print_simple_box_start("center", "", "$THEME->cellheading"); @@ -147,8 +148,10 @@ function validate_form($course, &$form, &$err) { $err["summary"] = "Missing summary"; if (empty($form->teacher)) - $err["teacher"] = "Missing Teacher/Tutor/Instructor/Facilitator"; + $err["teacher"] = "Must choose something"; + if (empty($form->student)) + $err["student"] = "Must choose something"; if ($form->startdate > $form->enddate) $err["startdate"] = "Starts after it ends!"; diff --git a/course/social.php b/course/social.php index b080f23af8..cd9ea24ac7 100644 --- a/course/social.php +++ b/course/social.php @@ -20,7 +20,7 @@ //echo "

"; print_simple_box("People", $align="CENTER", $width="100%", $color="$THEME->cellheading"); - $moddata[]="id\">Participants"; + $moddata[]="id\">List of all people"; $modicon[]="\"List"; $moddata[]="id&course=$course->id\">Edit my profile"; $modicon[]="\"Me\""; diff --git a/course/weeks.php b/course/weeks.php index aaad5b05b9..f75058357e 100644 --- a/course/weeks.php +++ b/course/weeks.php @@ -37,7 +37,7 @@ // Links to people print_simple_box("People", $align="CENTER", $width="100%", $color="$THEME->cellheading"); - $moddata[]="id\">Participants"; + $moddata[]="id\">List of all people"; $modicon[]="\"List"; $moddata[]="id&course=$course->id\">Edit my profile"; $modicon[]="\"Me\"";