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.
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
Adds shortcut button to add exam evaluation #2050
base: main
Are you sure you want to change the base?
Adds shortcut button to add exam evaluation #2050
Changes from 24 commits
2b22d0c
d096061
9356456
eece030
812a38a
8b03b35
1ea2b82
46cf782
f075998
2a37ffe
69a7090
200ec32
a2556c4
9f9b659
5aea609
e4614c1
b1e3957
9ebfb6c
f08ef58
19274fa
74bda64
f28e98c
9cb60e3
90e87a0
072c693
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Given that except for the
id
, all these forms are equal, we really only need oneThere 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.
The
id
of these modals will be duplicated when there is more than one applicable evaluation - I think we don't need the id anyways, in that case let's just remove itThere 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.
I do not think we can remove it. Without id it throws:
ValueError: "<Evaluation: Database Systems I – Exam>" needs to have a value for field "id" before this many-to-many relationship can be used.
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.
This id will also be duplicated. We could include the evaluation's id, or it should also work to move the
input
element into thelabel
element, then we don't need theid
andfor
attributes (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label). I think I prefer the second approach, we would have to make sure it also works withtype="date"
though :)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.
I don't think the message flow makes sense here (as is reflected in the test for this): The post request will be answered with an empty HTTP 200 OK -- how would a user get that error? To my understanding, they would only see that once they go to a new page, right?
If this error is possible to be triggered by a user, they should get a meaningful error immediately.
(A post-only REST handler setting an error in the messages framework generall seems not really useful to me)
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.
@niklasmohrin we settled to check the date when the user submits the modal, similar to the semester deletion modal (See the new commit). One problem we currently face is the error message disappearing fast as the modal closes on click. How would this feature work best with the confirmation modal?