diff --git a/app/build.gradle b/app/build.gradle index c39d0dd8a9..0c897f0607 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 26 targetSdkVersion 34 - versionCode 2147 - versionName "0.21.47" + versionCode 2148 + versionName "0.21.48" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt b/app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt index f83aea55b9..e762cdcd60 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt @@ -313,7 +313,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N val hasUnfinishedSurvey = mRealm.where(RealmStepExam::class.java) .equalTo("courseId", courseId) - .equalTo("type", "surveys") + .equalTo("type", "survey") .findAll() .any { survey -> !TakeCourseFragment.existsSubmission(mRealm, survey.id, "survey") } @@ -561,8 +561,9 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N private fun getSurveyTitlesFromSubmissions(submissions: List): List { val titles = mutableListOf() submissions.forEach { submission -> + val examId = submission.parentId?.split("@")?.firstOrNull() ?: "" val exam = mRealm.where(RealmStepExam::class.java) - .equalTo("id", submission.parentId) + .equalTo("id", examId) .findFirst() exam?.name?.let { titles.add(it) } } diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt.lite b/app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt.lite index 7255cdff4a..a24fbb6d61 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt.lite +++ b/app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt.lite @@ -313,7 +313,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N val hasUnfinishedSurvey = mRealm.where(RealmStepExam::class.java) .equalTo("courseId", courseId) - .equalTo("type", "surveys") + .equalTo("type", "survey") .findAll() .any { survey -> !TakeCourseFragment.existsSubmission(mRealm, survey.id, "survey") } @@ -561,8 +561,9 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N private fun getSurveyTitlesFromSubmissions(submissions: List): List { val titles = mutableListOf() submissions.forEach { submission -> + val examId = submission.parentId?.split("@")?.firstOrNull() ?: "" val exam = mRealm.where(RealmStepExam::class.java) - .equalTo("id", submission.parentId) + .equalTo("id", examId) .findFirst() exam?.name?.let { titles.add(it) } }