Skip to content

Commit dc05ccf

Browse files
authored
feat: add never_but_include_grade visibility option (#2489)
This PR introduces a new visibility option for assignment scores: “Never show individual assessment results, but show overall assessment results after the due date.” With this option, learners cannot see question-level correctness or scores at any time. However, once the due date has passed, they can view their overall score in the total grades section on the Progress page.
1 parent 106f22b commit dc05ccf

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

src/generic/configure-modal/ConfigureModal.test.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ describe('<ConfigureModal /> for Subsection', () => {
155155
expect(getByText(messages.neverShowAssessmentResultsDescription.defaultMessage)).toBeInTheDocument();
156156
expect(getByText(messages.showAssessmentResultsPastDue.defaultMessage)).toBeInTheDocument();
157157
expect(getByText(messages.showAssessmentResultsPastDueDescription.defaultMessage)).toBeInTheDocument();
158+
expect(getByText(messages.neverShowAssessmentResultsButIncludeGrade.defaultMessage)).toBeInTheDocument();
159+
expect(getByText(messages.neverShowAssessmentResultsButIncludeGradeDescription.defaultMessage)).toBeInTheDocument();
158160
});
159161

160162
it('switches to the subsection Advanced tab and renders correctly', async () => {

src/generic/configure-modal/VisibilityTab.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ const VisibilityTab = ({
112112
<FormattedMessage {...messages.showAssessmentResultsPastDue} />
113113
</Form.Radio>
114114
<Form.Text><FormattedMessage {...messages.showAssessmentResultsPastDueDescription} /></Form.Text>
115+
<Form.Radio value="never_but_include_grade">
116+
<FormattedMessage {...messages.neverShowAssessmentResultsButIncludeGrade} />
117+
</Form.Radio>
118+
<Form.Text>
119+
<FormattedMessage {...messages.neverShowAssessmentResultsButIncludeGradeDescription} />
120+
</Form.Text>
115121
</Form.RadioSet>
116122
</>
117123
) : (

src/generic/configure-modal/messages.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,26 +170,42 @@ const messages = defineMessages({
170170
alwaysShowAssessmentResults: {
171171
id: 'course-authoring.course-outline.configure-modal.visibility-tab.always-show-assessment-results',
172172
defaultMessage: 'Always show assessment results',
173+
description: 'Always show assessment results option in visibility tab',
173174
},
174175
alwaysShowAssessmentResultsDescription: {
175176
id: 'course-authoring.course-outline.configure-modal.visibility-tab.always-show-assessment-results-description',
176177
defaultMessage: 'When learners submit an answer to an assessment, they immediately see whether the answer is correct or incorrect, and the score received.',
178+
description: 'Always show assessment results option description in visibility tab',
177179
},
178180
neverShowAssessmentResults: {
179181
id: 'course-authoring.course-outline.configure-modal.visibility-tab.never-show-assessment-results',
180182
defaultMessage: 'Never show assessment results',
183+
description: 'Never show assessment results option in visibility tab',
181184
},
182185
neverShowAssessmentResultsDescription: {
183186
id: 'course-authoring.course-outline.configure-modal.visibility-tab.never-show-assessment-results-description',
184187
defaultMessage: 'Learners never see whether their answers to assessments are correct or incorrect, nor the score received.',
188+
description: 'Never show assessment results option description in visibility tab',
185189
},
186190
showAssessmentResultsPastDue: {
187191
id: 'course-authoring.course-outline.configure-modal.visibility-tab.show-assessment-results-past-due',
188192
defaultMessage: 'Show assessment results when subsection is past due',
193+
description: 'Show assessment results past due option in visibility tab',
189194
},
190195
showAssessmentResultsPastDueDescription: {
191196
id: 'course-authoring.course-outline.configure-modal.visibility-tab.show-assessment-results-past-due-description',
192197
defaultMessage: 'Learners do not see whether their answer to assessments were correct or incorrect, nor the score received, until after the due date for the subsection has passed. If the subsection does not have a due date, learners always see their scores when they submit answers to assessments.',
198+
description: 'Show assessment results past due option description in visibility tab',
199+
},
200+
neverShowAssessmentResultsButIncludeGrade: {
201+
id: 'course-authoring.course-outline.configure-modal.visibility-tab.never-show-assessment-results-but-include-grade',
202+
defaultMessage: 'Never show individual assessment results, but show overall assessment results after due date',
203+
description: 'Never show assessment results but include in grade calculations option in visibility tab',
204+
},
205+
neverShowAssessmentResultsButIncludeGradeDescription: {
206+
id: 'course-authoring.course-outline.configure-modal.visibility-tab.never-show-assessment-results-but-include-grade-description',
207+
defaultMessage: 'Learners do not see question-level correctness or scores before or after the due date. However, once the due date passes, they can see their overall score for the subsection on the Progress page.',
208+
description: 'Never show assessment results but include in grade calculations option description in visibility tab',
193209
},
194210
setSpecialExam: {
195211
id: 'course-authoring.course-outline.configure-modal.advanced-tab.set-special-exam',

0 commit comments

Comments
 (0)