-
Notifications
You must be signed in to change notification settings - Fork 146
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
Open
jooooosef
wants to merge
56
commits into
e-valuation:main
Choose a base branch
from
ybrnr:iss1786
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
915800f
alle changes ohne tests
ybrnr 9753d7e
tests jetzt hinzugefügt mit neuer struktur (schon wieder) test_tools.…
ybrnr 8adf9cb
minimal_test_data_results.json geändert, ist jetzt cooler, außerdem t…
ybrnr aa37c8b
vscode hat komische dinge in results_evaluation_detail.html gemacht, …
ybrnr 4f09e20
button description
ybrnr 27d9ef1
correct redirect link when exporting as manager
ybrnr e423086
tests shortened, new test for contributor
ybrnr ca0144f
added tests for delegates for contributor and responsible in contribu…
ybrnr 1c7f31d
test
jooooosef 48af815
changed contributor test
ybrnr c8866ae
changed tests again, trying to satisfy linter
ybrnr 0384ca6
linter happy now :)
ybrnr 4480937
Update evap/results/templates/results_evaluation_detail.html
ybrnr 9ce9da9
Update evap/results/templates/results_evaluation_detail.html
ybrnr 3a93972
Update evap/results/templates/results_evaluation_detail.html
ybrnr da932a7
Update evap/results/templates/results_evaluation_detail.html
ybrnr ff1eece
Update evap/results/templates/results_evaluation_detail.html
ybrnr 4522907
Apply suggestions from code review
ybrnr 80dd0f4
user with Textanswervisibility OWN cannot see general buttons
ybrnr 573de4a
standard values for button parameters defined as suggested by janno
ybrnr 98b866b
removed old comments
ybrnr d473e98
added small test for contributor default view
ybrnr 6fccb35
new can_textanswer_be_seen_by structure
ybrnr debabec
disable general view buttons if user cannot view general textanswers
ybrnr 538ee33
disable filter buttons, if user cannot see general/contributor textan…
ybrnr f724a3f
enum for differnet button filter options
ybrnr 05fdb07
fixed imports
ybrnr 451a56a
started to change test structure... (again)
ybrnr 5098e26
tests weiter geändert
ybrnr dee4ee0
changed some tests
jooooosef 942dcec
manager test now with staff mode and removed old tests
ybrnr c0f0b72
removed unnecessary test
jooooosef 1376153
made the active conitions for buttons use proper Enums
jooooosef 20c9769
added helper test to see if buttons are disabled
ybrnr 62a040b
buttons cannot be active, when disabled; created next_step file to tr…
ybrnr 90204e8
added comments in code to work on next time
ybrnr bb95b59
reformatted files
ybrnr 312e12c
(partially) fixed display of button groups
jooooosef 67cb1a6
changed filter logic for general
jooooosef cb4f781
added prints for testing
jooooosef 2fed8bb
added comment
jooooosef 2b6c649
disable textanswer buttons
jooooosef 042aff9
linter happy now :)
jooooosef fc76287
removed comments
jooooosef 49f0467
cleanup
jooooosef be6f262
removed txt file
ybrnr 49fb0b5
reverted bootstrap submodule
jooooosef 49d1c67
Implemented requested changes
jooooosef 522df3f
select ratings button when group disabled
jooooosef 325a534
changed tooltip on btn group
jooooosef 94eafd5
readded deleted test
jooooosef a989a67
changed iteration over contributions
jooooosef 360efd1
removed unnecessary else
jooooosef 0dc3e97
improved responsibles check
jooooosef 0d11ec7
changed html according to pr requests
jooooosef f7cecf3
format code
jooooosef File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 these 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,63 @@ | |
<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"> | ||
Comment on lines
35
to
+36
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. The second line is indented too far here |
||
<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 %}" | ||
> | ||
{% translate 'Ratings and texts' %} | ||
</a> | ||
<a | ||
janno42 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 active{% elif view_general_results == ViewGeneralResults.RATINGS %} active{% endif %}" | ||
> | ||
{% 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> | ||
<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 %}" | ||
> | ||
{% translate 'Ratings and texts' %} | ||
</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 active{% elif view_contributor_results == ViewContributorResults.RATINGS %} active{% endif %}" | ||
> | ||
{% 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_textanswers or not contributor_personal %} disabled{% elif view_contributor_results == ViewContributorResults.PERSONAL %} active{% endif %}" | ||
> | ||
{% translate 'Only mine' %} | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -106,8 +101,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 %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.