CLASSROOMIO-T-1: Personalize marks and attendance to students

This commit is contained in:
rotimi-best
2021-09-19 20:01:54 +03:00
parent 984a3d5e07
commit 5c9b6b9ae8
6 changed files with 36 additions and 56 deletions
@@ -28,8 +28,8 @@
// export let lessonId;
export let path;
export let isStudent = null;
let show = null;
let isStudent = null;
const { page } = stores();
@@ -105,13 +105,7 @@
label: 'Submissions',
to: getNavItemRoute($course.id, 'submissions'),
hideSortIcon: true,
show(groupMembers = [], profileId) {
const user = groupMembers.find(
(member) => member.profile_id === profileId
);
isStudent = user ? user.role_id === 3 : true;
show() {
return !isStudent;
},
},
@@ -157,7 +151,7 @@
</PageNav>
<div class="navItems">
{#each navItems as navItem}
{#if !navItem.show || (typeof navItem.show === 'function' && navItem.show($group.people, $profile.id))}
{#if !navItem.show || (typeof navItem.show === 'function' && navItem.show())}
<Expandable
label={navItem.label}
handleClick={handleMainGroupClick(navItem.to)}