Skip to content

Questionnaire management#2587

Open
ZoqkMaze wants to merge 8 commits intoe-valuation:mainfrom
ZoqkMaze:q_management
Open

Questionnaire management#2587
ZoqkMaze wants to merge 8 commits intoe-valuation:mainfrom
ZoqkMaze:q_management

Conversation

@ZoqkMaze
Copy link
Collaborator

@ZoqkMaze ZoqkMaze commented Dec 15, 2025

fix #2545

Copy link
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

@ZoqkMaze
Copy link
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
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
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

Copy link
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

@ZoqkMaze ZoqkMaze requested a review from niklasmohrin January 27, 2026 00:20
Copy link
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

@niklasmohrin niklasmohrin removed their request for review February 16, 2026 23:09
@richardebeling richardebeling requested a review from janno42 March 2, 2026 19:03
Copy link
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
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

return result


def get_string_from_url_or_session(request: HttpRequest, parameter: str, default=False) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if there is a sensible default, but the type annotation should surely be:

Suggested change
def get_string_from_url_or_session(request: HttpRequest, parameter: str, default=False) -> str:
def get_string_from_url_or_session(request: HttpRequest, parameter: str, default: str) -> str:

I am not sure why the function passed typechecking in the first place, maybe the GET.get returns Any?

self.assertEqual(counter.text, "0")


class QuestionnaireLiveTest(LiveServerTest):
Copy link
Member

Choose a reason for hiding this comment

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

Very nice, this is a very clear test :)

<a href="{% url 'staff:questionnaire_index' %}?filter_questionnaires=false" role="button" class="btn btn-sm btn-light{% if not filter_questionnaires %} active{% endif %}">
{% translate 'Show' %}
<a href="{% url 'staff:questionnaire_index' %}?filter_questionnaires=all" role="button" class="btn btn-sm btn-light{% if filter_questionnaires == 'all' %} active{% endif %}">
{% translate 'All' %}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{% translate 'All' %}
{% translate 'All' %}

Comment on lines -1 to -2
{% if questionnaires %}
<div class="card collapsible {{ extra_classes }}">
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove the two leading spaces in the rest of the file? Currently, the whole file is indented

@niklasmohrin
Copy link
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?

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