From 555417caa55b973268f3dfa01dbee13c0e7743cb Mon Sep 17 00:00:00 2001 From: Jesse Washburn <142361664+jessewashburn@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:24:29 -0500 Subject: [PATCH] courses: smoother progress navigation (fixes #7911)(fixes #7936) (#7938) Co-authored-by: mutugiii Co-authored-by: dogi --- package.json | 2 +- .../progress-courses/courses-progress-chart.component.html | 2 +- .../courses-progress-learner.component.html | 2 +- .../progress-courses/courses-progress-learner.component.ts | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index be624f1aa5..7c07e2bd36 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "planet", "license": "AGPL-3.0", - "version": "0.16.6", + "version": "0.16.7", "myplanet": { "latest": "v0.21.42", "min": "v0.20.42" diff --git a/src/app/courses/progress-courses/courses-progress-chart.component.html b/src/app/courses/progress-courses/courses-progress-chart.component.html index fb3711547f..1b5508212b 100644 --- a/src/app/courses/progress-courses/courses-progress-chart.component.html +++ b/src/app/courses/progress-courses/courses-progress-chart.component.html @@ -41,6 +41,6 @@
{{set.total}}
-

{{set.label}}

+

{{set.label}}

diff --git a/src/app/courses/progress-courses/courses-progress-learner.component.html b/src/app/courses/progress-courses/courses-progress-learner.component.html index e46c021040..1258573afe 100644 --- a/src/app/courses/progress-courses/courses-progress-learner.component.html +++ b/src/app/courses/progress-courses/courses-progress-learner.component.html @@ -7,7 +7,7 @@ Courses: myProgress
- + No Progress record available
diff --git a/src/app/courses/progress-courses/courses-progress-learner.component.ts b/src/app/courses/progress-courses/courses-progress-learner.component.ts index 9c59bab079..c030e26b8e 100644 --- a/src/app/courses/progress-courses/courses-progress-learner.component.ts +++ b/src/app/courses/progress-courses/courses-progress-learner.component.ts @@ -62,6 +62,7 @@ export class CoursesProgressLearnerComponent implements OnInit, OnDestroy { createChartData(courses = [], submissions) { return courses.map((course: any) => ({ label: course.doc.courseTitle, + courseId: course._id, items: this.courseBySteps( course, submissions.filter(submission => submission.parentId.indexOf(course._id) > -1) @@ -106,4 +107,10 @@ export class CoursesProgressLearnerComponent implements OnInit, OnDestroy { changeData(event) {} + handleCourseClick(event: any) { + if (event.courseId) { + this.router.navigate([ '/courses', 'view', event.courseId ]); + } + } + }