Skip to content
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

Admin solutions changelist view + Admin tasks changelist view: should have more logic while choosing colours and symbols for column entries #315

Open
ifrh opened this issue Apr 16, 2021 · 3 comments

Comments

@ifrh
Copy link
Contributor

ifrh commented Apr 16, 2021

current behavior
grafik
You see the "Tests Failed" is coloured red having a white "x".
That symbol should mean: "hey, here is a problem". But "having no failed tests" should not been calling like having a problem.

Expected behavior:

R(x) = symbol x with red circle => "not accepted solution" , "required tests failed", "Plagiarism detected"
G(v) = symbol tick with green circle => "final solution", "accepted solution", "no tests failed", "no plagiarism"
O(x) = symbol w with orange circle => in column tests failed : "only not required tests failed"
B(v) = symbol tick with blue circle => in column final : "accepted but not final solution"

But perhaps not only the colour logic should be extended but also the symbolic should change:
"Red triangle with x" for problem = R(x)
"Green circle with tick" for no problem = G(v)
"Orange triangle" for warning = O(x)
"Blue circle with tick" for "neutral" or "at least not negativ information" = B(v)

Using circle and triangle helps colour-blind persons (see BGG NRW §10 "Barrierefreie Informationstechnik" or for BaWü L-BGG §10 "Barrierefreie mediale Angebote").

I think, that Django-Models itself do not need to change Boolean to other types.

@ifrh
Copy link
Contributor Author

ifrh commented Apr 16, 2021

As mentioned on other websites, i.e.

it is possible to create sortable, filerable columns showed by admin list views using calculated "fields" having own HTML in strings.
With return format_html( " HTML-CODE" ): it should be possible to exchange the symbols in columns and the method logic has to choose which Symbol is used ...

@ifrh
Copy link
Contributor Author

ifrh commented Apr 16, 2021

a use full overview:
"How-to annotate a Django QuerySet with calculated properties, and use them in ModelAdmin for filtering and sorting (and in other places too)" https://marioorlandi.medium.com/how-to-annotate-a-django-queryset-with-calculated-properties-and-use-them-in-modeladmin-for-e21dc41ac27f

@ifrh
Copy link
Contributor Author

ifrh commented Apr 19, 2021

That annotated querysets are sortable, I used in commit 11c11f5 to the feature_admin-solution-new-filter branch on ifrh/Praktomat for pullrequest #314
Feature admin solution changelist view : add new filter "latest of only failed" + made annotated columns "tests failed" and "Latest of only failed" sortable

Therefor open is only the discussion if modifying the symbolic should happen.
Perhaps if symbolic could be modified, than there could be a new symbol for admin task changelist view, too,
which could mark for other trainers,admins which tasks are currently in state "run all checkers".

@ifrh ifrh changed the title Admin solutions list-view : should have more logic while choosing colours and symbols for column entries Admin solutions changelist view + Admin tasks changelist view: should have more logic while choosing colours and symbols for column entries Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant