kit-sdq / artemis4j

REST Client for the Artemis Project
Eclipse Public License 2.0
5 stars 6 forks source link

`Grading` prevent multiple annotations of same type in one line #76

Closed Shirkanesi closed 3 weeks ago

Shirkanesi commented 1 year ago

Is your feature request related to a problem?

No response

Describe the solution you'd like

There are multiple reasons one can accidentally add multiple annotations of the same type to one line (as well as due to the "Autograder").

This should be prevented; the method creating an annotation should return a boolean whether adding the annotation was possible or not. For the autograder this should then be (most likely) ignored, for the buttons in the UI a message could be raised (or the edit-dialog for the existing penalty in case of Shift+Click etc).

dfuchss commented 3 months ago

@Feuermagier @Luro02 maybe also something for the future (follow up pr)

Luro02 commented 3 weeks ago

Is this still an issue? intelligrade will show multiple annotations on the same line and from what I can tell, artemis4j has code to automatically merge multiple annotations on the same line: https://github.com/kit-sdq/artemis4j/blob/c6b910410e6594ab052b61b3ded1f8fc17c48c79/src/main/java/edu/kit/kastel/sdq/artemis4j/grading/Assessment.java#L392-L400