]> git.mjollnir.org Git - moodle.git/commitdiff
Moved the quiz constants into lib.php to keep things simple.
authorgustav_delius <gustav_delius>
Mon, 20 Mar 2006 20:59:46 +0000 (20:59 +0000)
committergustav_delius <gustav_delius>
Mon, 20 Mar 2006 20:59:46 +0000 (20:59 +0000)
mod/quiz/backuplib.php
mod/quiz/constants.php [deleted file]
mod/quiz/lib.php

index b2c9a2c6c9a844afd56e8ed9b88921bc4e85aa34..fc2093feca8775c2ea1fb30de11c509d5835b604 100644 (file)
     //Insert necessary category ids to backup_ids table
     function insert_category_ids ($course,$backup_unique_code,$instances=null) {
         global $CFG;
-        include_once("$CFG->dirroot/mod/quiz/constants.php");
+        include_once("$CFG->dirroot/mod/quiz/lib.php");
 
         //Create missing categories and reasign orphaned questions
         fix_orphaned_questions($course);
diff --git a/mod/quiz/constants.php b/mod/quiz/constants.php
deleted file mode 100644 (file)
index f626064..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php  // $Id$
-/**
-* Constants for the questions and quizzes.
-*
-* This is included by lib.php as well as questionlib.php
-* @version $Id$
-* @author Martin Dougiamas and many others. This has recently been completely
-*         rewritten by Alex Smith, Julian Sedding and Gustav Delius as part of
-*         the Serving Mathematics project
-*         {@link http://maths.york.ac.uk/serving_maths}
-* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
-* @package quiz
-*/
-
-/// CONSTANTS ///////////////////////////////////////////////////////////////////
-
-/**#@+
-* The different review options are stored in the bits of $quiz->review
-* These constants help to extract the options
-*/
-/**
-* The first 6 bits refer to the time immediately after the attempt
-*/
-define('QUIZ_REVIEW_IMMEDIATELY', 64-1);
-/**
-* the next 6 bits refer to the time after the attempt but while the quiz is open
-*/
-define('QUIZ_REVIEW_OPEN', 4096-64);
-/**
-* the final 6 bits refer to the time after the quiz closes
-*/
-define('QUIZ_REVIEW_CLOSED', 262144-4096);
-
-// within each group of 6 bits we determine what should be shown
-define('QUIZ_REVIEW_RESPONSES', 1+64+4096);    // Show responses
-define('QUIZ_REVIEW_SCORES', 2*4161);   // Show scores
-define('QUIZ_REVIEW_FEEDBACK', 4*4161); // Show feedback
-define('QUIZ_REVIEW_ANSWERS', 8*4161);  // Show correct answers
-// Some handling of worked solutions is already in the code but not yet fully supported
-// and not switched on in the user interface.
-define('QUIZ_REVIEW_SOLUTIONS', 16*4161);  // Show solutions
-// the 6th bit is as yet unused
-/**#@-*/
-
-/**
-* If start and end date for the quiz are more than this many seconds apart
-* they will be represented by two separate events in the calendar
-*/
-define("QUIZ_MAX_EVENT_LENGTH", "432000");   // 5 days maximum
-
-?>
index ebc8eed8db6198e7929b24dfdea9d6526f614b3c..de7a4d221835beeb2a8b349d7b3e6ae55f48e510 100644 (file)
 require_once($CFG->libdir.'/pagelib.php');
 require_once($CFG->dirroot.'/mod/quiz/constants.php');
 
+/// CONSTANTS ///////////////////////////////////////////////////////////////////
+
+/**#@+
+ * The different review options are stored in the bits of $quiz->review
+ * These constants help to extract the options
+ */
+/**
+ * The first 6 bits refer to the time immediately after the attempt
+ */
+define('QUIZ_REVIEW_IMMEDIATELY', 64-1);
+/**
+ * the next 6 bits refer to the time after the attempt but while the quiz is open
+ */
+define('QUIZ_REVIEW_OPEN', 4096-64);
+/**
+ * the final 6 bits refer to the time after the quiz closes
+ */
+define('QUIZ_REVIEW_CLOSED', 262144-4096);
+
+// within each group of 6 bits we determine what should be shown
+define('QUIZ_REVIEW_RESPONSES', 1+64+4096);    // Show responses
+define('QUIZ_REVIEW_SCORES', 2*4161);   // Show scores
+define('QUIZ_REVIEW_FEEDBACK', 4*4161); // Show feedback
+define('QUIZ_REVIEW_ANSWERS', 8*4161);  // Show correct answers
+// Some handling of worked solutions is already in the code but not yet fully supported
+// and not switched on in the user interface.
+define('QUIZ_REVIEW_SOLUTIONS', 16*4161);  // Show solutions
+// the 6th bit is as yet unused
+/**#@-*/
+
+/**
+ * If start and end date for the quiz are more than this many seconds apart
+ * they will be represented by two separate events in the calendar
+ */
+define("QUIZ_MAX_EVENT_LENGTH", "432000");   // 5 days maximum
 
 /// FUNCTIONS ///////////////////////////////////////////////////////////////////