Skip to content

Commit d59b175

Browse files
committed
MOBILE-4362 assign: Fix outcome not selected
This is related to MOBILE-3958, it was fixed in scaled but not in outcomes
1 parent 44f8a8e commit d59b175

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/addons/mod/assign/components/submission/submission.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,11 +1089,11 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy, Can
10891089
// Only show outcomes with info on it, outcomeid could be null if outcomes are disabled on site.
10901090
gradeInfo.outcomes?.forEach((outcome) => {
10911091
if (outcome.id == String(grade.outcomeid)) {
1092-
outcome.selected = grade.gradeformatted;
1092+
// Clean HTML tags, grade can contain an icon.
1093+
outcome.selected = CoreTextUtils.cleanTags(grade.gradeformatted || '');
10931094
outcome.modified = grade.gradedategraded;
10941095
if (outcome.options) {
1095-
outcome.selectedId =
1096-
CoreGradesHelper.getGradeValueFromLabel(outcome.options, outcome.selected || '');
1096+
outcome.selectedId = CoreGradesHelper.getGradeValueFromLabel(outcome.options, outcome.selected);
10971097
this.originalGrades.outcomes[outcome.id] = outcome.selectedId;
10981098
outcome.itemNumber = grade.itemnumber;
10991099
}

0 commit comments

Comments
 (0)