Skip to content

Commit

Permalink
Merge branch 'MDL-76899' of https://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jan 24, 2023
2 parents ae53d04 + ec0a2dd commit ce9f6db
Show file tree
Hide file tree
Showing 136 changed files with 2,425 additions and 2,425 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/delaybetweenattempts/rule.php
Expand Up @@ -59,7 +59,7 @@ public function prevent_new_attempt($numprevattempts, $lastattempt) {
* Compute the next time a student would be allowed to start an attempt,
* according to this rule.
* @param int $numprevattempts number of previous attempts.
* @param object $lastattempt information about the previous attempt.
* @param stdClass $lastattempt information about the previous attempt.
* @return number the time.
*/
protected function compute_next_start_time($numprevattempts, $lastattempt) {
Expand Down
4 changes: 2 additions & 2 deletions mod/quiz/accessrule/offlineattempts/rule.php
Expand Up @@ -44,7 +44,7 @@ public function is_preflight_check_required($attemptid) {

// First, check if the user did something offline.
if (!empty($attemptid)) {
$timemodifiedoffline = $DB->get_field('quiz_attempts', 'timemodifiedoffline', array('id' => $attemptid));
$timemodifiedoffline = $DB->get_field('quiz_attempts', 'timemodifiedoffline', ['id' => $attemptid]);
if (empty($timemodifiedoffline)) {
return false;
}
Expand All @@ -59,7 +59,7 @@ public function add_preflight_check_form_fields(preflight_check_form $quizform,
MoodleQuickForm $mform, $attemptid) {
global $DB;

$timemodifiedoffline = $DB->get_field('quiz_attempts', 'timemodifiedoffline', array('id' => $attemptid));
$timemodifiedoffline = $DB->get_field('quiz_attempts', 'timemodifiedoffline', ['id' => $attemptid]);
$lasttime = format_time(time() - $timemodifiedoffline);

$mform->addElement('header', 'offlineattemptsheader', get_string('mobileapp', 'quizaccess_offlineattempts'));
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/password/rule.php
Expand Up @@ -54,7 +54,7 @@ public function add_preflight_check_form_fields(preflight_check_form $quizform,
// Don't use the 'proper' field name of 'password' since that get's
// Firefox's password auto-complete over-excited.
$mform->addElement('password', 'quizpassword',
get_string('quizpassword', 'quizaccess_password'), array('autofocus' => 'true'));
get_string('quizpassword', 'quizaccess_password'), ['autofocus' => 'true']);
}

public function validate_preflight_check($data, $files, $errors, $attemptid) {
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/seb/classes/event/access_prevented.php
Expand Up @@ -110,7 +110,7 @@ public function get_description() {
* @return array Mapping of object id.
*/
public static function get_objectid_mapping() : array {
return array('db' => 'quiz', 'restore' => 'quiz');
return ['db' => 'quiz', 'restore' => 'quiz'];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/seb/classes/event/template_created.php
Expand Up @@ -106,7 +106,7 @@ public function get_description() {
* @return array Mapping of object id.
*/
public static function get_objectid_mapping() : array {
return array('db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template');
return ['db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template'];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/seb/classes/event/template_deleted.php
Expand Up @@ -100,7 +100,7 @@ public function get_description() {
* @return array Mapping of object id.
*/
public static function get_objectid_mapping() : array {
return array('db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template');
return ['db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template'];
}

/**
Expand Down
Expand Up @@ -106,7 +106,7 @@ public function get_description() {
* @return array Mapping of object id.
*/
public static function get_objectid_mapping() : array {
return array('db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template');
return ['db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template'];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/seb/classes/event/template_enabled.php
Expand Up @@ -106,7 +106,7 @@ public function get_description() {
* @return array Mapping of object id.
*/
public static function get_objectid_mapping() : array {
return array('db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template');
return ['db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template'];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/seb/classes/event/template_updated.php
Expand Up @@ -106,7 +106,7 @@ public function get_description() {
* @return array Mapping of object id.
*/
public static function get_objectid_mapping() : array {
return array('db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template');
return ['db' => 'quizaccess_seb_template', 'restore' => 'quizaccess_seb_template'];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/accessrule/seb/classes/helper.php
Expand Up @@ -47,7 +47,7 @@ class helper {
* @param array $options Display options.
* @return string
*/
public static function format_icon_link($url, $icon, $alt, $iconcomponent = 'moodle', $options = array()) {
public static function format_icon_link($url, $icon, $alt, $iconcomponent = 'moodle', $options = []) {
global $OUTPUT;

return $OUTPUT->action_icon(
Expand Down

0 comments on commit ce9f6db

Please sign in to comment.