diff --git a/mod/quiz/accessrules.php b/mod/quiz/accessrules.php
index a9f9e747451..dd7cc9bf8b3 100644
--- a/mod/quiz/accessrules.php
+++ b/mod/quiz/accessrules.php
@@ -32,8 +32,8 @@ defined('MOODLE_INTERNAL') || die();
* This class keeps track of the various access rules that apply to a particular
* quiz, with convinient methods for seeing whether access is allowed.
*
- * @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
*/
class quiz_access_manager {
private $_quizobj;
@@ -47,8 +47,8 @@ class quiz_access_manager {
* Create an instance for a particular quiz.
* @param object $quizobj An instance of the class quiz from attemptlib.php.
* The quiz we will be controlling access to.
- * @param integer $timenow The time to use as 'now'.
- * @param boolean $canignoretimelimits Whether this user is exempt from time
+ * @param int $timenow The time to use as 'now'.
+ * @param bool $canignoretimelimits Whether this user is exempt from time
* limits (has_capability('mod/quiz:ignoretimelimits', ...)).
*/
public function __construct($quizobj, $timenow, $canignoretimelimits) {
@@ -99,7 +99,7 @@ class quiz_access_manager {
* Print each message in an array, surrounded by <p>, </p> tags.
*
* @param array $messages the array of message strings.
- * @param boolean $return if true, return a string, instead of outputting.
+ * @param bool $return if true, return a string, instead of outputting.
*
* @return mixed, if $return is true, return the string that would have been output, otherwise
* return null.
@@ -137,7 +137,7 @@ class quiz_access_manager {
* any restrictions in force now, return an array of reasons why access
* should be blocked. If access is OK, return false.
*
- * @param integer $numattempts the number of previous attempts this user has made.
+ * @param int $numattempts the number of previous attempts this user has made.
* @param object|false $lastattempt information about the user's last completed attempt.
* if there is not a previous attempt, the false is passed.
* @return mixed An array of reason why access is not allowed, or an empty array
@@ -173,9 +173,9 @@ class quiz_access_manager {
* quiz. Used, for example, to change the label by the grade displayed on the view page from
* 'your current grade is' to 'your final grade is'.
*
- * @param integer $numattempts the number of previous attempts this user has made.
+ * @param int $numattempts the number of previous attempts this user has made.
* @param object $lastattempt information about the user's last completed attempt.
- * @return boolean true if there is no way the user will ever be allowed to attempt this quiz again.
+ * @return bool true if there is no way the user will ever be allowed to attempt this quiz again.
*/
public function is_finished($numprevattempts, $lastattempt) {
foreach ($this->_rules as $rule) {
@@ -233,10 +233,10 @@ class quiz_access_manager {
* depending on the access restrictions. The link will pop up a 'secure' window, if
* necessary.
*
- * @param boolean $canpreview whether this user can preview. This affects whether they must
+ * @param bool $canpreview whether this user can preview. This affects whether they must
* use a secure window.
* @param string $buttontext the label to put on the button.
- * @param boolean $unfinished whether the button is to continue an existing attempt,
+ * @param bool $unfinished whether the button is to continue an existing attempt,
* or start a new one. This affects whether a javascript alert is shown.
*/
public function print_start_attempt_button($canpreview, $buttontext, $unfinished) {
@@ -272,7 +272,7 @@ class quiz_access_manager {
* Send the user back to the quiz view page. Normally this is just a redirect, but
* If we were in a secure window, we close this window, and reload the view window we came from.
*
- * @param boolean $canpreview This affects whether we have to worry about secure window stuff.
+ * @param bool $canpreview This affects whether we have to worry about secure window stuff.
*/
public function back_to_view_page($canpreview, $message = '') {
global $CFG, $OUTPUT, $PAGE;
@@ -301,7 +301,7 @@ class quiz_access_manager {
* Print a control to finish the review. Normally this is just a link, but if we are
* in a secure window, it needs to be a button that does M.mod_quiz.secure_window.close.
*
- * @param boolean $canpreview This affects whether we have to worry about secure window stuff.
+ * @param bool $canpreview This affects whether we have to worry about secure window stuff.
*/
public function print_finish_review_link($canpreview, $return = false) {
global $CFG;
@@ -343,7 +343,7 @@ class quiz_access_manager {
* Actually ask the user for the password, if they have not already given it this session.
* This function only returns is access is OK.
*
- * @param boolean $canpreview used to enfore securewindow stuff.
+ * @param bool $canpreview used to enfore securewindow stuff.
*/
public function do_password_check($canpreview) {
if (!is_null($this->_passwordrule)) {
@@ -409,9 +409,9 @@ class quiz_access_manager {
* If $reviewoptions->attempt is false, meaning that students can't review this
* attempt at the moment, return an appropriate string explaining why.
*
- * @param integer $when One of the mod_quiz_display_options::DURING,
+ * @param int $when One of the mod_quiz_display_options::DURING,
* IMMEDIATELY_AFTER, LATER_WHILE_OPEN or AFTER_CLOSE constants.
- * @param boolean $short if true, return a shorter string.
+ * @param bool $short if true, return a shorter string.
* @return string an appropraite message.
*/
public function cannot_review_message($when, $short = false) {
@@ -444,8 +444,8 @@ class quiz_access_manager {
* as true) if access should be blocked. Slighly unnatural, but acutally the easist
* way to implement this.
*
- * @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
*/
abstract class quiz_access_rule_base {
protected $_quiz;
@@ -462,7 +462,7 @@ abstract class quiz_access_rule_base {
}
/**
* Whether or not a user should be allowed to start a new attempt at this quiz now.
- * @param integer $numattempts the number of previous attempts this user has made.
+ * @param int $numattempts the number of previous attempts this user has made.
* @param object $lastattempt information about the user's last completed attempt.
* @return string false if access should be allowed, a message explaining the reason if access should be prevented.
*/
@@ -491,9 +491,9 @@ abstract class quiz_access_rule_base {
* this quiz, then return true. This is used so we can know whether to display a
* final grade on the view page. This will only be called if there is not a currently
* active attempt for this user.
- * @param integer $numattempts the number of previous attempts this user has made.
+ * @param int $numattempts the number of previous attempts this user has made.
* @param object $lastattempt information about the user's last completed attempt.
- * @return boolean true if this rule means that this user will never be allowed another
+ * @return bool true if this rule means that this user will never be allowed another
* attempt at this quiz.
*/
public function is_finished($numprevattempts, $lastattempt) {
@@ -504,7 +504,7 @@ abstract class quiz_access_rule_base {
* If, becuase of this rule, the user has to finish their attempt by a certain time,
* you should override this method to return the amount of time left in seconds.
* @param object $attempt the current attempt
- * @param integer $timenow the time now. We don't use $this->_timenow, so we can
+ * @param int $timenow the time now. We don't use $this->_timenow, so we can
* give the user a more accurate indication of how much time is left.
* @return mixed false if there is no deadline, of the time left in seconds if there is one.
*/
@@ -516,8 +516,8 @@ abstract class quiz_access_rule_base {
/**
* A rule controlling the number of attempts allowed.
*
- * @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
*/
class num_attempts_access_rule extends quiz_access_rule_base {
public function description() {
@@ -537,8 +537,8 @@ class num_attempts_access_rule extends quiz_access_rule_base {
/**
* A rule enforcing open and close dates.
*
- * @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
*/
class open_close_date_access_rule extends quiz_access_rule_base {
public function description() {
@@ -589,8 +589,8 @@ class open_close_date_access_rule extends quiz_access_rule_base {
/**
* A rule imposing the delay between attemtps settings.
*
- * @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
*/
class inter_attempt_delay_access_rule extends quiz_access_rule_base {
public function prevent_new_attempt($numprevattempts, $lastattempt) {
@@ -616,7 +616,7 @@ class inter_attempt_delay_access_rule extends quiz_access_rule_base {
/**
* Compute the next time a student would be allowed to start an attempt,
* according to this rule.
- * @param integer $numprevattempts number of previous attempts.
+ * @param int $numprevattempts number of previous attempts.
* @param object $lastattempt information about the previous attempt.
* @return number the time.
*/
@@ -649,8 +649,8 @@ class inter_attempt_delay_access_rule extends quiz_access_rule_base {
/**
* A rule implementing the ipaddress check against the ->submet setting.
*
- * @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
*/
class ipaddress_access_rule extends quiz_access_rule_base {
public function prevent_access() {
@@ -666,8 +666,8 @@ class ipaddress_access_rule extends quiz_access_rule_base {
* A rule representing the password check. It does not actually implement the check,
* that has to be done directly in attempt.php, but this facilitates telling users about it.
*
- * @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
*/
class password_access_rule extends quiz_access_rule_base {
public function description() {
@@ -686,7 +686,7 @@ class password_access_rule extends quiz_access_rule_base {
* Actually ask the user for the password, if they have not already given it this session.
* This function only returns is access is OK.
*
- * @param boolean $canpreview used to enfore securewindow stuff.
+ * @param bool $canpreview used to enfore securewindow stuff.
* @param object $accessmanager the accessmanager calling us.
* @return mixed return null, unless $return is true, and a form needs to be displayed.
*/
@@ -778,8 +778,8 @@ class password_access_rule extends quiz_access_rule_base {
* A rule representing the time limit. It does not actually restrict access, but we use this
* class to encapsulate some of the relevant code.
*
- * @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
*/
class time_limit_access_rule extends quiz_access_rule_base {
public function description() {
@@ -794,8 +794,8 @@ class time_limit_access_rule extends quiz_access_rule_base {
* A rule for ensuring that the quiz is opened in a popup, with some JavaScript
* to prevent copying and pasting, etc.
*
- * @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
*/
class securewindow_access_rule extends quiz_access_rule_base {
/**
@@ -819,7 +819,7 @@ class securewindow_access_rule extends quiz_access_rule_base {
* Make a link to the review page for an attempt.
*
* @param string $linktext the desired link text.
- * @param integer $attemptid the attempt id.
+ * @param int $attemptid the attempt id.
* @return string HTML for the link.
*/
public function make_review_link($linktext, $attemptid) {
@@ -854,8 +854,8 @@ class securewindow_access_rule extends quiz_access_rule_base {
/**
* A rule representing the safe browser check.
*
- * @copyright 2009 Oliver Rahs
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 Oliver Rahs
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class safebrowser_access_rule extends quiz_access_rule_base {
public function prevent_access() {
diff --git a/mod/quiz/attemptlib.php b/mod/quiz/attemptlib.php
index 019530f3ef0..65294f9f5b1 100644
--- a/mod/quiz/attemptlib.php
+++ b/mod/quiz/attemptlib.php
@@ -35,9 +35,9 @@ defined('MOODLE_INTERNAL') || die();
* Class for quiz exceptions. Just saves a couple of arguments on the
* constructor for a moodle_exception.
*
- * @copyright 2008 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
+ * @copyright 2008 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since Moodle 2.0
*/
class moodle_quiz_exception extends moodle_exception {
function __construct($quizobj, $errorcode, $a = NULL, $link = '', $debuginfo = null) {
@@ -48,6 +48,7 @@ class moodle_quiz_exception extends moodle_exception {
}
}
+
/**
* A class encapsulating a quiz and the questions it contains, and making the
* information available to scripts like view.php.
@@ -56,9 +57,9 @@ class moodle_quiz_exception extends moodle_exception {
* extra information only when necessary or when asked. The class tracks which questions
* are loaded.
*
- * @copyright 2008 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
+ * @copyright 2008 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since Moodle 2.0
*/
class quiz {
// Fields initialised in the constructor.
@@ -80,7 +81,7 @@ class quiz {
* @param object $quiz the row from the quiz table.
* @param object $cm the course_module object for this quiz.
* @param object $course the row from the course table for the course we belong to.
- * @param boolean $getcontext intended for testing - stops the constructor getting the context.
+ * @param bool $getcontext intended for testing - stops the constructor getting the context.
*/
function __construct($quiz, $cm, $course, $getcontext = true) {
$this->quiz = $quiz;
@@ -96,8 +97,8 @@ class quiz {
/**
* Static function to create a new quiz object for a specific user.
*
- * @param integer $quizid the the quiz id.
- * @param integer $userid the the userid.
+ * @param int $quizid the the quiz id.
+ * @param int $userid the the userid.
* @return quiz the new quiz object
*/
static public function create($quizid, $userid) {
@@ -153,7 +154,7 @@ class quiz {
}
// Simple getters ======================================================================
- /** @return integer the course id. */
+ /** @return int the course id. */
public function get_courseid() {
return $this->course->id;
}
@@ -163,7 +164,7 @@ class quiz {
return $this->course;
}
- /** @return integer the quiz id. */
+ /** @return int the quiz id. */
public function get_quizid() {
return $this->quiz->id;
}
@@ -178,12 +179,12 @@ class quiz {
return $this->quiz->name;
}
- /** @return integer the number of attempts allowed at this quiz (0 = infinite). */
+ /** @return int the number of attempts allowed at this quiz (0 = infinite). */
public function get_num_attempts_allowed() {
return $this->quiz->attempts;
}
- /** @return integer the course_module id. */
+ /** @return int the course_module id. */
public function get_cmid() {
return $this->cm->id;
}
@@ -199,7 +200,7 @@ class quiz {
}
/**
- * @return boolean wether the current user is someone who previews the quiz,
+ * @return bool wether the current user is someone who previews the quiz,
* rather than attempting it.
*/
public function is_preview_user() {
@@ -217,7 +218,7 @@ class quiz {
}
/**
- * @param integer $id the question id.
+ * @param int $id the question id.
* @return object the question object with that id.
*/
public function get_question($id) {
@@ -243,7 +244,7 @@ class quiz {
}
/**
- * @param integer $timenow the current time as a unix timestamp.
+ * @param int $timenow the current time as a unix timestamp.
* @return quiz_access_manager and instance of the quiz_access_manager class for this quiz at this time.
*/
public function get_access_manager($timenow) {
@@ -286,7 +287,7 @@ class quiz {
}
/**
- * @param integer $attemptid the id of an attempt.
+ * @param int $attemptid the id of an attempt.
* @return string the URL of that attempt.
*/
public function attempt_url($attemptid) {
@@ -303,7 +304,7 @@ class quiz {
}
/**
- * @param integer $attemptid the id of an attempt.
+ * @param int $attemptid the id of an attempt.
* @return string the URL of the review of that attempt.
*/
public function review_url($attemptid) {
@@ -335,13 +336,14 @@ class quiz {
}
}
+
/**
* This class extends the quiz class to hold data about the state of a particular attempt,
* in addition to the data about the quiz.
*
- * @copyright 2008 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
+ * @copyright 2008 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since Moodle 2.0
*/
class quiz_attempt {
// Fields initialised in the constructor.
@@ -405,7 +407,7 @@ class quiz_attempt {
/**
* Static function to create a new quiz_attempt object given an attemptid.
*
- * @param integer $attemptid the attempt id.
+ * @param int $attemptid the attempt id.
* @return quiz_attempt the new quiz_attempt object
*/
static public function create($attemptid) {
@@ -415,7 +417,7 @@ class quiz_attempt {
/**
* Static function to create a new quiz_attempt object given a usage id.
*
- * @param integer $usageid the attempt usage id.
+ * @param int $usageid the attempt usage id.
* @return quiz_attempt the new quiz_attempt object
*/
static public function create_from_usage_id($usageid) {
@@ -470,17 +472,17 @@ class quiz_attempt {
return $this->quizobj;
}
- /** @return integer the course id. */
+ /** @return int the course id. */
public function get_courseid() {
return $this->quizobj->get_courseid();
}
- /** @return integer the course id. */
+ /** @return int the course id. */
public function get_course() {
return $this->quizobj->get_course();
}
- /** @return integer the quiz id. */
+ /** @return int the quiz id. */
public function get_quizid() {
return $this->quizobj->get_quizid();
}
@@ -501,37 +503,37 @@ class quiz_attempt {
}
/**
- * @return boolean wether the current user is someone who previews the quiz,
+ * @return bool wether the current user is someone who previews the quiz,
* rather than attempting it.
*/
public function is_preview_user() {
return $this->quizobj->is_preview_user();
}
- /** @return integer the number of attempts allowed at this quiz (0 = infinite). */
+ /** @return int the number of attempts allowed at this quiz (0 = infinite). */
public function get_num_attempts_allowed() {
return $this->quizobj->get_num_attempts_allowed();
}
- /** @return integer number fo pages in this quiz. */
+ /** @return int number fo pages in this quiz. */
public function get_num_pages() {
return count($this->pagelayout);
}
/**
- * @param integer $timenow the current time as a unix timestamp.
+ * @param int $timenow the current time as a unix timestamp.
* @return quiz_access_manager and instance of the quiz_access_manager class for this quiz at this time.
*/
public function get_access_manager($timenow) {
return $this->quizobj->get_access_manager($timenow);
}
- /** @return integer the attempt id. */
+ /** @return int the attempt id. */
public function get_attemptid() {
return $this->attempt->id;
}
- /** @return integer the attempt unique id. */
+ /** @return int the attempt unique id. */
public function get_uniqueid() {
return $this->attempt->uniqueid;
}
@@ -541,22 +543,22 @@ class quiz_attempt {
return $this->attempt;
}
- /** @return integer the number of this attemp (is it this user's first, second, ... attempt). */
+ /** @return int the number of this attemp (is it this user's first, second, ... attempt). */
public function get_attempt_number() {
return $this->attempt->attempt;
}
- /** @return integer the id of the user this attempt belongs to. */
+ /** @return int the id of the user this attempt belongs to. */
public function get_userid() {
return $this->attempt->userid;
}
- /** @return boolean whether this attempt has been finished (true) or is still in progress (false). */
+ /** @return bool whether this attempt has been finished (true) or is still in progress (false). */
public function is_finished() {
return $this->attempt->timefinish != 0;
}
- /** @return boolean whether this attempt is a preview attempt. */
+ /** @return bool whether this attempt is a preview attempt. */
public function is_preview() {
return $this->attempt->preview;
}
@@ -565,7 +567,7 @@ class quiz_attempt {
* Is this a student dealing with their own attempt/teacher previewing,
* or someone with 'mod/quiz:viewreports' reviewing someone elses attempt.
*
- * @return boolean whether this situation should be treated as someone looking at their own
+ * @return bool whether this situation should be treated as someone looking at their own
* attempt. The distinction normally only matters when an attempt is being reviewed.
*/
public function is_own_attempt() {
@@ -635,7 +637,7 @@ class quiz_attempt {
}
/**
- * @return integer one of the mod_quiz_display_options::DURING,
+ * @return int one of the mod_quiz_display_options::DURING,
* IMMEDIATELY_AFTER, LATER_WHILE_OPEN or AFTER_CLOSE constants.
*/
public function get_attempt_state() {
@@ -666,7 +668,7 @@ class quiz_attempt {
/**
* @param int $page page number
- * @return boolean true if this is the last page of the quiz.
+ * @return bool true if this is the last page of the quiz.
*/
public function is_last_page($page) {
return $page == count($this->pagelayout) - 1;
@@ -693,7 +695,7 @@ class quiz_attempt {
/**
* Get the question_attempt object for a particular question in this attempt.
- * @param integer $slot the number used to identify this question within this attempt.
+ * @param int $slot the number used to identify this question within this attempt.
* @return question_attempt
*/
public function get_question_attempt($slot) {
@@ -702,8 +704,8 @@ class quiz_attempt {
/**
* Is a particular question in this attempt a real question, or something like a description.
- * @param integer $slot the number used to identify this question within this attempt.
- * @return boolean whether that question is a real question.
+ * @param int $slot the number used to identify this question within this attempt.
+ * @return bool whether that question is a real question.
*/
public function is_real_question($slot) {
return $this->quba->get_question($slot)->length != 0;
@@ -711,8 +713,8 @@ class quiz_attempt {
/**
* Is a particular question in this attempt a real question, or something like a description.
- * @param integer $slot the number used to identify this question within this attempt.
- * @return boolean whether that question is a real question.
+ * @param int $slot the number used to identify this question within this attempt.
+ * @return bool whether that question is a real question.
*/
public function is_question_flagged($slot) {
return $this->quba->get_question_attempt($slot)->is_flagged();
@@ -722,7 +724,7 @@ class quiz_attempt {
* Return the grade obtained on a particular question, if the user is permitted to see it.
* You must previously have called load_question_states to load the state data about this question.
*
- * @param integer $slot the number used to identify this question within this attempt.
+ * @param int $slot the number used to identify this question within this attempt.
* @return string the formatted grade, to the number of decimal places specified by the quiz.
*/
public function get_question_number($slot) {
@@ -733,7 +735,7 @@ class quiz_attempt {
* Return the grade obtained on a particular question, if the user is permitted to see it.
* You must previously have called load_question_states to load the state data about this question.
*
- * @param integer $slot the number used to identify this question within this attempt.
+ * @param int $slot the number used to identify this question within this attempt.
* @return string the formatted grade, to the number of decimal places specified by the quiz.
*/
public function get_question_name($slot) {
@@ -744,8 +746,8 @@ class quiz_attempt {
* Return the grade obtained on a particular question, if the user is permitted to see it.
* You must previously have called load_question_states to load the state data about this question.
*
- * @param integer $slot the number used to identify this question within this attempt.
- * @param boolean $showcorrectness Whether right/partial/wrong states should
+ * @param int $slot the number used to identify this question within this attempt.
+ * @param bool $showcorrectness Whether right/partial/wrong states should
* be distinguised.
* @return string the formatted grade, to the number of decimal places specified by the quiz.
*/
@@ -758,7 +760,7 @@ class quiz_attempt {
* You must previously have called load_question_states to load the state
* data about this question.
*
- * @param integer $slot the number used to identify this question within this attempt.
+ * @param int $slot the number used to identify this question within this attempt.
* @return string the formatted grade, to the number of decimal places specified by the quiz.
*/
public function get_question_mark($slot) {
@@ -767,8 +769,8 @@ class quiz_attempt {
/**
* Get the time of the most recent action performed on a question.
- * @param integer $slot the number used to identify this question within this usage.
- * @return integer timestamp.
+ * @param int $slot the number used to identify this question within this usage.
+ * @return int timestamp.
*/
public function get_question_action_time($slot) {
return $this->quba->get_question_action_time($slot);
@@ -790,12 +792,12 @@ class quiz_attempt {
}
/**
- * @param integer $slot if speified, the slot number of a specific question to link to.
- * @param integer $page if specified, a particular page to link to. If not givem deduced
+ * @param int $slot if speified, the slot number of a specific question to link to.
+ * @param int $page if specified, a particular page to link to. If not givem deduced
* from $slot, or goes to the first page.
- * @param integer $questionid a question id. If set, will add a fragment to the URL
+ * @param int $questionid a question id. If set, will add a fragment to the URL
* to jump to a particuar question on the page.
- * @param integer $thispage if not -1, the current page. Will cause links to other things on
+ * @param int $thispage if not -1, the current page. Will cause links to other things on
* this page to be output as only a fragment.
* @return string the URL to continue this attempt.
*/
@@ -818,12 +820,12 @@ class quiz_attempt {
}
/**
- * @param integer $slot indicates which question to link to.
- * @param integer $page if specified, the URL of this particular page of the attempt, otherwise
+ * @param int $slot indicates which question to link to.
+ * @param int $page if specified, the URL of this particular page of the attempt, otherwise
* the URL will go to the first page. If -1, deduce $page from $slot.
- * @param boolean $showall if true, the URL will be to review the entire attempt on one page,
+ * @param bool $showall if true, the URL will be to review the entire attempt on one page,
* and $page will be ignored.
- * @param integer $thispage if not -1, the current page. Will cause links to other things on
+ * @param int $thispage if not -1, the current page. Will cause links to other things on
* this page to be output as only a fragment.
* @return string the URL to review this attempt.
*/
@@ -851,7 +853,7 @@ class quiz_attempt {
/**
* Initialise the JS etc. required by one question.
- * @param integer $questionid the question id.
+ * @param int $questionid the question id.
*/
public function get_question_html_head_contributions($slot) {
return $this->quba->render_question_head_html($slot) .
@@ -882,8 +884,8 @@ class quiz_attempt {
* Generate the HTML that displayes the question in its current state, with
* the appropriate display options.
*
- * @param integer $id the id of a question in this quiz attempt.
- * @param boolean $reviewing is the being printed on an attempt or a review page.
+ * @param int $id the id of a question in this quiz attempt.
+ * @param bool $reviewing is the being printed on an attempt or a review page.
* @param string $thispageurl the URL of the page this question is being printed on.
* @return string HTML for the question in its current state.
*/
@@ -897,9 +899,9 @@ class quiz_attempt {
* Like {@link render_question()} but displays the question at the past step
* indicated by $seq, rather than showing the latest step.
*
- * @param integer $id the id of a question in this quiz attempt.
- * @param integer $seq the seq number of the past state to display.
- * @param boolean $reviewing is the being printed on an attempt or a review page.
+ * @param int $id the id of a question in this quiz attempt.
+ * @param int $seq the seq number of the past state to display.
+ * @param bool $reviewing is the being printed on an attempt or a review page.
* @param string $thispageurl the URL of the page this question is being printed on.
* @return string HTML for the question in its current state.
*/
@@ -912,8 +914,8 @@ class quiz_attempt {
/**
* Wrapper round print_question from lib/questionlib.php.
*
- * @param integer $id the id of a question in this quiz attempt.
- * @param boolean $reviewing is the being printed on an attempt or a review page.
+ * @param int $id the id of a question in this quiz attempt.
+ * @param bool $reviewing is the being printed on an attempt or a review page.
* @param string $thispageurl the URL of the page this question is being printed on.
*/
public function render_question_for_commenting($slot) {
@@ -926,8 +928,8 @@ class quiz_attempt {
/**
* Check wheter access should be allowed to a particular file.
*
- * @param integer $id the id of a question in this quiz attempt.
- * @param boolean $reviewing is the being printed on an attempt or a review page.
+ * @param int $id the id of a question in this quiz attempt.
+ * @param bool $reviewing is the being printed on an attempt or a review page.
* @param string $thispageurl the URL of the page this question is being printed on.
* @return string HTML for the question in its current state.
*/
@@ -988,7 +990,7 @@ class quiz_attempt {
/**
* Process all the actions that were submitted as part of the current request.
*
- * @param integer $timestamp the timestamp that should be stored as the modifed
+ * @param int $timestamp the timestamp that should be stored as the modifed
* time in the database for these actions. If null, will use the current time.
*/
public function process_all_actions($timestamp) {
@@ -1061,10 +1063,10 @@ class quiz_attempt {
* Used by {@link attempt_url()} and {@link review_url()}.
*
* @param string $script. Used in the URL like /mod/quiz/$script.php
- * @param integer $slot identifies the specific question on the page to jump to. 0 to just use the $page parameter.
- * @param integer $page -1 to look up the page number from the slot, otherwise the page number to go to.
- * @param boolean $showall if true, return a URL with showall=1, and not page number
- * @param integer $thispage the page we are currently on. Links to questions on this
+ * @param int $slot identifies the specific question on the page to jump to. 0 to just use the $page parameter.
+ * @param int $page -1 to look up the page number from the slot, otherwise the page number to go to.
+ * @param bool $showall if true, return a URL with showall=1, and not page number
+ * @param int $thispage the page we are currently on. Links to questions on this
* page will just be a fragment #q123. -1 to disable this.
* @return The requested URL.
*/
@@ -1110,13 +1112,14 @@ class quiz_attempt {
}
}
+
/**
* Represents the navigation panel, and builds a {@link block_contents} to allow
* it to be output.
*
- * @copyright 2008 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
+ * @copyright 2008 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since Moodle 2.0
*/
abstract class quiz_nav_panel_base {
/** @var quiz_attempt */
@@ -1176,7 +1179,7 @@ abstract class quiz_nav_panel_base {
/**
* @param question_attempt $qa
- * @param boolean $showcorrectness
+ * @param bool $showcorrectness
* @return array class name => descriptive string.
*/
protected function get_attributes(question_attempt $qa, $showcorrectness) {
@@ -1245,12 +1248,13 @@ abstract class quiz_nav_panel_base {
}
}
+
/**
* Specialisation of {@link quiz_nav_panel_base} for the attempt quiz page.
*
- * @copyright 2008 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
+ * @copyright 2008 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since Moodle 2.0
*/
class quiz_attempt_nav_panel extends quiz_nav_panel_base {
protected function get_question_url($slot) {
@@ -1270,12 +1274,13 @@ class quiz_attempt_nav_panel extends quiz_nav_panel_base {
}
}
+
/**
* Specialisation of {@link quiz_nav_panel_base} for the review quiz page.
*
- * @copyright 2008 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
+ * @copyright 2008 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since Moodle 2.0
*/
class quiz_review_nav_panel extends quiz_nav_panel_base {
protected function get_question_url($slot) {
diff --git a/mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php b/mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php
index e757b5dd9eb..d065a472e9e 100644
--- a/mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php
+++ b/mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php
@@ -16,10 +16,10 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
+ * @package moodlecore
* @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -31,6 +31,9 @@ require_once($CFG->dirroot . '/mod/quiz/backup/moodle2/backup_quiz_stepslib.php'
/**
* quiz backup task that provides all the settings and steps to perform one
* complete backup of the activity
+ *
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_quiz_activity_task extends backup_activity_task {
diff --git a/mod/quiz/backup/moodle2/backup_quiz_stepslib.php b/mod/quiz/backup/moodle2/backup_quiz_stepslib.php
index 17fed6c73cf..e01eb474401 100644
--- a/mod/quiz/backup/moodle2/backup_quiz_stepslib.php
+++ b/mod/quiz/backup/moodle2/backup_quiz_stepslib.php
@@ -16,10 +16,10 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
+ * @package moodlecore
* @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -28,6 +28,9 @@ defined('MOODLE_INTERNAL') || die();
/**
* Define all the backup steps that will be used by the backup_quiz_activity_task
+ *
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_quiz_activity_structure_step extends backup_questions_activity_structure_step {
diff --git a/mod/quiz/backup/moodle2/restore_quiz_activity_task.class.php b/mod/quiz/backup/moodle2/restore_quiz_activity_task.class.php
index 98759c4633f..4c36b7b7784 100644
--- a/mod/quiz/backup/moodle2/restore_quiz_activity_task.class.php
+++ b/mod/quiz/backup/moodle2/restore_quiz_activity_task.class.php
@@ -16,10 +16,10 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
+ * @package moodlecore
* @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -31,6 +31,9 @@ require_once($CFG->dirroot . '/mod/quiz/backup/moodle2/restore_quiz_stepslib.php
/**
* quiz restore task that provides all the settings and steps to perform one
* complete restore of the activity
+ *
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class restore_quiz_activity_task extends restore_activity_task {
diff --git a/mod/quiz/backup/moodle2/restore_quiz_stepslib.php b/mod/quiz/backup/moodle2/restore_quiz_stepslib.php
index 3731c388948..266637367c5 100644
--- a/mod/quiz/backup/moodle2/restore_quiz_stepslib.php
+++ b/mod/quiz/backup/moodle2/restore_quiz_stepslib.php
@@ -16,10 +16,10 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
+ * @package moodlecore
* @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -28,6 +28,9 @@ defined('MOODLE_INTERNAL') || die();
/**
* Structure step to restore one quiz activity
+ *
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class restore_quiz_activity_structure_step extends restore_questions_activity_structure_step {
diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php
index 656e5c1087d..7d1da3f1902 100644
--- a/mod/quiz/editlib.php
+++ b/mod/quiz/editlib.php
@@ -59,7 +59,7 @@ function quiz_remove_question($quiz, $questionid) {
/**
* Remove an empty page from the quiz layout. If that is not possible, do nothing.
* @param string $layout the existinng layout, $quiz->questions.
- * @param integer $index the position into $layout where the empty page should be removed.
+ * @param int $index the position into $layout where the empty page should be removed.
* @return the updated layout
*/
function quiz_delete_empty_page($layout, $index) {
@@ -88,7 +88,7 @@ function quiz_delete_empty_page($layout, $index) {
* @param object $quiz The extended quiz object as used by edit.php
* This is updated by this function
* @param int $page Which page in quiz to add the question on. If 0 (default), add at the end
- * @return boolean false if the question was already in the quiz
+ * @return bool false if the question was already in the quiz
*/
function quiz_add_quiz_question($id, $quiz, $page = 0) {
global $DB;
@@ -203,7 +203,7 @@ function quiz_add_random_questions($quiz, $addonpage, $categoryid, $number, $inc
/**
* Add a page break after at particular position$.
* @param string $layout the existinng layout, $quiz->questions.
- * @param integer $index the position into $layout where the empty page should be removed.
+ * @param int $index the position into $layout where the empty page should be removed.
* @return the updated layout
*/
function quiz_add_page_break_at($layout, $index) {
@@ -220,7 +220,7 @@ function quiz_add_page_break_at($layout, $index) {
/**
* Add a page break after a particular question.
* @param string $layout the existinng layout, $quiz->questions.
- * @param integer $qustionid the question to add the page break after.
+ * @param int $qustionid the question to add the page break after.
* @return the updated layout
*/
function quiz_add_page_break_after($layout, $questionid) {
@@ -253,9 +253,9 @@ function quiz_save_new_layout($quiz) {
* Saves changes to the question grades in the quiz_question_instances table.
* It does not update 'sumgrades' in the quiz table.
*
- * @param integer grade The maximal grade for the question
- * @param integer $questionid The id of the question
- * @param integer $quizid The id of the quiz to update / add the instances for.
+ * @param int grade The maximal grade for the question
+ * @param int $questionid The id of the question
+ * @param int $quizid The id of the quiz to update / add the instances for.
*/
function quiz_update_question_instance($grade, $questionid, $quiz) {
global $DB;
@@ -306,7 +306,7 @@ function _quiz_move_question($layout, $questionid, $shift) {
* Move a particular question one space earlier in the $quiz->questions list.
* If that is not possible, do nothing.
* @param string $layout the existinng layout, $quiz->questions.
- * @param integer $questionid the id of a question.
+ * @param int $questionid the id of a question.
* @return the updated layout
*/
function quiz_move_question_up($layout, $questionid) {
@@ -317,7 +317,7 @@ function quiz_move_question_up($layout, $questionid) {
* Move a particular question one space later in the $quiz->questions list.
* If that is not possible, do nothing.
* @param string $layout the existinng layout, $quiz->questions.
- * @param integer $questionid the id of a question.
+ * @param int $questionid the id of a question.
* @return the updated layout
*/
function quiz_move_question_down($layout, $questionid) {
@@ -334,10 +334,10 @@ function quiz_move_question_down($layout, $questionid) {
* $quiz->grades
* @param object $pageurl The url of the current page with the parameters required
* for links returning to the current page, as a moodle_url object
- * @param boolean $allowdelete Indicates whether the delete icons should be displayed
- * @param boolean $reordertool Indicates whether the reorder tool should be displayed
- * @param boolean $quiz_qbanktool Indicates whether the question bank should be displayed
- * @param boolean $hasattempts Indicates whether the quiz has attempts
+ * @param bool $allowdelete Indicates whether the delete icons should be displayed
+ * @param bool $reordertool Indicates whether the reorder tool should be displayed
+ * @param bool $quiz_qbanktool Indicates whether the question bank should be displayed
+ * @param bool $hasattempts Indicates whether the quiz has attempts
*/
function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
$quiz_qbanktool, $hasattempts, $defaultcategoryobj) {
@@ -762,7 +762,7 @@ function quiz_print_singlequestion($question, $returnurl, $quiz) {
* @param object $question A question object from the database questions table
* @param object $questionurl The url of the question editing page as a moodle_url object
* @param object $quiz The quiz in the context of which the question is being displayed
- * @param boolean $quiz_qbanktool Indicate to this function if the question bank window open
+ * @param bool $quiz_qbanktool Indicate to this function if the question bank window open
*/
function quiz_print_randomquestion(&$question, &$pageurl, &$quiz, $quiz_qbanktool) {
global $DB, $OUTPUT;
@@ -929,10 +929,10 @@ function print_random_option_icon($question) {
* Creates a textual representation of a question for display.
*
* @param object $question A question object from the database questions table
- * @param boolean $showicon If true, show the question's icon with the question. False by default.
- * @param boolean $showquestiontext If true (default), show question text after question name.
+ * @param bool $showicon If true, show the question's icon with the question. False by default.
+ * @param bool $showquestiontext If true (default), show question text after question name.
* If false, show only question name.
- * @param boolean $return If true (default), return the output. If false, print it.
+ * @param bool $return If true (default), return the output. If false, print it.
*/
function quiz_question_tostring(&$question, $showicon = false, $showquestiontext = true, $return = true) {
global $COURSE;
@@ -970,6 +970,9 @@ function quiz_question_tostring(&$question, $showicon = false, $showquestiontext
/**
* A column type for the add this question to the quiz.
+ *
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_bank_add_to_quiz_action_column extends question_bank_action_column_base {
protected $stradd;
@@ -1000,6 +1003,9 @@ class question_bank_add_to_quiz_action_column extends question_bank_action_colum
/**
* A column type for the name followed by the start of the question text.
+ *
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_bank_question_name_text_column extends question_bank_question_name_column {
public function get_name() {
@@ -1029,6 +1035,9 @@ class question_bank_question_name_text_column extends question_bank_question_nam
/**
* Subclass to customise the view of the question bank for the quiz editing screen.
+ *
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class quiz_question_bank_view extends question_bank_view {
protected $quizhasattempts = false;
@@ -1048,7 +1057,7 @@ class quiz_question_bank_view extends question_bank_view {
* Let the question bank display know whether the quiz has been attempted,
* hence whether some bits of UI, like the add this question to the quiz icon,
* should be displayed.
- * @param boolean $quizhasattempts whether the quiz has attempts.
+ * @param bool $quizhasattempts whether the quiz has attempts.
*/
public function set_quiz_has_attempts($quizhasattempts) {
$this->quizhasattempts = $quizhasattempts;
@@ -1139,8 +1148,8 @@ class quiz_question_bank_view extends question_bank_view {
* @param object $quiz The quiz object of the quiz in question
* @param object $pageurl The url of the current page with the parameters required
* for links returning to the current page, as a moodle_url object
- * @param integer $tabindex The tabindex to start from for the form elements created
- * @return integer The tabindex from which the calling page can continue, that is,
+ * @param int $tabindex The tabindex to start from for the form elements created
+ * @return int The tabindex from which the calling page can continue, that is,
* the last value used +1.
*/
function quiz_print_grading_form($quiz, $pageurl, $tabindex) {
diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php
index 075490b84d3..a3dc8536a0d 100644
--- a/mod/quiz/lib.php
+++ b/mod/quiz/lib.php
@@ -135,7 +135,7 @@ function quiz_update_instance($quiz, $mform) {
* and any data that depends on it.
*
* @param int $id the id of the quiz to delete.
- * @return boolean success or failure.
+ * @return bool success or failure.
*/
function quiz_delete_instance($id) {
global $DB;
@@ -164,7 +164,7 @@ function quiz_delete_instance($id) {
* Deletes a quiz override from the database and clears any corresponding calendar events
*
* @param object $quiz The quiz object.
- * @param integer $overrideid The id of the override being deleted
+ * @param int $overrideid The id of the override being deleted
* @return bool true on success
*/
function quiz_delete_override($quiz, $overrideid) {
@@ -211,7 +211,7 @@ function quiz_delete_all_overrides($quiz) {
* passwords.
*
* @param object $quiz The quiz object.
- * @param integer $userid The userid.
+ * @param int $userid The userid.
* @return object $quiz The updated quiz object.
*/
function quiz_update_effective_access($quiz, $userid) {
@@ -316,7 +316,7 @@ function quiz_delete_all_attempts($quiz) {
* Get the best current grade for a particular user in a quiz.
*
* @param object $quiz the quiz settings.
- * @param integer $userid the id of the user.
+ * @param int $userid the id of the user.
* @return float the user's current grade for this quiz, or NULL if this user does
* not have a grade on this quiz.
*/
@@ -338,7 +338,7 @@ function quiz_get_best_grade($quiz, $userid) {
* divide by them).
*
* @param object $quiz a row from the quiz table.
- * @return boolean whether this is a graded quiz.
+ * @return bool whether this is a graded quiz.
*/
function quiz_has_grades($quiz) {
return $quiz->grade >= 0.000005 && $quiz->sumgrades >= 0.000005;
@@ -427,8 +427,8 @@ function quiz_cron() {
}
/**
- * @param integer $quizid the quiz id.
- * @param integer $userid the userid.
+ * @param int $quizid the quiz id.
+ * @param int $userid the userid.
* @param string $status 'all', 'finished' or 'unfinished' to control
* @param bool $includepreviews
* @return an array of all the user's attempts at this quiz. Returns an empty array if there are none.
@@ -1159,7 +1159,7 @@ function quiz_get_post_actions() {
/**
* @param array $questionids of question ids.
- * @return boolean whether any of these questions are used by any instance of this module.
+ * @return bool whether any of these questions are used by any instance of this module.
*/
function quiz_questions_in_use($questionids) {
global $DB;
@@ -1269,7 +1269,7 @@ function quiz_reset_userdata($data) {
*
* @param int $attemptuniqueid int attempt id
* @param int $questionid int question id
- * @return boolean to indicate access granted or denied
+ * @return bool to indicate access granted or denied
*/
function quiz_check_file_access($attemptuniqueid, $questionid, $context = null) {
global $USER, $DB, $CFG;
@@ -1380,7 +1380,7 @@ function quiz_print_overview($courses, &$htmlarray) {
*
* @param object $quiz the quiz object. Only $quiz->id is used at the moment.
* @param object $cm the cm object. Only $cm->course, $cm->groupmode and $cm->groupingid fields are used at the moment.
- * @param boolean $returnzero if false (default), when no attempts have been made '' is returned instead of 'Attempts: 0'.
+ * @param bool $returnzero if false (default), when no attempts have been made '' is returned instead of 'Attempts: 0'.
* @param int $currentgroup if there is a concept of current group where this method is being called
* (e.g. a report) pass it in here. Default 0 which means no current group.
* @return string a string like "Attempts: 123", "Attemtps 123 (45 from your groups)" or
@@ -1420,7 +1420,7 @@ function quiz_num_attempt_summary($quiz, $cm, $returnzero = false, $currentgroup
* @param object $quiz the quiz object. Only $quiz->id is used at the moment.
* @param object $cm the cm object. Only $cm->course, $cm->groupmode and $cm->groupingid fields are used at the moment.
* @param object $context the quiz context.
- * @param boolean $returnzero if false (default), when no attempts have been made '' is returned instead of 'Attempts: 0'.
+ * @param bool $returnzero if false (default), when no attempts have been made '' is returned instead of 'Attempts: 0'.
* @param int $currentgroup if there is a concept of current group where this method is being called
* (e.g. a report) pass it in here. Default 0 which means no current group.
* @return string HTML fragment for the link.
diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php
index af15b326a57..76b2630c58c 100644
--- a/mod/quiz/locallib.php
+++ b/mod/quiz/locallib.php
@@ -67,11 +67,11 @@ define('QUIZ_SHOW_TIME_BEFORE_DEADLINE', '3600');
* NOT written to the database.
*
* @param object $quiz the quiz to create an attempt for.
- * @param integer $attemptnumber the sequence number for the attempt.
+ * @param int $attemptnumber the sequence number for the attempt.
* @param object $lastattempt the previous attempt by this user, if any. Only needed
* if $attemptnumber > 1 and $quiz->attemptonlast is true.
- * @param integer $timenow the time the attempt was started at.
- * @param boolean $ispreview whether this new attempt is a preview.
+ * @param int $timenow the time the attempt was started at.
+ * @param bool $ispreview whether this new attempt is a preview.
*
* @return object the newly created attempt object.
*/
@@ -114,8 +114,8 @@ function quiz_create_attempt($quiz, $attemptnumber, $lastattempt, $timenow, $isp
* Returns an unfinished attempt (if there is one) for the given
* user on the given quiz. This function does not return preview attempts.
*
- * @param integer $quizid the id of the quiz.
- * @param integer $userid the id of the user.
+ * @param int $quizid the id of the quiz.
+ * @param int $userid the id of the user.
*
* @return mixed the unfinished attempt if there is one, false if not.
*/
@@ -132,8 +132,8 @@ function quiz_get_user_attempt_unfinished($quizid, $userid) {
* Returns the most recent attempt by a given user on a given quiz.
* May be finished, or may not.
*
- * @param integer $quizid the id of the quiz.
- * @param integer $userid the id of the user.
+ * @param int $quizid the id of the quiz.
+ * @param int $userid the id of the user.
*
* @return mixed the attempt if there is one, false if not.
*/
@@ -192,7 +192,7 @@ function quiz_delete_attempt($attempt, $quiz) {
* Delete all the preview attempts at a quiz, or possibly all the attempts belonging
* to one user.
* @param object $quiz the quiz object.
- * @param integer $userid (optional) if given, only delete the previews belonging to this user.
+ * @param int $userid (optional) if given, only delete the previews belonging to this user.
*/
function quiz_delete_previews($quiz, $userid = null) {
global $DB;
@@ -207,8 +207,8 @@ function quiz_delete_previews($quiz, $userid = null) {
}
/**
- * @param integer $quizid The quiz id.
- * @return boolean whether this quiz has any (non-preview) attempts.
+ * @param int $quizid The quiz id.
+ * @return bool whether this quiz has any (non-preview) attempts.
*/
function quiz_has_attempts($quizid) {
global $DB;
@@ -223,7 +223,7 @@ function quiz_has_attempts($quizid) {
* @param string $layout the string representing the quiz layout. Each page is represented as a
* comma separated list of question ids and 0 indicating page breaks.
* So 5,2,0,3,0 means questions 5 and 2 on page 1 and question 3 on page 2
- * @param integer $page the number of the current page.
+ * @param int $page the number of the current page.
* @return string comma separated list of question ids
*/
function quiz_questions_on_page($layout, $page) {
@@ -254,7 +254,7 @@ function quiz_questions_in_quiz($layout) {
* Returns the number of pages in a quiz layout
*
* @param string $layout The string representing the quiz layout. Always ends in ,0
- * @return integer The number of pages in the quiz.
+ * @return int The number of pages in the quiz.
*/
function quiz_number_of_pages($layout) {
return substr_count(',' . $layout, ',0');
@@ -264,7 +264,7 @@ function quiz_number_of_pages($layout) {
* Returns the number of questions in the quiz layout
*
* @param string $layout the string representing the quiz layout.
- * @return integer The number of questions in the quiz.
+ * @return int The number of questions in the quiz.
*/
function quiz_number_of_questions_in_quiz($layout) {
// TODO is this still used.
@@ -281,7 +281,7 @@ function quiz_number_of_questions_in_quiz($layout) {
*
* @param string $quizlayout The string representing the layout for the whole quiz
* @param string $pagelayout The string representing the layout for the current page
- * @return integer the number of the first question
+ * @return int the number of the first question
*/
function quiz_first_questionnumber($quizlayout, $pagelayout) {
// TODO is this still used.
@@ -303,8 +303,8 @@ function quiz_first_questionnumber($quizlayout, $pagelayout) {
* Re-paginates the quiz layout
*
* @param string $layout The string representing the quiz layout.
- * @param integer $perpage The number of questions per page
- * @param boolean $shuffle Should the questions be reordered randomly?
+ * @param int $perpage The number of questions per page
+ * @param bool $shuffle Should the questions be reordered randomly?
* @return string the new layout string
*/
function quiz_repaginate($layout, $perpage, $shuffle = false) {
@@ -375,7 +375,7 @@ function quiz_get_all_question_grades($quiz) {
*
* @param float $rawgrade the unadjusted grade, fof example $attempt->sumgrades
* @param object $quiz the quiz object. Only the fields grade, sumgrades and decimalpoints are used.
- * @param boolean|string $format whether to format the results for display
+ * @param bool|string $format whether to format the results for display
* or 'question' to format a question grade (different number of decimal places.
* @return float|string the rescaled grade, or null/the lang string 'notyetgraded' if the $grade is null.
*/
@@ -429,7 +429,7 @@ function quiz_feedback_for_grade($grade, $quiz, $context) {
/**
* @param object $quiz the quiz database row.
- * @return boolean Whether this quiz has any non-blank feedback text.
+ * @return bool Whether this quiz has any non-blank feedback text.
*/
function quiz_has_feedback($quiz) {
global $DB;
@@ -490,7 +490,7 @@ function quiz_update_all_attempt_sumgrades($quiz) {
*
* @param float $newgrade the new maximum grade for the quiz.
* @param object $quiz the quiz we are updating. Passed by reference so its grade field can be updated too.
- * @return boolean indicating success or failure.
+ * @return bool indicating success or failure.
*/
function quiz_set_grade($newgrade, $quiz) {
global $DB;
@@ -546,11 +546,11 @@ function quiz_set_grade($newgrade, $quiz) {
* Save the overall grade for a user at a quiz in the quiz_grades table
*
* @param object $quiz The quiz for which the best grade is to be calculated and then saved.
- * @param integer $userid The userid to calculate the grade for. Defaults to the current user.
+ * @param int $userid The userid to calculate the grade for. Defaults to the current user.
* @param array $attempts The attempts of this user. Useful if you are
* looping through many users. Attempts can be fetched in one master query to
* avoid repeated querying.
- * @return boolean Indicates success or failure.
+ * @return bool Indicates success or failure.
*/
function quiz_save_best_grade($quiz, $userid = null, $attempts = array()) {
global $DB;
@@ -882,7 +882,7 @@ function quiz_upgrade_states($attempt) {
/**
* @param object $quiz the quiz.
- * @param integer $cmid the course_module object for this quiz.
+ * @param int $cmid the course_module object for this quiz.
* @param object $question the question.
* @param string $returnurl url to return to after action is done.
* @return string html for a number of icons linked to action pages for a
@@ -895,7 +895,7 @@ function quiz_question_action_icons($quiz, $cmid, $question, $returnurl) {
}
/**
- * @param integer $cmid the course_module.id for this quiz.
+ * @param int $cmid the course_module.id for this quiz.
* @param object $question the question.
* @param string $returnurl url to return to after action is done.
* @param string $contentbeforeicon some HTML content to be added inside the link, before the icon.
@@ -938,7 +938,7 @@ function quiz_question_edit_button($cmid, $question, $returnurl, $contentafteric
/**
* @param object $quiz the quiz
* @param object $question the question
- * @param boolean $label if true, show the preview question label after the icon
+ * @param bool $label if true, show the preview question label after the icon
* @return the HTML for a preview question icon.
*/
function quiz_question_preview_button($quiz, $question, $label = false) {
@@ -974,7 +974,7 @@ function quiz_question_preview_button($quiz, $question, $label = false) {
/**
* @param object $attempt the attempt.
* @param object $context the quiz context.
- * @return integer whether flags should be shown/editable to the current user for this attempt.
+ * @return int whether flags should be shown/editable to the current user for this attempt.
*/
function quiz_get_flag_option($attempt, $context) {
global $USER;
@@ -991,7 +991,7 @@ function quiz_get_flag_option($attempt, $context) {
* Work out what state this quiz attempt is in.
* @param object $quiz the quiz settings
* @param object $attempt the quiz_attempt database row.
- * @return integer one of the mod_quiz_display_options::DURING,
+ * @return int one of the mod_quiz_display_options::DURING,
* IMMEDIATELY_AFTER, LATER_WHILE_OPEN or AFTER_CLOSE constants.
*/
function quiz_attempt_state($quiz, $attempt) {
@@ -1095,7 +1095,7 @@ function quiz_get_combined_reviewoptions($quiz, $attempts) {
* - Finally, add a ",0" in the end if there is none
*
* @param $string $layout the quiz layout to clean up, usually from $quiz->questions.
- * @param boolean $removeemptypages If true, remove empty pages from the quiz. False by default.
+ * @param bool $removeemptypages If true, remove empty pages from the quiz. False by default.
* @return $string the cleaned-up layout
*/
function quiz_clean_layout($layout, $removeemptypages = false) {
@@ -1141,8 +1141,8 @@ function quiz_clean_layout($layout, $removeemptypages = false) {
/**
* Get the slot for a question with a particular id.
* @param object $quiz the quiz settings.
- * @param integer $questionid the of a question in the quiz.
- * @return integer the corresponding slot. Null if the question is not in the quiz.
+ * @param int $questionid the of a question in the quiz.
+ * @return int the corresponding slot. Null if the question is not in the quiz.
*/
function quiz_get_slot_for_question($quiz, $questionid) {
$questionids = quiz_questions_in_quiz($quiz->questions);
@@ -1374,8 +1374,8 @@ function quiz_get_js_module() {
* An extension of question_display_options that includes the extra options used
* by the quiz.
*
- * @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 mod_quiz_display_options extends question_display_options {
/**#@+
@@ -1403,7 +1403,7 @@ class mod_quiz_display_options extends question_display_options {
/**
* Set up the various options from the quiz settings, and a time constant.
* @param object $quiz the quiz settings.
- * @param integer $one of the {@link DURING}, {@link IMMEDIATELY_AFTER},
+ * @param int $one of the {@link DURING}, {@link IMMEDIATELY_AFTER},
* {@link LATER_WHILE_OPEN} or {@link AFTER_CLOSE} constants.
* @return mod_quiz_display_options set up appropriately.
*/
@@ -1443,8 +1443,8 @@ class mod_quiz_display_options extends question_display_options {
* A {@link qubaid_condition} for finding all the question usages belonging to
* a particular quiz.
*
- * @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 quibaid_for_quiz extends qubaid_join {
public function __construct($quizid, $includepreviews = true, $onlyfinished = false) {
diff --git a/mod/quiz/report/attemptsreport.php b/mod/quiz/report/attemptsreport.php
index 49f8c375cbf..19ed487b993 100644
--- a/mod/quiz/report/attemptsreport.php
+++ b/mod/quiz/report/attemptsreport.php
@@ -35,8 +35,8 @@ require_once($CFG->libdir.'/tablelib.php');
/**
* Base class for quiz reports that are basically a table with one row for each attempt.
*
- * @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
*/
abstract class quiz_attempt_report extends quiz_default_report {
/** @var object the quiz context. */
@@ -49,7 +49,7 @@ abstract class quiz_attempt_report extends quiz_default_report {
* Should the grades be displayed in this report. That depends on the quiz
* display options, and whether the quiz is graded.
* @param object $quiz the quiz settings.
- * @return boolean
+ * @return bool
*/
protected function should_show_grades($quiz) {
if (!is_null($this->showgrades)) {
@@ -108,10 +108,10 @@ abstract class quiz_attempt_report extends quiz_default_report {
/**
* Alters $attemptsmode and $pagesize if the current values are inappropriate.
- * @param integer $attemptsmode what sort of attemtps to display (may be updated)
- * @param integer $pagesize number of records to display per page (may be updated)
+ * @param int $attemptsmode what sort of attemtps to display (may be updated)
+ * @param int $pagesize number of records to display per page (may be updated)
* @param object $course the course settings.
- * @param integer $currentgroup the currently selected group. 0 for none.
+ * @param int $currentgroup the currently selected group. 0 for none.
*/
protected function validate_common_options(&$attemptsmode, &$pagesize, $course, $currentgroup) {
if ($currentgroup) {
@@ -136,8 +136,8 @@ abstract class quiz_attempt_report extends quiz_default_report {
* Contruct all the parts of the main database query.
* @param object $quiz the quiz settings.
* @param string $qmsubselect SQL fragment from {@link quiz_report_qm_filter_select()}.
- * @param boolean $qmfilter whether to show all, or only the final grade attempt.
- * @param integer $attemptsmode which attemtps to show. One of the QUIZ_REPORT_ATTEMPTS_... constants.
+ * @param bool $qmfilter whether to show all, or only the final grade attempt.
+ * @param int $attemptsmode which attemtps to show. One of the QUIZ_REPORT_ATTEMPTS_... constants.
* @param array $reportstudents list if userids of users to include in the report.
* @return array with 4 elements ($fields, $from, $where, $params) that can be used to
* build the actual database query.
@@ -312,7 +312,7 @@ abstract class quiz_attempt_report extends quiz_default_report {
* @param array $headers the columns headings.
* @param moodle_url $reporturl the URL of this report.
* @param array $displayoptions the display options.
- * @param boolean $collapsible whether to allow columns in the report to be collapsed.
+ * @param bool $collapsible whether to allow columns in the report to be collapsed.
*/
protected function set_up_table_columns($table, $columns, $headers, $reporturl, $displayoptions, $collapsible) {
$table->define_columns($columns);
@@ -362,8 +362,8 @@ abstract class quiz_attempt_report extends quiz_default_report {
/**
* Base class for the table used by {@link quiz_attempt_report}s.
*
- * @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
*/
abstract class quiz_attempt_report_table extends table_sql {
public $useridfield = 'userid';
@@ -485,7 +485,7 @@ abstract class quiz_attempt_report_table extends table_sql {
*
* @param string $data HTML fragment. The text to make into the link.
* @param object $attempt data for the row of the table being output.
- * @param integer $slot the number used to identify this question within this usage.
+ * @param int $slot the number used to identify this question within this usage.
*/
public function make_review_link($data, $attempt, $slot) {
global $OUTPUT;
@@ -562,7 +562,7 @@ abstract class quiz_attempt_report_table extends table_sql {
}
/**
- * @return boolean should {@link query_db()} call {@link load_question_latest_steps}?
+ * @return bool should {@link query_db()} call {@link load_question_latest_steps}?
*/
protected function requires_latest_steps_loaded() {
return false;
@@ -572,7 +572,7 @@ abstract class quiz_attempt_report_table extends table_sql {
* Is this a column that depends on joining to the latest state information?
* If so, return the corresponding slot. If not, return false.
* @param string $column a column name
- * @return integer false if no, else a slot.
+ * @return int false if no, else a slot.
*/
protected function is_latest_step_column($column) {
return false;
@@ -580,7 +580,7 @@ abstract class quiz_attempt_report_table extends table_sql {
/**
* Get any fields that might be needed when sorting on date for a particular slot.
- * @param integer $slot the slot for the column we want.
+ * @param int $slot the slot for the column we want.
* @param string $alias the table alias for latest state information relating to that slot.
*/
protected function get_required_latest_state_fields($slot, $alias) {
@@ -595,7 +595,7 @@ abstract class quiz_attempt_report_table extends table_sql {
* 'table' with alias qa$slot, with columns that are a union of
* the columns of the question_attempts and question_attempts_states tables.
*
- * @param integer $slot the question to add information for.
+ * @param int $slot the question to add information for.
*/
protected function add_latest_state_join($slot) {
$alias = 'qa' . $slot;
diff --git a/mod/quiz/report/grading/report.php b/mod/quiz/report/grading/report.php
index 175bed7d37e..efaa4117191 100644
--- a/mod/quiz/report/grading/report.php
+++ b/mod/quiz/report/grading/report.php
@@ -205,8 +205,8 @@ class quiz_grading_report extends quiz_default_report {
}
/**
- * @param integer $slot
- * @param integer $questionid
+ * @param int $slot
+ * @param int $questionid
* @param string $grade
* @param mixed $page = true, link to current page. false = omit page.
* number = link to specific page.
@@ -508,13 +508,13 @@ class quiz_grading_report extends quiz_default_report {
* $limitnum. A special value 'random' can be passed as $orderby, in which case
* $limitfrom is ignored.
*
- * @param integer $slot The slot for the questions you want to konw about.
- * @param integer $questionid (optional) Only return attempts that were of this specific question.
+ * @param int $slot The slot for the questions you want to konw about.
+ * @param int $questionid (optional) Only return attempts that were of this specific question.
* @param string $summarystate 'all', 'needsgrading', 'autograded' or 'manuallygraded'.
* @param string $orderby 'random', 'date', 'student' or 'idnumber'.
- * @param integer $page implements paging of the results.
+ * @param int $page implements paging of the results.
* Ignored if $orderby = random or $pagesize is null.
- * @param integer $pagesize implements paging of the results. null = all.
+ * @param int $pagesize implements paging of the results. null = all.
*/
function get_usage_ids_where_question_in_state($summarystate, $slot,
$questionid = null, $orderby = 'random', $page = 0, $pagesize = null) {
diff --git a/mod/quiz/report/overview/overviewsettings_form.php b/mod/quiz/report/overview/overviewsettings_form.php
index f498ff1faf6..1f1a2bb92dc 100644
--- a/mod/quiz/report/overview/overviewsettings_form.php
+++ b/mod/quiz/report/overview/overviewsettings_form.php
@@ -33,8 +33,8 @@ require_once($CFG->libdir . '/formslib.php');
/**
* Quiz overview report settings form.
*
- * @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 mod_quiz_report_overview_settings extends moodleform {
diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php
index 5ec1c9824d4..0323ebc0a0e 100644
--- a/mod/quiz/report/overview/report.php
+++ b/mod/quiz/report/overview/report.php
@@ -35,8 +35,8 @@ require_once($CFG->dirroot.'/mod/quiz/report/overview/overview_table.php');
/**
* Quiz report subclass for the overview (grades) report.
*
- * @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
*/
class quiz_overview_report extends quiz_attempt_report {
@@ -338,7 +338,7 @@ class quiz_overview_report extends quiz_attempt_report {
* However, $attempt->sumgrades is updated, if this is not a dry run.
*
* @param object $attempt the quiz attempt to regrade.
- * @param boolean $dryrun if true, do a pretend regrade, otherwise do it for real.
+ * @param bool $dryrun if true, do a pretend regrade, otherwise do it for real.
* @param array $slots if null, regrade all questions, otherwise, just regrade
* the quetsions with those slots.
*/
@@ -382,7 +382,7 @@ class quiz_overview_report extends quiz_attempt_report {
* Regrade attempts for this quiz, exactly which attempts are regraded is
* controlled by the parameters.
* @param object $quiz the quiz settings.
- * @param boolean $dryrun if true, do a pretend regrade, otherwise do it for real.
+ * @param bool $dryrun if true, do a pretend regrade, otherwise do it for real.
* @param array $groupstudents blank for all attempts, otherwise regrade attempts
* for these users.
* @param array $attemptids blank for all attempts, otherwise only regrade
diff --git a/mod/quiz/report/reportlib.php b/mod/quiz/report/reportlib.php
index 6676fe9202d..97a8bc15c77 100644
--- a/mod/quiz/report/reportlib.php
+++ b/mod/quiz/report/reportlib.php
@@ -44,7 +44,7 @@ define('QUIZ_REPORT_ATTEMPTS_ALL_STUDENTS', 3);
* including the keys passed as the next param.
* @param array $keys Array of strings with the names of the properties on the
* objects in datum that you want to index the multidimensional array by.
- * @param boolean $keysunique If there is not only one object for each
+ * @param bool $keysunique If there is not only one object for each
* combination of keys you are using you should set $keysunique to true.
* Otherwise all the object will be added to a zero based array. So the array
* returned will have count($keys) + 1 indexs.
@@ -178,8 +178,8 @@ function quiz_report_qm_filter_select($quiz, $quizattemptsalias = 'quiza') {
/**
* Get the nuber of students whose score was in a particular band for this quiz.
* @param number $bandwidth the width of each band.
- * @param integer $bands the number of bands
- * @param integer $quizid the quiz id.
+ * @param int $bands the number of bands
+ * @param int $quizid the quiz id.
* @param array $userids list of user ids.
* @return array band number => number of users with scores in that band.
*/
@@ -250,7 +250,7 @@ function quiz_report_highlighting_grading_method($quiz, $qmsubselect, $qmfilter)
* processed ready for display.
*
* @param float $grade a grade on this quiz.
- * @param integer $quizid the id of the quiz object.
+ * @param int $quizid the id of the quiz object.
* @return string the comment that corresponds to this grade (empty string if there is not one.
*/
function quiz_report_feedback_for_grade($grade, $quizid, $context) {
@@ -290,7 +290,7 @@ function quiz_report_feedback_for_grade($grade, $quizid, $context) {
* Format a number as a percentage out of $quiz->sumgrades
* @param number $rawgrade the mark to format.
* @param object $quiz the quiz settings
- * @param boolean $round whether to round the results ot $quiz->decimalpoints.
+ * @param bool $round whether to round the results ot $quiz->decimalpoints.
*/
function quiz_report_scale_summarks_as_percentage($rawmark, $quiz, $round = true) {
if ($quiz->sumgrades == 0) {
diff --git a/mod/quiz/report/responses/report.php b/mod/quiz/report/responses/report.php
index 39d978430f7..0783dda79a6 100644
--- a/mod/quiz/report/responses/report.php
+++ b/mod/quiz/report/responses/report.php
@@ -43,8 +43,8 @@ require_once($CFG->dirroot.'/mod/quiz/report/responses/responses_table.php');
* Like the overview report, there are options for showing students with/without
* attempts, and for deleting selected attempts.
*
- * @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
*/
class quiz_responses_report extends quiz_attempt_report {
diff --git a/mod/quiz/report/responses/responses_table.php b/mod/quiz/report/responses/responses_table.php
index 6f9b188d311..6397fcce4bc 100644
--- a/mod/quiz/report/responses/responses_table.php
+++ b/mod/quiz/report/responses/responses_table.php
@@ -156,7 +156,7 @@ class quiz_report_responses_table extends quiz_attempt_report_table {
/**
* Get any fields that might be needed when sorting on date for a particular slot.
- * @param integer $slot the slot for the column we want.
+ * @param int $slot the slot for the column we want.
* @param string $alias the table alias for latest state information relating to that slot.
*/
protected function get_required_latest_state_fields($slot, $alias) {
diff --git a/mod/quiz/report/statistics/qstats.php b/mod/quiz/report/statistics/qstats.php
index 421fbff79f9..a5db958f63d 100644
--- a/mod/quiz/report/statistics/qstats.php
+++ b/mod/quiz/report/statistics/qstats.php
@@ -92,10 +92,10 @@ class quiz_statistics_question_stats {
/**
* Load the data that will be needed to perform the calculations.
*
- * @param integer $quizid the quiz id.
- * @param integer $currentgroup the current group. 0 for none.
+ * @param int $quizid the quiz id.
+ * @param int $currentgroup the current group. 0 for none.
* @param array $groupstudents students in this group.
- * @param boolean $allattempts use all attempts, or just first attempts.
+ * @param bool $allattempts use all attempts, or just first attempts.
*/
public function load_step_data($quizid, $currentgroup, $groupstudents, $allattempts) {
global $DB;
@@ -276,7 +276,7 @@ class quiz_statistics_question_stats {
*
* @param object $step the state to add to the statistics.
* @param object $stats the question statistics we are accumulating.
- * @param boolean $positionstat whether this is a statistic of position of question.
+ * @param bool $positionstat whether this is a statistic of position of question.
*/
protected function initial_steps_walker($step, $stats, $positionstat = true) {
$stats->s++;
@@ -320,7 +320,7 @@ class quiz_statistics_question_stats {
*
* @param object $step the state to add to the statistics.
* @param object $stats the question statistics we are accumulating.
- * @param boolean $positionstat whether this is a statistic of position of question.
+ * @param bool $positionstat whether this is a statistic of position of question.
*/
protected function secondary_steps_walker($step, $stats) {
$markdifference = $step->mark - $stats->markaverage;
diff --git a/mod/quiz/report/statistics/report.php b/mod/quiz/report/statistics/report.php
index 079958c20f3..0378d66c145 100644
--- a/mod/quiz/report/statistics/report.php
+++ b/mod/quiz/report/statistics/report.php
@@ -384,7 +384,7 @@ class quiz_statistics_report extends quiz_default_report {
/**
* Output the table that lists all the questions in the quiz with their statistics.
- * @param integer $s number of attempts.
+ * @param int $s number of attempts.
* @param array $questions the questions in the quiz.
* @param array $subquestions the subquestions of any random questions.
*/
@@ -529,7 +529,7 @@ class quiz_statistics_report extends quiz_default_report {
/**
* Output the HTML needed to show the statistics graph.
- * @param integer $quizstatsid the id of the statistics to show in the graph.
+ * @param int $quizstatsid the id of the statistics to show in the graph.
*/
protected function output_statistics_graph($quizstatsid, $s) {
global $OUTPUT;
@@ -550,8 +550,8 @@ class quiz_statistics_report extends quiz_default_report {
* Return the stats data for when there are no stats to show.
*
* @param array $questions question definitions.
- * @param integer $firstattemptscount number of first attempts (optional).
- * @param integer $firstattemptscount total number of attempts (optional).
+ * @param int $firstattemptscount number of first attempts (optional).
+ * @param int $firstattemptscount total number of attempts (optional).
* @return array with three elements:
* - integer $s Number of attempts included in the stats (0).
* - array $quizstats The statistics for overall attempt scores.
@@ -575,9 +575,9 @@ class quiz_statistics_report extends quiz_default_report {
* Compute the quiz statistics.
*
* @param object $quizid the quiz id.
- * @param integer $currentgroup the current group. 0 for none.
- * @param boolean $nostudentsingroup true if there a no students.
- * @param boolean $useallattempts use all attempts, or just first attempts.
+ * @param int $currentgroup the current group. 0 for none.
+ * @param bool $nostudentsingroup true if there a no students.
+ * @param bool $useallattempts use all attempts, or just first attempts.
* @param array $groupstudents students in this group.
* @param array $questions question definitions.
* @return array with three elements:
@@ -735,9 +735,9 @@ class quiz_statistics_report extends quiz_default_report {
* Load the cached statistics from the database.
*
* @param object $quiz the quiz settings
- * @param integer $currentgroup the current group. 0 for none.
- * @param boolean $nostudentsingroup true if there a no students.
- * @param boolean $useallattempts use all attempts, or just first attempts.
+ * @param int $currentgroup the current group. 0 for none.
+ * @param bool $nostudentsingroup true if there a no students.
+ * @param bool $useallattempts use all attempts, or just first attempts.
* @param array $groupstudents students in this group.
* @param array $questions question definitions.
* @return array with 4 elements:
@@ -796,8 +796,8 @@ class quiz_statistics_report extends quiz_default_report {
* Store the statistics in the cache tables in the database.
*
* @param object $quizid the quiz id.
- * @param integer $currentgroup the current group. 0 for none.
- * @param boolean $useallattempts use all attempts, or just first attempts.
+ * @param int $currentgroup the current group. 0 for none.
+ * @param bool $useallattempts use all attempts, or just first attempts.
* @param object $quizstats The statistics for overall attempt scores.
* @param array $questions The questions, with an additional _stats field.
* @param array $subquestions The subquestions, if any, with an additional _stats field.
@@ -840,9 +840,9 @@ class quiz_statistics_report extends quiz_default_report {
* or by recomputing them.
*
* @param object $quiz the quiz settings.
- * @param integer $currentgroup the current group. 0 for none.
- * @param boolean $nostudentsingroup true if there a no students.
- * @param boolean $useallattempts use all attempts, or just first attempts.
+ * @param int $currentgroup the current group. 0 for none.
+ * @param bool $nostudentsingroup true if there a no students.
+ * @param bool $useallattempts use all attempts, or just first attempts.
* @param array $groupstudents students in this group.
* @param array $questions question definitions.
* @return array with 4 elements:
@@ -928,10 +928,10 @@ class quiz_statistics_report extends quiz_default_report {
* Generate the snipped of HTML that says when the stats were last caculated,
* with a recalcuate now button.
* @param object $quizstats the overall quiz statistics.
- * @param integer $quizid the quiz id.
- * @param integer $currentgroup the id of the currently selected group, or 0.
+ * @param int $quizid the quiz id.
+ * @param int $currentgroup the id of the currently selected group, or 0.
* @param array $groupstudents ids of students in the group.
- * @param boolean $useallattempts whether to use all attempts, instead of just first attempts.
+ * @param bool $useallattempts whether to use all attempts, instead of just first attempts.
* @return string a HTML snipped saying when the stats were last computed, or blank if that is not appropriate.
*/
protected function output_caching_info($quizstats, $quizid, $currentgroup,
@@ -973,9 +973,9 @@ class quiz_statistics_report extends quiz_default_report {
/**
* Clear the cached data for a particular report configuration. This will
* trigger a re-computation the next time the report is displayed.
- * @param integer $quizid the quiz id.
- * @param integer $currentgroup a group id, or 0.
- * @param boolean $useallattempts whether all attempts, or just first attempts are included.
+ * @param int $quizid the quiz id.
+ * @param int $currentgroup a group id, or 0.
+ * @param bool $useallattempts whether all attempts, or just first attempts are included.
*/
protected function clear_cached_data($quizid, $currentgroup, $useallattempts) {
global $DB;
@@ -995,7 +995,7 @@ class quiz_statistics_report extends quiz_default_report {
}
/**
- * @param boolean $useallattempts whether we are using all attempts.
+ * @param bool $useallattempts whether we are using all attempts.
* @return the appropriate lang string to describe this option.
*/
protected function using_attempts_string($useallattempts) {
diff --git a/mod/quiz/report/statistics/responseanalysis.php b/mod/quiz/report/statistics/responseanalysis.php
index 4a6887581e5..0f9bea00f44 100644
--- a/mod/quiz/report/statistics/responseanalysis.php
+++ b/mod/quiz/report/statistics/responseanalysis.php
@@ -77,14 +77,14 @@ class quiz_statistics_response_analyser {
}
/**
- * @return boolean whether this analysis has more than one subpart.
+ * @return bool whether this analysis has more than one subpart.
*/
public function has_subparts() {
return count($this->responseclasses) > 1;
}
/**
- * @return boolean whether this analysis has (a subpart with) more than one
+ * @return bool whether this analysis has (a subpart with) more than one
* response class.
*/
public function has_response_classes() {
@@ -97,7 +97,7 @@ class quiz_statistics_response_analyser {
}
/**
- * @return boolean whether this analysis has a response class more than one
+ * @return bool whether this analysis has a response class more than one
* different acutal response.
*/
public function has_actual_responses() {
@@ -160,9 +160,9 @@ class quiz_statistics_response_analyser {
/**
* Store the computed response analysis in the quiz_question_response_stats
* table.
- * @param integer $quizstatisticsid the cached quiz statistics to load the
+ * @param int $quizstatisticsid the cached quiz statistics to load the
* data corresponding to.
- * @return boolean true if cached data was found in the database and loaded,
+ * @return bool true if cached data was found in the database and loaded,
* otherwise false, to mean no data was loaded.
*/
public function load_cached($quizstatisticsid) {
@@ -185,7 +185,7 @@ class quiz_statistics_response_analyser {
/**
* Store the computed response analysis in the quiz_question_response_stats
* table.
- * @param integer $quizstatisticsid the cached quiz statistics this correspons to.
+ * @param int $quizstatisticsid the cached quiz statistics this correspons to.
*/
public function store_cached($quizstatisticsid) {
global $DB;
diff --git a/mod/quiz/report/statistics/simpletest/test_qstats.php b/mod/quiz/report/statistics/simpletest/test_qstats.php
index 33405bbb4bd..ccd454972c1 100644
--- a/mod/quiz/report/statistics/simpletest/test_qstats.php
+++ b/mod/quiz/report/statistics/simpletest/test_qstats.php
@@ -52,8 +52,8 @@ class testable_quiz_statistics_question_stats extends quiz_statistics_question_s
/**
* Unit tests for (some of) quiz_statistics_question_stats.
*
- * @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_test extends UnitTestCase {
public static $includecoverage = array('mod/quiz/report/reportlib.php');
diff --git a/mod/quiz/report/statistics/statistics_form.php b/mod/quiz/report/statistics/statistics_form.php
index 04bc47941c2..8919b1b8f06 100644
--- a/mod/quiz/report/statistics/statistics_form.php
+++ b/mod/quiz/report/statistics/statistics_form.php
@@ -33,8 +33,8 @@ require_once($CFG->libdir . '/formslib.php');
/**
* This is the settings form for the quiz statistics 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_statistics_statistics_settings_form extends moodleform {
function definition() {
diff --git a/mod/quiz/report/statistics/statistics_question_table.php b/mod/quiz/report/statistics/statistics_question_table.php
index 29f3b65c2e4..fed8467ce46 100644
--- a/mod/quiz/report/statistics/statistics_question_table.php
+++ b/mod/quiz/report/statistics/statistics_question_table.php
@@ -38,8 +38,8 @@ require_once($CFG->libdir . '/tablelib.php');
* The responses may be grouped, either by subpart of the question, or by the
* answer they match.
*
- * @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_question_table extends flexible_table {
/** @var object this question with a _stats field. */
@@ -60,7 +60,7 @@ class quiz_report_statistics_question_table extends flexible_table {
*
* @param moodle_url $reporturl the URL to redisplay this report.
* @param object $question a question with a _stats field
- * @param boolean $hassubqs
+ * @param bool $hassubqs
*/
public function setup($reporturl, $questiondata, quiz_statistics_response_analyser $responesstats) {
$this->questiondata = $questiondata;
diff --git a/mod/quiz/report/statistics/statistics_table.php b/mod/quiz/report/statistics/statistics_table.php
index 6edc82f83a4..ade4d76be99 100644
--- a/mod/quiz/report/statistics/statistics_table.php
+++ b/mod/quiz/report/statistics/statistics_table.php
@@ -56,9 +56,9 @@ class quiz_report_statistics_table extends flexible_table {
* call flexible_table::setup() method.
*
* @param object $quiz the quiz settings
- * @param integer $cmid the quiz course_module id
+ * @param int $cmid the quiz course_module id
* @param moodle_url $reporturl the URL to redisplay this report.
- * @param integer $s number of attempts included in the statistics.
+ * @param int $s number of attempts included in the statistics.
*/
function setup($quiz, $cmid, $reporturl, $s) {
$this->quiz = $quiz;
@@ -326,7 +326,7 @@ class quiz_report_statistics_table extends flexible_table {
* This method encapsulates the test for wheter a question should be considered dubious.
* @param object question the question object with a property _stats which
* includes all the stats for the question.
- * @return boolean is this question possibly not pulling it's weight?
+ * @return bool is this question possibly not pulling it's weight?
*/
protected function is_dubious_question($question) {
if (!is_numeric($question->_stats->discriminativeefficiency)) {
diff --git a/mod/quiz/settingslib.php b/mod/quiz/settingslib.php
index 358e1dd635e..7d646f2c80c 100644
--- a/mod/quiz/settingslib.php
+++ b/mod/quiz/settingslib.php
@@ -74,7 +74,7 @@ class mod_quiz_admin_review_setting extends admin_setting {
}
/**
- * @return integer all times.
+ * @return int all times.
*/
public static function all_on() {
return self::DURING | self::IMMEDIATELY_AFTER | self::LATER_WHILE_OPEN |
diff --git a/mod/quiz/simpletest/testquizdisplayoptions.php b/mod/quiz/simpletest/testquizdisplayoptions.php
index 991afdd5282..982746013bb 100644
--- a/mod/quiz/simpletest/testquizdisplayoptions.php
+++ b/mod/quiz/simpletest/testquizdisplayoptions.php
@@ -33,8 +33,8 @@ 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
+ * @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() {
diff --git a/question/behaviour/adaptive/behaviour.php b/question/behaviour/adaptive/behaviour.php
index 00598782e96..5518469328d 100644
--- a/question/behaviour/adaptive/behaviour.php
+++ b/question/behaviour/adaptive/behaviour.php
@@ -33,8 +33,8 @@ defined('MOODLE_INTERNAL') || die();
*
* This is the old version of interactive mode.
*
- * @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
*/
class qbehaviour_adaptive extends question_behaviour_with_save {
const IS_ARCHETYPAL = true;
diff --git a/question/behaviour/behaviourbase.php b/question/behaviour/behaviourbase.php
index 814e3225fe0..097faef1a18 100644
--- a/question/behaviour/behaviourbase.php
+++ b/question/behaviour/behaviourbase.php
@@ -130,8 +130,8 @@ abstract class question_behaviour {
* @param string $component the name of the component we are serving files for.
* @param string $filearea the name of the file area.
* @param array $args the remaining bits of the file path.
- * @param boolean $forcedownload whether the user must be forced to download the file.
- * @return boolean true if the user can access this file.
+ * @param bool $forcedownload whether the user must be forced to download the file.
+ * @return bool true if the user can access this file.
*/
public function check_file_access($options, $component, $filearea, $args, $forcedownload) {
$this->adjust_display_options($options);
@@ -314,7 +314,7 @@ abstract class question_behaviour {
* Generate a brief textual description of the current state of the question,
* normally displayed under the question number.
*
- * @param boolean $showcorrectness Whether right/partial/wrong states should
+ * @param bool $showcorrectness Whether right/partial/wrong states should
* be distinguised.
* @return string a brief summary of the current state of the qestion attempt.
*/
@@ -341,7 +341,7 @@ abstract class question_behaviour {
* the comment, and the mark (if given) is the same.
*
* @param question_attempt_step $pendingstep contains the new responses.
- * @return boolean whether the new response is the same as we already have.
+ * @return bool whether the new response is the same as we already have.
*/
protected function is_same_comment($pendingstep) {
$previouscomment = $this->qa->get_last_behaviour_var('comment');
@@ -409,7 +409,7 @@ abstract class question_behaviour {
* @param question_attempt_pending_step $pendingstep a partially initialised step
* containing all the information about the action that is being peformed.
* This information can be accessed using {@link question_attempt_step::get_behaviour_var()}.
- * @return boolean either {@link question_attempt::KEEP} or {@link question_attempt::DISCARD}
+ * @return bool either {@link question_attempt::KEEP} or {@link question_attempt::DISCARD}
*/
public abstract function process_action(question_attempt_pending_step $pendingstep);
@@ -418,7 +418,7 @@ abstract class question_behaviour {
* be suitable for most subclasses.
* @param question_attempt_pending_step $pendingstep a partially initialised step
* containing all the information about the action that is being peformed.
- * @return boolean either {@link question_attempt::KEEP}
+ * @return bool either {@link question_attempt::KEEP}
*/
public function process_comment(question_attempt_pending_step $pendingstep) {
if (!$this->qa->get_state()->is_finished()) {
@@ -500,8 +500,8 @@ abstract class question_behaviour {
* action that is suitable for most questions that implement the
* {@link question_manually_gradable} interface.
*
- * @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
*/
abstract class question_behaviour_with_save extends question_behaviour {
public function required_question_definition_type() {
@@ -512,7 +512,7 @@ abstract class question_behaviour_with_save extends question_behaviour {
* Work out whether the response in $pendingstep are significantly different
* from the last set of responses we have stored.
* @param question_attempt_step $pendingstep contains the new responses.
- * @return boolean whether the new response is the same as we already have.
+ * @return bool whether the new response is the same as we already have.
*/
protected function is_same_response(question_attempt_step $pendingstep) {
return $this->question->is_same_response(
@@ -526,7 +526,7 @@ abstract class question_behaviour_with_save extends question_behaviour {
* behaviours, for example the CBM ones, have their own parts to the
* response.
* @param question_attempt_step $pendingstep contains the new responses.
- * @return boolean whether the new response is complete.
+ * @return bool whether the new response is complete.
*/
protected function is_complete_response(question_attempt_step $pendingstep) {
return $this->question->is_complete_response($pendingstep->get_qt_data());
@@ -537,7 +537,7 @@ abstract class question_behaviour_with_save extends question_behaviour {
* most subclasses.
* @param question_attempt_pending_step $pendingstep a partially initialised step
* containing all the information about the action that is being peformed.
- * @return boolean either {@link question_attempt::KEEP} or {@link question_attempt::DISCARD}
+ * @return bool either {@link question_attempt::KEEP} or {@link question_attempt::DISCARD}
*/
public function process_save(question_attempt_pending_step $pendingstep) {
if ($this->qa->get_state()->is_finished()) {
@@ -588,8 +588,8 @@ abstract class question_behaviour_with_save extends question_behaviour {
* This helper class contains the constants and methods required for
* manipulating scores for certainly based marking.
*
- * @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
*/
abstract class question_cbm {
/**#@+ @var integer named constants for the certainty levels. */
@@ -615,7 +615,7 @@ abstract class question_cbm {
/**#@-*/
/**
- * @return integer the default certaintly level that should be assuemd if
+ * @return int the default certaintly level that should be assuemd if
* the student does not choose one.
*/
public static function default_certainty() {
@@ -625,7 +625,7 @@ abstract class question_cbm {
/**
* Given a fraction, and a certainly, compute the adjusted fraction.
* @param number $fraction the raw fraction for this question.
- * @param integer $certainty one of the certainly level constants.
+ * @param int $certainty one of the certainly level constants.
* @return number the adjusted fraction taking the certainly into account.
*/
public static function adjust_fraction($fraction, $certainty) {
@@ -633,7 +633,7 @@ abstract class question_cbm {
}
/**
- * @param integer $certainty one of the LOW/MED/HIGH constants.
+ * @param int $certainty one of the LOW/MED/HIGH constants.
* @return string a textual desciption of this certainly.
*/
public static function get_string($certainty) {
diff --git a/question/behaviour/deferredfeedback/behaviour.php b/question/behaviour/deferredfeedback/behaviour.php
index e39e17fba97..579c0076e8a 100644
--- a/question/behaviour/deferredfeedback/behaviour.php
+++ b/question/behaviour/deferredfeedback/behaviour.php
@@ -36,7 +36,7 @@ defined('MOODLE_INTERNAL') || die();
* when the whole attempt is finished, their answer is graded.
*
* @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_deferredfeedback extends question_behaviour_with_save {
const IS_ARCHETYPAL = true;
diff --git a/question/behaviour/deferredfeedback/renderer.php b/question/behaviour/deferredfeedback/renderer.php
index e1e9ae57e16..bd4ccbfb595 100644
--- a/question/behaviour/deferredfeedback/renderer.php
+++ b/question/behaviour/deferredfeedback/renderer.php
@@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die();
* feedback behaviour.
*
* @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_deferredfeedback_renderer extends qbehaviour_renderer {
}
diff --git a/question/behaviour/deferredfeedback/simpletest/testwalkthrough.php b/question/behaviour/deferredfeedback/simpletest/testwalkthrough.php
index 90201eefd67..2a821243b20 100644
--- a/question/behaviour/deferredfeedback/simpletest/testwalkthrough.php
+++ b/question/behaviour/deferredfeedback/simpletest/testwalkthrough.php
@@ -36,7 +36,7 @@ require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php');
* Unit tests for the deferred feedback behaviour.
*
* @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qbehaviour_deferredfeedback_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_deferredfeedback_feedback_truefalse() {
diff --git a/question/behaviour/interactive/behaviour.php b/question/behaviour/interactive/behaviour.php
index fbaa868963d..04ad8be6126 100644
--- a/question/behaviour/interactive/behaviour.php
+++ b/question/behaviour/interactive/behaviour.php
@@ -62,7 +62,7 @@ class qbehaviour_interactive extends question_behaviour_with_save {
}
/**
- * @return boolean are we are currently in the try_again state.
+ * @return bool are we are currently in the try_again state.
*/
protected function is_try_again_state() {
$laststep = $this->qa->get_last_step();
diff --git a/question/editlib.php b/question/editlib.php
index b26a8efa1fc..ba34c4c8dd0 100644
--- a/question/editlib.php
+++ b/question/editlib.php
@@ -18,10 +18,10 @@
/**
* Functions used to show question editing interface
*
- * @package moodlecore
+ * @package moodlecore
* @subpackage questionbank
- * @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
*/
@@ -93,8 +93,8 @@ function get_questions_category( $category, $noparent=false, $recurse=true, $exp
}
/**
- * @param integer $categoryid a category id.
- * @return boolean whether this is the only top-level category in a context.
+ * @param int $categoryid a category id.
+ * @return bool whether this is the only top-level category in a context.
*/
function question_is_only_toplevel_category_in_context($categoryid) {
global $DB;
@@ -110,7 +110,7 @@ function question_is_only_toplevel_category_in_context($categoryid) {
/**
* Check whether this user is allowed to delete this category.
*
- * @param integer $todelete a category id.
+ * @param int $todelete a category id.
*/
function question_can_delete_cat($todelete) {
global $DB;
@@ -122,6 +122,13 @@ function question_can_delete_cat($todelete) {
}
}
+
+/**
+ * Base class for representing a column in a {@link question_bank_view}.
+ *
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
abstract class question_bank_column_base {
/**
* @var question_bank_view
@@ -150,7 +157,7 @@ abstract class question_bank_column_base {
/**
* Output the column header cell.
- * @param integer $currentsort 0 for none. 1 for normal sort, -1 for reverse sort.
+ * @param int $currentsort 0 for none. 1 for normal sort, -1 for reverse sort.
*/
public function display_header() {
echo '