diff --git a/src/components/Course/components/Lesson/Exercise/ViewMode.svelte b/src/components/Course/components/Lesson/Exercise/ViewMode.svelte index 3a60b8d2..857acc27 100644 --- a/src/components/Course/components/Lesson/Exercise/ViewMode.svelte +++ b/src/components/Course/components/Lesson/Exercise/ViewMode.svelte @@ -8,12 +8,13 @@ import CheckboxQuestion from '../../../../Question/CheckboxQuestion/index.svelte'; import TextareaQuestion from '../../../../Question/TextareaQuestion/index.svelte'; import PrimaryButton from '../../../../PrimaryButton/index.svelte'; + import RoleBasedSecurity from '../../../../RoleBasedSecurity/index.svelte'; import Progress from '../../../../Progress/index.svelte'; import { removeDuplicate } from '../../../../../utils/functions/removeDuplicate'; import { QUESTION_TYPE } from '../../../../Question/constants'; import { STATUS } from './constants'; import { getPropsForQuestion, filterOutDeleted } from './functions'; - import { formatAnswers } from '../../../function'; + import { formatAnswers, getGroupMemberId } from '../../../function'; import { submitExercise } from '../../../../../utils/services/courses'; import { fetchSubmission } from '../../../../../utils/services/submissions'; import { profile } from '../../../../../utils/store/user'; @@ -25,14 +26,6 @@ let renderProps = {}; let submission; - function getGroupMemberId(people, profileId) { - const groupMember = people.find( - (person) => person.profile_id === profileId - ); - - return groupMember ? groupMember.id : null; - } - function handleStart() { $questionnaireMetaData.currentQuestionIndex += 1; } @@ -185,8 +178,10 @@ class="w-4/5 h-40 m-auto flex items-center justify-center text-center border-2 border-gray-200 rounded-md" >
{
+ if (isStudent) return;
+
const attendanceItem = $attendance[student.id]
? $attendance[student.id][lesson.id] || {}
: {};
diff --git a/src/routes/courses/[id]/lessons/[...lessonParams]/index.svelte b/src/routes/courses/[id]/lessons/[...lessonParams]/index.svelte
index 7a924ae1..37cdc6ad 100644
--- a/src/routes/courses/[id]/lessons/[...lessonParams]/index.svelte
+++ b/src/routes/courses/[id]/lessons/[...lessonParams]/index.svelte
@@ -23,6 +23,7 @@
import CourseContainer from '../../../../../components/CourseContainer/index.svelte';
import PrimaryButton from '../../../../../components/PrimaryButton/index.svelte';
+ import RoleBasedSecurity from '../../../../../components/RoleBasedSecurity/index.svelte';
import PageNav from '../../../../../components/PageNav/index.svelte';
import PageBody from '../../../../../components/PageBody/index.svelte';
import Materials from '../../../../../components/Course/components/Lesson/Materials/index.svelte';
@@ -108,18 +109,20 @@
]}
>
Name
Role
- +(shouldEditMemberId = true)} + class="mr-2 w-20 text-center {!isStudent && + 'hover:bg-gray-100 cursor-pointer'} p-3" + on:click={() => !isStudent && handleEditStudentIdMode()} > {person.assigned_student_id || '-'}
@@ -174,18 +189,20 @@{ROLE_LABEL[person.role_id]}
-{title}
-{title}
+{item.student.username}
+{item.student.username}
++ #{item.lesson.title} + {`${item.tutor ? 'created by' + item.tutor.name : ''}`} +
+- #{item.lesson.title} - {`${item.tutor ? 'created by' + item.tutor.name : ''}`} -
- -