Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions www/addons/mod/quiz/controllers/attempt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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));
}
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod/quiz/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}",
Expand Down
2 changes: 1 addition & 1 deletion www/addons/mod/quiz/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
3 changes: 3 additions & 0 deletions www/addons/mod/quiz/templates/attempt.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<div class="item" ng-if="quiz.showReviewColumn && attempt.finished">
<button class="button button-block" ui-sref="site.mod_quiz-review({courseid: courseId, quizid: quiz.id, attemptid: attempt.id})">{{ 'mma.mod_quiz.review' | translate }}</button>
</div>
<div class="item item-text-wrap mma-mod-quiz-warning" ng-if="!quiz.showReviewColumn">
<p class="mma-mod-quiz-warning">{{ 'mma.mod_quiz.noreviewattempt' | translate }}</p>
</div>
</div>
</mm-loading>
</ion-content>
Expand Down
4 changes: 0 additions & 4 deletions www/addons/mod/quiz/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ <h2>{{ 'mma.mod_quiz.summaryofattempts' | translate }}</h2>
<p class="col col-50"><b>{{ 'mma.mod_quiz.attemptstate' | translate }}</b></p>
<p class="col text-center" ng-if="isTablet && quiz.showMarkColumn"><b>{{ 'mma.mod_quiz.marks' | translate }} / {{ quiz.sumGradesFormatted }}</b></p>
<p class="col text-center" ng-if="quiz.showGradeColumn"><b>{{ 'mma.mod_quiz.grade' | translate }} / {{ quiz.gradeFormatted }}</b></p>
<p class="col text-center" ng-if="isTablet && quiz.showReviewColumn"><b>{{ 'mma.mod_quiz.review' | translate }}</b></p>
<p class="col col-10"></p>
</div>
<div class="item item-text-wrap row" ng-repeat="attempt in attempts" ng-class='{"mma-mod-quiz-highlighted": attempt.highlightGrade}'>
Expand All @@ -44,9 +43,6 @@ <h2>{{ 'mma.mod_quiz.summaryofattempts' | translate }}</h2>
</div>
<p class="col text-center" ng-if="isTablet && quiz.showMarkColumn">{{ attempt.readableMark }}</p>
<p class="col text-center" ng-if="quiz.showGradeColumn">{{ attempt.readableGrade }}</p>
<p class="col text-center" ng-if="isTablet && quiz.showReviewColumn">
<button class="button button-block" ng-if="attempt.finished" ui-sref="site.mod_quiz-review({courseid: courseId, quizid: quiz.id, attemptid: attempt.id})">{{ 'mma.mod_quiz.review' | translate }}</button>
</p>
<p class="col col-10 text-center">
<a class="button button-block button-icon ion-ios-arrow-forward" ui-sref="site.mod_quiz-attempt({courseid: courseId, quizid: quiz.id, attemptid: attempt.id})" aria-label="{{ 'mm.core.seemoredetail' | translate }}"></a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion www/addons/mod/scorm/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
};

Expand Down