fix: edit permission and other issues

This commit is contained in:
Jannat Patel
2024-05-17 18:03:04 +05:30
parent 36c7c10d94
commit 76ea4fc1ae
8 changed files with 58 additions and 12 deletions

View File

@@ -166,5 +166,13 @@ function enrollStudent() {
}
}
const is_instructor = () => {}
const is_instructor = () => {
let user_is_instructor = false
props.course.data.instructors.forEach((instructor) => {
if (!user_is_instructor && instructor.name == user.data?.name) {
user_is_instructor = true
}
})
return user_is_instructor
}
</script>