-
Notifications
You must be signed in to change notification settings - Fork 147
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
Customizable evaluation results filters #2232
base: main
Are you sure you want to change the base?
Changes from all commits
915800f
9753d7e
8adf9cb
aa37c8b
4f09e20
27d9ef1
e423086
ca0144f
1c7f31d
48af815
c8866ae
0384ca6
4480937
9ce9da9
3a93972
da932a7
ff1eece
4522907
80dd0f4
573de4a
98b866b
d473e98
6fccb35
debabec
538ee33
f724a3f
05fdb07
451a56a
5098e26
dee4ee0
942dcec
c0f0b72
1376153
20c9769
62a040b
90204e8
bb95b59
312e12c
67cb1a6
cb4f781
2fed8bb
2b6c649
042aff9
fc76287
49f0467
be6f262
49fb0b5
49d1c67
522df3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
{% if evaluation.state != evaluation.State.PUBLISHED %} | ||
<div class="alert alert-warning">{% translate 'This is a preview. The results have not been published yet.' %}</div> | ||
{% endif %} | ||
|
||
{# manager is automatically a reviewer (so this are all groups that can see the buttons) #} | ||
{% if is_reviewer or is_responsible_or_contributor_or_delegate %} | ||
{% if evaluation.course.is_private %} | ||
<div class="alert alert-info d-print-none"> | ||
|
@@ -32,68 +32,74 @@ | |
<div class="col"> | ||
<h3 class="mb-0">{{ evaluation.full_name }} ({{ evaluation.course.semester.name }})</h3> | ||
</div> | ||
|
||
<div class="col-auto"> | ||
<div class="btn-switch btn-switch-light my-auto d-print-none"> | ||
<div class="btn-switch-label">{% translate 'View' %}</div> | ||
<div class="btn-switch btn-group"> | ||
{% if user.is_staff and view == 'export' or is_contributor %} | ||
<a | ||
href="{% if is_contributor %}{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view=export{% endif %}" | ||
role="button" | ||
class="btn btn-sm btn-light{% if view == 'export' %} active{% endif %}" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title="{% blocktranslate %}Shows filtered view meant for personal export. Other contributors' results and private answers are hidden.{% endblocktranslate %}" | ||
> | ||
{% translate 'Export' context 'view mode' %} | ||
</a> | ||
|
||
{% endif %} | ||
<a | ||
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view=full" | ||
role="button" | ||
class="btn btn-sm btn-light{% if view == 'full' %} active{% endif %}" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title="{% translate 'Shows all results available for you.' %}" | ||
> | ||
{% translate 'Full' %} | ||
</a> | ||
{% if not evaluation.can_publish_rating_results %} | ||
<button | ||
type="button" | ||
disabled | ||
class="btn btn-sm btn-light" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title="{% blocktranslate %}The results of this evaluation have not been published because it didn't get enough votes.{% endblocktranslate %}" | ||
> | ||
{% if evaluation.course.is_private %} | ||
{% translate 'Participant' %} | ||
{% else %} | ||
{% translate 'Public' %} | ||
{% endif %} | ||
</button> | ||
{% else %} | ||
<a | ||
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view=public" | ||
role="button" | ||
class="btn btn-sm btn-light{% if view == 'public' %} active{% endif %}" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title=" | ||
{% if evaluation.course.is_private %} | ||
{% translate 'Shows results available for the participants.' %}" | ||
> | ||
{% translate 'Participant' %} | ||
{% else %} | ||
{% translate 'Shows results available for everyone logged in.' %}" | ||
> | ||
{% translate 'Public' %} | ||
{% endif %} | ||
</a> | ||
{% endif %} | ||
<div class="row"> | ||
<div class="col-auto"> | ||
<div class="btn-switch btn-switch-light my-auto d-print-none"> | ||
<div class="btn-switch-label">{% translate 'General results' %}</div> | ||
<div class="btn-switch btn-group"> | ||
<a | ||
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results=full&view_contributor_results={{ view_contributor_results.value }}" | ||
role="button" | ||
class="btn btn-sm btn-light {% if not general_textanswers %} disabled {% elif view_general_results == ViewGeneralResults.FULL %} active {% endif %}" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title="{% blocktranslate %}All results of general questions (including text answers){% endblocktranslate %}" | ||
> | ||
{% translate 'Full' %} | ||
</a> | ||
<a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Users with |
||
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results=ratings&view_contributor_results={{ view_contributor_results.value }}" | ||
role="button" | ||
class="btn btn-sm btn-light {% if not general_textanswers %} disabled {% endif %} {% if view_general_results == ViewGeneralResults.RATINGS or not general_textanswers %} active{% endif %}" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title="{% translate 'Only rating results of general questions (without text answers)' %}" | ||
> | ||
{% translate 'Ratings' %} | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row mt-1"> | ||
<div class="col-auto"> | ||
<div class="btn-switch btn-switch-light my-auto d-print-none"> | ||
<div class="btn-switch-label">{% translate 'Contributor results' %}</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when disabled, "Ratings" should be selected/active and its tooltip should be shown on hover. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We added that ratings is selected when the button group is disabled. I think this could be fixed with some js? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we found a way of having tooltips on disabled buttons in #1931. |
||
<div class="btn-switch btn-group"> | ||
<a | ||
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results={{ view_general_results.value }}&view_contributor_results=full" | ||
role="button" | ||
class="btn btn-sm btn-light {% if not contributor_textanswers %} disabled {% elif view_contributor_results == ViewContributorResults.FULL %} active {% endif %}" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title="{% blocktranslate %}All results of contributor questions available for you (including text answers){% endblocktranslate %}" | ||
> | ||
{% translate 'Full' %} | ||
</a> | ||
<a | ||
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results={{ view_general_results.value }}&view_contributor_results=ratings" | ||
role="button" | ||
class="btn btn-sm btn-light {% if not contributor_textanswers %} disabled {% endif %} {% if view_contributor_results == ViewContributorResults.RATINGS or not contributor_textanswers %} active{% endif %}" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title="{% translate 'Only rating results of contributor questions (without text answers)' %}" | ||
> | ||
{% translate 'Ratings' %} | ||
</a> | ||
<a | ||
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results={{ view_general_results.value }}&view_contributor_results=personal" | ||
role="button" | ||
class="btn btn-sm btn-light {% if not contributor_personal or not contributor_textanswers %} disabled {% elif view_contributor_results == ViewContributorResults.PERSONAL %} active {% endif %}" | ||
data-bs-toggle="tooltip" | ||
data-bs-placement="bottom" | ||
title="{% translate 'All results of contributor questions regarding yourself, hiding other contributors' %}" | ||
> | ||
{% translate 'Personal' %} | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -106,8 +112,8 @@ <h3>{{ evaluation.full_name }} ({{ evaluation.course.semester.name }})</h3> | |
<div class="card-header d-flex"> | ||
<div class="me-auto">{% translate 'Overview' %}</div> | ||
{% if can_export_text_answers %} | ||
<a class="btn btn-sm btn-light d-print-none" href="{% url 'results:evaluation_text_answers_export' evaluation.id %}?view={{ view }}{% if contributor_id is not None %}&contributor_id={{ contributor_id }}{% endif %}" type="button"> | ||
{% translate 'Export text answers' %} | ||
<a class="btn btn-sm btn-light d-print-none" href="{% url 'results:evaluation_text_answers_export' evaluation.id %}?view_general_results={{ view_general_results.value }}&view_contributor_results={{ view_contributor_results.value }}{% if contributor_id is not None %}&contributor_id={{ contributor_id }}{% endif %}" type="button"> | ||
{% translate 'Export visible text answers' %} | ||
</a> | ||
{% endif %} | ||
{% if evaluation.course.grade_documents.count == 1 and can_download_grades %} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when disabled, "Ratings" should be selected/active and its tooltip should be shown on hover.
a different tooltip should be shown for "All" when disabled: "You can't see text answers for general questions in this evaluation."