WIP: Add email templates [skip ci]
This commit is contained in:
parent
14474d1799
commit
0206fd4217
|
|
@ -287,7 +287,10 @@ def collect_course_sessions_by_course(
|
|||
|
||||
|
||||
def has_preview(role_key: RoleKeyType) -> bool:
|
||||
return role_key in [RoleKeyType.MENTOR_VV, RoleKeyType.MENTOR_UK] and not role_key == RoleKeyType.MEMBER
|
||||
return (
|
||||
role_key in [RoleKeyType.MENTOR_VV, RoleKeyType.MENTOR_UK]
|
||||
and not role_key == RoleKeyType.MEMBER
|
||||
)
|
||||
|
||||
|
||||
def get_newest_cs(
|
||||
|
|
|
|||
|
|
@ -140,9 +140,14 @@ def create_invitation(request, course_session_id: int):
|
|||
invitation = serializer.save()
|
||||
target_url = f"/lernbegleitung/{course_session_id}/invitation/{invitation.id}"
|
||||
|
||||
if course_session.course.configuration.is_uk:
|
||||
template = EmailTemplate.PRAXISBILDNER_INVITATION
|
||||
else:
|
||||
template = EmailTemplate.LEARNING_MENTOR_INVITATION
|
||||
|
||||
send_email(
|
||||
recipient_email=invitation.email,
|
||||
template=EmailTemplate.LEARNING_MENTOR_INVITATION,
|
||||
template=template,
|
||||
template_data={
|
||||
"inviter_name": f"{user.first_name} {user.last_name}",
|
||||
"inviter_email": user.email,
|
||||
|
|
|
|||
|
|
@ -69,13 +69,20 @@ class EmailTemplate(Enum):
|
|||
"it": "d-d27db9fc96f34f55a8cacf7640787c4e",
|
||||
}
|
||||
|
||||
# VBV - Lernbegleitung Einladung
|
||||
# VV - Lernbegleitung Einladung
|
||||
LEARNING_MENTOR_INVITATION = {
|
||||
"de": "d-8c862afde62748b6b8410887eeee89d8",
|
||||
"fr": "d-7451e3c858954c15a9f410fa9d92dc06",
|
||||
"it": "d-30c6aa9accda4973a940dd25703cb4a9",
|
||||
}
|
||||
|
||||
# üK - Praxisbildner Einladung
|
||||
PRAXISBILDNER_INVITATION = {
|
||||
"de": "d-480c78cf1ff2471c8b4d230539a206c7",
|
||||
"fr": "d-3e198460d98745799c7ec4b5959ab3d1",
|
||||
"it": "d-b3b5404b627d46b5ba466ce2b57fa681",
|
||||
}
|
||||
|
||||
# Fremdeinschätzung (Requester → Provider)
|
||||
SELF_EVALUATION_FEEDBACK_REQUESTED = {
|
||||
"de": "d-cf9c6681991d4293a7baccaa5b043c5c",
|
||||
|
|
|
|||
Loading…
Reference in New Issue