-
Notifications
You must be signed in to change notification settings - Fork 301
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
Exam mode
: Allow instructors to view unsubmitted exams and adjust summary layout
#7588
Exam mode
: Allow instructors to view unsubmitted exams and adjust summary layout
#7588
Conversation
Exam mode
: Prevent user from viewing unsubmitted examsExam mode
: Allow instructors to view unsubmitted exams
…osition of the unsubmitted banner
Exam mode
: Allow instructors to view unsubmitted examsExam mode
: Allow instructors to view unsubmitted exams and adjust summary layout
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.
manually tested on legacy ts11, works as expected
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (1)
- src/main/java/de/tum/in/www1/artemis/service/exam/ExamService.java (2 hunks)
Additional comments: 1
src/main/java/de/tum/in/www1/artemis/service/exam/ExamService.java (1)
- 452-464: The method
getStudentExamGradesForSummary
has been updated to include a new parameteraccessingUserIsAtLeastInstructor
. This parameter is used to determine if access to the exam summary is always allowed, which is the case for test runs or if the accessing user is at least an instructor. The logic for access control is sound and uses clear conditionals to throw anAccessForbiddenException
when necessary.However, the method name and the new parameter suggest that it could be used for different roles, not just students. It would be beneficial to add a method comment explaining the use case for the new parameter to clarify its purpose for future maintainers.
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.
tested on ts3. works as described
|
Checklist
General
Client
Motivation and Context
I ran into this error while working on #7561 and think that it is not good for the UX to navigate to a page that is not loaded properly.
The underlying issue is that there is no access granted to the grade.
Description
Disabling the button that forwards to the student exam summary instead of forwarding to a broken page as the server endpoint denies access to the grade of an unsubmitted exam.This issue could also be resolved by allowing access to the grade for instructors - since there is the explicit error messageYou are not allowed to access the grade summary of a student exam which was NOT submitted!
thrown I assumed that there are some explicit thoughts behind denying this view for instructor.As I do not know a scenario where the instructor would like to view unsubmitted exams, I think that just disabling the button that forwards to the student exam is a better solution than letting the instructor run into error messages.
Steps for Testing
student
: verify the preview page of an exam does still have the general information centeredinstructor
: assess the examinstructor
: release the grades (= Release Dates of Results in the past)instructor
: try to view the unsubmitted Student Examinstructor
: see that no error message is displayed, but instead a banner that the currently viewed exam was not submitted (verify translation for English and German)Testserver States
Review Progress
Code Review
Manual Tests
Test Coverage
Client
Server
Screenshots
New
new Layout
banner instead of a notification when viewing an resubmitted exam
Old
errorMessageWhenViewingUnsubmittedExamAfterReleasingGrades.mov
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes
Refactor
Style
Tests