feat: opt out is not supported by lti proctoring (#673)

This toggle does nothing if an LTI tool is selected. We should hide it in that case.
This commit is contained in:
Zachary Hancock
2023-11-13 09:14:54 -05:00
committed by GitHub
parent 7c7b3cdc07
commit e41efba0cd
2 changed files with 3 additions and 1 deletions

View File

@@ -350,7 +350,7 @@ const ProctoringSettings = ({ intl, onClose }) => {
)}
{/* ALLOW OPTING OUT OF PROCTORED EXAMS */}
{ isEdxStaff && formValues.enableProctoredExams && (
{ isEdxStaff && formValues.enableProctoredExams && !isLtiProvider(formValues.proctoringProvider) && (
<fieldset aria-describedby="allowOptingOutHelpText">
<Form.Group controlId="formAllowingOptingOut">
<Form.Label as="legend" className="font-weight-bold">
@@ -358,6 +358,7 @@ const ProctoringSettings = ({ intl, onClose }) => {
</Form.Label>
<Form.RadioSet
name="allowOptingOut"
data-testid="allowOptingOutRadio"
value={formValues.allowOptingOut.toString()}
onChange={handleChange}
>

View File

@@ -197,6 +197,7 @@ describe('ProctoredExamSettings', () => {
fireEvent.change(selectElement, { target: { value: 'test_lti' } });
});
expect(screen.queryByTestId('escalationEmail')).toBeNull();
expect(screen.queryByTestId('allowOptingOutRadio')).toBeNull();
expect(screen.queryByTestId('createZendeskTicketsYes')).toBeNull();
expect(screen.queryByTestId('createZendeskTicketsNo')).toBeNull();
});