-
Notifications
You must be signed in to change notification settings - Fork 80
fix(studentView): Standardize grader's student view to match actual student experience #8000
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
base: master
Are you sure you want to change the base?
Conversation
…ric-based response
…sitive fields Students should only see the rubric when the submission is published and the assessment setting is on.
…tual student experience Ensures that grader's student view accurately reflects what students are seeing at the same time for the following assessment features: - Private test cases - Evaluation test cases - MCQ/MRQ solutions - Rubric breakdown These features are only visible to students when the submission is published and the corresponding assessment setting is enabled.
…tual student experience Ensures that grader's student view accurately reflects what students are seeing at the same time for the different kind of comments. Students should only see published comments or annotations.
…tual student experience Ensures that grader's student view accurately reflects what students are seeing at the same time for past attempts view (using the "All Answers" button) Add display settings props to AnswerDetails component to control visibility of various answer elements like test cases, rubric breakdown, and MCQ/MRQ solutions.
91e3888
to
bea80f9
Compare
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.
Pull Request Overview
This PR aligns the grader’s “student view” with the actual student experience by centralizing visibility flags, enforcing read-only views for students, and conditioning JSON output on grading permissions and publish state.
- Introduced a
DisplaySettings
type and propagatedpublished
/readOnly
flags through answer components - Made rubric panels non-editable in student-view contexts and hid unpublished annotations
- Updated view components and JSON builders to conditionally expose rubric categories, test cases, and annotations based on
graderView
,published
, and course/assessment settings
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
client/app/types/course/assessment/submission/question/types.ts | Made aiGradingEnabled optional and categoryGrades optional |
client/app/bundles/course/assessment/submission/types.ts | Added DisplaySettings interface and passed displaySettings |
client/app/bundles/course/assessment/submission/containers/QuestionContent.tsx | Computed and passed published flag alongside graderView |
client/app/bundles/course/assessment/submission/containers/ReadOnlyEditor.jsx | Filtered out unpublished annotations based on graderView/posts |
client/app/bundles/course/assessment/submission/components/AllAttempts/AllAttemptsTimelineView.tsx | Populated displaySettings for past attempts view |
app/views/course/assessment/question/rubric_based_responses/_rubric_based_response.json.jbuilder | Conditionally output rubric categories based on permissions |
Comments suppressed due to low confidence (4)
client/app/bundles/course/assessment/submission/containers/ReadOnlyEditor.jsx:61
annotations
is an object, not an array, so it doesn't have alength
property. To detect changes, useObject.keys(annotations).length
or track the filtered annotations array length instead.
}
client/app/bundles/course/assessment/submission/pages/SubmissionEditIndex/components/QuestionContent.tsx:50
- The
published
property is passed down but not declared in the component's Props interface. Please update theProps
type to includepublished: boolean
to ensure type safety.
const published = workflowState === workflowStates.Published;
client/app/bundles/course/assessment/submission/containers/QuestionGrade.tsx:95
- The variable
published
is used here but not defined in this scope. Introduceconst published = submission.workflowState === workflowStates.Published;
before using it.
(graderView || (published && assessment.showRubricToStudents));
client/app/bundles/course/assessment/submission/components/AllAttempts/AllAttemptsTimelineView.tsx:115
- The property
assessment.showEvaluation
does not exist on the assessment object. If you intended to check the display flag, use the correct field name, e.g.assessment.showEvaluationTestCases
.
graderView || (published && assessment.showEvaluation),
Description
Currently, the student's view feature for graders do not accurately represent what the student is actually seeing at the same time. What students actually see is due to what data is returned from back end, while what graders' student view see is due to the conditional check in the front end (through the
graderView
state)Changes made
showPrivateTestCases
showEvaluationTestCases
showMcqMrqSolution
showRubricBreakdown
showPublicTestCasesOutput
showStdoutAndStderr
published
comments and annotations at all timesCodaveri
,delayed
,draft
commentsAnswerDetails
component which is also used in the assessment statistics page throughLastAttempt