wip: to be reverted
This commit is contained in:
parent
7c00ac1681
commit
e55cb31e9f
|
|
@ -62,6 +62,9 @@ export function useCourseSessionDetailQuery(courSessionId?: string) {
|
|||
},
|
||||
});
|
||||
|
||||
// TODO: Why is this always empty??????!!!!!
|
||||
// console.log(queryResult.data.value?.course_session);
|
||||
|
||||
const courseSessionDetail = computed(() => {
|
||||
return queryResult.data.value?.course_session as CourseSessionDetail | undefined;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -211,4 +211,21 @@ class CourseSessionObjectType(DjangoObjectType):
|
|||
return CourseSessionEdoniqTest.objects.filter(course_session=self)
|
||||
|
||||
def resolve_users(self, info):
|
||||
return CourseSessionUser.objects.filter(course_session_id=self.id).distinct()
|
||||
csu = list(CourseSessionUser.objects.filter(course_session_id=self.id).distinct())
|
||||
|
||||
# TODO remove or fix this
|
||||
# HACK: This is an ugly hack to pretend supervisor is a course session expert
|
||||
# if CourseSessionGroup.objects.filter(
|
||||
# course_session=self.id, supervisor=info.context.user
|
||||
# ).exists():
|
||||
# print()
|
||||
# csu = [CourseSessionUser(
|
||||
# id=info.context.user.id,
|
||||
# user=info.context.user,
|
||||
# role=CourseSessionUser.Role.EXPERT,
|
||||
# )] + csu
|
||||
#
|
||||
# for user in csu:
|
||||
# print(user.id)
|
||||
|
||||
return csu
|
||||
|
|
|
|||
Loading…
Reference in New Issue