Skip to content

Commit

Permalink
Give the question bank code sensible PHPdocumentor package names.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Mar 19, 2007
1 parent 77d0833 commit 4323d02
Show file tree
Hide file tree
Showing 16 changed files with 123 additions and 101 deletions.
7 changes: 6 additions & 1 deletion question/backuplib.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?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
Expand Down
3 changes: 1 addition & 2 deletions question/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
/**
* 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");
Expand Down
12 changes: 7 additions & 5 deletions question/category_class.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<?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;
Expand Down
3 changes: 1 addition & 2 deletions question/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
*
* 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");
Expand Down
23 changes: 11 additions & 12 deletions question/editlib.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?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');

Expand Down
16 changes: 8 additions & 8 deletions question/export.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?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" );
Expand Down
27 changes: 18 additions & 9 deletions question/format.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
<?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;
Expand Down
16 changes: 8 additions & 8 deletions question/import.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?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" );
Expand Down
29 changes: 14 additions & 15 deletions question/preview.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?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');
Expand Down
5 changes: 2 additions & 3 deletions question/question.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php // $Id$
/**
* Page for editing questions
*
Expand All @@ -10,12 +10,11 @@
* 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');
Expand Down
2 changes: 1 addition & 1 deletion question/question2.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @author [email protected]
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package question
* @package questionbank
*//** */

// Includes.
Expand Down
7 changes: 6 additions & 1 deletion question/restorelib.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?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
Expand Down
34 changes: 17 additions & 17 deletions question/showbank.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?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.');
Expand Down
11 changes: 5 additions & 6 deletions question/tabs.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?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.

Expand Down
6 changes: 5 additions & 1 deletion question/type/edit_question_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
* @copyright &copy; 2006 The Open University
* @author [email protected]
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package quiz
* @package questionbank
* @subpackage questiontypes
*//** */

/**
* Form definition base class. This defines the common fields that
* 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 {
/**
Expand Down
23 changes: 13 additions & 10 deletions question/type/questiontype.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?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');

Expand All @@ -25,6 +25,9 @@
* 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 {

Expand Down

0 comments on commit 4323d02

Please sign in to comment.