Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💻 Disable the teachers' survey #6147

Merged
merged 4 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1658,12 +1658,6 @@ msgstr ""
msgid "surname"
msgstr ""

msgid "survey"
msgstr ""

msgid "survey_completed"
msgstr ""

msgid "survey_skip"
msgstr ""

Expand Down
8 changes: 0 additions & 8 deletions static/css/generated.full.css
Original file line number Diff line number Diff line change
Expand Up @@ -346956,14 +346956,6 @@ div[class^="ace_incorrect_hedy_code"] {
margin-bottom: 0px;
}

.md\:ml-4 {
margin-left: 1rem;
}

.md\:mr-4 {
margin-right: 1rem;
}

.md\:block {
display: block;
}
Expand Down
15 changes: 0 additions & 15 deletions templates/class-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,10 @@
<span class="fa fa-arrow-{% if g.dir == " ltr" %}right{% else %}left{% endif %}">&nbsp;</span>
{{_('go_back')}}
</button>
<div id="survey" data-cy="survey" class="hidden"></div>
{% if second_teacher %}<h1>{{_('role')}}: {{role}}</h1>{% endif %}
<div class="flex flex-col md:flex-row items-left md:items-center justify-between">
<h1>{{ class_info.name }}</h1>
<div class="flex flex-col md:flex-row gap-2">
<div class="items-center gap-2 md:ml-4 md:mr-4 align-middle">
{% if class_info.students > 0 %}
<h2 id="survey_status_button" class="hidden md:block" data-cy="survey_status_button">
{% if questions|length == 0 %}
{{_('survey_completed')}} ✅
{% else %}
<a class="cursor-pointer" hx-post="/for-teachers/load-survey/{{class_info.id}}" hx-target="#survey"
hx-swap="outerHTML">
{{_('survey')}} {{total_questions - questions|length}}/{{total_questions}}
</a>
{% endif %}
</h2>
{% endif %}
</div>
<button class="green-btn w-fit" id="customize_class_button" data-cy="customize_class_button"
onclick="window.location.href = '/for-teachers/customize-class/{{class_info.id}}'">
{{_('customize_class')}}
Expand Down
51 changes: 26 additions & 25 deletions tests/cypress/e2e/for-teacher_page/class_page/other_buttons.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,30 @@ teachers.forEach((teacher) => {
.should('eq', Cypress.config('baseUrl') + Cypress.env('teachers_page'));
})

it('Is able to click on survey button, cancel it, respond to 1 question, then 3 to finish', () => {
// cancel survey
cy.getDataCy('survey_status_button').click();
cy.getDataCy('survey').should("be.visible");
cy.getDataCy('cancel_survey').click();
cy.getDataCy('survey').should("not.be.visible");
// respond to 1 question
cy.getDataCy('survey_status_button').click();
cy.getDataCy('survey').should("be.visible");
cy.getDataCy('input_1').type("test");
cy.getDataCy('submit').click();
// respond to last 3 questions
cy.getDataCy('survey_status_button').click();
const surveyInputs = Array.from({length:3},(v, k)=> k+1)
cy.wrap(surveyInputs).each((index) => {
cy.getDataCy("input_" + index)
.type("test")
.invoke("val").then((text) => {
expect("test").to.equal(text);
});
});
cy.getDataCy('submit').click();
cy.getDataCy('survey_status_button').contains("complete");
})
// Disabling the survey test because it should be used again after the redesign
// it('Is able to click on survey button, cancel it, respond to 1 question, then 3 to finish', () => {
// // cancel survey
// cy.getDataCy('survey_status_button').click();
// cy.getDataCy('survey').should("be.visible");
// cy.getDataCy('cancel_survey').click();
// cy.getDataCy('survey').should("not.be.visible");
// // respond to 1 question
// cy.getDataCy('survey_status_button').click();
// cy.getDataCy('survey').should("be.visible");
// cy.getDataCy('input_1').type("test");
// cy.getDataCy('submit').click();
// // respond to last 3 questions
// cy.getDataCy('survey_status_button').click();
// const surveyInputs = Array.from({length:3},(v, k)=> k+1)
// cy.wrap(surveyInputs).each((index) => {
// cy.getDataCy("input_" + index)
// .type("test")
// .invoke("val").then((text) => {
// expect("test").to.equal(text);
// });
// });
// cy.getDataCy('submit').click();
// cy.getDataCy('survey_status_button').contains("complete");
// })
});
});
});
14 changes: 6 additions & 8 deletions translations/ar/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1936,14 +1936,6 @@ msgstr ""
msgid "surname"
msgstr "الاسم الأول"

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -2714,3 +2706,9 @@ msgstr ""
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

14 changes: 6 additions & 8 deletions translations/bg/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -2110,14 +2110,6 @@ msgstr ""
msgid "surname"
msgstr ""

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -2922,3 +2914,9 @@ msgstr ""
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

14 changes: 6 additions & 8 deletions translations/bn/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -2199,14 +2199,6 @@ msgstr ""
msgid "surname"
msgstr "Username"

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -3040,3 +3032,9 @@ msgstr ""
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

12 changes: 6 additions & 6 deletions translations/ca/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1690,12 +1690,6 @@ msgstr "Prova de canviar els valors perquè siguin tots text o tots números"
msgid "surname"
msgstr "Nom"

msgid "survey"
msgstr "Enquesta"

msgid "survey_completed"
msgstr "Enquesta completada"

msgid "survey_skip"
msgstr "No ho tornis a mostrar"

Expand Down Expand Up @@ -2397,3 +2391,9 @@ msgstr "El teu programa"
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr "Enquesta"

#~ msgid "survey_completed"
#~ msgstr "Enquesta completada"

14 changes: 6 additions & 8 deletions translations/cs/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -2111,14 +2111,6 @@ msgstr ""
msgid "surname"
msgstr "Jméno"

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -2934,3 +2926,9 @@ msgstr ""
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

14 changes: 6 additions & 8 deletions translations/cy/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -2187,14 +2187,6 @@ msgstr ""
msgid "surname"
msgstr ""

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -3022,3 +3014,9 @@ msgstr ""
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

14 changes: 6 additions & 8 deletions translations/da/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -2182,14 +2182,6 @@ msgstr ""
msgid "surname"
msgstr ""

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -3005,3 +2997,9 @@ msgstr ""
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

14 changes: 6 additions & 8 deletions translations/de/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1843,14 +1843,6 @@ msgstr ""
msgid "surname"
msgstr "Vorname"

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -2597,3 +2589,9 @@ msgstr "Dein Programm"
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

14 changes: 6 additions & 8 deletions translations/el/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1973,14 +1973,6 @@ msgstr ""
msgid "surname"
msgstr "Μικρό Όνομα"

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -2795,3 +2787,9 @@ msgstr ""
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

12 changes: 6 additions & 6 deletions translations/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1687,12 +1687,6 @@ msgstr "Try changing the values to be all text or all numbers"
msgid "surname"
msgstr "First Name"

msgid "survey"
msgstr "Survey"

msgid "survey_completed"
msgstr "Survey completed"

msgid "survey_skip"
msgstr "Don't show this again"

Expand Down Expand Up @@ -2464,3 +2458,9 @@ msgstr "Your program"
#~ msgid "Delete"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr "Survey"

#~ msgid "survey_completed"
#~ msgstr "Survey completed"

14 changes: 6 additions & 8 deletions translations/eo/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1995,14 +1995,6 @@ msgstr ""
msgid "surname"
msgstr "Antaŭnomo"

#, fuzzy
msgid "survey"
msgstr ""

#, fuzzy
msgid "survey_completed"
msgstr ""

#, fuzzy
msgid "survey_skip"
msgstr ""
Expand Down Expand Up @@ -2784,3 +2776,9 @@ msgstr ""
#~ msgid "select_class"
#~ msgstr ""

#~ msgid "survey"
#~ msgstr ""

#~ msgid "survey_completed"
#~ msgstr ""

Loading