Skip to content

Commit

Permalink
fixup! MDL-68806 quiz: Retain backwards compatibility in external fun…
Browse files Browse the repository at this point in the history
…ction

Bump version
Fix @SInCE tags
  • Loading branch information
marxjohnson committed May 17, 2024
1 parent 2d01fdd commit 403f153
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
14 changes: 7 additions & 7 deletions mod/quiz/classes/external.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ public static function get_user_attempts_is_deprecated(): bool {
* Describes the parameters for get_user_quiz_attempts.
*
* @return external_function_parameters
* @since Moodle 4.4
* @since Moodle 4.5
*/
public static function get_user_quiz_attempts_parameters(): external_function_parameters {
return new external_function_parameters (
Expand All @@ -587,7 +587,7 @@ public static function get_user_quiz_attempts_parameters(): external_function_pa
* @param string $status quiz status: all, finished or unfinished
* @param bool $includepreviews whether to include previews or not
* @return array of warnings and the list of attempts
* @since Moodle 4.4
* @since Moodle 4.5
*/
public static function get_user_quiz_attempts(
int $quizid,
Expand All @@ -605,7 +605,7 @@ public static function get_user_quiz_attempts(
'status' => $status,
'includepreviews' => $includepreviews,
];
$params = self::validate_parameters(self::get_user_attempts_parameters(), $params);
$params = self::validate_parameters(self::get_user_quiz_attempts_parameters(), $params);

[$quiz, $course, $cm, $context] = self::validate_quiz($params['quizid']);

Expand Down Expand Up @@ -661,7 +661,7 @@ public static function get_user_quiz_attempts(
* Describes the get_user_attempts return value.
*
* @return external_single_structure
* @since Moodle 3.1
* @since Moodle 4.5
*/
public static function get_user_quiz_attempts_returns(): external_single_structure {
return new external_single_structure(
Expand Down Expand Up @@ -1791,7 +1791,7 @@ public static function get_attempt_review_is_deprecated(): bool {
* Describes the parameters for get_quiz_attempt_review.
*
* @return external_function_parameters
* @since Moodle 4.4
* @since Moodle 4.5
*/
public static function get_quiz_attempt_review_parameters(): external_function_parameters {
return new external_function_parameters (
Expand All @@ -1811,7 +1811,7 @@ public static function get_quiz_attempt_review_parameters(): external_function_p
* @param int $attemptid attempt id
* @param int $page page number, empty for all the questions in all the pages
* @return array of warnings and the attempt data, feedback and questions
* @since Moodle 4.4
* @since Moodle 4.5
*/
public static function get_quiz_attempt_review(int $attemptid, int $page = -1): array {
$warnings = [];
Expand Down Expand Up @@ -1888,7 +1888,7 @@ public static function get_quiz_attempt_review(int $attemptid, int $page = -1):
* Describes the get_attempt_review return value.
*
* @return external_single_structure
* @since Moodle 4.4
* @since Moodle 4.5
*/
public static function get_quiz_attempt_review_returns(): external_single_structure {
return new external_single_structure(
Expand Down
7 changes: 7 additions & 0 deletions mod/quiz/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ function quiz_start_attempt_built_on_last($quba, $attempt, $lastattempt) {
/**
* The save started question usage and quiz attempt in db and log the started attempt.
*
* If the attempt already exists in the database with the NOT_STARTED state, it will be transitioned
* to IN_PROGRESS and the timestart updated. If it does not already exist, a new record will be created
* already in the IN_PROGRESS state.
*
* @param quiz_settings $quizobj
* @param question_usage_by_activity $quba
* @param stdClass $attempt
Expand Down Expand Up @@ -416,6 +420,9 @@ function quiz_attempt_save_started(
/**
* The save started question usage and quiz attempt in db.
*
* This saves an attempt in the NOT_STARTED state, and is designed for use when pre-creating attempts
* ahead of the quiz start time to spread out the processing load.
*
* @param question_usage_by_activity $quba
* @param stdClass $attempt
* @return stdClass attempt object with uniqueid and id set.
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

defined('MOODLE_INTERNAL') || die();

$version = 2024051600.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2024051600.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.5dev (Build: 20240516)'; // Human-friendly version name
Expand Down

0 comments on commit 403f153

Please sign in to comment.