Skip to content

Commit

Permalink
MDL-45273 quiz: Fix codechecker issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Apr 29, 2014
1 parent 8a347d8 commit 3180508
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
26 changes: 21 additions & 5 deletions mod/quiz/classes/admin_review_setting.php
Expand Up @@ -33,15 +33,29 @@
* @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.
Expand Down Expand Up @@ -82,6 +96,7 @@ public function __construct($name, $visiblename, $description,
}

/**
* Return the combination that means all times.
* @return int all times.
*/
public static function all_on() {
Expand All @@ -90,7 +105,8 @@ public static function all_on() {
}

/**
* @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(
Expand Down
6 changes: 4 additions & 2 deletions mod/quiz/locallib.php
Expand Up @@ -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() {
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/settings.php
Expand Up @@ -202,7 +202,7 @@
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'),
Expand Down

0 comments on commit 3180508

Please sign in to comment.