MOBILE-2781 assign: Support grader hidden
parent
63b564106e
commit
d3d796e54b
|
@ -215,6 +215,12 @@
|
||||||
<p *ngIf="feedback.gradeddate">{{ feedback.gradeddate * 1000 | coreFormatDate }}</p>
|
<p *ngIf="feedback.gradeddate">{{ feedback.gradeddate * 1000 | coreFormatDate }}</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<!-- Grader is hidden, display only the grade date. -->
|
||||||
|
<ion-item text-wrap *ngIf="!grader && feedback.gradeddate">
|
||||||
|
<h2>{{ 'addon.mod_assign.gradedon' | translate }}</h2>
|
||||||
|
<p>{{ feedback.gradeddate * 1000 | coreFormatDate }}</p>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
<!-- Warning message if cannot save grades. -->
|
<!-- Warning message if cannot save grades. -->
|
||||||
<div *ngIf="isGrading && !canSaveGrades" class="core-warning-card" icon-start>
|
<div *ngIf="isGrading && !canSaveGrades" class="core-warning-card" icon-start>
|
||||||
<ion-icon name="warning"></ion-icon>
|
<ion-icon name="warning"></ion-icon>
|
||||||
|
|
|
@ -485,12 +485,14 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy {
|
||||||
this.feedback = feedback;
|
this.feedback = feedback;
|
||||||
|
|
||||||
// If we have data about the grader, get its profile.
|
// If we have data about the grader, get its profile.
|
||||||
if (feedback.grade && feedback.grade.grader) {
|
if (feedback.grade && feedback.grade.grader > 0) {
|
||||||
this.userProvider.getProfile(feedback.grade.grader, this.courseId).then((profile) => {
|
this.userProvider.getProfile(feedback.grade.grader, this.courseId).then((profile) => {
|
||||||
this.grader = profile;
|
this.grader = profile;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// Ignore errors.
|
// Ignore errors.
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
delete this.grader;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the grade uses advanced grading.
|
// Check if the grade uses advanced grading.
|
||||||
|
|
|
@ -392,7 +392,7 @@ export class AddonModAssignPrefetchHandler extends CoreCourseActivityPrefetchHan
|
||||||
// Prefetch feedback.
|
// Prefetch feedback.
|
||||||
if (submission.feedback) {
|
if (submission.feedback) {
|
||||||
// Get profile and image of the grader.
|
// Get profile and image of the grader.
|
||||||
if (submission.feedback.grade && submission.feedback.grade.grader && submission.feedback.grade.grader != -1) {
|
if (submission.feedback.grade && submission.feedback.grade.grader > 0) {
|
||||||
userIds.push(submission.feedback.grade.grader);
|
userIds.push(submission.feedback.grade.grader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue