feat: students should move to next lesson on click go to lesson (#230)

* completion

* completion

* PR Fixes

* PR Fixes

* fix: progress bug on home page

* chore: fix lesson completion issue

---------

Co-authored-by: Rotimi Best <best@classroomio.com>
This commit is contained in:
Adeyemi Adetunji
2024-04-16 08:51:53 +01:00
committed by GitHub
co-authored by Rotimi Best
parent db38756cbf
commit 1277bcbfc6
7 changed files with 81 additions and 27 deletions
@@ -7,7 +7,7 @@
const gotoCourse = (id: string | undefined) => {
if (!id) return;
goto(`/courses/${id}`);
goto(`/courses/${id}/lessons?next=true`);
};
</script>
@@ -41,7 +41,9 @@
</span>
<div class="relative bg-[#EAEAEA] w-full h-1">
<div
style="width:{course.progress_rate}%"
style="width: {Math.round(
((course?.progress_rate ?? 0) / (course?.total_lessons ?? 0)) * 100
) || 0}%"
class={`absolute top-0 left-0 bg-primary-700 h-full`}
/>
</div>