Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
915800f
alle changes ohne tests
ybrnr Jul 1, 2024
9753d7e
tests jetzt hinzugefügt mit neuer struktur (schon wieder) test_tools.…
ybrnr Jul 1, 2024
8adf9cb
minimal_test_data_results.json geändert, ist jetzt cooler, außerdem t…
ybrnr Jul 1, 2024
aa37c8b
vscode hat komische dinge in results_evaluation_detail.html gemacht, …
ybrnr Jul 2, 2024
4f09e20
button description
ybrnr Jul 8, 2024
27d9ef1
correct redirect link when exporting as manager
ybrnr Jul 8, 2024
e423086
tests shortened, new test for contributor
ybrnr Jul 8, 2024
ca0144f
added tests for delegates for contributor and responsible in contribu…
ybrnr Jul 8, 2024
1c7f31d
test
jooooosef Jul 8, 2024
48af815
changed contributor test
ybrnr Jul 15, 2024
c8866ae
changed tests again, trying to satisfy linter
ybrnr Jul 15, 2024
0384ca6
linter happy now :)
ybrnr Jul 15, 2024
4480937
Update evap/results/templates/results_evaluation_detail.html
ybrnr Jul 15, 2024
9ce9da9
Update evap/results/templates/results_evaluation_detail.html
ybrnr Jul 29, 2024
3a93972
Update evap/results/templates/results_evaluation_detail.html
ybrnr Jul 29, 2024
da932a7
Update evap/results/templates/results_evaluation_detail.html
ybrnr Jul 29, 2024
ff1eece
Update evap/results/templates/results_evaluation_detail.html
ybrnr Jul 29, 2024
4522907
Apply suggestions from code review
ybrnr Jul 29, 2024
80dd0f4
user with Textanswervisibility OWN cannot see general buttons
ybrnr Jul 29, 2024
573de4a
standard values for button parameters defined as suggested by janno
ybrnr Jul 29, 2024
98b866b
removed old comments
ybrnr Jul 29, 2024
d473e98
added small test for contributor default view
ybrnr Jul 29, 2024
6fccb35
new can_textanswer_be_seen_by structure
ybrnr Aug 5, 2024
debabec
disable general view buttons if user cannot view general textanswers
ybrnr Aug 5, 2024
538ee33
disable filter buttons, if user cannot see general/contributor textan…
ybrnr Aug 12, 2024
f724a3f
enum for differnet button filter options
ybrnr Aug 12, 2024
05fdb07
fixed imports
ybrnr Oct 14, 2024
451a56a
started to change test structure... (again)
ybrnr Oct 14, 2024
5098e26
tests weiter geändert
ybrnr Oct 21, 2024
dee4ee0
changed some tests
jooooosef Oct 28, 2024
942dcec
manager test now with staff mode and removed old tests
ybrnr Oct 28, 2024
c0f0b72
removed unnecessary test
jooooosef Oct 28, 2024
1376153
made the active conitions for buttons use proper Enums
jooooosef Oct 28, 2024
20c9769
added helper test to see if buttons are disabled
ybrnr Oct 28, 2024
62a040b
buttons cannot be active, when disabled; created next_step file to tr…
ybrnr Oct 28, 2024
90204e8
added comments in code to work on next time
ybrnr Oct 28, 2024
bb95b59
reformatted files
ybrnr Oct 28, 2024
312e12c
(partially) fixed display of button groups
jooooosef Nov 11, 2024
67cb1a6
changed filter logic for general
jooooosef Nov 18, 2024
cb4f781
added prints for testing
jooooosef Nov 18, 2024
2fed8bb
added comment
jooooosef Nov 18, 2024
2b6c649
disable textanswer buttons
jooooosef Nov 18, 2024
042aff9
linter happy now :)
jooooosef Nov 18, 2024
fc76287
removed comments
jooooosef Nov 18, 2024
49f0467
cleanup
jooooosef Nov 18, 2024
be6f262
removed txt file
ybrnr Nov 25, 2024
49fb0b5
reverted bootstrap submodule
jooooosef Dec 16, 2024
49d1c67
Implemented requested changes
jooooosef Dec 16, 2024
522df3f
select ratings button when group disabled
jooooosef Dec 16, 2024
325a534
changed tooltip on btn group
jooooosef Jan 6, 2025
94eafd5
readded deleted test
jooooosef Jan 6, 2025
a989a67
changed iteration over contributions
jooooosef Jan 6, 2025
360efd1
removed unnecessary else
jooooosef Jan 6, 2025
0dc3e97
improved responsibles check
jooooosef Jan 6, 2025
0d11ec7
changed html according to pr requests
jooooosef Jan 13, 2025
f7cecf3
format code
jooooosef Jan 13, 2025
53ad0b6
fix indendation
jooooosef Feb 17, 2025
a240678
fix naming
jooooosef Feb 17, 2025
e0a996a
added check_view_with helper function for tests, replacing old helper…
ybrnr Feb 17, 2025
464ab54
improved code quality
jooooosef Feb 18, 2025
f7af6f8
fixed spacing on comment
jooooosef Feb 18, 2025
113c750
changed textanswer button layout
jooooosef Mar 10, 2025
92df337
improve queries
jooooosef Mar 10, 2025
d897600
refactored tests
ybrnr Mar 10, 2025
3b3c725
remove unessessary comment
jooooosef Mar 10, 2025
02226af
remove superfluous spaces in HTML
jooooosef Mar 10, 2025
0f06216
format code
jooooosef Mar 17, 2025
c88d2a7
very bad typo :(
jooooosef Apr 14, 2025
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
24 changes: 12 additions & 12 deletions evap/results/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,20 @@ def evaluation_detail(request, semester_id, evaluation_id):

is_responsible_or_contributor_or_delegate = evaluation.is_user_responsible_or_contributor_or_delegate(view_as_user)

contributor_textanswers = view_as_user.is_reviewer or any(
evaluation.is_user_contributor(user) for user in represented_users
)
contributor_textanswers = view_as_user.is_reviewer or evaluation.contributions.filter(
contributor__in=represented_users
).exists()

contributor_personal = evaluation.is_user_contributor(view_as_user)

user_represents_responsible = any(user in represented_users for user in evaluation.course.responsibles.all())
user_represents_general_visibilty_contributor = any(
evaluation.is_user_contributor(user)
and evaluation.contributions.filter(
contributor=user,
textanswer_visibility=Contribution.TextAnswerVisibility.GENERAL_TEXTANSWERS,
).exists()
for user in represented_users
)
user_represents_responsible = evaluation.course.responsibles.all().filter(
pk__in=(user.pk for user in represented_users)
).exists()

#any(user in represented_users for user in evaluation.course.responsibles.all())
user_represents_general_visibilty_contributor = evaluation.contributions.filter(
contributor__in=represented_users,
textanswer_visibility=Contribution.TextAnswerVisibility.GENERAL_TEXTANSWERS).exists()

general_textanswers = (
view_as_user.is_reviewer or user_represents_responsible or user_represents_general_visibilty_contributor
Expand Down
Loading