Merge pull request #4152 from dpalou/MOBILE-4638

MOBILE-4638 quiz: Use new correctness icons
main
Pau Ferrer Ocaña 2024-08-19 09:13:46 +02:00 committed by GitHub
commit 959cb178f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 4 deletions

View File

@ -815,11 +815,15 @@ export class CoreQuestionHelperProvider {
color = CoreIonicColorNames.DANGER; color = CoreIonicColorNames.DANGER;
} }
} else { } else {
if (icon.classList.contains('fa-check-square')) { // In LMS 4.4 and older, fa-check means correct. In 4.5+, fa-check means partially correct.
iconName = 'square-check'; if (
color = CoreIonicColorNames.WARNING; icon.classList.contains('fa-check-square') ||
} else if (icon.classList.contains('fa-check')) { (icon.classList.contains('fa-check') && icon.classList.contains('text-warning'))
) {
iconName = 'check'; iconName = 'check';
color = CoreIonicColorNames.WARNING;
} else if (icon.classList.contains('fa-check-double') || icon.classList.contains('fa-check')) {
iconName = 'check-double';
color = CoreIonicColorNames.SUCCESS; color = CoreIonicColorNames.SUCCESS;
} else if (icon.classList.contains('fa-xmark') || icon.classList.contains('fa-remove')) { } else if (icon.classList.contains('fa-xmark') || icon.classList.contains('fa-remove')) {
iconName = 'xmark'; iconName = 'xmark';