From 578fdd0a037bdf18fda018e840fad8055cfad8f4 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 25 Jun 2002 11:46:12 +0000 Subject: [PATCH] Renamed from editweek to editsection --- course/editsection.html | 12 ++++++++++ course/editsection.php | 53 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 course/editsection.html create mode 100644 course/editsection.php diff --git a/course/editsection.html b/course/editsection.html new file mode 100644 index 0000000000..cc84841c81 --- /dev/null +++ b/course/editsection.html @@ -0,0 +1,12 @@ +
+
+

Summary of section"; ?>

+ +
(Maximum of 255 characters) +

+ + + +

+
+
diff --git a/course/editsection.php b/course/editsection.php new file mode 100644 index 0000000000..b06a24e713 --- /dev/null +++ b/course/editsection.php @@ -0,0 +1,53 @@ +course)) { + error("Could not find the course!"); + } + + require_login($course->id); + + if (!isteacher($course->id)) { + error("Only teachers can edit this!"); + } + + +/// If data submitted, then process and store. + + if (match_referer() && isset($HTTP_POST_VARS)) { + + $timenow = time(); + + if (! set_field("course_sections", "summary", $summary, "id", $section->id)) { + error("Could not update the summary!"); + } + + add_to_log($course->id, "course", "editsection", "editsection.php?id=$section->id", "$section->section"); + + redirect("view.php?id=$course->id"); + exit; + } + +/// Otherwise fill and print the form. + + if (! $form ) { + $form = $section; + } + + $sectionname = $SECTION[$course->format]; + + print_header("Edit $sectionname $section->section", "Edit $sectionname $section->section", "", "form.summary"); + + include("editsection.html"); + + print_footer($course); + +?> -- 2.39.5