Skip to content

Commit a118372

Browse files
committed
MOBILE-4638 quiz: Use new correctness icons
1 parent 4193bfc commit a118372

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/core/features/question/services/question-helper.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,11 +815,15 @@ export class CoreQuestionHelperProvider {
815815
color = CoreIonicColorNames.DANGER;
816816
}
817817
} else {
818-
if (icon.classList.contains('fa-check-square')) {
819-
iconName = 'square-check';
820-
color = CoreIonicColorNames.WARNING;
821-
} else if (icon.classList.contains('fa-check')) {
818+
// In LMS 4.4 and older, fa-check means correct. In 4.5+, fa-check means partially correct.
819+
if (
820+
icon.classList.contains('fa-check-square') ||
821+
(icon.classList.contains('fa-check') && icon.classList.contains('text-warning'))
822+
) {
822823
iconName = 'check';
824+
color = CoreIonicColorNames.WARNING;
825+
} else if (icon.classList.contains('fa-check-double') || icon.classList.contains('fa-check')) {
826+
iconName = 'check-double';
823827
color = CoreIonicColorNames.SUCCESS;
824828
} else if (icon.classList.contains('fa-xmark') || icon.classList.contains('fa-remove')) {
825829
iconName = 'xmark';

0 commit comments

Comments
 (0)