-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add edit submission link when evaluating a submission #5190
Conversation
Co-authored-by: Niko Strijbol <[email protected]>
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.
The functionality looks good, but the buttons can use some margin.
-
In the normal view, the buttons are too close to each other horizontally (if you hover over the new button). On small screens, the same is true vertically.
-
I would also move the breakpoint down 1 tier (to large). This then overflows in Dutch for an evaluation, but I would then hide the word "annotations" (the label next to the toggle buttons) instead.
@@ -17,14 +17,18 @@ import { | |||
|
|||
const MARKING_CLASS = "marked"; | |||
|
|||
function initAnnotations(submissionId: number, courseId: number, exerciseId: number, userId: number, code: string, questionMode = false): void { | |||
function initAnnotations(submissionId: number, courseId: number, exerciseId: number, userId: number, code: string, userIsStudent: boolean, canSubmitAsOwn: boolean): void { |
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 is becoming a bit of an anti-pattern. For such long list of options, an object might be better (but I don't know if we already do that in other places).
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 function is only used in a single place, so making it an object would be very artificial, definitely with the rather specific options.
Although a case could be made to group the first options into a submission
object. This would be more reusable in the frontend. But I see no reason to refactor that right now.
This pull request adds an edit submission link to to the feedback show page.
On smaller screens this results in:
The new button now also appears on non owned submissions, replacing the edit button on those pages
I also generalized some css about icon buttons in card titles. This also improved the submission index page.
old:
new:
Closes #2054