From 247505f2ba57ed721bd4c946f9f2158986b955ec Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 17 Jun 2021 11:07:58 +0200 Subject: [PATCH] MOBILE-3320 workshop: Display '-' if no assessment grade --- src/addons/mod/workshop/pages/assessment/assessment.html | 2 +- src/addons/mod/workshop/pages/assessment/assessment.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/addons/mod/workshop/pages/assessment/assessment.html b/src/addons/mod/workshop/pages/assessment/assessment.html index c4862bb4a..33978af33 100644 --- a/src/addons/mod/workshop/pages/assessment/assessment.html +++ b/src/addons/mod/workshop/pages/assessment/assessment.html @@ -70,7 +70,7 @@

{{ 'addon.mod_workshop.gradinggradecalculated' | translate }}

-

{{ assessment.gradinggrade }}

+

{{ gradingGrade }}

diff --git a/src/addons/mod/workshop/pages/assessment/assessment.ts b/src/addons/mod/workshop/pages/assessment/assessment.ts index 2085832e1..ea8b2ec52 100644 --- a/src/addons/mod/workshop/pages/assessment/assessment.ts +++ b/src/addons/mod/workshop/pages/assessment/assessment.ts @@ -73,7 +73,8 @@ export class AddonModWorkshopAssessmentPage implements OnInit, OnDestroy, CanLea weights: number[] = []; evaluateByProfile?: CoreUserProfile; - evaluationGrades: CoreGradesMenuItem[] =[]; + evaluationGrades: CoreGradesMenuItem[] = []; + gradingGrade?: string | number; protected workshopId!: number; protected originalEvaluation: AddonModWorkshopAssessmentEvaluation = { @@ -193,6 +194,7 @@ export class AddonModWorkshopAssessmentPage implements OnInit, OnDestroy, CanLea this.assessment = AddonModWorkshopHelper.realGradeValue(this.workshop, assessment); this.evaluate.text = this.assessment.feedbackreviewer || ''; this.evaluate.weight = this.assessment.weight; + this.gradingGrade = this.assessment.gradinggrade ?? '-'; if (this.evaluating) { if (this.access.canallocate) {