diff --git a/mod/quiz/accessrules.php b/mod/quiz/accessrules.php index 219a482e19f..806328880f4 100644 --- a/mod/quiz/accessrules.php +++ b/mod/quiz/accessrules.php @@ -18,10 +18,10 @@ /** * Sets up the tabs used by the quiz pages based on the users capabilites. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 2009 Tim Hunt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2009 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** @@ -430,6 +430,7 @@ class quiz_access_manager { } } + /** * A base class that defines the interface for the various quiz access rules. * Most of the methods are defined in a slightly unnatural way because we either diff --git a/mod/quiz/addrandom.php b/mod/quiz/addrandom.php index 7c4d12d8c42..b20a88aced0 100644 --- a/mod/quiz/addrandom.php +++ b/mod/quiz/addrandom.php @@ -1,13 +1,31 @@ . + /** * Fallback page of /mod/quiz/edit.php add random question dialog, * for users who do not use javascript. * - * @author Olli Savolainen, as a part of the Quiz UI Redesign project in Summer 2008 - * {@link http://docs.moodle.org/en/Development:Quiz_UI_redesign}. - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package quiz + * @package mod + * @subpackage quiz + * @copyright 2008 Olli Savolainen + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + + require_once('../../config.php'); require_once($CFG->dirroot . '/mod/quiz/editlib.php'); require_once($CFG->dirroot . '/mod/quiz/addrandomform.php'); diff --git a/mod/quiz/addrandomform.php b/mod/quiz/addrandomform.php index 2db19f3526c..8da771a8706 100644 --- a/mod/quiz/addrandomform.php +++ b/mod/quiz/addrandomform.php @@ -1,7 +1,39 @@ . + +/** + * Defines the Moodle forum used to add random questions to the quiz. + * + * @package mod + * @subpackage quiz + * @copyright 2008 Olli Savolainen + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + + require_once($CFG->libdir.'/formslib.php'); + +/** + * The add random questions form. + * + * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class quiz_add_random_form extends moodleform { function definition() { diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index e131e516f70..691f56f86ac 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -18,10 +18,10 @@ /** * This script displays a particular page of a quiz attempt that is in progress. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(dirname(__FILE__) . '/../../config.php'); diff --git a/mod/quiz/attemptlib.php b/mod/quiz/attemptlib.php index 1637eb50c51..41e731bfcc4 100644 --- a/mod/quiz/attemptlib.php +++ b/mod/quiz/attemptlib.php @@ -21,10 +21,10 @@ * There are classes for loading all the information about a quiz and attempts, * and for displaying the navigation panel. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 2008 onwards Tim Hunt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2008 onwards Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/comment.php b/mod/quiz/comment.php index e92633dbe5c..e752fae14cd 100644 --- a/mod/quiz/comment.php +++ b/mod/quiz/comment.php @@ -19,10 +19,10 @@ * This page allows the teacher to enter a manual grade for a particular question. * This page is expected to only be used in a popup window. * - * @package mod + * @package mod * @subpackage quiz - * @copyright gustav delius 2006 - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright gustav delius 2006 + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once('../../config.php'); diff --git a/mod/quiz/db/access.php b/mod/quiz/db/access.php index d4dfdd6ffdc..50357c0e0d9 100644 --- a/mod/quiz/db/access.php +++ b/mod/quiz/db/access.php @@ -1,9 +1,29 @@ . + /** * Capability definitions for the quiz module. * - * For naming conventions, see lib/db/access.php. + * @package mod + * @subpackage quiz + * @copyright 2006 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + $capabilities = array( // Ability to see that the quiz exists, and the basic information diff --git a/mod/quiz/db/install.php b/mod/quiz/db/install.php index cb9036e8396..75c3ad83373 100644 --- a/mod/quiz/db/install.php +++ b/mod/quiz/db/install.php @@ -1,10 +1,33 @@ . +/** + * Post-install code for the quiz module. + * + * @package mod + * @subpackage quiz + * @copyright 2009 Petr Skoda + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + + +/** + * Code run after the quiz module database tables have been created. + */ function xmldb_quiz_install() { global $DB; @@ -22,5 +45,4 @@ function xmldb_quiz_install() { $record->name = 'grading'; $record->displayorder = '6000'; $DB->insert_record('quiz_report', $record); - } diff --git a/mod/quiz/db/log.php b/mod/quiz/db/log.php index 8db9d268753..ce0fccd9d45 100644 --- a/mod/quiz/db/log.php +++ b/mod/quiz/db/log.php @@ -16,7 +16,7 @@ // along with Moodle. If not, see . /** - * Definition of log events + * Definition of log events for the quiz module. * * @package mod * @subpackage quiz diff --git a/mod/quiz/db/messages.php b/mod/quiz/db/messages.php index 04f95d52f24..159b0e2e92f 100644 --- a/mod/quiz/db/messages.php +++ b/mod/quiz/db/messages.php @@ -16,12 +16,12 @@ // along with Moodle. If not, see . /** - * Defines message providers (types of messages being sent) + * Defines message providers (types of message sent) for the quiz module. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 2010 onwards Andrew Davis http://moodle.com - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2010 Andrew Davis http://moodle.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $messageproviders = array ( diff --git a/mod/quiz/db/subplugins.php b/mod/quiz/db/subplugins.php index 06f8ac16bf4..26181ee18e4 100644 --- a/mod/quiz/db/subplugins.php +++ b/mod/quiz/db/subplugins.php @@ -1,3 +1,27 @@ 'mod/quiz/report'); +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Sub-plugin definitions for the quiz module. + * + * @package mod + * @subpackage quiz + * @copyright 2010 Petr Skoda + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$subplugins = array('quiz' => 'mod/quiz/report'); diff --git a/mod/quiz/db/upgrade.php b/mod/quiz/db/upgrade.php index 28c59c654d4..969e452d6af 100644 --- a/mod/quiz/db/upgrade.php +++ b/mod/quiz/db/upgrade.php @@ -1,25 +1,34 @@ . +/** + * Upgrade script for the quiz module. + * + * @package mod + * @subpackage quiz + * @copyright 2006 Eloy Lafuente (stronk7) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + + +/** + * Quiz module upgrade function. + * @param string $oldversion the version we are upgrading from. + */ function xmldb_quiz_upgrade($oldversion) { global $CFG, $DB; diff --git a/mod/quiz/edit.js b/mod/quiz/edit.js index 447e712523e..86b1c016179 100644 --- a/mod/quiz/edit.js +++ b/mod/quiz/edit.js @@ -16,10 +16,10 @@ /** * JavaScript library for the quiz module editing interface. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 2008 Olli Savolainen - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2008 Olli Savolainen + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 3539ef6b0c0..366b7b5efec 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -36,10 +36,10 @@ * delete Removes a question from the quiz * savechanges Saves the order and grades for questions in the quiz * - * @package mod + * @package mod * @subpackage quiz - * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index d4edd78c61a..b7a9d5119e8 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -23,10 +23,10 @@ * the module-indpendent code for handling questions and which in turn * initialises all the questiontype classes. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/grade.php b/mod/quiz/grade.php index 0fea9ae3ad3..312e0e7025f 100644 --- a/mod/quiz/grade.php +++ b/mod/quiz/grade.php @@ -1,27 +1,53 @@ . - $id = required_param('id', PARAM_INT); // Course module ID - - if (! $cm = get_coursemodule_from_id('quiz', $id)) { - print_error('invalidcoursemodule'); - } - - if (! $quiz = $DB->get_record('quiz', array('id' => $cm->instance))) { - print_error('invalidquizid'); - } - - if (! $course = $DB->get_record('course', array('id' => $quiz->course))) { - print_error('coursemisconf'); - } - - require_login($course->id, false, $cm); - - if (has_capability('mod/quiz:viewreports', get_context_instance(CONTEXT_MODULE, $cm->id))) { - redirect('report.php?id='.$cm->id); - } else { - redirect('view.php?id='.$cm->id); - } +/** + * This page is the entry page into the quiz UI. Displays information about the + * quiz to students and teachers, and lets students see their previous attempts. + * + * @package mod + * @subpackage quiz + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +require_once(dirname(__FILE__) . '/../../config.php'); +require_once($CFG->dirroot . '/mod/quiz/report/reportlib.php'); + + +$id = required_param('id', PARAM_INT); + +if (!$cm = get_coursemodule_from_id('quiz', $id)) { + print_error('invalidcoursemodule'); +} +if (!$quiz = $DB->get_record('quiz', array('id' => $cm->instance))) { + print_error('invalidquizid'); +} +if (!$course = $DB->get_record('course', array('id' => $quiz->course))) { + print_error('coursemisconf'); +} + +require_login($course, false, $cm); + +$reportlist = quiz_report_list(get_context_instance(CONTEXT_MODULE, $cm->id)); +if (!empty($reportlist)) { + redirect(new moodle_url('/mod/quiz/report.php', array( + 'id' => $cm->id, 'mode' => reset($reportlist)))); +} else { + redirect(new moodle_url('/mod/quiz/view.php', array('id' => $cm->id))); +} diff --git a/mod/quiz/index.php b/mod/quiz/index.php index 51badbe12ef..bfe542514f6 100644 --- a/mod/quiz/index.php +++ b/mod/quiz/index.php @@ -15,15 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . - /** * This script lists all the instances of quiz in a particular course * - * @package mod + * @package mod * @subpackage quiz - * @author Martin Dougiamas and many others. - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + + require_once("../../config.php"); require_once("locallib.php"); diff --git a/mod/quiz/lang/en/quiz.php b/mod/quiz/lang/en/quiz.php index 13f1cb238a2..420fca6ac60 100644 --- a/mod/quiz/lang/en/quiz.php +++ b/mod/quiz/lang/en/quiz.php @@ -18,9 +18,10 @@ /** * Strings for component 'quiz', language 'en', branch 'MOODLE_20_STABLE' * - * @package quiz - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['acceptederror'] = 'Accepted error'; diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index be6909692a9..0fd03e8ceb2 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -21,10 +21,10 @@ * This contains functions that are called also from outside the quiz module * Functions that are only called by the quiz module itself are in {@link locallib.php} * - * @package mod + * @package mod * @subpackage quiz - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index e953ed141ff..45ef5ec66dd 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -24,10 +24,10 @@ * the module-indpendent code for handling questions and which in turn * initialises all the questiontype classes. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ if (!defined('MOODLE_INTERNAL')) { diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php index dbe1094fd14..f424ccbfd3d 100644 --- a/mod/quiz/mod_form.php +++ b/mod/quiz/mod_form.php @@ -1,34 +1,34 @@ . + +/** + * Defines the quiz module ettings form. + * + * @package mod + * @subpackage quiz + * @copyright 2006 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page } - require_once($CFG->dirroot . '/course/moodleform_mod.php'); require_once($CFG->dirroot . '/mod/quiz/locallib.php'); @@ -36,8 +36,8 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php'); /** * Settings form for the quiz module. * - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package quiz + * @copyright 2006 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class mod_quiz_mod_form extends moodleform_mod { protected $_feedbacks; diff --git a/mod/quiz/module.js b/mod/quiz/module.js index 6d3b4757a01..354da1c6233 100644 --- a/mod/quiz/module.js +++ b/mod/quiz/module.js @@ -1,7 +1,10 @@ -/* +/** * JavaScript library for the quiz module. * - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License + * @package mod + * @subpackage quiz + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ M.mod_quiz = M.mod_quiz || {}; diff --git a/mod/quiz/override_form.php b/mod/quiz/override_form.php index 00c3fc72826..a7a5e099e0b 100644 --- a/mod/quiz/override_form.php +++ b/mod/quiz/override_form.php @@ -15,21 +15,29 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . - /** * Settings form for overrides in the quiz module. * - * @package mod_quiz - * @copyright 2010 Matt Petro - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 2010 Matt Petro + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page } require_once $CFG->libdir.'/formslib.php'; + +/** + * Form for editing settings overrides. + * + * @copyright 2010 Matt Petro + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class quiz_override_form extends moodleform { protected $cm; // course module object diff --git a/mod/quiz/overridedelete.php b/mod/quiz/overridedelete.php index 5170787d706..4ba06fc3b81 100644 --- a/mod/quiz/overridedelete.php +++ b/mod/quiz/overridedelete.php @@ -15,15 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . - /** * This page handles deleting quiz overrides * - * @package mod_quiz - * @copyright 2010 Matt Petro - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 2010 Matt Petro + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot.'/mod/quiz/lib.php'); require_once($CFG->dirroot.'/mod/quiz/locallib.php'); diff --git a/mod/quiz/overrideedit.php b/mod/quiz/overrideedit.php index d340435157a..542dbc796b3 100644 --- a/mod/quiz/overrideedit.php +++ b/mod/quiz/overrideedit.php @@ -15,15 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . - /** * This page handles editing and creation of quiz overrides * - * @package mod_quiz - * @copyright 2010 Matt Petro - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 2010 Matt Petro + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot.'/mod/quiz/lib.php'); require_once($CFG->dirroot.'/mod/quiz/locallib.php'); diff --git a/mod/quiz/overrides.php b/mod/quiz/overrides.php index 05357931d40..876788deb88 100644 --- a/mod/quiz/overrides.php +++ b/mod/quiz/overrides.php @@ -15,15 +15,16 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . - /** * This page handles listing of quiz overrides * - * @package mod_quiz - * @copyright 2010 Matt Petro - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 2010 Matt Petro + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot.'/mod/quiz/lib.php'); require_once($CFG->dirroot.'/mod/quiz/locallib.php'); diff --git a/mod/quiz/pix/icon.gif b/mod/quiz/pix/icon.gif deleted file mode 100644 index 47b7040d2b1..00000000000 Binary files a/mod/quiz/pix/icon.gif and /dev/null differ diff --git a/mod/quiz/pix/icon.png b/mod/quiz/pix/icon.png new file mode 100644 index 00000000000..dcaf4565e4e Binary files /dev/null and b/mod/quiz/pix/icon.png differ diff --git a/mod/quiz/processattempt.php b/mod/quiz/processattempt.php index b1b052c6735..00f77445982 100644 --- a/mod/quiz/processattempt.php +++ b/mod/quiz/processattempt.php @@ -24,10 +24,10 @@ * * This code used to be near the top of attempt.php, if you are looking for CVS history. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 2009 Tim Hunt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2009 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(dirname(__FILE__) . '/../../config.php'); diff --git a/mod/quiz/report.php b/mod/quiz/report.php index 44675f8e25e..243b4faedab 100644 --- a/mod/quiz/report.php +++ b/mod/quiz/report.php @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . - /** * This script controls the display of the quiz reports. * - * @package mod_quiz - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -68,7 +68,7 @@ $context = get_context_instance(CONTEXT_MODULE, $cm->id); $PAGE->set_pagelayout('report'); $reportlist = quiz_report_list($context); -if (count($reportlist) == 0) { +if (empty($reportlist)) { print_error('erroraccessingreport', 'quiz'); } diff --git a/mod/quiz/report/default.php b/mod/quiz/report/default.php index bc579b34413..9fc33134c08 100644 --- a/mod/quiz/report/default.php +++ b/mod/quiz/report/default.php @@ -18,9 +18,10 @@ /** * Base class for quiz report plugins. * - * @package mod_quiz - * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -36,8 +37,8 @@ * to itself - all these will also be globally available. You must * pass "id=$cm->id" or q=$quiz->id", and "mode=reportname". * - * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ abstract class quiz_default_report { /** diff --git a/mod/quiz/report/grading/db/access.php b/mod/quiz/report/grading/db/access.php index 385e60dea4f..eac7be2b5c3 100644 --- a/mod/quiz/report/grading/db/access.php +++ b/mod/quiz/report/grading/db/access.php @@ -18,10 +18,10 @@ /** * Capability definitions for the quiz manual grading report. * - * @package quiz + * @package quiz * @subpackage grading - * @copyright 2010 The Open University - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2010 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $capabilities = array( diff --git a/mod/quiz/report/grading/gradingsettings_form.php b/mod/quiz/report/grading/gradingsettings_form.php index 053c0b9ce94..a280cd65bd0 100644 --- a/mod/quiz/report/grading/gradingsettings_form.php +++ b/mod/quiz/report/grading/gradingsettings_form.php @@ -18,9 +18,10 @@ /** * This file defines the setting form for the quiz grading report. * - * @package quiz_grading - * @copyright 2010 Tim Hunt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage grading + * @copyright 2010 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -30,8 +31,8 @@ require_once($CFG->libdir . '/formslib.php'); /** * Quiz grading report settings form. * - * @copyright 2010 Tim Hunt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2010 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class quiz_grading_settings extends moodleform { protected $includeauto; diff --git a/mod/quiz/report/grading/lang/en/quiz_grading.php b/mod/quiz/report/grading/lang/en/quiz_grading.php index 197bf025234..1301f871ef6 100644 --- a/mod/quiz/report/grading/lang/en/quiz_grading.php +++ b/mod/quiz/report/grading/lang/en/quiz_grading.php @@ -18,9 +18,10 @@ /** * Strings for component 'quiz_grading', language 'en', branch 'MOODLE_20_STABLE' * - * @package quiz_grading - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage grading + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['alldoneredirecting'] = 'All selected attempts have been graded. Returning to the list of questions.'; diff --git a/mod/quiz/report/grading/report.php b/mod/quiz/report/grading/report.php index 59c5f4d5365..23d6c349205 100644 --- a/mod/quiz/report/grading/report.php +++ b/mod/quiz/report/grading/report.php @@ -18,9 +18,10 @@ /** * This file defines the quiz manual grading report class. * - * @package quiz_grading - * @copyright 2006 Gustav Delius - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage grading + * @copyright 2006 Gustav Delius + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -34,8 +35,8 @@ require_once($CFG->dirroot . '/mod/quiz/report/grading/gradingsettings_form.php' * - List question that might need manual grading (or optionally all questions). * - Provide an efficient UI to grade all attempts at a particular question. * - * @copyright 2006 Gustav Delius - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2006 Gustav Delius + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class quiz_grading_report extends quiz_default_report { const DEFAULT_PAGE_SIZE = 5; diff --git a/mod/quiz/report/grading/version.php b/mod/quiz/report/grading/version.php index 9ff23c41924..141d9203dfc 100644 --- a/mod/quiz/report/grading/version.php +++ b/mod/quiz/report/grading/version.php @@ -18,9 +18,10 @@ /** * Quiz grading report version information. * - * @package quiz_grading - * @copyright 2010 The Open University - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage grading + * @copyright 2010 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $plugin->version = 2011021400; diff --git a/mod/quiz/report/overview/lang/en/quiz_overview.php b/mod/quiz/report/overview/lang/en/quiz_overview.php index 0eb69b8fe24..c98ac931e66 100644 --- a/mod/quiz/report/overview/lang/en/quiz_overview.php +++ b/mod/quiz/report/overview/lang/en/quiz_overview.php @@ -18,9 +18,10 @@ /** * Strings for component 'quiz_overview', language 'en', branch 'MOODLE_20_STABLE' * - * @package quiz_overview - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage overview + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['allattempts'] = 'Show all attempts'; diff --git a/mod/quiz/report/overview/overview_table.php b/mod/quiz/report/overview/overview_table.php index a976c65df21..bfe097256a6 100644 --- a/mod/quiz/report/overview/overview_table.php +++ b/mod/quiz/report/overview/overview_table.php @@ -18,17 +18,18 @@ /** * This file defines the quiz grades table. * - * @package quiz_overview - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage overview + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * This is a table subclass for displaying the quiz grades report. * - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class quiz_report_overview_table extends quiz_attempt_report_table { diff --git a/mod/quiz/report/overview/overviewgraph.php b/mod/quiz/report/overview/overviewgraph.php index 76f64b2cc92..4b5f2a7137d 100644 --- a/mod/quiz/report/overview/overviewgraph.php +++ b/mod/quiz/report/overview/overviewgraph.php @@ -18,9 +18,10 @@ /** * This file renders the quiz overview graph. * - * @package quiz_overview - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage overview + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/report/overview/overviewsettings_form.php b/mod/quiz/report/overview/overviewsettings_form.php index 0f32664de07..85bf30c7da3 100644 --- a/mod/quiz/report/overview/overviewsettings_form.php +++ b/mod/quiz/report/overview/overviewsettings_form.php @@ -18,9 +18,10 @@ /** * This file defines the setting form for the quiz overview report. * - * @package quiz_overview - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage overview + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/report/reportlib.php b/mod/quiz/report/reportlib.php index a84b25c5eec..31389d466ec 100644 --- a/mod/quiz/report/reportlib.php +++ b/mod/quiz/report/reportlib.php @@ -18,9 +18,10 @@ /** * Helper functions for the quiz reports. * - * @package mod_quiz - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once($CFG->dirroot . '/mod/quiz/lib.php'); diff --git a/mod/quiz/report/responses/responses_table.php b/mod/quiz/report/responses/responses_table.php index f70b5005156..829a1ad9b37 100644 --- a/mod/quiz/report/responses/responses_table.php +++ b/mod/quiz/report/responses/responses_table.php @@ -18,17 +18,18 @@ /** * This file defines the quiz responses report class. * - * @package quiz_responses - * @copyright 2008 Jean-Michel Vedrine - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage responses + * @copyright 2008 Jean-Michel Vedrine + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * This is a table subclass for displaying the quiz responses report. * - * @copyright 2008 Jean-Michel Vedrine - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2008 Jean-Michel Vedrine + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class quiz_report_responses_table extends quiz_attempt_report_table { diff --git a/mod/quiz/report/responses/responsessettings_form.php b/mod/quiz/report/responses/responsessettings_form.php index 6528f8c9089..1c25bfec2e8 100644 --- a/mod/quiz/report/responses/responsessettings_form.php +++ b/mod/quiz/report/responses/responsessettings_form.php @@ -18,9 +18,10 @@ /** * This file defines the setting form for the quiz responses report. * - * @package quiz_responses - * @copyright 2008 Jean-Michel Vedrine - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage responses + * @copyright 2008 Jean-Michel Vedrine + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -30,8 +31,8 @@ require_once($CFG->libdir . '/formslib.php'); /** * Quiz responses report settings form. * - * @copyright 2008 Jean-Michel Vedrine - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2008 Jean-Michel Vedrine + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class mod_quiz_report_responses_settings extends moodleform { diff --git a/mod/quiz/report/simpletest/testreportlib.php b/mod/quiz/report/simpletest/testreportlib.php index d55ae917e11..41066942ac4 100644 --- a/mod/quiz/report/simpletest/testreportlib.php +++ b/mod/quiz/report/simpletest/testreportlib.php @@ -1,20 +1,43 @@ . + /** * Unit tests for (some of) mod/quiz/report/reportlib.php * - * @author me@jamiep.org - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package quiz + * @package mod + * @subpackage quiz + * @copyright 2008 Jamie Pratt me@jamiep.org + * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -/** */ + require_once(dirname(__FILE__) . '/../../../../config.php'); global $CFG; require_once($CFG->libdir . '/simpletestlib.php'); // Include the test libraries require_once($CFG->dirroot . '/mod/quiz/report/reportlib.php'); // Include the code to test -/** This class contains the test cases for the functions in reportlib.php. */ + +/** + * This class contains the test cases for the functions in reportlib.php. + * + * @copyright 2008 Jamie Pratt me@jamiep.org + * @license http://www.gnu.org/copyleft/gpl.html GNU Public License + */ class question_reportlib_test extends UnitTestCase { public static $includecoverage = array('mod/quiz/report/reportlib.php'); diff --git a/mod/quiz/report/statistics/db/upgrade.php b/mod/quiz/report/statistics/db/upgrade.php index 6b5a9b3342b..fcc842675db 100644 --- a/mod/quiz/report/statistics/db/upgrade.php +++ b/mod/quiz/report/statistics/db/upgrade.php @@ -1,24 +1,23 @@ . /** * Post-install script for the quiz statistics report. + * * @package quiz * @subpackage statistics * @copyright 2008 Jamie Pratt diff --git a/mod/quiz/report/statistics/lang/en/quiz_statistics.php b/mod/quiz/report/statistics/lang/en/quiz_statistics.php index b2a65aa5e12..94dfc88b463 100644 --- a/mod/quiz/report/statistics/lang/en/quiz_statistics.php +++ b/mod/quiz/report/statistics/lang/en/quiz_statistics.php @@ -18,9 +18,10 @@ /** * Strings for component 'quiz_statistics', language 'en', branch 'MOODLE_20_STABLE' * - * @package quiz_statistics - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage statistics + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/report/statistics/qstats.php b/mod/quiz/report/statistics/qstats.php index 1aa4cf9f2cf..e0a7dc0580b 100644 --- a/mod/quiz/report/statistics/qstats.php +++ b/mod/quiz/report/statistics/qstats.php @@ -18,17 +18,18 @@ /** * Quiz statistics report calculations class. * - * @package quiz_statistics - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage statistics + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * This class has methods to compute the question statistics from the raw data. * - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class quiz_statistics_question_stats { public $questions; diff --git a/mod/quiz/report/statistics/responseanalysis.php b/mod/quiz/report/statistics/responseanalysis.php index 10ae907805c..4359789c58b 100644 --- a/mod/quiz/report/statistics/responseanalysis.php +++ b/mod/quiz/report/statistics/responseanalysis.php @@ -19,9 +19,10 @@ * This file contains the code to analyse all the responses to a particular * question. * - * @package quiz_statistics - * @copyright 2010 The Open University - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage statistics + * @copyright 2010 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -29,8 +30,8 @@ * This class can store and compute the analysis of the responses to a particular * question. * - * @copyright 2010 The Open University - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2010 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class quiz_statistics_response_analyser { /** @var object the data from the database that defines the question. */ diff --git a/mod/quiz/report/statistics/statistics_graph.php b/mod/quiz/report/statistics/statistics_graph.php index 867285c1288..d2c30140420 100644 --- a/mod/quiz/report/statistics/statistics_graph.php +++ b/mod/quiz/report/statistics/statistics_graph.php @@ -24,9 +24,10 @@ * It plots a bar graph showing certain question statistics plotted against * question number. * - * @package quiz_statistics - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage statistics + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/quiz/report/statistics/statistics_table.php b/mod/quiz/report/statistics/statistics_table.php index c809b966f3b..aa0be319b52 100644 --- a/mod/quiz/report/statistics/statistics_table.php +++ b/mod/quiz/report/statistics/statistics_table.php @@ -18,9 +18,10 @@ /** * Quiz statistics report, table for showing statistics of each question in the quiz. * - * @package quiz_statistics - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package quiz + * @subpackage statistics + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -31,8 +32,8 @@ require_once($CFG->libdir.'/tablelib.php'); * This table has one row for each question in the quiz, with sub-rows when * random questions appear. There are columns for the various statistics. * - * @copyright 2008 Jamie Pratt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2008 Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class quiz_report_statistics_table extends flexible_table { /** @var object the quiz settings. */ diff --git a/mod/quiz/review.php b/mod/quiz/review.php index 5695a157b5d..585883569ec 100644 --- a/mod/quiz/review.php +++ b/mod/quiz/review.php @@ -21,12 +21,13 @@ * It is used either by the student whose attempts this is, after the attempt, * or by a teacher reviewing another's attempt during or afterwards. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/mod/quiz/locallib.php'); require_once($CFG->dirroot . '/mod/quiz/report/reportlib.php'); diff --git a/mod/quiz/reviewquestion.php b/mod/quiz/reviewquestion.php index 545b4b90ea5..8b5eb308219 100644 --- a/mod/quiz/reviewquestion.php +++ b/mod/quiz/reviewquestion.php @@ -19,12 +19,13 @@ * This page prints a review of a particular question attempt. * This page is expected to only be used in a popup window. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require_once(dirname(__FILE__) . '/../../config.php'); require_once('locallib.php'); diff --git a/mod/quiz/settings.php b/mod/quiz/settings.php index 77684219aeb..0ff5ee34489 100644 --- a/mod/quiz/settings.php +++ b/mod/quiz/settings.php @@ -1,12 +1,30 @@ . + /** - * settingstree.php - Tells the admin menu that there are sub menu pages to - * include for this activity. + * Administration settings definitions for the quiz module. * - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package quiz + * @package mod + * @subpackage quiz + * @copyright 2010 Petr Skoda + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + defined('MOODLE_INTERNAL') || die; require_once($CFG->dirroot . '/mod/quiz/lib.php'); diff --git a/mod/quiz/settingslib.php b/mod/quiz/settingslib.php index 5df7048f173..d49aacc33ab 100644 --- a/mod/quiz/settingslib.php +++ b/mod/quiz/settingslib.php @@ -1,11 +1,41 @@ . + +/** + * This page is the entry page into the quiz UI. Displays information about the + * quiz to students and teachers, and lets students see their previous attempts. + * + * @package mod + * @subpackage quiz + * @copyright 2008 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + + if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page. } + /** * Quiz specific admin settings class. + * + * @copyright 2008 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class mod_quiz_admin_review_setting extends admin_setting { /**#@+ diff --git a/mod/quiz/simpletest/testaccessrules.php b/mod/quiz/simpletest/testaccessrules.php index 069436bab85..c4d2083d835 100644 --- a/mod/quiz/simpletest/testaccessrules.php +++ b/mod/quiz/simpletest/testaccessrules.php @@ -1,11 +1,27 @@ . + /** * Unit tests for (some of) mod/quiz/accessrules.php. * - * @copyright 2008 The Open University - * @author T.J.Hunt@open.ac.uk - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package quiz + * @package mod + * @subpackage quiz + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ if (!defined('MOODLE_INTERNAL')) { @@ -14,6 +30,13 @@ if (!defined('MOODLE_INTERNAL')) { require_once($CFG->dirroot . '/mod/quiz/locallib.php'); + +/** + * Unit tests for (some of) mod/quiz/accessrules.php. + * + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class simple_rules_test extends UnitTestCase { public static $includecoverage = array('mod/quiz/locallib.php'); function test_num_attempts_access_rule() { @@ -96,6 +119,11 @@ class simple_rules_test extends UnitTestCase { } } + +/** + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class open_close_date_access_rule_test extends UnitTestCase { function test_no_dates() { $quiz = new stdClass; @@ -226,6 +254,11 @@ class open_close_date_access_rule_test extends UnitTestCase { } } + +/** + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class inter_attempt_delay_access_rule_test extends UnitTestCase { function test_just_first_delay() { $quiz = new stdClass; @@ -446,6 +479,11 @@ class inter_attempt_delay_access_rule_test extends UnitTestCase { } } + +/** + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class password_access_rule_test extends UnitTestCase { function test_password_access_rule() { $quiz = new stdClass; @@ -465,6 +503,11 @@ class password_access_rule_test extends UnitTestCase { } } + +/** + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class securewindow_access_rule_test extends UnitTestCase { // Nothing very testable in this class, just test that it obeys the general access rule contact. @@ -487,6 +530,10 @@ class securewindow_access_rule_test extends UnitTestCase { } +/** + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class quiz_access_manager_test extends UnitTestCase { public function test_cannot_review_message() { $quiz = new stdClass; diff --git a/mod/quiz/simpletest/testeditlib.php b/mod/quiz/simpletest/testeditlib.php index c70299da666..d11e2246421 100644 --- a/mod/quiz/simpletest/testeditlib.php +++ b/mod/quiz/simpletest/testeditlib.php @@ -1,17 +1,43 @@ . + /** * Unit tests for (some of) mod/quiz/editlib.php. * - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package quiz + * @package mod + * @subpackage quiz + * @copyright 2009 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page. } require_once($CFG->dirroot . '/mod/quiz/editlib.php'); + +/** + * Unit tests for (some of) mod/quiz/editlib.php. + * + * @copyright 2009 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class quiz_editlib_test extends UnitTestCase { public static $includecoverage = array('mod/quiz/editlib.php'); function test_quiz_move_question_up() { diff --git a/mod/quiz/simpletest/testlib.php b/mod/quiz/simpletest/testlib.php index 89b712fe1c6..83cda8a9b7c 100644 --- a/mod/quiz/simpletest/testlib.php +++ b/mod/quiz/simpletest/testlib.php @@ -1,18 +1,41 @@ . + /** * Unit tests for (some of) mod/quiz/locallib.php. * - * @author T.J.Hunt@open.ac.uk - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package quiz + * @package mod + * @subpackage quiz + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ + if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page. } require_once($CFG->dirroot . '/mod/quiz/lib.php'); + +/** + * @copyright 2008 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU Public License + */ class quiz_lib_test extends UnitTestCase { public static $includecoverage = array('mod/quiz/lib.php'); function test_quiz_has_grades() { diff --git a/mod/quiz/simpletest/testlocallib.php b/mod/quiz/simpletest/testlocallib.php index 1ea6f609962..4887923d330 100644 --- a/mod/quiz/simpletest/testlocallib.php +++ b/mod/quiz/simpletest/testlocallib.php @@ -1,18 +1,43 @@ . + /** * Unit tests for (some of) mod/quiz/locallib.php. * - * @author T.J.Hunt@open.ac.uk - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package quiz + * @package mod + * @subpackage quiz + * @copyright 2008 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page. } require_once($CFG->dirroot . '/mod/quiz/locallib.php'); + +/** + * Unit tests for (some of) mod/quiz/locallib.php. + * + * @copyright 2008 Tim Hunt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class quiz_locallib_test extends UnitTestCase { public static $includecoverage = array('mod/quiz/locallib.php'); function test_quiz_questions_in_quiz() { diff --git a/mod/quiz/simpletest/testquizdisplayoptions.php b/mod/quiz/simpletest/testquizdisplayoptions.php index 9a309ded5cf..a7e11b8cfa0 100644 --- a/mod/quiz/simpletest/testquizdisplayoptions.php +++ b/mod/quiz/simpletest/testquizdisplayoptions.php @@ -15,21 +15,29 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . - /** - * Unit tests for the {@link mod_quiz_display_options} class. + * Unit tests for the mod_quiz_display_options class. * - * @package mod_quiz + * @package mod + * @subpackage quiz * @copyright 2010 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + if (!defined('MOODLE_INTERNAL')) { die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page. } require_once($CFG->dirroot . '/mod/quiz/locallib.php'); + +/** + * Unit tests for {@link mod_quiz_display_options}. + * + * @copyright 2010 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class mod_quiz_display_options_test extends UnitTestCase { function test_num_attempts_access_rule() { $quiz = new stdClass; diff --git a/mod/quiz/startattempt.php b/mod/quiz/startattempt.php index d03a5d911eb..0f456173f5f 100644 --- a/mod/quiz/startattempt.php +++ b/mod/quiz/startattempt.php @@ -22,10 +22,10 @@ * * This code used to be at the top of attempt.php, if you are looking for CVS history. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 2009 The Open University - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2009 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(dirname(__FILE__) . '/../../config.php'); diff --git a/mod/quiz/summary.php b/mod/quiz/summary.php index b4f7e9cbf81..b87314a207d 100644 --- a/mod/quiz/summary.php +++ b/mod/quiz/summary.php @@ -18,12 +18,13 @@ /** * This page prints a summary of a quiz attempt before it is submitted. * - * @package mod + * @package mod * @subpackage quiz - * @copyright 2009 Tim Hunt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @copyright 2009 The Open University + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/mod/quiz/locallib.php'); diff --git a/mod/quiz/version.php b/mod/quiz/version.php index 1a37e4763f4..26cbfc82b31 100644 --- a/mod/quiz/version.php +++ b/mod/quiz/version.php @@ -1,9 +1,28 @@ . + +/** + * Quiz statistics report version information. + * + * @package mod + * @subpackage quiz + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ $module->version = 2010122304; // The (date) version of this module $module->requires = 2010080300; // Requires this Moodle version diff --git a/mod/quiz/view.php b/mod/quiz/view.php index 8164a5fb87f..b420f2393e3 100644 --- a/mod/quiz/view.php +++ b/mod/quiz/view.php @@ -19,9 +19,10 @@ * This page is the entry page into the quiz UI. Displays information about the * quiz to students and teachers, and lets students see their previous attempts. * - * @package mod_quiz - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage quiz + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/question/todo/diffstat.txt b/question/todo/diffstat.txt index 2e92dcd0dcd..89f5bcb6671 100644 --- a/question/todo/diffstat.txt +++ b/question/todo/diffstat.txt @@ -446,3 +446,25 @@ DONE question/type/truefalse/renderer.php | 142 + DONE question/type/truefalse/simpletest/testquestion.php | 99 + DONE question/type/truefalse/simpletest/testquestiontype.php | 73 + DONE question/type/truefalse/version.php | 4 +- + +Missing @package +================ + +DONE mod/quiz/addrandomform.php +DONE mod/quiz/db/access.php +DONE mod/quiz/db/install.php +DONE mod/quiz/db/install.xml +DONE mod/quiz/db/subplugins.php +DONE mod/quiz/db/upgrade.php +DONE mod/quiz/grade.php +DONE mod/quiz/module.js +DONE mod/quiz/pix/icon.gif +DONE mod/quiz/pix/navflagged.png +DONE mod/quiz/report/grading/styles.css +DONE mod/quiz/report/overview/db/install.xml +DONE mod/quiz/report/statistics/db/install.xml +DONE mod/quiz/report/statistics/simpletest/mdl_question.csv +DONE mod/quiz/report/statistics/simpletest/mdl_question_states.csv +DONE mod/quiz/settingslib.php +DONE mod/quiz/styles.css +DONE mod/quiz/version.php