diff --git a/src/instructions/Instructions.test.jsx b/src/instructions/Instructions.test.jsx
index 191591a2..83df8b96 100644
--- a/src/instructions/Instructions.test.jsx
+++ b/src/instructions/Instructions.test.jsx
@@ -502,7 +502,7 @@ describe('SequenceExamWrapper', () => {
expect(screen.getByTestId('retry-exam-button')).toHaveTextContent('Retry my exam');
});
- it('Shows submitted practice exam instructions if exam is onboarding and attempt status is submitted', () => {
+ it('Shows submitted practice exam instructions if exam is onboarding and attempt status is submitted on legacy LTI exams', () => {
store.getState = () => ({
specialExams: Factory.build('specialExams', {
activeAttempt: {},
@@ -510,6 +510,7 @@ describe('SequenceExamWrapper', () => {
is_proctored: true,
type: ExamType.PRACTICE,
attempt: Factory.build('attempt', {
+ use_legacy_attempt_api: true,
attempt_status: ExamStatus.SUBMITTED,
}),
}),
diff --git a/src/instructions/practice_exam/SubmittedPracticeExamInstructions.jsx b/src/instructions/practice_exam/SubmittedPracticeExamInstructions.jsx
index 22550608..b69201d7 100644
--- a/src/instructions/practice_exam/SubmittedPracticeExamInstructions.jsx
+++ b/src/instructions/practice_exam/SubmittedPracticeExamInstructions.jsx
@@ -4,12 +4,17 @@ import { FormattedMessage } from '@edx/frontend-platform/i18n';
import { Button } from '@openedx/paragon';
import { resetExam } from '../../data';
+import { ExamStatus } from '../../constants';
const SubmittedPracticeExamInstructions = () => {
const dispatch = useDispatch();
const { exam } = useSelector(state => state.specialExams);
- const examHasLtiProvider = !exam?.attempt?.use_legacy_attempt_api;
+ // It does not show the reload button if the exam is submitted and not legacy
+ const showRetryButton = !(
+ exam.attempt?.attempt_status === ExamStatus.SUBMITTED
+ && !exam.attempt?.use_legacy_attempt_api
+ );
return (
@@ -26,7 +31,7 @@ const SubmittedPracticeExamInstructions = () => {
+ 'completed this practice exam and can continue with your course work.'}
/>
- {!examHasLtiProvider ? (
+ {showRetryButton ? (