MOBILE-3320 assign: Fix errors when feedback is undefined
This commit is contained in:
		
							parent
							
								
									8fd64f85c0
								
							
						
					
					
						commit
						6a3e8073cd
					
				| @ -280,9 +280,11 @@ | ||||
|                     </ion-item> | ||||
|                 </ng-container> | ||||
| 
 | ||||
|                 <addon-mod-assign-feedback-plugin *ngFor="let plugin of feedback!.plugins" [assign]="assign" | ||||
|                 <ng-container *ngIf="feedback"> | ||||
|                     <addon-mod-assign-feedback-plugin *ngFor="let plugin of feedback.plugins" [assign]="assign" | ||||
|                         [submission]="userSubmission" [userId]="submitId" [plugin]="plugin" [canEdit]="canSaveGrades"> | ||||
|                     </addon-mod-assign-feedback-plugin> | ||||
|                 </ng-container> | ||||
| 
 | ||||
|                 <!-- Workflow status. --> | ||||
|                 <ion-item class="ion-text-wrap" *ngIf="workflowStatusTranslationId"> | ||||
| @ -338,7 +340,7 @@ | ||||
|                 </ion-item> | ||||
| 
 | ||||
|                 <!-- Grader is hidden, display only the grade date. --> | ||||
|                 <ion-item class="ion-text-wrap" *ngIf="!grader && feedback!.gradeddate"> | ||||
|                 <ion-item class="ion-text-wrap" *ngIf="!grader && feedback?.gradeddate"> | ||||
|                     <ion-label> | ||||
|                         <h2>{{ 'addon.mod_assign.gradedon' | translate }}</h2> | ||||
|                         <p>{{ feedback!.gradeddate * 1000 | coreFormatDate }}</p> | ||||
|  | ||||
| @ -671,8 +671,8 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy, Can | ||||
|                 AddonModAssign.getSubmissionGradingStatusTranslationId(this.grade.gradingStatus); | ||||
|         } | ||||
| 
 | ||||
|         if (this.lastAttempt?.gradingstatus == 'graded' && !this.assign!.markingworkflow && this.userSubmission) { | ||||
|             if (this.feedback!.gradeddate < this.userSubmission.timemodified) { | ||||
|         if (this.lastAttempt?.gradingstatus == 'graded' && !this.assign!.markingworkflow && this.userSubmission && feedback) { | ||||
|             if (feedback.gradeddate < this.userSubmission.timemodified) { | ||||
|                 this.lastAttempt.gradingstatus = AddonModAssignProvider.GRADED_FOLLOWUP_SUBMIT; | ||||
| 
 | ||||
|                 // Get grading text and color.
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user