require("../config.php");
require("lib.php");
+ require_login();
if (isset($cancel)) {
if (!empty($SESSION->returnpage)) {
$mod = (object)$_POST;
}
- require_login($mod->course);
-
if (!isteacher($mod->course)) {
error("You can't modify this course!");
}
if (! $cm = get_record("course_modules", "id", $id)) {
error("This course module doesn't exist");
}
+
+ if (!isteacher($cm->course)) {
+ error("You can't modify this course!");
+ }
move_module($cm, $move);
if (! $cm = get_record("course_modules", "id", $hide)) {
error("This course module doesn't exist");
}
+
+ if (!isteacher($cm->course)) {
+ error("You can't modify this course!");
+ }
hide_course_module($cm->id);
error("This course module doesn't exist");
}
+ if (!isteacher($cm->course)) {
+ error("You can't modify this course!");
+ }
+
if (! $section = get_record("course_sections", "id", $cm->section)) {
error("This module doesn't exist");
}
error("This course doesn't exist");
}
- require_login($course->id);
-
if (!isteacher($course->id)) {
error("You can't modify this course!");
}
error("This course doesn't exist");
}
+ if (!isteacher($course->id)) {
+ error("You can't modify this course!");
+ }
+
if (! $module = get_record("modules", "id", $cm->module)) {
error("This module doesn't exist");
}
error("No action was specfied");
}
- require_login($course->id);
-
if (!isteacher($course->id)) {
error("You can't modify this course!");
}