mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-65274 mod_quiz: Do not return a translated string
We should be returning proper error codes and the translated string can be part of the debug information.
This commit is contained in:
parent
a866c5c238
commit
ee766461b4
@ -1299,7 +1299,8 @@ class mod_quiz_external extends external_api {
|
||||
if (!$attemptobj->is_finished()) {
|
||||
throw new moodle_quiz_exception($attemptobj->get_quizobj(), 'attemptclosed');
|
||||
} else if (!$displayoptions->attempt) {
|
||||
throw new moodle_exception($attemptobj->cannot_review_message());
|
||||
throw new moodle_quiz_exception($attemptobj->get_quizobj(), 'noreview', null, '',
|
||||
$attemptobj->cannot_review_message());
|
||||
}
|
||||
} else if (!$attemptobj->is_review_allowed()) {
|
||||
throw new moodle_quiz_exception($attemptobj->get_quizobj(), 'noreviewattempt');
|
||||
|
Loading…
x
Reference in New Issue
Block a user