Skip to content

Questionnaires: add archived state, tabs in management page#2587

Merged
niklasmohrin merged 7 commits intoe-valuation:mainfrom
ZoqkMaze:q_management
Apr 20, 2026
Merged

Questionnaires: add archived state, tabs in management page#2587
niklasmohrin merged 7 commits intoe-valuation:mainfrom
ZoqkMaze:q_management

Conversation

@ZoqkMaze
Copy link
Copy Markdown
Collaborator

@ZoqkMaze ZoqkMaze commented Dec 15, 2025

fix #2545

Copy link
Copy Markdown
Member

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to get feedback yet? I took only a very quick look over the changes so far

Comment thread evap/evaluation/migrations/0159_merge_20251215_2018.py Outdated
Comment thread evap/staff/templates/staff_questionnaire_index_list.html Outdated
@ZoqkMaze
Copy link
Copy Markdown
Collaborator Author

do you want to get feedback yet? I took only a very quick look over the changes so far

Yes, please. Hopefully, only one test is missing

@niklasmohrin
Copy link
Copy Markdown
Member

niklasmohrin commented Jan 11, 2026

@hansegucker @fekoch @jooooosef @ybrnr I won't find time to review this before I am there tomorrow, and by then I expect that other things will have come up. Can some of you give a review round or two on this? Maybe if you have some time tomorrow at the meeting :)

Copy link
Copy Markdown
Collaborator

@ybrnr ybrnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should also run ./manage.py precommit

Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/forms.py Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html
Comment thread evap/evaluation/tools.py
Comment thread evap/staff/views.py Outdated
Comment thread evap/staff/views.py Outdated
Comment thread evap/static/scss/_adjustments.scss Outdated
Copy link
Copy Markdown
Member

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, but there are some rough corners we should still fix

Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/views.py Outdated
Comment thread evap/staff/views.py Outdated
Comment thread evap/staff/views.py Outdated
Comment thread evap/staff/views.py Outdated
Comment thread evap/static/scss/_adjustments.scss Outdated
@ZoqkMaze ZoqkMaze requested a review from niklasmohrin January 27, 2026 00:20
Copy link
Copy Markdown
Collaborator

@fekoch fekoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janno42 and me rethought about the "All" - "Visible" - "Non-Archived" filter-buttons. Can you change them to be the following:

  1. "All" (the default) should show all non-archived questionnaires
  2. "Visible": same as before
  3. "Archived": only archived questionaires

Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html
Comment thread evap/staff/templates/staff_questionnaire_index_list.html
Comment thread evap/staff/tests/test_views.py Outdated
Comment thread evap/staff/tests/test_views.py Outdated
Comment thread evap/staff/tests/test_views.py Outdated
Comment thread evap/static/scss/_adjustments.scss Outdated
Comment thread evap/static/scss/_adjustments.scss Outdated
Comment thread evap/staff/views.py
@richardebeling richardebeling requested a review from janno42 March 2, 2026 19:03
Copy link
Copy Markdown
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the text "There are no matching questionnaires" and instead keep the empty table (with header). We will address the handling of empty tables in a separate issue.

Copy link
Copy Markdown
Member

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems to work as expected, some small comments on the code

Comment thread evap/evaluation/tools.py Outdated
Comment thread evap/staff/tests/test_live.py
Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index_list.html
@niklasmohrin
Copy link
Copy Markdown
Member

Note that we still have an "There are no questionnaires yet." with no table at all if there are no questionnaires in any of the tabs; @janno42 do you want this one to also go away?

Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Copy link
Copy Markdown
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good - except for this small thing. Then we can merge from my side :)

Comment thread evap/static/scss/_adjustments.scss
Comment thread evap/static/scss/_adjustments.scss Outdated
Copy link
Copy Markdown
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manage all the questionnaires!

Comment thread evap/evaluation/tools.py
Comment on lines +183 to +188
def get_string_from_url_or_session(request: HttpRequest, parameter: str, default: str | None = None) -> str | None:
result = request.GET.get(parameter, None)
if result is None:
result = request.session.get(parameter, default)
request.session[parameter] = result
return result
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two helpers here are now basically the same thing, and they are named a bit weirdly.

We can do it as a follow-up issue to get this merged quickly, but I guess it would be nice to think about proper names here and how to make one of these use the other one.

@niklasmohrin niklasmohrin changed the title Questionnaire management Questionnaires: add archived state, tabs in management page Apr 20, 2026
@niklasmohrin niklasmohrin merged commit 8807428 into e-valuation:main Apr 20, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Questionnaire management

7 participants