// In editing mode, allows the admin to edit a category,
// and rearrange courses
- require_once("../config.php");
- require_once("lib.php");
+ require_once("../config.php");
+ require_once("lib.php");
require_variable($id); // Category id
optional_variable($page, "0"); // which page to show
optional_variable($perpage, "20"); // how many per page
-
if (!$site = get_site()) {
error("Site isn't defined!");
}
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
if (!$category = get_record("course_categories", "id", $id)) {
error("Category not known!");
}
$site = get_site();
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
if (empty($THEME->custompix)) {
$pixpath = "$CFG->wwwroot/pix";
} else {
$site = get_site();
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist, "");
error("404 - File Not Found");\r
}\r
\r
+ if ($CFG->forcelogin) {\r
+ require_login();\r
+ }\r
+\r
include($info->filepath);\r
\r
print_header();\r
optional_variable($sub, ""); // sub-section (named anchor)
optional_variable($lang, ""); // override current language
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
if (!empty($lang)) {
$SESSION->lang = $lang;
}
require("../config.php");
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
if (empty($CFG->langmenu)) {
$langmenu = "";
} else {
$file = clean_filename($file);
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
if ($id) {
if (! $course = get_record("course", "id", $id)) {
error("Course is misconfigured");
$lifetime = 86400;
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
if (isset($file)) { // workaround for situations where / syntax doesn't work
$pathinfo = $file;
$lifetime = 86400;
+ if ($CFG->forcelogin) {
+ require_login();
+ }
+
if (isset($file)) { // workaround for situations where / syntax doesn't work
$pathinfo = $file;