Skip to content

Commit

Permalink
Merge pull request #4152 from dpalou/MOBILE-4638
Browse files Browse the repository at this point in the history
MOBILE-4638 quiz: Use new correctness icons
  • Loading branch information
crazyserver authored Aug 19, 2024
2 parents 4193bfc + a118372 commit 959cb17
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/core/features/question/services/question-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,11 +815,15 @@ export class CoreQuestionHelperProvider {
color = CoreIonicColorNames.DANGER;
}
} else {
if (icon.classList.contains('fa-check-square')) {
iconName = 'square-check';
color = CoreIonicColorNames.WARNING;
} else if (icon.classList.contains('fa-check')) {
// In LMS 4.4 and older, fa-check means correct. In 4.5+, fa-check means partially correct.
if (
icon.classList.contains('fa-check-square') ||
(icon.classList.contains('fa-check') && icon.classList.contains('text-warning'))
) {
iconName = 'check';
color = CoreIonicColorNames.WARNING;
} else if (icon.classList.contains('fa-check-double') || icon.classList.contains('fa-check')) {
iconName = 'check-double';
color = CoreIonicColorNames.SUCCESS;
} else if (icon.classList.contains('fa-xmark') || icon.classList.contains('fa-remove')) {
iconName = 'xmark';
Expand Down

0 comments on commit 959cb17

Please sign in to comment.