From 1b71f69cfe3a3e23f8bf959a20e278084ecf1b82 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 30 Apr 2024 15:53:36 +0200 Subject: [PATCH] MOBILE-4560 colors: Use CoreIonicColorNames in missing places --- .../competency/classes/competency-plans-source.ts | 7 ++++--- .../mod/assign/components/submission/submission.ts | 3 ++- .../features/question/services/question-helper.ts | 11 ++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/addons/competency/classes/competency-plans-source.ts b/src/addons/competency/classes/competency-plans-source.ts index 471db5ba5..53b7f3c09 100644 --- a/src/addons/competency/classes/competency-plans-source.ts +++ b/src/addons/competency/classes/competency-plans-source.ts @@ -17,6 +17,7 @@ import { CoreRoutedItemsManagerSource } from '@classes/items-management/routed-i import { ADDON_COMPETENCY_COMPETENCIES_PAGE } from '../competency.module'; import { AddonCompetency, AddonCompetencyPlan, AddonCompetencyProvider } from '../services/competency'; import { AddonCompetencyHelper } from '../services/competency-helper'; +import { CoreIonicColorNames } from '@singletons/colors'; /** * Provides a collection of learning plans. @@ -73,13 +74,13 @@ export class AddonCompetencyPlansSource extends CoreRoutedItemsManagerSource= 0) { iconName = 'check'; - color = 'success'; + color = CoreIonicColorNames.SUCCESS; } else if ((icon as HTMLImageElement).src.indexOf('incorrect') >= 0 ) { iconName = 'xmark'; - color = 'danger'; + color = CoreIonicColorNames.DANGER; } } else { if (icon.classList.contains('fa-check-square')) { iconName = 'square-check'; - color = 'warning'; + color = CoreIonicColorNames.WARNING; } else if (icon.classList.contains('fa-check')) { iconName = 'check'; - color = 'success'; + color = CoreIonicColorNames.SUCCESS; } else if (icon.classList.contains('fa-xmark') || icon.classList.contains('fa-remove')) { iconName = 'xmark'; - color = 'danger'; + color = CoreIonicColorNames.DANGER; } }