diff --git a/www/addons/mod/quiz/controllers/attempt.js b/www/addons/mod/quiz/controllers/attempt.js index 35ab7167f76..a0748e1dfa0 100644 --- a/www/addons/mod/quiz/controllers/attempt.js +++ b/www/addons/mod/quiz/controllers/attempt.js @@ -71,6 +71,11 @@ angular.module('mm.addons.mod_quiz') promises.push($mmaModQuiz.getQuizAccessInformation(quiz.id).then(function(aI) { accessInfo = aI; + if (accessInfo.canreviewmyattempts) { + return $mmaModQuiz.getAttemptReview(attemptId, -1).catch(function() { + accessInfo.canreviewmyattempts = false; + }); + } })); return $q.all(promises).then(function() { @@ -102,6 +107,7 @@ angular.module('mm.addons.mod_quiz') promises.push($mmaModQuiz.invalidateUserAttemptsForUser(quizId)); promises.push($mmaModQuiz.invalidateQuizAccessInformation(quizId)); promises.push($mmaModQuiz.invalidateCombinedReviewOptionsForUser(quizId)); + promises.push($mmaModQuiz.invalidateAttemptReview(attemptId)); if (typeof attempt.feedback != 'undefined') { promises.push($mmaModQuiz.invalidateFeedback(quizId)); } diff --git a/www/addons/mod/quiz/lang/en.json b/www/addons/mod/quiz/lang/en.json index 0c7d257d5b3..ae3f6382331 100644 --- a/www/addons/mod/quiz/lang/en.json +++ b/www/addons/mod/quiz/lang/en.json @@ -37,6 +37,7 @@ "marks": "Marks", "mustbesubmittedby": "This attempt must be submitted by {{$a}}.", "noquestions": "No questions have been added yet", + "noreviewattempt": "You are not allowed to review this attempt.", "notyetgraded": "Not yet graded", "opentoc": "Open navigation popover.", "outof": "{{$a.grade}} out of {{$a.maxgrade}}", diff --git a/www/addons/mod/quiz/services/handlers.js b/www/addons/mod/quiz/services/handlers.js index 207ce02a5b9..88feb0d6331 100644 --- a/www/addons/mod/quiz/services/handlers.js +++ b/www/addons/mod/quiz/services/handlers.js @@ -60,7 +60,7 @@ angular.module('mm.addons.mod_quiz') downloadBtn = { hidden: true, - icon: 'ion-ios-cloud-download', + icon: 'ion-ios-cloud-download-outline', label: 'mm.core.download', action: download }; diff --git a/www/addons/mod/quiz/templates/attempt.html b/www/addons/mod/quiz/templates/attempt.html index a18b0a0dce8..0daac7fb187 100644 --- a/www/addons/mod/quiz/templates/attempt.html +++ b/www/addons/mod/quiz/templates/attempt.html @@ -28,6 +28,9 @@
+
+

{{ 'mma.mod_quiz.noreviewattempt' | translate }}

+
diff --git a/www/addons/mod/quiz/templates/index.html b/www/addons/mod/quiz/templates/index.html index 5d547c1fa29..46550f972b7 100644 --- a/www/addons/mod/quiz/templates/index.html +++ b/www/addons/mod/quiz/templates/index.html @@ -33,7 +33,6 @@

{{ 'mma.mod_quiz.summaryofattempts' | translate }}

{{ 'mma.mod_quiz.attemptstate' | translate }}

{{ 'mma.mod_quiz.marks' | translate }} / {{ quiz.sumGradesFormatted }}

{{ 'mma.mod_quiz.grade' | translate }} / {{ quiz.gradeFormatted }}

-

{{ 'mma.mod_quiz.review' | translate }}

@@ -44,9 +43,6 @@

{{ 'mma.mod_quiz.summaryofattempts' | translate }}

{{ attempt.readableMark }}

{{ attempt.readableGrade }}

-

- -

diff --git a/www/addons/mod/scorm/services/handlers.js b/www/addons/mod/scorm/services/handlers.js index 59f40323dff..b71f95b7455 100644 --- a/www/addons/mod/scorm/services/handlers.js +++ b/www/addons/mod/scorm/services/handlers.js @@ -61,7 +61,7 @@ angular.module('mm.addons.mod_scorm') // Create the buttons without action yet. This is to prevent a glitch in the view. downloadBtn = { hidden: true, - icon: 'ion-ios-cloud-download', + icon: 'ion-ios-cloud-download-outline', label: 'mm.core.download' };