MDL-45273 quiz: Fix codechecker issues.

This commit is contained in:
Tim Hunt 2014-04-29 11:56:30 +01:00
parent 8a347d8011
commit 3180508949
3 changed files with 26 additions and 8 deletions

View File

@ -33,15 +33,29 @@ defined('MOODLE_INTERNAL') || die();
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mod_quiz_admin_review_setting extends admin_setting {
/**#@+
* @var integer should match the constants defined in {@link mod_quiz_display_options}.
* again, copied for performance reasons.
/**
* @var integer should match the constants defined in
* {@link mod_quiz_display_options}. Copied for performance reasons.
*/
const DURING = 0x10000;
/**
* @var integer should match the constants defined in
* {@link mod_quiz_display_options}. Copied for performance reasons.
*/
const IMMEDIATELY_AFTER = 0x01000;
/**
* @var integer should match the constants defined in
* {@link mod_quiz_display_options}. Copied for performance reasons.
*/
const LATER_WHILE_OPEN = 0x00100;
/**
* @var integer should match the constants defined in
* {@link mod_quiz_display_options}. Copied for performance reasons.
*/
const AFTER_CLOSE = 0x00010;
/**#@-*/
/**
* @var boolean|null forced checked / disabled attributes for the during time.
@ -82,6 +96,7 @@ class mod_quiz_admin_review_setting extends admin_setting {
}
/**
* Return the combination that means all times.
* @return int all times.
*/
public static function all_on() {
@ -90,7 +105,8 @@ class mod_quiz_admin_review_setting extends admin_setting {
}
/**
* @return array name of all the possible times.
* Get an array of the names of all the possible times.
* @return array an array of time constant => lang string.
*/
protected static function times() {
return array(

View File

@ -1126,6 +1126,7 @@ function quiz_get_overdue_handling_options() {
}
/**
* Get the choices for what size user picture to show.
* @return array string => lang string the options for whether to display the user's picture.
*/
function quiz_get_user_image_options() {
@ -1137,8 +1138,9 @@ function quiz_get_user_image_options() {
}
/**
* @param string $state one of the state constants like IN_PROGRESS.
* @return string the human-readable state name.
* Get the human-readable name for a quiz attempt state.
* @param string $state one of the state constants like {@link quiz_attempt::IN_PROGRESS}.
* @return string The lang string to describe that state.
*/
function quiz_attempt_state_name($state) {
switch ($state) {

View File

@ -202,7 +202,7 @@ if ($ADMIN->fulltree) {
get_string('showinsecurepopup', 'quiz'), get_string('configpopup', 'quiz'),
array('value' => '-', 'adv' => true), null));
// Allow user to specify if setting outcomes is an advanced setting
// Allow user to specify if setting outcomes is an advanced setting.
if (!empty($CFG->enableoutcomes)) {
$quizsettings->add(new admin_setting_configcheckbox('quiz/outcomes_adv',
get_string('outcomesadvanced', 'quiz'), get_string('configoutcomesadvanced', 'quiz'),