From d59b175314eac1da501232727daca03437aa164b Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 30 Oct 2023 15:08:09 +0100 Subject: [PATCH] MOBILE-4362 assign: Fix outcome not selected This is related to MOBILE-3958, it was fixed in scaled but not in outcomes --- src/addons/mod/assign/components/submission/submission.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/addons/mod/assign/components/submission/submission.ts b/src/addons/mod/assign/components/submission/submission.ts index 7305092ad..4bf833519 100644 --- a/src/addons/mod/assign/components/submission/submission.ts +++ b/src/addons/mod/assign/components/submission/submission.ts @@ -1089,11 +1089,11 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy, Can // Only show outcomes with info on it, outcomeid could be null if outcomes are disabled on site. gradeInfo.outcomes?.forEach((outcome) => { if (outcome.id == String(grade.outcomeid)) { - outcome.selected = grade.gradeformatted; + // Clean HTML tags, grade can contain an icon. + outcome.selected = CoreTextUtils.cleanTags(grade.gradeformatted || ''); outcome.modified = grade.gradedategraded; if (outcome.options) { - outcome.selectedId = - CoreGradesHelper.getGradeValueFromLabel(outcome.options, outcome.selected || ''); + outcome.selectedId = CoreGradesHelper.getGradeValueFromLabel(outcome.options, outcome.selected); this.originalGrades.outcomes[outcome.id] = outcome.selectedId; outcome.itemNumber = grade.itemnumber; }