fix: uk mentor still needed for cypress reset :-/
- uk mentor, which does not really make sense but is still needed for cypress tests - vv mentor, can't be added yet to the same user, see open PR https://bitbucket.org/iterativ/vbv_lernwelt/pull-requests/287 ==> Once 287 is merged, we can add the vv mentor as well
This commit is contained in:
parent
a97e698165
commit
1065e8c2da
|
|
@ -9,16 +9,12 @@ from vbv_lernwelt.core.constants import (
|
|||
TEST_COURSE_SESSION_BERN_ID,
|
||||
TEST_MENTOR1_USER_ID,
|
||||
TEST_STUDENT1_USER_ID,
|
||||
TEST_STUDENT1_VV_USER_ID,
|
||||
TEST_STUDENT2_USER_ID,
|
||||
TEST_STUDENT3_USER_ID,
|
||||
TEST_TRAINER1_USER_ID,
|
||||
)
|
||||
from vbv_lernwelt.core.models import Organisation, User
|
||||
from vbv_lernwelt.course.consts import (
|
||||
COURSE_TEST_ID,
|
||||
COURSE_VERSICHERUNGSVERMITTLERIN_ID,
|
||||
)
|
||||
from vbv_lernwelt.course.consts import COURSE_TEST_ID
|
||||
from vbv_lernwelt.course.creators.test_course import (
|
||||
create_edoniq_test_result_data,
|
||||
create_feedback_response_data,
|
||||
|
|
@ -336,19 +332,32 @@ def command(
|
|||
attendance_course.save()
|
||||
|
||||
if create_learning_mentor:
|
||||
vv_course = Course.objects.get(id=COURSE_VERSICHERUNGSVERMITTLERIN_ID)
|
||||
vv_course_session = CourseSession.objects.get(course=vv_course)
|
||||
|
||||
vv_mentor = LearningMentor.objects.create(
|
||||
course=vv_course,
|
||||
uk_mentor = LearningMentor.objects.create(
|
||||
course=Course.objects.get(id=COURSE_TEST_ID),
|
||||
mentor=User.objects.get(id=TEST_MENTOR1_USER_ID),
|
||||
)
|
||||
|
||||
csu = CourseSessionUser.objects.get(
|
||||
user__id=TEST_STUDENT1_VV_USER_ID, course_session=vv_course_session
|
||||
uk_mentor.participants.add(
|
||||
CourseSessionUser.objects.get(
|
||||
user__id=TEST_STUDENT1_USER_ID,
|
||||
course_session=CourseSession.objects.get(
|
||||
id=TEST_COURSE_SESSION_BERN_ID
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
vv_mentor.participants.add(csu)
|
||||
# FIXME: Add mentor to VV course as well, once we can:
|
||||
# -> https://bitbucket.org/iterativ/vbv_lernwelt/pull-requests/287
|
||||
# vv_course = Course.objects.get(id=COURSE_VERSICHERUNGSVERMITTLERIN_ID)
|
||||
# vv_course_session = CourseSession.objects.get(course=vv_course)
|
||||
# vv_mentor = LearningMentor.objects.create(
|
||||
# course=vv_course,
|
||||
# mentor=User.objects.get(id=TEST_MENTOR1_USER_ID),
|
||||
# )
|
||||
# vv_mentor.participants.add(
|
||||
# CourseSessionUser.objects.get(
|
||||
# user__id=TEST_STUDENT1_VV_USER_ID, course_session=vv_course_session
|
||||
# )
|
||||
# )
|
||||
|
||||
course = Course.objects.get(id=COURSE_TEST_ID)
|
||||
course.enable_circle_documents = enable_circle_documents
|
||||
|
|
|
|||
Loading…
Reference in New Issue