diff --git a/CHANGELOG.md b/CHANGELOG.md index bb3cb45b..86152692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +##### Februar 2024 +- Qualix enthält neu ein Namenslernspiel! Auf der TN-Liste hat es einen Link zum Spiel [#332](https://github.com/gloggi/qualix/pull/332) + ##### Januar 2024 - Aus technischen und praktischen Gründen wurde die Anzahl relevante Anforderungen in einer Rückmeldung auf maximal 40 limitiert. Auslöser war, dass die Übersichtstabelle sonst technisch wie auch visuell nicht mehr sinnvoll angezeigt werden konnte. Auch fachlich gesehen ist das Konzept der Rückmeldungen in Qualix nicht darauf ausgelegt, sehr viele eingebettete Anforderungen zu enthalten, da Übersichtlichkeit, Fördergedanke, Überprüfbarkeit, zweite Chancen, Zweitausbildung etc. alle darunter leiden. Dies sehen wir in folgenden Textstellen der RQF-Broschüre bestätigt, welche klar machen dass mit jeder einzelnen Mindestanforderung der Zeitaufwand für das Kursteam wie auch für die TN markant ansteigt: > [Es] muss beachtet werden, dass zu jeder Mindestanforderung auch ein Beobachtungsmoment gehört, bei dem die TN zeigen können, was sie gelernt haben und das Kursteam ebendies wahrnehmen kann.[^1] diff --git a/app/Http/Controllers/NameGameController.php b/app/Http/Controllers/NameGameController.php new file mode 100644 index 00000000..db010b6b --- /dev/null +++ b/app/Http/Controllers/NameGameController.php @@ -0,0 +1,37 @@ +session()->now('alert-warning', trans('t.views.admin.participant_import.warning_existing_participants')); } - $MiDataParticipantListLink = (new HtmlString) ->s('') ->__('t.views.admin.participant_import.MiData.name') @@ -81,7 +80,6 @@ public function upload(Request $request, Course $course) { * @throws ValidationException if parsing the uploaded file fails */ public function import(ParticipantImportRequest $request, Course $course) { - $request->validated(); try { $imported = $request->getImporter()->import($request->file('file')->getRealPath(), $course); diff --git a/cypress/e2e/name-game.cy.js b/cypress/e2e/name-game.cy.js new file mode 100644 index 00000000..14227e70 --- /dev/null +++ b/cypress/e2e/name-game.cy.js @@ -0,0 +1,78 @@ +import { useDatabaseResets } from "../support/databaseTransactions" + +describe('name game', () => { + useDatabaseResets() + + beforeEach(() => { + cy.then(() => { + cy.login().then(user => { + cy.artisan('e2e:scenario', { '--user-id': user.id }) + }) + }) + cy.courseId() + }) + + it('plays through the easy version of the name game', function () { + cy.visit(`/course/${this.courseId}/participants`) + + cy.contains('Namen lernen').click() + + cy.contains('Name Game') + + cy.get('#participants').click() + cy.get('#participants .multiselect__option').first().click() + cy.get('#participants .multiselect__option').eq(2).click() + cy.get('#participants .multiselect__option').eq(3).click() + + // Click outside the multiselect to close the dropdown menu + cy.get('.card-body').click('right') + + cy.contains('Los geht\'s').click() + + cy.contains('Zeit:') + + for (let i = 0; i < 3; i++) { + // 3 participants with 2 clicks each + cy.get('.name-game button[type=submit]').first().click() + cy.get('.name-game button[type=submit]').first().click() + } + + cy.contains('Nochmals').click() + + cy.contains('Los geht\'s') + }) + + it('plays through the hard version of the name game', function () { + cy.visit(`/course/${this.courseId}/participants`) + + cy.contains('Namen lernen').click() + + cy.contains('Name Game') + + cy.get('#participants').click() + cy.get('#participants .multiselect__option').first().click() + cy.get('#participants .multiselect__option').eq(2).click() + cy.get('#participants .multiselect__option').eq(3).click() + + // Click outside the multiselect to close the dropdown menu + cy.get('.card-body').click('right') + + cy.get('#gameMode').click() + cy.contains('Schwierig (Namen eintippen)').click() + + cy.contains('Los geht\'s').click() + + cy.contains('Zeit:') + + for (let i = 0; i < 3; i++) { + // 3 participants with 2 clicks each + cy.get('.name-game button[type=submit]').first().click() + cy.get('.name-game button[type=submit]').first().click() + } + + cy.contains('Nochmals').click() + + cy.contains('Los geht\'s') + cy.contains('Einfach (multiple choice)').should('not.be.visible') + }) +}) diff --git a/lang/de/t.php b/lang/de/t.php index 2c1dfa24..0bbbccac 100644 --- a/lang/de/t.php +++ b/lang/de/t.php @@ -551,6 +551,35 @@ ), "via_midata" => "Via PBS MiData einloggen", ), + "name_game" => array( + "abort" => "Zurück zu den TN", + "correct" => "Richtig!", + "game_mode" => "Schwierigkeit", + "manual_name_input" => "Schwierig (Namen eintippen)", + "multiple_choice" => "Einfach (multiple choice)", + "name_game" => "Name Game", + "next" => "Weiter", + "no_image" => "kein Bild", + "num_correct_and_incorrect" => ":correct richtig, :incorrect falsch von :total", + "page_title" => "Name Game", + "participants" => "Namen", + "play_again" => "Nochmals", + "practice_wrong_names" => "Falsch geratene Namen üben", + "scout_name" => "Name", + "select_all" => "Alle auswählen", + "select_all_equipe_members" => "Equipe auswählen", + "select_all_participants" => "Alle TN auswählen", + "select_all_participants_with_image" => "Alle TN mit Bild auswählen", + "skip" => "Weiss nicht", + "start" => "Los geht's", + "submit" => "Abschicken", + "this_is" => "Das ist:", + "too_few_participants" => "Wähle mindestens 3 Personen aus", + "well_done" => "Super gemacht!", + "who_is_this" => "Wer ist das?", + "wrong_guesses" => "Folgende Namen hast du falsch geraten:", + "you_guessed" => "Deine Antwort:", + ), "observations" => array( "add_success" => "Beobachtung erfasst. Mässi!", "go_to_participant" => "Zu :name", @@ -573,6 +602,7 @@ "participants" => array( "here" => "hier", "menu_name" => "TN", + "name_game" => "Namen lernen", "no_participants" => "Bisher sind keine Teilnehmende erfasst. Bitte erfasse sie :here.", "page_title" => "TN-Überblick", "title" => "Beobachtung für TN erfassen", diff --git a/package-lock.json b/package-lock.json index bf11a534..12878156 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1650,6 +1650,54 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, + "@formatjs/ecma402-abstract": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.18.2.tgz", + "integrity": "sha512-+QoPW4csYALsQIl8GbN14igZzDbuwzcpWrku9nyMXlaqAlwRBgl5V+p0vWMGFqHOw37czNXaP/lEk4wbLgcmtA==", + "requires": { + "@formatjs/intl-localematcher": "0.5.4", + "tslib": "^2.4.0" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } + } + }, + "@formatjs/intl-durationformat": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@formatjs/intl-durationformat/-/intl-durationformat-0.2.2.tgz", + "integrity": "sha512-8cBgB9ejg9a2pmGVmcVoF0OlK4XifRtm7Se5F9kMj+Ex+5x8QVBLEuqnTHEyV584VMNR2ngUP1dNR36MeTWG3A==", + "requires": { + "@formatjs/ecma402-abstract": "1.18.2", + "@formatjs/intl-localematcher": "0.5.4", + "tslib": "^2.4.0" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } + } + }, + "@formatjs/intl-localematcher": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", + "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", + "requires": { + "tslib": "^2.4.0" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } + } + }, "@fortawesome/fontawesome-free": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.1.2.tgz", diff --git a/package.json b/package.json index 5cf4215f..27c79669 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "yjs": "^13.5.12" }, "dependencies": { + "@formatjs/intl-durationformat": "^0.2.2", "jszip": "^3.10.1" } } diff --git a/resources/js/components/form/ButtonSubmit.vue b/resources/js/components/form/ButtonSubmit.vue index 52a0b0af..64ed0296 100644 --- a/resources/js/components/form/ButtonSubmit.vue +++ b/resources/js/components/form/ButtonSubmit.vue @@ -1,7 +1,7 @@