<?php //$Id$
- //This php script contains all the stuff to backup questions
+/**
+ * Question bank backup code.
+ *
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package questionbank
+ *//** */
//This is the "graphical" structure of the question database:
//To see, put your terminal to 160cc
/**
* Allows a teacher to create, edit and delete categories
*
- * @version $Id$
* @author Martin Dougiamas and many others.
* {@link http://moodle.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package question
+ * @package questionbank
*/
require_once("../config.php");
<?php // $Id$
/**
- * Class question_category_object
+ * Class representing question categories
*
- * Used for handling changes to the question categories
- *
- * @version $Id$
* @author Martin Dougiamas and many others. {@link http://moodle.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package question
+ * @package questionbank
*/
// number of categories to display on page
define( "PAGE_LENGTH",25 );
+/**
+ * Class representing question categories
+ *
+ * @package questionbank
+ */
class question_category_object {
var $str;
*
* TODO: add logging
*
-* @version $Id$
* @author Martin Dougiamas and many others. This has recently been extensively
* rewritten by Gustav Delius and other members 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 question
+* @package questionbank
*/
require_once("../config.php");
require_once("editlib.php");
<?php // $Id$
/**
-* Functions used by showbank.php to show question editing interface
-*
-* TODO: currently the function question_list still provides controls specific
-* to the quiz module. This needs to be generalised.
-*
-* @version $Id$
-* @author Martin Dougiamas and many others. This has recently been extensively
-* rewritten by members 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 question
-*/
+ * Functions used by showbank.php to show question editing interface
+ *
+ * TODO: currently the function question_list still provides controls specific
+ * to the quiz module. This needs to be generalised.
+ *
+ * @author Martin Dougiamas and many others. This has recently been extensively
+ * rewritten by members 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 questionbank
+ */
require_once($CFG->libdir.'/questionlib.php');
<?php // $Id$
/**
-* Export quiz questions into the given category
-*
-* @version $Id$
-* @author Martin Dougiamas, Howard Miller, and many others.
-* {@link http://moodle.org}
-* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
-* @package quiz
-*/
+ * Export quiz questions into the given category
+ *
+ * @author Martin Dougiamas, Howard Miller, and many others.
+ * {@link http://moodle.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package questionbank
+ * @subpackage importexport
+ */
require_once("../config.php");
require_once( "editlib.php" );
<?php // $Id$
-
-////////////////////////////////////////////////////////////////////
-/// format.php - Default format class for file imports/exports. //
-/// //
-/// Doesn't do everything on it's own -- it needs to be extended. //
-////////////////////////////////////////////////////////////////////
-
-// Included by import.php and export.php
-
+/**
+ * Base class for question import and export formats.
+ *
+ * @author Martin Dougiamas, Howard Miller, and many others.
+ * {@link http://moodle.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package questionbank
+ * @subpackage importexport
+ *//** */
+
+/**
+ * Base class for question import and export formats.
+ *
+ * Doesn't do everything on it's own -- it needs to be extended.
+ *
+ * @package questionbank
+ * @subpackage importexport
+ */
class qformat_default {
var $displayerrors = true;
<?php // $Id$
/**
-* Import quiz questions into the given category
-*
-* @version $Id$
-* @author Martin Dougiamas, Howard Miller, and many others.
-* {@link http://moodle.org}
-* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
-* @package quiz
-*/
+ * Import quiz questions into the given category
+ *
+ * @author Martin Dougiamas, Howard Miller, and many others.
+ * {@link http://moodle.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package questionbank
+ * @subpackage importexport
+ */
require_once("../config.php");
require_once("editlib.php" );
<?php // $Id$
/**
-* This page displays a preview of a question
-*
-* The preview uses the option settings from the activity within which the question
-* is previewed or the default settings if no activity is specified. The question session
-* information is stored in the session as an array of subsequent states rather
-* than in the database.
-*
-* TODO: make this work with activities other than quiz
-*
-* @version $Id$
-* @author Alex Smith 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 question
-*/
+ * This page displays a preview of a question
+ *
+ * The preview uses the option settings from the activity within which the question
+ * is previewed or the default settings if no activity is specified. The question session
+ * information is stored in the session as an array of subsequent states rather
+ * than in the database.
+ *
+ * TODO: make this work with activities other than quiz
+ *
+ * @author Alex Smith 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 questionbank
+ */
require_once("../config.php");
require_once($CFG->libdir.'/questionlib.php');
-<?php
+<?php // $Id$
/**
* Page for editing questions
*
* TODO: currently this still treats the quiz as special
* TODO: question versioning is not currently enabled
*
- * @version $Id$
* @author Martin Dougiamas and many others. This has recently been extensively
* rewritten by members 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 question
+ * @package questionbank
*//** */
require_once(dirname(__FILE__) . '/../config.php');
*
* @author T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package question
+ * @package questionbank
*//** */
// Includes.
<?php //$Id$
- //This php script contains all the stuff to restore questions
+/**
+ * Question bank restore code.
+ *
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package questionbank
+ *//** */
// Todo:
// the restoration of the parent and sortorder fields in the category table needs
<?php // $Id$
/**
-* Shows the question bank editing interface. To be included by other pages
-*
-* The script also processes a number of actions:
-* Actions affecting the question pool:
-* move Moves a question to a different category
-* deleteselected Deletes the selected questions from the category
-* Other actions:
-* cat Chooses the category
-* displayoptions Sets display options
-*
-* @version $Id$
-* @author Martin Dougiamas and many others. This has recently been extensively
-* rewritten by Gustav Delius and other members 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 question
-*/
+ * Shows the question bank editing interface. To be included by other pages
+ *
+ * The script also processes a number of actions:
+ *
+ * Actions affecting the question pool:
+ * move Moves a question to a different category
+ * deleteselected Deletes the selected questions from the category
+ * Other actions:
+ * cat Chooses the category
+ * displayoptions Sets display options
+ *
+ * @author Martin Dougiamas and many others. This has recently been extensively
+ * rewritten by Gustav Delius and other members 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 questionbank
+ */
// Make sure this can only be used from within Moodle scripts
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
<?php // $Id$
/**
-* Sets up the tabs used by the question bank editing page
-*
-* @version $Id$
-* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
-* @package question
-*/
+ * Sets up the tabs used by the question bank editing page
+ *
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package questionbank
+ */
/// This file to be included so we can assume config.php has already been included.
* @copyright © 2006 The Open University
* @author T.J.Hunt@open.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package quiz
+ * @package questionbank
+ * @subpackage questiontypes
*//** */
/**
* all question types need. Question types should define their own
* class that inherits from this one, and implements the definition_inner()
* method.
+ *
+ * @package questionbank
+ * @subpackage questiontypes
*/
class question_edit_form extends moodleform {
/**
<?php // $Id$
/**
-* The default questiontype class.
-*
-* @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
-*//** */
+ * The default questiontype class.
+ *
+ * @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 questionbank
+ * @subpackage questiontypes
+ *//** */
require_once($CFG->libdir . '/questionlib.php');
* experiences of the first few question type implementors, and improve the
* interface to meet their needs, rather the freeze the API prematurely and
* condem everyone to working round a clunky interface for ever afterwards.
+ *
+ * @package questionbank
+ * @subpackage questiontypes
*/
class default_questiontype {