chore: simplify grading for self paced course (#326)

* updated the grading flow for self paced course

* updated some logic and translations

* fix bug with newsfeed not opening for students and fix more bugs

* remove console

* add blog template route

* add doc page

---------

Co-authored-by: Rotimi Best <best@classroomio.com>
This commit is contained in:
Em_Dev
2024-05-25 05:50:14 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 44087c458e
commit fc0b91a493
23 changed files with 144 additions and 176 deletions
@@ -18,7 +18,6 @@
export let courseId = '';
export let path = '';
export let isExercisePage = false;
export let isStudent = false;
export let isFetching = false;
export let containerClass = '';
@@ -51,20 +50,16 @@
$: onCourseIdChange(courseId);
$: if (typeof $globalStore.isStudent !== 'boolean') {
$: {
const user = $group.people.find((person) => person.profile_id === $profile.id);
if (user) {
isStudent = user.role_id === 3;
$globalStore.isStudent = isStudent;
$globalStore.isStudent = user.role_id === 3;
filterPollsByStatus(isStudent);
filterPollsByStatus($globalStore.isStudent);
} else if ($profile.id && $group.people.length) {
// Current User doesn't have permission to view
isPermitted = false;
}
} else {
isStudent = $globalStore.isStudent;
}
</script>
@@ -97,7 +92,7 @@
</Modal>
<div class="root">
<Navigation {path} {isStudent} />
<Navigation {path} isStudent={$globalStore.isStudent} />
<div class="rightBar {containerClass}" class:isMobile={$isMobile}>
{#if isExercisePage}
<Confetti />