Clean sweep through all the important changing all include(), include_once()
and require() to require_once()
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Admin-only script to assign administrative rights to users
|
||||
// !!! based on ../course/teacher.php (cut and pasted, then mangled)
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
# sanity checks
|
||||
assert("!ereg('[^0-9]', \$_REQUEST['add'])");
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@
|
||||
|
||||
echo "<table border=\"0\" width=\"100%\" cellpadding=\"4\">";
|
||||
|
||||
require("$CFG->dirroot/auth/$auth/config.html");
|
||||
require_once("$CFG->dirroot/auth/$auth/config.html");
|
||||
|
||||
if ($auth != "email" and $auth != "none") {
|
||||
echo "<tr valign=\"top\">";
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
require("../config.php");
|
||||
require("../lib/countries.php");
|
||||
require_once("../config.php");
|
||||
require_once("../lib/countries.php");
|
||||
|
||||
if (isset($config)) { // For debugging purposes, protected by password
|
||||
if (md5($config) == "caf9b6b99962bf5c2264824231d7a40c") {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
$FULLME = "cron";
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
echo "<PRE>\n";
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Deletes the moodledata directory, COMPLETELY!!
|
||||
// BE VERY CAREFUL USING THIS!
|
||||
|
||||
include("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
require_login();
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
|
||||
/// Check that PHP is of a sufficient version
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
optional_variable($mode, "");
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
if ($site = get_site()) {
|
||||
if (!isadmin()) {
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../config.php");
|
||||
require("../user/lib.php");
|
||||
require("../lib/countries.php");
|
||||
require_once("../config.php");
|
||||
require_once("../user/lib.php");
|
||||
require_once("../lib/countries.php");
|
||||
|
||||
$recordsperpage = 30;
|
||||
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ $CFG->buggy_referer = false;
|
||||
|
||||
|
||||
$CFG->libdir = "$CFG->dirroot/lib"; // Do not change this
|
||||
require("$CFG->libdir/setup.php"); // Do not change this
|
||||
require_once("$CFG->libdir/setup.php"); // Do not change this
|
||||
|
||||
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
|
||||
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Allows the admin to create, delete and rename course categories
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
if (!isadmin()) {
|
||||
error("Only administrators can use this course!");
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
// Admin-only code to delete a course utterly
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
optional_variable($id); // course id
|
||||
optional_variable($delete); // delete confirmation
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Edit course settings
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($id, 0); // course id
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Edit the introduction of a section
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Week ID
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Asks for a course pass key, once only, and enrols that user
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_login();
|
||||
require_variable($id);
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Displays all grades for a student in a course
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course id
|
||||
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
<?PHP // $Id$
|
||||
// Displays all grades for a course
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require("../lib/psxlsgen.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
require_once("../lib/psxlsgen.php");
|
||||
|
||||
require_variable($id); // course id
|
||||
optional_variable($download, ""); // to download data
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Display list of all courses
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($category, "");
|
||||
|
||||
|
||||
+2
-2
@@ -594,7 +594,7 @@ function print_side_block_end() {
|
||||
|
||||
|
||||
function print_admin_links ($siteid, $width=180) {
|
||||
global $THEME, $CFG;
|
||||
global $CFG;
|
||||
|
||||
$icon = "<IMG SRC=\"$CFG->wwwroot/pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||
$moddata[]="<A HREF=\"$CFG->wwwroot/admin/config.php\">".get_string("configvariables")."</A>";
|
||||
@@ -639,7 +639,7 @@ function print_admin_links ($siteid, $width=180) {
|
||||
}
|
||||
|
||||
function print_course_admin_links($course, $width=180) {
|
||||
global $USER, $THEME, $CFG;
|
||||
global $USER, $CFG;
|
||||
|
||||
if (isteacher($course->id)) {
|
||||
$adminicon[]="<IMG SRC=\"$CFG->wwwroot/pix/i/edit.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Displays different views of the logs.
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course ID
|
||||
optional_variable($user, 0); // User to display
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
<?PHP // $Id$
|
||||
// Produces a graph of log accesses
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require("$CFG->libdir/graphlib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
require_once("$CFG->libdir/graphlib.php");
|
||||
|
||||
require_variable($id); // Course ID
|
||||
require_variable($type); // Graph Type
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Allows a teacher/admin to login as another user (in stealth mode)
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course id
|
||||
optional_variable($user); // login as this user
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Displays live view of recent logs
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_login($id);
|
||||
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@
|
||||
|
||||
$modlib = "../mod/$mod->modulename/lib.php";
|
||||
if (file_exists($modlib)) {
|
||||
include($modlib);
|
||||
include_once($modlib);
|
||||
} else {
|
||||
error("This module is missing important code! ($modlib)");
|
||||
}
|
||||
@@ -163,7 +163,7 @@
|
||||
$form->fullmodulename = $fullmodulename;
|
||||
$form->instancename = $instance->name;
|
||||
|
||||
include("mod_delete.html");
|
||||
include_once("mod_delete.html");
|
||||
|
||||
exit;
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
|
||||
print_heading($pageheading);
|
||||
print_simple_box_start("center", "", "$THEME->cellheading");
|
||||
include($modform);
|
||||
include_once($modform);
|
||||
print_simple_box_end();
|
||||
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
// social.php - course format featuring social forum
|
||||
// included from view.php
|
||||
|
||||
include_once("$CFG->dirroot/mod/forum/lib.php");
|
||||
include_once("$CFG->dirroot/mod/resource/lib.php");
|
||||
require_once("$CFG->dirroot/mod/forum/lib.php");
|
||||
require_once("$CFG->dirroot/mod/resource/lib.php");
|
||||
|
||||
$leftwidth = 210;
|
||||
?>
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Admin-only script to assign teachers to courses
|
||||
|
||||
require("../config.php");
|
||||
require("../user/lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("../user/lib.php");
|
||||
|
||||
optional_variable($id); // course id
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Allows a teacher to edit teacher order and roles for a course
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course id
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
// courses that aren't so rigidly defined by time.
|
||||
// Included from "view.php"
|
||||
|
||||
include_once("$CFG->dirroot/mod/forum/lib.php");
|
||||
require_once("$CFG->dirroot/mod/forum/lib.php");
|
||||
|
||||
if (isset($topic)) {
|
||||
if ($topic == "all") {
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
// but will remove them from the student list and prevent
|
||||
// any course email being sent to them.
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); //course
|
||||
optional_variable($user, $USER->id); //user
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
// Display user activity reports for a course
|
||||
|
||||
require("../config.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course id
|
||||
require_variable($user); // user id
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
// Display the course home page.
|
||||
|
||||
include_once("../config.php");
|
||||
include_once("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($id);
|
||||
optional_variable($name);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Display the whole course as "weeks" made of of modules
|
||||
// Included from "view.php"
|
||||
|
||||
include_once("$CFG->dirroot/mod/forum/lib.php");
|
||||
require_once("$CFG->dirroot/mod/forum/lib.php");
|
||||
|
||||
|
||||
if (isset($week)) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// This function fetches files from the data directory
|
||||
// Syntax: file.php/courseid/dir/.../dir/filename.ext
|
||||
|
||||
require("config.php");
|
||||
require("files/mimetypes.php");
|
||||
require_once("config.php");
|
||||
require_once("files/mimetypes.php");
|
||||
|
||||
$lifetime = 86400;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// Usually this will appear in a popup
|
||||
/// See helpbutton() in lib/moodlelib.php
|
||||
|
||||
include("config.php");
|
||||
require_once("config.php");
|
||||
|
||||
optional_variable($file, "");
|
||||
optional_variable($text, "No text to display");
|
||||
@@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
if (file_exists("$filepath")) {
|
||||
include("$filepath"); // Chosen language
|
||||
require_once("$filepath"); // Chosen language
|
||||
|
||||
} else { // Fall back to English
|
||||
if ($module == "moodle") {
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
|
||||
if (file_exists("$filepath")) {
|
||||
include("$filepath");
|
||||
require_once("$filepath");
|
||||
} else {
|
||||
notify("Can not find the specified help file");
|
||||
die;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?PHP // $Id$
|
||||
// index.php - the front page.
|
||||
|
||||
require("config.php");
|
||||
require("course/lib.php");
|
||||
require("mod/resource/lib.php");
|
||||
require("mod/forum/lib.php");
|
||||
require_once("config.php");
|
||||
require_once("course/lib.php");
|
||||
require_once("mod/resource/lib.php");
|
||||
require_once("mod/forum/lib.php");
|
||||
|
||||
if (! $site = get_site()) {
|
||||
redirect("$CFG->wwwroot/admin/index.php");
|
||||
|
||||
+4
-4
@@ -15,7 +15,7 @@
|
||||
|
||||
/// Connect to the database using adodb
|
||||
|
||||
require("$CFG->libdir/adodb/adodb.inc.php"); // Database access functions
|
||||
require_once("$CFG->libdir/adodb/adodb.inc.php"); // Database access functions
|
||||
|
||||
$db = &ADONewConnection($CFG->dbtype);
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
|
||||
/// Load up standard libraries
|
||||
|
||||
require("$CFG->libdir/weblib.php"); // Functions for producing HTML
|
||||
require("$CFG->libdir/datalib.php"); // Functions for accessing databases
|
||||
require("$CFG->libdir/moodlelib.php"); // Other general-purpose functions
|
||||
require_once("$CFG->libdir/weblib.php"); // Functions for producing HTML
|
||||
require_once("$CFG->libdir/datalib.php"); // Functions for accessing databases
|
||||
require_once("$CFG->libdir/moodlelib.php"); // Other general-purpose functions
|
||||
|
||||
|
||||
/// Load up any configuration from the config table
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
include("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
optional_variable($id);
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
if ( isset($p) && isset($s) ) { # p = user.secret s = user.username
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
include("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
if ($frm = data_submitted()) {
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
require("../config.php");
|
||||
|
||||
require_once("../config.php");
|
||||
|
||||
// Check if the guest user exists. If not, create one.
|
||||
if (! record_exists("user", "username", "guest")) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
// Logs the user out and sends them to the home page
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
$USER = NULL;
|
||||
$SESSION = NULL;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../config.php");
|
||||
require("../lib/countries.php");
|
||||
require_once("../config.php");
|
||||
require_once("../lib/countries.php");
|
||||
|
||||
if ($user = data_submitted()) {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
include_once("$CFG->dirroot/files/mimetypes.php");
|
||||
require_once("$CFG->dirroot/files/mimetypes.php");
|
||||
|
||||
define("OFFLINE", "0");
|
||||
define("UPLOADSINGLE", "1");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Assignment
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Assignment ID
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($id); // Course Module ID
|
||||
optional_variable($a); // Assignment ID
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course module
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// Deletes a forum entirely.
|
||||
|
||||
require("../../config.php");
|
||||
require("mod.php");
|
||||
require_once("../../config.php");
|
||||
require_once("mod.php");
|
||||
|
||||
require_variable($f); // The forum to delete.
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// Displays a post, and all the posts below it.
|
||||
// If no post is given, displays all posts in a discussion
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($d); // Discussion ID
|
||||
optional_variable($parent); // If set, then display this post and all children.
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($id); // course
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
include_once("$CFG->dirroot/files/mimetypes.php");
|
||||
require_once("$CFG->dirroot/files/mimetypes.php");
|
||||
|
||||
/// CONSTANTS ///////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
// Edit and save a new post to a discussion
|
||||
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
if (isguest()) {
|
||||
error(get_string("noguestpost", "forum"), $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
// Collect ratings, store them, then return to where we came from
|
||||
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
if (isguest()) {
|
||||
error("Guests are not allowed to rate posts.", $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// For a given post, shows a report of all the ratings it has
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course id
|
||||
optional_variable($search, ""); // search string
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// Subscribe to or unsubscribe from a forum.
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // The forum to subscribe or unsubscribe to
|
||||
optional_variable($force); // Force everyone to be subscribed to this forum?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // forum
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($id); // Course Module ID
|
||||
optional_variable($f); // Forum ID
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require_once("../../config.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course module
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// This page prints a particular instance of quiz
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($id); // Course Module ID, or
|
||||
optional_variable($q); // quiz ID
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
// Allows a teacher to create, edit and delete categories
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_login();
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
// This page lists all the instances of quiz in a particular course
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<!-- It is used from /course/mod.php. The whole instance is available as $form. -->
|
||||
|
||||
<?PHP
|
||||
include_once("$CFG->dirroot/mod/quiz/lib.php");
|
||||
require_once("$CFG->dirroot/mod/quiz/lib.php");
|
||||
|
||||
if (empty($form->name)) {
|
||||
$form->name = "";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?PHP // $Id$
|
||||
/// For creating and editing quiz questions.
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require("../../files/mimetypes.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
require_once("../../files/mimetypes.php");
|
||||
|
||||
optional_variable($id);
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
// This page prints a particular instance of quiz
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($id); // Course Module ID, or
|
||||
optional_variable($q); // quiz ID
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
// This page prints a particular instance of quiz
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
optional_variable($id); // Course Module ID, or
|
||||
optional_variable($q); // quiz ID
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_login();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require_once("../../config.php");
|
||||
|
||||
require_variable($id); // course
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require_once("../../config.php");
|
||||
|
||||
if ($form = data_submitted($destination)) {
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
// Output the file as a valid Excel spreadsheet if required
|
||||
|
||||
if ($type == "xls") {
|
||||
include( "$CFG->libdir/psxlsgen.php" );
|
||||
require_once( "$CFG->libdir/psxlsgen.php" );
|
||||
|
||||
|
||||
$myxls = new PhpSimpleXlsGen();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("$CFG->libdir/graphlib.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("$CFG->libdir/graphlib.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
require_variable($type); // Graph Type
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../../config.php");
|
||||
require("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // course
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
include("../../config.php");
|
||||
include("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
// Check that all the parameters have been provided.
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require('../../config.php');
|
||||
require('lib.php');
|
||||
require_once('../../config.php');
|
||||
require_once('lib.php');
|
||||
|
||||
|
||||
// Make sure this is a legitimate posting
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
include("../../config.php");
|
||||
include("lib.php");
|
||||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course Module ID
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
optional_variable($preview); // which theme to show
|
||||
optional_variable($choose); // set this theme as default
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
require("../config.php");
|
||||
require("../lib/countries.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("../lib/countries.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // user id
|
||||
require_variable($course); // course id
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
|
||||
// Lists all the users within a given course
|
||||
|
||||
require("../config.php");
|
||||
require("../lib/countries.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("../lib/countries.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); //course
|
||||
optional_variable($sort, "lastaccess"); //how to sort students
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Syntax: pix.php/userid/f1.jpg or pix.php/userid/f2.jpg
|
||||
// OR: ?file=userid/f1.jpg or ?file=userid/f2.jpg
|
||||
|
||||
require("../config.php");
|
||||
require_once("../config.php");
|
||||
|
||||
$lifetime = 86400;
|
||||
|
||||
|
||||
+4
-4
@@ -2,10 +2,10 @@
|
||||
|
||||
// Display profile for a particular user
|
||||
|
||||
require("../config.php");
|
||||
require("../lib/countries.php");
|
||||
require("../mod/forum/lib.php");
|
||||
require("lib.php");
|
||||
require_once("../config.php");
|
||||
require_once("../lib/countries.php");
|
||||
require_once("../mod/forum/lib.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id);
|
||||
require_variable($course);
|
||||
|
||||
Reference in New Issue
Block a user