Skip to content

Commit

Permalink
MDL-68806 quiz: Retain backwards compatibility in external functions
Browse files Browse the repository at this point in the history
To ensure backwards compatibility, particularly with the mobile app, the
mod_quiz_get_user_attempts and mod_quiz_get_attempt_review functions
will continue to return only the existing 'inprogress', 'overdue',
'finished' and 'abandoned' states for quiz attempts.

'submitted' attempts will be reported as 'finished', while 'notstarted'
attempts will be reported as 'inprogress'.

These functions are now deprecated. The new functions
mod_quiz_get_user_quiz_attempts and mod_quiz_get_quiz_attempt_review
will replace them. They have exactly the same code as the original
functions had before these changes, so will return all attempts in their
true states.
  • Loading branch information
marxjohnson committed Jun 6, 2024
1 parent 387f126 commit e17752d
Show file tree
Hide file tree
Showing 6 changed files with 909 additions and 11 deletions.
12 changes: 12 additions & 0 deletions .upgradenotes/MDL-68806-2024060613552522.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
issueNumber: MDL-68806
notes:
mod_quiz:
- message: >
External functions used by the app to get quiz attempts,
mod_quiz_get_user_attempts and mod_quiz_review_attempt, have been
modified to return SUBMITTED attempts as FINISHED, and NOT_STARTED
attempts as IN_PROGRESS, to retain backwards-compatibility with the app.
These functions have been deprecated in favour of
mod_quiz_get_user_quiz_attempts and mod_quiz_review_quiz_attempt, which
will return attempts in their true states.
type: deprecated
Loading

0 comments on commit e17752d

Please sign in to comment.