Skip to content
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

Lk/fix message #106

Merged
merged 5 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/components/ProgressBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
stepNames.submission,
...useAssessmentStepOrder(),
stepNames.done,
];
].filter(step => step !== stepNames.staff);

Check warning on line 50 in src/components/ProgressBar/index.jsx

View check run for this annotation

Codecov / codecov/patch

src/components/ProgressBar/index.jsx#L50

Added line #L50 was not covered by tests
const { formatMessage } = useIntl();

if (!isLoaded) {
return null;
}

const stepEl = (curStep) => (stepLabels[curStep] ? (
const stepEl = (curStep) => (

Check warning on line 57 in src/components/ProgressBar/index.jsx

View check run for this annotation

Codecov / codecov/patch

src/components/ProgressBar/index.jsx#L57

Added line #L57 was not covered by tests
<ProgressStep
step={curStep}
key={curStep}
Expand All @@ -64,9 +64,12 @@
|| stepCanRevisit[curStep]
}
/>
) : null);
);

const activeStepTitle = activeStep === stepNames.xblock ? activeStepName : activeStep;
let activeStepTitle = activeStep === stepNames.xblock ? activeStepName : activeStep;
if (activeStepTitle === stepNames.staff) {
activeStepTitle = stepNames.submission;

Check warning on line 71 in src/components/ProgressBar/index.jsx

View check run for this annotation

Codecov / codecov/patch

src/components/ProgressBar/index.jsx#L71

Added line #L71 was not covered by tests
}

return (
<Navbar className={classNames('px-0', className)} expand="md">
Expand Down
4 changes: 2 additions & 2 deletions src/components/StatusAlert/hooks/simpleAlerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const useTrainingErrorAlerts = ({ step }) => ([

export const useStaffAlerts = ({ step }) => ([
useCreateAlert({ step })({
message: messages.alerts[stepNames.staff],
heading: messages.headings[stepNames.staff],
message: messages.alerts[stepNames.staff][stepNames.staff],
heading: messages.headings[stepNames.staff][stepNames.staff],
}),
]);

Expand Down
12 changes: 6 additions & 6 deletions src/components/StatusAlert/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,27 +178,27 @@ const peerHeadings = defineMessages({

const doneAlerts = defineMessages({
status: {
id: 'frontend-app-ora.StatusAlert.done',
id: 'frontend-app-ora.StatusAlert.status',
defaultMessage: 'You have completed this assignment. Review your grade and your assessment details',
description: 'Done status alert',
},
});
const doneHeadings = defineMessages({
status: {
id: 'frontend-app-ora.StatusAlert.Heading.done',
id: 'frontend-app-ora.StatusAlert.Heading.status',
defaultMessage: 'Assignment Complete and Graded',
description: 'Done status alert heading',
},
});
const staffAlerts = defineMessages({
staffAssessment: {
staff: {
id: 'frontend-app-ora.StatusAlert.xblock.staffAssessment',
defaultMessage: 'Your final grade will be ready once the instructor has finished grading your response. Check back periodically to see if there is an update.',
description: 'Status alert message for staff assessment step',
},
});
const staffHeadings = defineMessages({
staffAssessment: {
staff: {
id: 'ora-mfe.StatusAlert.Heading.xblock.staffAssessment',
defaultMessage: 'Great work! All assignment steps are completed.',
description: 'Status alert message heading for staff assessment step',
Expand All @@ -220,15 +220,15 @@ export default {
[stepNames.self]: selfHeadings,
[stepNames.peer]: peerHeadings,
[stepNames.done]: doneHeadings,
[stepNames.staff]: staffHeadings.staffAssessment,
[stepNames.staff]: staffHeadings,
},
alerts: {
[stepNames.submission]: submissionAlerts,
[stepNames.studentTraining]: studentTrainingAlerts,
[stepNames.self]: selfAlerts,
[stepNames.peer]: peerAlerts,
[stepNames.done]: doneAlerts,
[stepNames.staff]: staffAlerts.staffAssessment,
[stepNames.staff]: staffAlerts,
},
...messages,
};
Loading