diff --git a/core/src/edx/org/openedx/core/ui/theme/Colors.kt b/core/src/edx/org/openedx/core/ui/theme/Colors.kt
index bb2614a3e..d2e420bd3 100644
--- a/core/src/edx/org/openedx/core/ui/theme/Colors.kt
+++ b/core/src/edx/org/openedx/core/ui/theme/Colors.kt
@@ -84,7 +84,10 @@ val light_course_home_header_shade = Color(0xFFBABABA)
val light_course_home_back_btn_background = light_surface
val light_settings_title_content = light_surface
val light_progress_bar_color = light_primary_button_background
-val light_progress_bar_background_color = Color(0xFFCCD4E0)
+val light_progress_bar_background_color = Color(0xFFE7E4DB)
+
+val light_primary_card_caution_background = Color(0xFFF3F1ED)
+val light_primary_card_info_background = Color(0xFFE7E4DB)
// Dark theme colors scheme
@@ -166,4 +169,7 @@ val dark_course_home_header_shade = Color(0xFF999999)
val dark_course_home_back_btn_background = Color.Black
val dark_settings_title_content = Color.White
val dark_progress_bar_color = dark_primary_button_background
-val dark_progress_bar_background_color = Color(0xFF8E9BAE)
+val dark_progress_bar_background_color = Color(0xFFE7E4DB)
+
+val dark_primary_card_caution_background = Color(0xFF2D494E)
+val dark_primary_card_info_background = Color(0xFF0E3639)
diff --git a/core/src/main/java/org/openedx/core/ui/UpgradeToAccessView.kt b/core/src/main/java/org/openedx/core/ui/UpgradeToAccessView.kt
index fe9962a21..a5af5d8c3 100644
--- a/core/src/main/java/org/openedx/core/ui/UpgradeToAccessView.kt
+++ b/core/src/main/java/org/openedx/core/ui/UpgradeToAccessView.kt
@@ -75,7 +75,7 @@ fun UpgradeToAccessView(
primaryIcon = Icons.Filled.EmojiEvents
textColor = MaterialTheme.appColors.textDark
shape = RectangleShape
- backgroundColor = textColor.copy(0.05f)
+ backgroundColor = MaterialTheme.appColors.primaryCardInfoBackground
secondaryIcon = {
Icon(
modifier = Modifier
diff --git a/core/src/main/java/org/openedx/core/ui/theme/AppColors.kt b/core/src/main/java/org/openedx/core/ui/theme/AppColors.kt
index 37783b820..7baebb255 100644
--- a/core/src/main/java/org/openedx/core/ui/theme/AppColors.kt
+++ b/core/src/main/java/org/openedx/core/ui/theme/AppColors.kt
@@ -78,7 +78,10 @@ data class AppColors(
val settingsTitleContent: Color,
val progressBarColor: Color,
- val progressBarBackgroundColor: Color
+ val progressBarBackgroundColor: Color,
+
+ val primaryCardCautionBackground: Color,
+ val primaryCardInfoBackground: Color,
) {
val primary: Color get() = material.primary
val primaryVariant: Color get() = material.primaryVariant
diff --git a/core/src/main/java/org/openedx/core/ui/theme/Theme.kt b/core/src/main/java/org/openedx/core/ui/theme/Theme.kt
index 8fe1eb8ff..47a69fac1 100644
--- a/core/src/main/java/org/openedx/core/ui/theme/Theme.kt
+++ b/core/src/main/java/org/openedx/core/ui/theme/Theme.kt
@@ -96,7 +96,10 @@ private val DarkColorPalette = AppColors(
settingsTitleContent = dark_settings_title_content,
progressBarColor = dark_progress_bar_color,
- progressBarBackgroundColor = dark_progress_bar_background_color
+ progressBarBackgroundColor = dark_progress_bar_background_color,
+
+ primaryCardCautionBackground = dark_primary_card_caution_background,
+ primaryCardInfoBackground = dark_primary_card_info_background,
)
private val LightColorPalette = AppColors(
@@ -185,7 +188,10 @@ private val LightColorPalette = AppColors(
settingsTitleContent = light_settings_title_content,
progressBarColor = light_progress_bar_color,
- progressBarBackgroundColor = light_progress_bar_background_color
+ progressBarBackgroundColor = light_progress_bar_background_color,
+
+ primaryCardCautionBackground = light_primary_card_caution_background,
+ primaryCardInfoBackground = light_primary_card_info_background,
)
val MaterialTheme.appColors: AppColors
diff --git a/dashboard/src/main/java/org/openedx/courses/presentation/DashboardGalleryView.kt b/dashboard/src/main/java/org/openedx/courses/presentation/DashboardGalleryView.kt
index 62897d076..280e4981e 100644
--- a/dashboard/src/main/java/org/openedx/courses/presentation/DashboardGalleryView.kt
+++ b/dashboard/src/main/java/org/openedx/courses/presentation/DashboardGalleryView.kt
@@ -671,15 +671,21 @@ private fun PrimaryCourseButtons(
if (!pastAssignments.isNullOrEmpty()) {
viewsList.add {
val nearestAssignment = pastAssignments.maxBy { it.date }
- val title = if (pastAssignments.size == 1) nearestAssignment.title else null
+ val title = if (pastAssignments.size == 1) {
+ nearestAssignment.title
+ } else {
+ stringResource(R.string.dashboard_assignment_due_default)
+ }
AssignmentItem(
- modifier = Modifier.clickable {
- if (pastAssignments.size == 1) {
- resumeBlockId(primaryCourse, nearestAssignment.blockId)
- } else {
- navigateToDates(primaryCourse)
- }
- },
+ modifier = Modifier
+ .background(MaterialTheme.appColors.primaryCardCautionBackground)
+ .clickable {
+ if (pastAssignments.size == 1) {
+ resumeBlockId(primaryCourse, nearestAssignment.blockId)
+ } else {
+ navigateToDates(primaryCourse)
+ }
+ },
painter = rememberVectorPainter(Icons.Default.Warning),
title = title,
info = pluralStringResource(
@@ -697,13 +703,20 @@ private fun PrimaryCourseButtons(
val nearestAssignment = futureAssignments.minBy { it.date }
val title = if (futureAssignments.size == 1) nearestAssignment.title else null
AssignmentItem(
- modifier = Modifier.clickable {
- if (futureAssignments.size == 1) {
- resumeBlockId(primaryCourse, nearestAssignment.blockId)
- } else {
- navigateToDates(primaryCourse)
- }
- },
+ modifier = Modifier
+ .background(
+ if (!pastAssignments.isNullOrEmpty())
+ MaterialTheme.appColors.primaryCardInfoBackground
+ else
+ MaterialTheme.appColors.primaryCardCautionBackground
+ )
+ .clickable {
+ if (futureAssignments.size == 1) {
+ resumeBlockId(primaryCourse, nearestAssignment.blockId)
+ } else {
+ navigateToDates(primaryCourse)
+ }
+ },
painter = painterResource(id = CoreR.drawable.ic_core_chapter_icon),
title = title,
info = stringResource(
@@ -988,7 +1001,7 @@ private val mockCourse = EnrolledCourse(
certificate = Certificate(""),
mode = "mode",
isActive = true,
- progress = Progress.DEFAULT_PROGRESS,
+ progress = Progress(4, 10),
courseStatus = CourseStatus("", emptyList(), "", "Unit name"),
courseAssignments = mockCourseAssignments,
course = EnrolledCourseData(
diff --git a/dashboard/src/main/res/values/strings.xml b/dashboard/src/main/res/values/strings.xml
index f1f2af5b7..b10b8ca0f 100644
--- a/dashboard/src/main/res/values/strings.xml
+++ b/dashboard/src/main/res/values/strings.xml
@@ -10,6 +10,7 @@
View All My Courses (%1$d)
View All
%1$s %2$s
+ View Assignments
All
In Progress
Completed