mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-45273 quiz: Fix codechecker issues.
This commit is contained in:
parent
6f9a441023
commit
fddcf077ab
3 changed files with 26 additions and 8 deletions
|
@ -34,15 +34,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.
|
||||
|
@ -83,6 +97,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() {
|
||||
|
@ -91,7 +106,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(
|
||||
|
|
|
@ -1168,6 +1168,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() {
|
||||
|
@ -1179,8 +1180,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) {
|
||||
|
|
|
@ -203,7 +203,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'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue