diff --git a/client/src/pages/DashboardPage.vue b/client/src/pages/DashboardPage.vue index 8606d679..f7ca56d5 100644 --- a/client/src/pages/DashboardPage.vue +++ b/client/src/pages/DashboardPage.vue @@ -90,6 +90,8 @@ const getNextStepLink = (courseSession: CourseSession) => { {{ $t("uk.contact.team") }}
{{ $t("uk.contact.address") }} +
+ uk.contact.email

diff --git a/client/src/pages/LoginPage.vue b/client/src/pages/LoginPage.vue index 3363da51..1d722737 100644 --- a/client/src/pages/LoginPage.vue +++ b/client/src/pages/LoginPage.vue @@ -102,6 +102,8 @@ const userStore = useUserStore(); {{ $t("uk.contact.team") }}
{{ $t("uk.contact.address") }} +
+ uek-support@vbv-afa.ch

diff --git a/server/vbv_lernwelt/assignment/creators/create_assignments.py b/server/vbv_lernwelt/assignment/creators/create_assignments.py index 57add32b..97e833a5 100644 --- a/server/vbv_lernwelt/assignment/creators/create_assignments.py +++ b/server/vbv_lernwelt/assignment/creators/create_assignments.py @@ -2356,6 +2356,301 @@ def create_uk_kickoff_prep_assignment(course_id=COURSE_UK): return assignment +def create_uk_fr_kickoff_prep_assignment(course_id=COURSE_UK): + assignment_list_page = ( + CoursePage.objects.get(course_id=course_id) + .get_children() + .exact_type(AssignmentListPage) + .first() + ) + + assignment = AssignmentFactory( + parent=assignment_list_page, + assignment_type=AssignmentType.PREP_ASSIGNMENT.name, + title="Circle Lancement - Secteur de l'assurance", + effort_required="2 heures environ", + intro_text=replace_whitespace( + """ +

Compétences opérationnelles, situations de travail & objectifs évaluateurs

+

+ Compétence opérationnelle d2: Mener un entretien d'information et de conseil avec des clients ou des fournisseurs
+

+

+ +

+ Compétence opérationnelle c3: Documenter, coordonner et mettre en œuvre des processus d'entreprise
+ Situation de travail 5 : traiter les demandes, rédiger les contrats, développer et entretenir les produits
+

+

+ +

Situation de départ

+

+ La vie n'a pas que des côtés positifs, elle comporte aussi des risques. Ainsi, nous pouvons avoir un accident ou tomber gravement malade dès demain. Ou une maison peut être sérieusement endommagée par un orage de grêle. Personne ne peut se protéger complètement contre de tels risques. Nous pouvons toutefois nous protéger contre les dommages financiers. Les assurances offrent ce type de protection.
+ Dans cette séquence, nous nous intéressons à ce qui constitue réellement une assurance. +

+ """ + ), + performance_objectives=[], + ) + + assignment.tasks = [] + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 1: Obtiens un premier aperçu du sujet.", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + 'Pour cela, regarde la vidéo suivante: Comment fonctionne une assurance? Un sujet expliqué simplement' + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText( + "Oui, j'ai regardé la vidéo et j'ai compris." + ) + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 2", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + "Lis et traite les pages 12 à 30 du livre «Idée assurance»." + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Oui, j'ai lu et compris les pages.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 3: Créer un croquis", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

+ Sur la base de ce que tu as lu, fais une esquisse qui représente pour toi le principe de base d'une assurance. +

+

+ Emporte ce croquis en classe. +

+ """ + ) + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Oui, j'ai créé le croquis.") + ), + ), + ], + ), + ), + ) + ) + + assignment.save() + + return assignment + + +def create_uk_it_kickoff_prep_assignment(course_id=COURSE_UK): + assignment_list_page = ( + CoursePage.objects.get(course_id=course_id) + .get_children() + .exact_type(AssignmentListPage) + .first() + ) + + assignment = AssignmentFactory( + parent=assignment_list_page, + assignment_type=AssignmentType.PREP_ASSIGNMENT.name, + title="Circle Introduzione - Settore assicurativo", + effort_required="circa 2 ore", + intro_text=replace_whitespace( + """ +

Competenze operativa, situazioni di lavoro e obiettivi di valutazione

+

+ Competenza operativa d2: condurre colloqui informativi e di consulenza con clienti o fornitori.
+ Situazione lavorativa 4: consigliare i clienti e svolgere i relativi processi
+

+

+ +

+ Competenza operativa c3: documentare, coordinare e attuare processi aziendali
+ Situazione lavorativa 5: trattare proposte, allestire contratti, sviluppare e gestire prodotti.
+

+

+ +

Situazione iniziale

+

+ La vita non ha solo lati positivi, ma comporta anche dei rischi. Domani possiamo avere un incidente o ammalarci gravemente. Oppure una casa può essere gravemente danneggiata da una grandinata. Nessuno può proteggersi completamente da questi rischi. Tuttavia, possiamo proteggerci dai danni economici. Questo tipo di protezione è offerto dalle compagnie di assicurazione. + In questa sequenza esaminiamo ciò che costituisce effettivamente un'assicurazione. +

+ """ + ), + performance_objectives=[], + ) + + assignment.tasks = [] + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 1: Ottenete una prima panoramica dell'argomento.", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + 'Guardate il seguente video: Come funziona un’assicurazione? – I punti chiave' + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Sì, ho visto il video e ho capito.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 2", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + "Leggete e lavorate le pagine da 12 a 29 del libro «AssicurIdea»." + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Sì, ho letto e compreso le pagine.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 3: Crea uno schizzo", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

+ Sulla base di quanto letto, disegnate uno schizzo che rappresenti il principio base dell'assicurazione per voi. +

+

+ Portate questo disegno in classe. +

+ """ + ) + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Sì, ho creato lo schizzo.") + ), + ), + ], + ), + ), + ) + ) + + assignment.save() + + return assignment + + def create_uk_basis_prep_assignment(course_id=COURSE_UK): assignment_list_page = ( CoursePage.objects.get(course_id=course_id) @@ -2673,7 +2968,7 @@ def create_uk_basis_prep_assignment(course_id=COURSE_UK): return assignment -def create_uk_condition_acceptance(course_id=COURSE_UK_FR): +def create_uk_fr_basis_prep_assignment(course_id=COURSE_UK): assignment_list_page = ( CoursePage.objects.get(course_id=course_id) .get_children() @@ -2683,14 +2978,30 @@ def create_uk_condition_acceptance(course_id=COURSE_UK_FR): assignment = AssignmentFactory( parent=assignment_list_page, - assignment_type=AssignmentType.CONDITION_ACCEPTANCE.name, - title="Redlichkeitserklärung", + assignment_type=AssignmentType.PREP_ASSIGNMENT.name, + title="Circle Base", + effort_required="1 jour environ", intro_text=replace_whitespace( """ -

Was akzeptierst du?

+

Compétences opérationnelles, situations de travail & objectifs évaluateurs

- Die folgende Redlichkeitserklärung ist ein wichtiges Dokument, das bestätigt, dass die Arbeit, die du einreichst, ganz und gar deine eigene ist und dass du alle Regeln der akademischen Integrität eingehalten hast. Akademische Integrität beinhaltet Ehrlichkeit, Verantwortung und Respekt für das geistige Eigentum anderer. Dies bedeutet, dass du keine unerlaubte Hilfe in Anspruch nimmst und dass du alle Quellen und Materialien, die du zur Unterstützung deiner Arbeit genutzt hast, korrekt zitierst und anerkennst. - Durch das Unterzeichnen dieser Erklärung bestätigst du, dass du die Bedeutung der akademischen Integrität verstanden hast und die Verantwortung für die Einhaltung dieser Prinzipien übernimmst. Bitte bedenke, dass das Brechen dieser Regeln ernsthafte Konsequenzen nach sich ziehen kann, darunter eine Verringerung deiner Note, das Durchfallen des Kurses oder andere disziplinarische Maßnahmen. + Compétence opérationnelle d2: Mener des entretiens d’information et de conseil avec des clients et des fournisseurs
+ Situation de travail 4: Conseiller les clients et s’occuper des processus correspondants
+

+

+

+ Compétence opérationnelle c3 : Documenter, coordonner et mettre en œuvre des processus de travail en entreprise
+ Situation de travail 5 : Traiter les propositions, établir les contrats, développer les produits et veiller à leur évolution
+

+

+ +

Situation de départ

+

+ Tu as atterri dans un secteur passionnant. Dans le monde des assurances. Les assurances sont d'une grande importance pour le fonctionnement d'une économie moderne. C'est pourquoi il est impératif que tu te familiarises avec les bases des assurances.

""" ), @@ -2702,7 +3013,7 @@ def create_uk_condition_acceptance(course_id=COURSE_UK_FR): ( "task", TaskBlockFactory( - title="Erklärung", + title="Tâche partielle 1: Obtenir un premier aperçu du sujet.", # it is hard to create a StreamValue programmatically, we have to # create a `StreamValue` manually. Ask Daniel and/or Ramon content=StreamValue( @@ -2712,14 +3023,546 @@ def create_uk_condition_acceptance(course_id=COURSE_UK_FR): "explanation", ExplanationBlockFactory( text=RichText( - "Ich erkläre hiermit, dass ich diese Prüfung oder Aufgabe selbstständig und ohne unzulässige Hilfe Dritter ausgeführt habe. Alle verwendeten Quellen und Hilfsmittel sind korrekt und vollständig angegeben. Ich verstehe, dass ein Verstoß gegen diese Erklärung ernsthafte Konsequenzen nach sich ziehen kann, einschließlich, aber nicht beschränkt auf, Notenreduzierung, Kursversagen und disziplinarische Maßnahmen." + """ + Obtiens un premier aperçu des différents processus d'une entreprise d'assurance. Lis à cet effet dans le support didactique «ClientsAssurance"» le paragraphe «Les processus de création de valeur d’un assureur» (pages 14 à 17) + """ ) ), ), ( "user_confirmation", ExplanationBlockFactory( - text=RichText("Ja, ich akzeptiere diese Bedingungen.") + text=RichText("Oui, j'ai lu la section.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 2: Entretien", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + """ +

Interroge dans ton entreprise d'apprentissage une personne de chacun des deux domaines de processus commerciaux que tu as choisis (par ex. souscription et sinistres) et pose-lui les questions suivantes:

+ + """ + ) + ), + ), + ( + "user_text_input", + UserTextInputBlockFactory( + text=RichText( + "Notez vos résultats électroniquement ou physiquement et apportez tout à l'entraînement." + ) + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 3: Aperçu des chiffres clés", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

+ Procure-toi un premier aperçu des différents chiffres clés. Lis à cet effet dans le support didactique «ClientsAssurance"» la section «L’entreprise d’assurance en chiffres» (pages 25 à 31) +

+ """ + ) + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Oui, j'ai lu la section.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 4: Les chiffres clés en détail", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

+ Demande à ton entreprise d'apprentissage de te fournir 3 chiffres clés de l'exercice comptable précédent: +

+ +

Si tu n'y arrives pas, demande à ton interlocuteur dans l'entreprise formatrice.

+ """ + ) + ) + ), + ), + ( + "user_text_input", + UserTextInputBlockFactory( + text=RichText( + "Notez vos résultats électroniquement ou physiquement et apportez tout à l'entraînement." + ) + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 5: Droits et obligations", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

Lis dans le manuel «Client et assurance» la section «Les droits et obligations des parties contractantes» (ages 130 à 141)

+ """ + ) + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Oui, j'ai lu la section.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 6: LCA (loi sur le contrat d'assurance)", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

Procure-toi une LCA (loi sur le contrat d'assurance) sur www.fedlex.admin.ch

+ """ + ) + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory(text=RichText("Oui, j'ai le LCA.")), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Tâche partielle 7: Droits et obligations dans l'entreprise formatrice", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

+ Clarifie deux questions dans l'entreprise formatrice: +

+ + """ + ) + ) + ), + ), + ( + "user_text_input", + UserTextInputBlockFactory( + text=RichText( + "Notez vos résultats électroniquement ou physiquement et apportez tout à l'entraînement." + ) + ), + ), + ], + ), + ), + ) + ) + + assignment.save() + + return assignment + + +def create_uk_it_basis_prep_assignment(course_id=COURSE_UK): + assignment_list_page = ( + CoursePage.objects.get(course_id=course_id) + .get_children() + .exact_type(AssignmentListPage) + .first() + ) + + assignment = AssignmentFactory( + parent=assignment_list_page, + assignment_type=AssignmentType.PREP_ASSIGNMENT.name, + title="Cercle Base", + effort_required="Circa 1 giornon", + intro_text=replace_whitespace( + """ +

Competenze operative, situazioni di lavoro e obiettivi di valutazione

+

+ Competenza operativa d2: Conduzione di colloqui informativi e di consulenza con clienti o fornitori
+ Situazione lavorativa 4: consigliare i clienti e svolgere i relativi processi
+

+

+

+ Competenza operativa c3: documentare, coordinare e attuare i processi aziendali
+ Situazione lavorativa 5: Elaborazione di applicazioni, progettazione di contratti, sviluppo e manutenzione di prodotti.
+

+

+ +

Situazione iniziale

+

+ Siete approdati in un settore entusiasmante. Nel mondo delle assicurazioni. Le assicurazioni sono di grande importanza per il funzionamento di un'economia moderna. Per questo motivo è indispensabile che conosciate le basi dell'assicurazione. +

+ """ + ), + performance_objectives=[], + ) + + assignment.tasks = [] + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 1: Ottieni una prima panoramica dell'argomento.", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + """ + Ottenete una prima panoramica dei diversi processi di una compagnia assicurativa. Leggete la sezione «I processi a valore aggiunto di un assicuratore"» (pagine da 14 a 18) nel supporto didattico «Cliente e assicurazione». + """ + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Sì, ho letto la sezione.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 2: Colloquio", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + """ +

Intervistate una persona per ciascuna delle due campi di processo aziendale prescelte (ad esempio, sottoscrizione e sinistri) nella vostra azienda e chiedete loro quanto segue:

+ + """ + ) + ), + ), + ( + "user_text_input", + UserTextInputBlockFactory( + text=RichText( + "Registrate i vostri risultati elettronicamente o fisicamente e portate tutto alla formazione." + ) + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 3: Panoramica delle cifre chiave", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

+ Ottenete una prima panoramica delle diverse cifre indicative. Leggete la sezione «L’impresa ‘assicurazione’ in cifre» (pagine 26-32) nel mezzo di apprendimento «Cliente e assicurazione» +

+ """ + ) + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Sì, ho letto la sezione.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 4: Dati chiave in dettaglio", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

+ Scoprite 3 cifre indicative della vostra azienda formatrice nell'ultimo anno d’esercizio: +

+ +

Se siete bloccati, chiedete al vostro referente in azienda.

+ """ + ) + ) + ), + ), + ( + "user_text_input", + UserTextInputBlockFactory( + text=RichText( + "Registrate i vostri risultati elettronicamente o fisicamente e portate tutto alla formazione." + ) + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 5: Droits et obligations", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

Leggete la sezione «Diritti e obblighi delle parti» (pagine 131-143) nel mezzo di apprendimento «Cliente e assicurazione»

+ """ + ) + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Sì, ho letto la sezione.") + ), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 6: LCA (Legge sul contratto d'assicurazione)", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

Cliccate sul link del LCA RS 221.229.1 - Legge federale del 2 aprile 1908 sul contratto d'assicurazione (Legge sul contratto d'assicurazione, LCA) (admin.ch) oppure ottenete la LCA in formato cartaceo dall'azienda formatrice.

+ """ + ) + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory(text=RichText("Sì, ho ACL")), + ), + ], + ), + ), + ) + ) + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Sottocompito 7: Diritti e doveri nell'azienda formatrice", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + replace_whitespace( + """ +

+ Chiarire due questioni nell'azienda formatrice: +

+ + """ + ) + ) + ), + ), + ( + "user_text_input", + UserTextInputBlockFactory( + text=RichText( + "Registrate i vostri risultati elettronicamente o fisicamente e portate tutto alla formazione." + ) ), ), ], @@ -3042,159 +3885,6 @@ def create_uk_fr_reflection(course_id=COURSE_UK_FR, circle_title="Véhicule"): return assignment -def create_uk_it_reflection(course_id=COURSE_UK_FR, circle_title="Véhicule"): - assignment_list_page = ( - CoursePage.objects.get(course_id=course_id) - .get_children() - .exact_type(AssignmentListPage) - .first() - ) - - assignment = AssignmentFactory( - parent=assignment_list_page, - assignment_type=AssignmentType.REFLECTION.name, - title=f"Reflexion", - effort_required="", - intro_text=replace_whitespace( - """ -

- Tu as reçu beaucoup de nouveaux contenus et d'inputs dans ce Circle. Il est maintenant temps de jeter à nouveau un coup d'œil sur ton profil de compétences. Répondre aux questions de réflexion t'aide à rendre visible et compréhensible ton propre processus d'apprentissage et de réflexion. Elle met en évidence tes forces et tes faiblesses personnelles pendant l'élaboration et t'aide à t'améliorer en permanence. -

- """ - ), - performance_objectives=[], - ) - - assignment.tasks = [] - assignment.tasks.append( - ( - "task", - TaskBlockFactory( - title="Question 1: Qu'est-ce que je réussis déjà bien?", - content=StreamValue( - TaskContentStreamBlock(), - stream_data=[ - ( - "user_text_input", - UserTextInputBlockFactory(), - ), - ], - ), - ), - ) - ) - - assignment.tasks.append( - ( - "task", - TaskBlockFactory( - title="Question 2: Approfondissment", - content=StreamValue( - TaskContentStreamBlock(), - stream_data=[ - ( - "user_text_input", - UserTextInputBlockFactory( - text=RichText( - "Où dois-je encore approfondir ou répéter? " - ) - ), - ), - ], - ), - ), - ) - ) - - assignment.tasks.append( - ( - "task", - TaskBlockFactory( - title="Question 3: Qu'est-ce que je retiens?", - content=StreamValue( - TaskContentStreamBlock(), - stream_data=[ - ( - "user_text_input", - UserTextInputBlockFactory(), - ), - ], - ), - ), - ) - ) - - assignment.tasks.append( - ( - "task", - TaskBlockFactory( - title="Question 4: Préparation", - content=StreamValue( - TaskContentStreamBlock(), - stream_data=[ - ( - "user_text_input", - UserTextInputBlockFactory( - text=RichText( - "Comment me suis-je préparé(e) au Cercle (par ex. en prévoyant du temps d'étude)?" - ) - ), - ), - ], - ), - ), - ) - ) - - assignment.tasks.append( - ( - "task", - TaskBlockFactory( - title="Question 5: Cours de présence", - content=StreamValue( - TaskContentStreamBlock(), - stream_data=[ - ( - "user_text_input", - UserTextInputBlockFactory( - text=RichText( - "Quel a été mon degré d'engagement dans les cours de présence?" - ) - ), - ), - ], - ), - ), - ) - ) - - assignment.tasks.append( - ( - "task", - TaskBlockFactory( - title="Question 6: Amélioration", - content=StreamValue( - TaskContentStreamBlock(), - stream_data=[ - ( - "user_text_input", - UserTextInputBlockFactory( - text=RichText( - "Qu'est-ce que je veux changer/améliorer dans le processus d'apprentissage pour le prochain Circle?" - ) - ), - ), - ], - ), - ), - ) - ) - - assignment.save() - - return assignment - - def create_uk_it_reflection(course_id=COURSE_UK_FR, circle_title="Véhicule"): assignment_list_page = ( CoursePage.objects.get(course_id=course_id) @@ -4451,3 +5141,70 @@ def create_vv_gesundheit_casework(course_id=COURSE_VERSICHERUNGSVERMITTLERIN_ID) assignment.save() return assignment + + +def create_uk_condition_acceptance(course_id=COURSE_UK_FR): + assignment_list_page = ( + CoursePage.objects.get(course_id=course_id) + .get_children() + .exact_type(AssignmentListPage) + .first() + ) + + assignment = AssignmentFactory( + parent=assignment_list_page, + assignment_type=AssignmentType.CONDITION_ACCEPTANCE.name, + title="Redlichkeitserklärung", + intro_text=replace_whitespace( + """ + +

Was akzeptierst du?

+ +

+ + Die folgende Redlichkeitserklärung ist ein wichtiges Dokument, das bestätigt, dass die Arbeit, die du einreichst, ganz und gar deine eigene ist und dass du alle Regeln der akademischen Integrität eingehalten hast. Akademische Integrität beinhaltet Ehrlichkeit, Verantwortung und Respekt für das geistige Eigentum anderer. Dies bedeutet, dass du keine unerlaubte Hilfe in Anspruch nimmst und dass du alle Quellen und Materialien, die du zur Unterstützung deiner Arbeit genutzt hast, korrekt zitierst und anerkennst. + + Durch das Unterzeichnen dieser Erklärung bestätigst du, dass du die Bedeutung der akademischen Integrität verstanden hast und die Verantwortung für die Einhaltung dieser Prinzipien übernimmst. Bitte bedenke, dass das Brechen dieser Regeln ernsthafte Konsequenzen nach sich ziehen kann, darunter eine Verringerung deiner Note, das Durchfallen des Kurses oder andere disziplinarische Maßnahmen. + +

+ + """ + ), + performance_objectives=[], + ) + + assignment.tasks = [] + + assignment.tasks.append( + ( + "task", + TaskBlockFactory( + title="Erklärung", + # it is hard to create a StreamValue programmatically, we have to + # create a `StreamValue` manually. Ask Daniel and/or Ramon + content=StreamValue( + TaskContentStreamBlock(), + stream_data=[ + ( + "explanation", + ExplanationBlockFactory( + text=RichText( + "Ich erkläre hiermit, dass ich diese Prüfung oder Aufgabe selbstständig und ohne unzulässige Hilfe Dritter ausgeführt habe. Alle verwendeten Quellen und Hilfsmittel sind korrekt und vollständig angegeben. Ich verstehe, dass ein Verstoß gegen diese Erklärung ernsthafte Konsequenzen nach sich ziehen kann, einschließlich, aber nicht beschränkt auf, Notenreduzierung, Kursversagen und disziplinarische Maßnahmen." + ) + ), + ), + ( + "user_confirmation", + ExplanationBlockFactory( + text=RichText("Ja, ich akzeptiere diese Bedingungen.") + ), + ), + ], + ), + ), + ) + ) + + assignment.save() + + return assignment diff --git a/server/vbv_lernwelt/core/constants.py b/server/vbv_lernwelt/core/constants.py index d525ee0d..b08f4245 100644 --- a/server/vbv_lernwelt/core/constants.py +++ b/server/vbv_lernwelt/core/constants.py @@ -2,12 +2,14 @@ DEFAULT_RICH_TEXT_FEATURES = [ "ul", "bold", "italic", + "link", ] DEFAULT_RICH_TEXT_FEATURES_WITH_HEADER = [ "ul", "bold", "italic", "h3", + "link", ] # ids for cypress test data diff --git a/server/vbv_lernwelt/course/management/commands/create_default_courses.py b/server/vbv_lernwelt/course/management/commands/create_default_courses.py index dca45990..c8649970 100644 --- a/server/vbv_lernwelt/course/management/commands/create_default_courses.py +++ b/server/vbv_lernwelt/course/management/commands/create_default_courses.py @@ -4,6 +4,7 @@ from datetime import datetime, timedelta import djclick as click from dateutil.relativedelta import MO, relativedelta, TH, TU +from django.conf import settings from django.utils import timezone from vbv_lernwelt.assignment.creators.create_assignments import ( @@ -11,11 +12,15 @@ from vbv_lernwelt.assignment.creators.create_assignments import ( create_uk_condition_acceptance, create_uk_fahrzeug_casework, create_uk_fahrzeug_prep_assignment, + create_uk_fr_basis_prep_assignment, create_uk_fr_fahrzeug_casework, create_uk_fr_fahrzeug_prep_assignment, + create_uk_fr_kickoff_prep_assignment, create_uk_fr_reflection, + create_uk_it_basis_prep_assignment, create_uk_it_fahrzeug_casework, create_uk_it_fahrzeug_prep_assignment, + create_uk_it_kickoff_prep_assignment, create_uk_it_reflection, create_uk_kickoff_prep_assignment, create_uk_reflection, @@ -131,17 +136,18 @@ def command(course): if COURSE_UK in course: create_course_uk_de() - create_course_uk_de_course_sessions() - create_course_uk_de_completion_data( - CourseSession.objects.get(title="Bern 2023 a") - ) - create_course_uk_de_assignment_completion_data( - assignment=Assignment.objects.get( - slug="überbetriebliche-kurse-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice" - ), - course_session=CourseSession.objects.get(title="Bern 2023 a"), - user=User.objects.get(email="lina.egger@example.com"), - ) + if settings.APP_ENVIRONMENT != "production": + create_course_uk_de_course_sessions() + create_course_uk_de_completion_data( + CourseSession.objects.get(title="Bern 2023 a") + ) + create_course_uk_de_assignment_completion_data( + assignment=Assignment.objects.get( + slug="überbetriebliche-kurse-assignment-überprüfen-einer-motorfahrzeugs-versicherungspolice" + ), + course_session=CourseSession.objects.get(title="Bern 2023 a"), + user=User.objects.get(email="lina.egger@example.com"), + ) if COURSE_UK_FR in course: create_course_uk_fr() @@ -431,6 +437,9 @@ def create_course_uk_fr(): _assignment_list_page = AssignmentListPageFactory( parent=course.coursepage, ) + + create_uk_fr_kickoff_prep_assignment(course_id=COURSE_UK_FR) + create_uk_fr_basis_prep_assignment(course_id=COURSE_UK_FR) create_uk_fr_fahrzeug_casework(course_id=COURSE_UK_FR) create_uk_fr_fahrzeug_prep_assignment(course_id=COURSE_UK_FR) create_uk_fr_reflection(course_id=COURSE_UK_FR) @@ -438,33 +447,34 @@ def create_course_uk_fr(): create_uk_fr_competence_profile(course_id=COURSE_UK_FR) create_default_media_library(course_id=COURSE_UK_FR) - cs = CourseSession.objects.create( - course_id=COURSE_UK_FR, - title="Cours interentreprises année 1 - Région Fribourg", - ) + if settings.APP_ENVIRONMENT != "production": + cs = CourseSession.objects.create( + course_id=COURSE_UK_FR, + title="Cours interentreprises année 1 - Région Fribourg", + ) - csu = CourseSessionUser.objects.create( - course_session=cs, - user=User.objects.get(username="geraldine.kolly@assurance.ch"), - role=CourseSessionUser.Role.EXPERT, - ) - csu.expert.add( - Circle.objects.get(slug="cours-interentreprises-lp-circle-lancement") - ) - _csu = CourseSessionUser.objects.create( - course_session=cs, - user=User.objects.get(username="luca.dupont@assurance.ch"), - ) - csu = CourseSessionUser.objects.create( - course_session=cs, - user=User.objects.get(username="andreas.feuz@eiger-versicherungen.ch"), - role=CourseSessionUser.Role.EXPERT, - ) + csu = CourseSessionUser.objects.create( + course_session=cs, + user=User.objects.get(username="geraldine.kolly@assurance.ch"), + role=CourseSessionUser.Role.EXPERT, + ) + csu.expert.add( + Circle.objects.get(slug="cours-interentreprises-lp-circle-lancement") + ) + _csu = CourseSessionUser.objects.create( + course_session=cs, + user=User.objects.get(username="luca.dupont@assurance.ch"), + ) + csu = CourseSessionUser.objects.create( + course_session=cs, + user=User.objects.get(username="andreas.feuz@eiger-versicherungen.ch"), + role=CourseSessionUser.Role.EXPERT, + ) - for fr_circle in Circle.objects.filter( - slug__startswith="cours-interentreprises-lp" - ): - csu.expert.add(fr_circle) + for fr_circle in Circle.objects.filter( + slug__startswith="cours-interentreprises-lp" + ): + csu.expert.add(fr_circle) def create_course_uk_it(): @@ -477,6 +487,8 @@ def create_course_uk_it(): _assignment_list_page = AssignmentListPageFactory( parent=course.coursepage, ) + create_uk_it_kickoff_prep_assignment(course_id=COURSE_UK_IT) + create_uk_it_basis_prep_assignment(course_id=COURSE_UK_IT) create_uk_it_fahrzeug_casework(course_id=COURSE_UK_IT) create_uk_it_fahrzeug_prep_assignment(course_id=COURSE_UK_IT) create_uk_it_reflection(course_id=COURSE_UK_IT) @@ -484,10 +496,11 @@ def create_course_uk_it(): create_uk_it_competence_profile(course_id=COURSE_UK_IT) create_default_media_library(course_id=COURSE_UK_IT) - _cs = CourseSession.objects.create( - course_id=COURSE_UK_IT, - title="Corso interaziendale Ticino", - ) + if settings.APP_ENVIRONMENT != "production": + _cs = CourseSession.objects.create( + course_id=COURSE_UK_IT, + title="Corso interaziendale Ticino", + ) def create_course_uk_de_assignment_completion_data(assignment, course_session, user): diff --git a/server/vbv_lernwelt/edoniq_test/tests/test_edoniq_export.py b/server/vbv_lernwelt/edoniq_test/tests/test_edoniq_export.py index 735e34e8..80bd3bcb 100644 --- a/server/vbv_lernwelt/edoniq_test/tests/test_edoniq_export.py +++ b/server/vbv_lernwelt/edoniq_test/tests/test_edoniq_export.py @@ -61,18 +61,18 @@ class EdoniqUserExportTestCase(TestCase): expected_response_data = [ [ "login", - "firstName", - "lastName", + "firstname", + "lastname", "gender", - "preferredLanguage", - "emailBusiness", + "preferred_language", + "email", "birthday", "group", "region", "division", - "organisationUnit", - "superiorLogin", - ], + "oe", + "superior_login", + ] ] + user_data # Perform assertions on the response diff --git a/server/vbv_lernwelt/edoniq_test/views.py b/server/vbv_lernwelt/edoniq_test/views.py index e156b688..8f2f5a7c 100644 --- a/server/vbv_lernwelt/edoniq_test/views.py +++ b/server/vbv_lernwelt/edoniq_test/views.py @@ -35,17 +35,17 @@ def generate_export_response(cs_users: List[CourseSessionUser]) -> HttpResponse: writer.writerow( [ "login", - "firstName", - "lastName", + "firstname", + "lastname", "gender", - "preferredLanguage", - "emailBusiness", + "preferred_language", + "email", "birthday", "group", "region", "division", - "organisationUnit", - "superiorLogin", + "oe", + "superior_login", ] )