From be94bcd03f40d6793e73f028e7ad8625a57a3493 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 1 Oct 2025 13:01:18 +0530 Subject: [PATCH 01/20] chore: Refactor proctoring provider handling in Settings --- plugins/course-apps/proctoring/Settings.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.jsx b/plugins/course-apps/proctoring/Settings.jsx index 645bc95dd0..e6301bf983 100644 --- a/plugins/course-apps/proctoring/Settings.jsx +++ b/plugins/course-apps/proctoring/Settings.jsx @@ -84,10 +84,7 @@ const ProctoringSettings = ({ onClose }) => { } else if (name === 'proctoringProvider') { const newFormValues = { ...formValues, proctoringProvider: value }; - if (value === 'proctortrack') { - setFormValues({ ...newFormValues, createZendeskTickets: false }); - setShowEscalationEmail(true); - } else if (value === 'software_secure') { + if (value === 'software_secure') { setFormValues({ ...newFormValues, createZendeskTickets: true }); setShowEscalationEmail(false); } else if (isLtiProvider(value)) { From da94636a9f0a6e2b9447611b224d98a637c9f0bf Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 09:38:48 +0530 Subject: [PATCH 02/20] chore: Skip Zendesk ticket tests for deprecated provider Skipped tests related to Zendesk ticket functionality due to proctortrack provider deprecation. --- plugins/course-apps/proctoring/Settings.test.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 6cdd33aa16..a2f024fe55 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -115,7 +115,8 @@ describe('ProctoredExamSettings', () => { expect(zendeskTicketInput.checked).toEqual(true); }); - it('Updates Zendesk ticket field if software_secure is provider', async () => { + it.skip('Updates Zendesk ticket field if software_secure is provider', async () => { + // Test skipped as proctortrack provider is being deprecated from the platform await waitFor(() => { screen.getByDisplayValue('mockproc'); }); @@ -863,7 +864,8 @@ describe('ProctoredExamSettings', () => { }); }); - it('Include Zendesk ticket in post request if user is not an admin', async () => { + it.skip('Include Zendesk ticket in post request if user is not an admin', async () => { + // Test skipped as proctortrack provider is being deprecated from the platform // use non-admin user for test const isAdmin = false; setupApp(isAdmin); From fd78dd6dbc478ad610dd2fa589b022bcb4ef81ac Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 10:21:29 +0530 Subject: [PATCH 03/20] chore: Skip proctortrack related tests in Settings.test.jsx Skip tests related to proctortrack provider updates. --- plugins/course-apps/proctoring/Settings.test.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index a2f024fe55..092e1f53d3 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -105,7 +105,7 @@ describe('ProctoredExamSettings', () => { await act(async () => render(intlWrapper())); }); - it('Updates Zendesk ticket field if proctortrack is provider', async () => { + it.skip('Updates Zendesk ticket field if proctortrack is provider', async () => { await waitFor(() => { screen.getByDisplayValue('mockproc'); }); @@ -607,7 +607,7 @@ describe('ProctoredExamSettings', () => { expect(submitButton).toHaveAttribute('disabled'); }); - it('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { + it.skip('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { await act(async () => render(intlWrapper())); // Make a change to the provider to proctortrack and set the email const selectElement = screen.getByDisplayValue('mockproc'); From 19a279ee3c0e9aef5b7fe95aa73f52c0f9b34e6d Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 10:33:47 +0530 Subject: [PATCH 04/20] chore: Skip tests for Proctortrack deprecation Updated tests to skip those related to Proctortrack deprecation. --- plugins/course-apps/proctoring/Settings.test.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 092e1f53d3..af6cfe96dc 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -105,6 +105,7 @@ describe('ProctoredExamSettings', () => { await act(async () => render(intlWrapper())); }); + // Test skipped due to Proctortrack deprecation it.skip('Updates Zendesk ticket field if proctortrack is provider', async () => { await waitFor(() => { screen.getByDisplayValue('mockproc'); @@ -115,8 +116,7 @@ describe('ProctoredExamSettings', () => { expect(zendeskTicketInput.checked).toEqual(true); }); - it.skip('Updates Zendesk ticket field if software_secure is provider', async () => { - // Test skipped as proctortrack provider is being deprecated from the platform + it('Updates Zendesk ticket field if software_secure is provider', async () => { await waitFor(() => { screen.getByDisplayValue('mockproc'); }); @@ -350,7 +350,8 @@ describe('ProctoredExamSettings', () => { expect(screen.queryByTestId('escalationEmail')).toBeNull(); }); - it(`Escalation email Field Show when proctoring backend is switched back to ${provider}`, async () => { + // Test skipped due to Proctortrack deprecation + it.skip(`Escalation email Field Show when proctoring backend is switched back to ${provider}`, async () => { await waitFor(() => { screen.getByDisplayValue('proctortrack'); }); @@ -607,6 +608,7 @@ describe('ProctoredExamSettings', () => { expect(submitButton).toHaveAttribute('disabled'); }); + // Test skipped due to Proctortrack deprecation it.skip('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { await act(async () => render(intlWrapper())); // Make a change to the provider to proctortrack and set the email @@ -864,8 +866,8 @@ describe('ProctoredExamSettings', () => { }); }); + // Test skipped due to Proctortrack deprecation it.skip('Include Zendesk ticket in post request if user is not an admin', async () => { - // Test skipped as proctortrack provider is being deprecated from the platform // use non-admin user for test const isAdmin = false; setupApp(isAdmin); From e1f198c6479bfe78ff0d12a3f8ffb32e843e94fd Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 10:49:00 +0530 Subject: [PATCH 05/20] chore: Skip alert test for invalid proctoring escalation email Updated test to skip due to Proctortrack deprecation and changed selector for escalation email input. --- plugins/course-apps/proctoring/Settings.test.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index af6cfe96dc..f5823dcea9 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -251,7 +251,8 @@ describe('ProctoredExamSettings', () => { expect(document.activeElement).toEqual(escalationEmailInput); }); - it(`Creates an alert when invalid proctoring escalation email is provided with ${provider} selected`, async () => { + // Test skipped due to Proctortrack deprecation + it.skip(`Creates an alert when invalid proctoring escalation email is provided with ${provider} selected`, async () => { await waitFor(() => { screen.getByDisplayValue('proctortrack'); }); @@ -259,7 +260,7 @@ describe('ProctoredExamSettings', () => { const selectElement = screen.getByDisplayValue('proctortrack'); fireEvent.change(selectElement, { target: { value: provider } }); - const selectEscalationEmailElement = screen.getByDisplayValue('test@example.com'); + const selectEscalationEmailElement = screen.getByTestId('escalationEmail'); fireEvent.change(selectEscalationEmailElement, { target: { value: 'foo.bar' } }); const proctoringForm = screen.getByTestId('proctoringForm'); fireEvent.submit(proctoringForm); From be5045062ecd81b87f37322b1c6bd58767611051 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 11:03:54 +0530 Subject: [PATCH 06/20] chore: Update test to select escalation email by display value --- plugins/course-apps/proctoring/Settings.test.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index f5823dcea9..51e8024e95 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -260,7 +260,7 @@ describe('ProctoredExamSettings', () => { const selectElement = screen.getByDisplayValue('proctortrack'); fireEvent.change(selectElement, { target: { value: provider } }); - const selectEscalationEmailElement = screen.getByTestId('escalationEmail'); + const selectEscalationEmailElement = screen.getByDisplayValue('test@example.com'); fireEvent.change(selectEscalationEmailElement, { target: { value: 'foo.bar' } }); const proctoringForm = screen.getByTestId('proctoringForm'); fireEvent.submit(proctoringForm); From 9942e167ea306be90f1f73509b46f408c1839ef1 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 11:52:46 +0530 Subject: [PATCH 07/20] chore: Remove deprecated Proctortrack tests from Settings.test.jsx Removed tests related to Proctortrack due to its deprecation. --- .../course-apps/proctoring/Settings.test.jsx | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 51e8024e95..006eb1298a 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -105,17 +105,6 @@ describe('ProctoredExamSettings', () => { await act(async () => render(intlWrapper())); }); - // Test skipped due to Proctortrack deprecation - it.skip('Updates Zendesk ticket field if proctortrack is provider', async () => { - await waitFor(() => { - screen.getByDisplayValue('mockproc'); - }); - const selectElement = screen.getByDisplayValue('mockproc'); - fireEvent.change(selectElement, { target: { value: 'proctortrack' } }); - const zendeskTicketInput = screen.getByTestId('createZendeskTicketsNo'); - expect(zendeskTicketInput.checked).toEqual(true); - }); - it('Updates Zendesk ticket field if software_secure is provider', async () => { await waitFor(() => { screen.getByDisplayValue('mockproc'); @@ -609,38 +598,6 @@ describe('ProctoredExamSettings', () => { expect(submitButton).toHaveAttribute('disabled'); }); - // Test skipped due to Proctortrack deprecation - it.skip('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { - await act(async () => render(intlWrapper())); - // Make a change to the provider to proctortrack and set the email - const selectElement = screen.getByDisplayValue('mockproc'); - fireEvent.change(selectElement, { target: { value: 'proctortrack' } }); - const escalationEmail = screen.getByTestId('escalationEmail'); - expect(escalationEmail.value).toEqual('test@example.com'); - fireEvent.change(escalationEmail, { target: { value: 'proctortrack@example.com' } }); - expect(escalationEmail.value).toEqual('proctortrack@example.com'); - const submitButton = screen.getByTestId('submissionButton'); - fireEvent.click(submitButton); - expect(axiosMock.history.post.length).toBe(1); - expect(JSON.parse(axiosMock.history.post[0].data)).toEqual({ - proctored_exam_settings: { - enable_proctored_exams: true, - allow_proctoring_opt_out: false, - proctoring_provider: 'proctortrack', - proctoring_escalation_email: 'proctortrack@example.com', - create_zendesk_tickets: false, - }, - }); - - await waitFor(() => { - const errorAlert = screen.getByTestId('saveSuccess'); - expect(errorAlert.textContent).toEqual( - expect.stringContaining('Proctored exam settings saved successfully.'), - ); - expect(document.activeElement).toEqual(errorAlert); - }); - }); - it('Makes API call successfully without proctoring_escalation_email if not proctortrack', async () => { await act(async () => render(intlWrapper())); From 60af877d64341357176b7dde4f320b8f0555a57a Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Tue, 7 Oct 2025 10:33:55 +0000 Subject: [PATCH 08/20] feat: remove Create Zendesk Tickets for suspicious attempts setting from Proctored Exam Settings --- plugins/course-apps/proctoring/Settings.jsx | 29 +--------- .../course-apps/proctoring/Settings.test.jsx | 58 +------------------ plugins/course-apps/proctoring/messages.js | 5 -- 3 files changed, 4 insertions(+), 88 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.jsx b/plugins/course-apps/proctoring/Settings.jsx index e6301bf983..5cce6f5453 100644 --- a/plugins/course-apps/proctoring/Settings.jsx +++ b/plugins/course-apps/proctoring/Settings.jsx @@ -32,7 +32,6 @@ const ProctoringSettings = ({ onClose }) => { proctoringProvider: false, escalationEmail: '', allowOptingOut: false, - createZendeskTickets: false, }; const [formValues, setFormValues] = useState(initialFormValues); const [loading, setLoading] = useState(true); @@ -78,14 +77,14 @@ const ProctoringSettings = ({ onClose }) => { const value = target.type === 'checkbox' ? target.checked : target.value; const { name } = target; - if (['allowOptingOut', 'createZendeskTickets'].includes(name)) { + if (['allowOptingOut'].includes(name)) { // Form.Radio expects string values, so convert back to a boolean here setFormValues({ ...formValues, [name]: value === 'true' }); } else if (name === 'proctoringProvider') { const newFormValues = { ...formValues, proctoringProvider: value }; if (value === 'software_secure') { - setFormValues({ ...newFormValues, createZendeskTickets: true }); + setFormValues({ ...newFormValues }); setShowEscalationEmail(false); } else if (isLtiProvider(value)) { setFormValues(newFormValues); @@ -113,7 +112,6 @@ const ProctoringSettings = ({ onClose }) => { enable_proctored_exams: formValues.enableProctoredExams, // lti providers are managed outside edx-platform, lti_external indicates this proctoring_provider: isLtiProviderSelected ? 'lti_external' : selectedProvider, - create_zendesk_tickets: formValues.createZendeskTickets, }, }; if (isEdxStaff) { @@ -384,29 +382,6 @@ const ProctoringSettings = ({ onClose }) => { )} - - {/* CREATE ZENDESK TICKETS */} - { isEdxStaff && formValues.enableProctoredExams && !isLtiProviderSelected && ( -
- - - {intl.formatMessage(messages['authoring.proctoring.createzendesk.label'])} - - - - {intl.formatMessage(messages['authoring.proctoring.yes'])} - - - {intl.formatMessage(messages['authoring.proctoring.no'])} - - - -
- )} ); } diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 006eb1298a..8aad9c9004 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -105,26 +105,6 @@ describe('ProctoredExamSettings', () => { await act(async () => render(intlWrapper())); }); - it('Updates Zendesk ticket field if software_secure is provider', async () => { - await waitFor(() => { - screen.getByDisplayValue('mockproc'); - }); - const selectElement = screen.getByDisplayValue('mockproc'); - fireEvent.change(selectElement, { target: { value: 'software_secure' } }); - const zendeskTicketInput = screen.getByTestId('createZendeskTicketsYes'); - expect(zendeskTicketInput.checked).toEqual(true); - }); - - it('Does not update zendesk ticket field for any other provider', async () => { - await waitFor(() => { - screen.getByDisplayValue('mockproc'); - }); - const selectElement = screen.getByDisplayValue('mockproc'); - fireEvent.change(selectElement, { target: { value: 'mockproc' } }); - const zendeskTicketInput = screen.getByTestId('createZendeskTicketsYes'); - expect(zendeskTicketInput.checked).toEqual(true); - }); - it('Hides all other fields when enabledProctorExam is false when first loaded', async () => { cleanup(); // Overrides the handler defined in beforeEach. @@ -151,8 +131,6 @@ describe('ProctoredExamSettings', () => { expect(screen.queryByText('Allow Opting Out of Proctored Exams')).toBeNull(); expect(screen.queryByDisplayValue('mockproc')).toBeNull(); expect(screen.queryByTestId('escalationEmail')).toBeNull(); - expect(screen.queryByTestId('createZendeskTicketsYes')).toBeNull(); - expect(screen.queryByTestId('createZendeskTicketsNo')).toBeNull(); }); it('Hides all other fields when enableProctoredExams toggled to false', async () => { @@ -162,8 +140,6 @@ describe('ProctoredExamSettings', () => { expect(screen.queryByText('Allow opting out of proctored exams')).toBeDefined(); expect(screen.queryByDisplayValue('mockproc')).toBeDefined(); expect(screen.queryByTestId('escalationEmail')).toBeDefined(); - expect(screen.queryByTestId('createZendeskTicketsYes')).toBeDefined(); - expect(screen.queryByTestId('createZendeskTicketsNo')).toBeDefined(); let enabledProctoredExamCheck = screen.getAllByLabelText('Proctored exams', { exact: false })[0]; expect(enabledProctoredExamCheck.checked).toEqual(true); @@ -173,8 +149,6 @@ describe('ProctoredExamSettings', () => { expect(screen.queryByText('Allow opting out of proctored exams')).toBeNull(); expect(screen.queryByDisplayValue('mockproc')).toBeNull(); expect(screen.queryByTestId('escalationEmail')).toBeNull(); - expect(screen.queryByTestId('createZendeskTicketsYes')).toBeNull(); - expect(screen.queryByTestId('createZendeskTicketsNo')).toBeNull(); }); it('Hides unsupported fields when lti provider is selected', async () => { @@ -519,18 +493,16 @@ describe('ProctoredExamSettings', () => { }); describe('Toggles field visibility based on user permissions', () => { - it('Hides opting out and zendesk tickets for non edX staff', async () => { + it('Hides opting out for non edX staff', async () => { setupApp(false); await act(async () => render(intlWrapper())); expect(screen.queryByTestId('allowOptingOutYes')).toBeNull(); - expect(screen.queryByTestId('createZendeskTicketsYes')).toBeNull(); }); - it('Shows opting out and zendesk tickets for edX staff', async () => { + it('Shows opting out for edX staff', async () => { setupApp(true); await act(async () => render(intlWrapper())); expect(screen.queryByTestId('allowOptingOutYes')).not.toBeNull(); - expect(screen.queryByTestId('createZendeskTicketsYes')).not.toBeNull(); }); }); @@ -653,7 +625,6 @@ describe('ProctoredExamSettings', () => { enable_proctored_exams: true, allow_proctoring_opt_out: false, proctoring_provider: 'lti_external', - create_zendesk_tickets: true, }, }); @@ -705,7 +676,6 @@ describe('ProctoredExamSettings', () => { allow_proctoring_opt_out: false, proctoring_provider: 'mockproc', proctoring_escalation_email: 'test@example.com', - create_zendesk_tickets: true, }, available_proctoring_providers: ['software_secure', 'proctortrack', 'mockproc'], course_start_date: '2070-01-01T00:00:00Z', @@ -723,7 +693,6 @@ describe('ProctoredExamSettings', () => { enable_proctored_exams: true, allow_proctoring_opt_out: false, proctoring_provider: 'mockproc', - create_zendesk_tickets: true, }, }); @@ -823,28 +792,5 @@ describe('ProctoredExamSettings', () => { expect(document.activeElement).toEqual(successAlert); }); }); - - // Test skipped due to Proctortrack deprecation - it.skip('Include Zendesk ticket in post request if user is not an admin', async () => { - // use non-admin user for test - const isAdmin = false; - setupApp(isAdmin); - - await act(async () => render(intlWrapper())); - // Make a change to the proctoring provider - const selectElement = screen.getByDisplayValue('mockproc'); - fireEvent.change(selectElement, { target: { value: 'proctortrack' } }); - const submitButton = screen.getByTestId('submissionButton'); - fireEvent.click(submitButton); - expect(axiosMock.history.post.length).toBe(1); - expect(JSON.parse(axiosMock.history.post[0].data)).toEqual({ - proctored_exam_settings: { - enable_proctored_exams: true, - proctoring_provider: 'proctortrack', - proctoring_escalation_email: 'test@example.com', - create_zendesk_tickets: false, - }, - }); - }); }); }); diff --git a/plugins/course-apps/proctoring/messages.js b/plugins/course-apps/proctoring/messages.js index b5192c1fea..ed4d652fb3 100644 --- a/plugins/course-apps/proctoring/messages.js +++ b/plugins/course-apps/proctoring/messages.js @@ -81,11 +81,6 @@ const messages = defineMessages({ defaultMessage: 'Allow learners to opt out of proctoring on proctored exams', description: 'Label for radio selection allowing proctored exam opt out', }, - 'authoring.proctoring.createzendesk.label': { - id: 'authoring.proctoring.createzendesk.label', - defaultMessage: 'Create Zendesk tickets for suspicious attempts', - description: 'Label for Zendesk ticket creation radio select.', - }, 'authoring.proctoring.error.single': { id: 'authoring.proctoring.error.single', defaultMessage: 'There is 1 error in this form.', From a7c60e014e6989883dff43413c37a75078904de2 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Tue, 7 Oct 2025 16:25:32 +0530 Subject: [PATCH 09/20] feat: Remove create_zendesk_tickets from test settings Removed 'create_zendesk_tickets' from proctored exam settings in tests. --- plugins/course-apps/proctoring/Settings.test.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 8aad9c9004..289a753acd 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -584,7 +584,6 @@ describe('ProctoredExamSettings', () => { enable_proctored_exams: true, allow_proctoring_opt_out: false, proctoring_provider: 'mockproc', - create_zendesk_tickets: true, }, }); @@ -654,7 +653,6 @@ describe('ProctoredExamSettings', () => { enable_proctored_exams: true, allow_proctoring_opt_out: false, proctoring_provider: 'mockproc', - create_zendesk_tickets: true, }, }); From c834e8dd92a70b58fea9cbb6da38c48a9a4799af Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 07:15:53 +0530 Subject: [PATCH 10/20] chore: Update proctoring provider logic in Settings.jsx --- plugins/course-apps/proctoring/Settings.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.jsx b/plugins/course-apps/proctoring/Settings.jsx index 5cce6f5453..5d59462120 100644 --- a/plugins/course-apps/proctoring/Settings.jsx +++ b/plugins/course-apps/proctoring/Settings.jsx @@ -82,8 +82,10 @@ const ProctoringSettings = ({ onClose }) => { setFormValues({ ...formValues, [name]: value === 'true' }); } else if (name === 'proctoringProvider') { const newFormValues = { ...formValues, proctoringProvider: value }; - - if (value === 'software_secure') { + + if (value === 'proctortrack') { + setShowEscalationEmail(true); + } else if (value === 'software_secure') { setFormValues({ ...newFormValues }); setShowEscalationEmail(false); } else if (isLtiProvider(value)) { From d656b9438292d0a1b61280413ceb9f954d5663d6 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 07:21:41 +0530 Subject: [PATCH 11/20] chore: Update proctoring escalation email tests --- .../course-apps/proctoring/Settings.test.jsx | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 289a753acd..17239e5739 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -214,8 +214,7 @@ describe('ProctoredExamSettings', () => { expect(document.activeElement).toEqual(escalationEmailInput); }); - // Test skipped due to Proctortrack deprecation - it.skip(`Creates an alert when invalid proctoring escalation email is provided with ${provider} selected`, async () => { + it.(`Creates an alert when invalid proctoring escalation email is provided with ${provider} selected`, async () => { await waitFor(() => { screen.getByDisplayValue('proctortrack'); }); @@ -569,7 +568,38 @@ describe('ProctoredExamSettings', () => { submitButton = screen.getByTestId('submissionButton'); expect(submitButton).toHaveAttribute('disabled'); }); + + it('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { + await act(async () => render(intlWrapper()));Expand commentComment on line L610Code has comments. Press enter to view. + // Make a change to the provider to proctortrack and set the email + const selectElement = screen.getByDisplayValue('mockproc'); + fireEvent.change(selectElement, { target: { value: 'proctortrack' } }); + const escalationEmail = screen.getByTestId('escalationEmail'); + expect(escalationEmail.value).toEqual('test@example.com'); + fireEvent.change(escalationEmail, { target: { value: 'proctortrack@example.com' } }); + expect(escalationEmail.value).toEqual('proctortrack@example.com'); + const submitButton = screen.getByTestId('submissionButton'); + fireEvent.click(submitButton); + expect(axiosMock.history.post.length).toBe(1); + expect(JSON.parse(axiosMock.history.post[0].data)).toEqual({ + proctored_exam_settings: { + enable_proctored_exams: true, + allow_proctoring_opt_out: false, + proctoring_provider: 'proctortrack', + proctoring_escalation_email: 'proctortrack@example.com', + create_zendesk_tickets: false, + }, + }); + await waitFor(() => { + const errorAlert = screen.getByTestId('saveSuccess'); + expect(errorAlert.textContent).toEqual( + expect.stringContaining('Proctored exam settings saved successfully.'), + ); + expect(document.activeElement).toEqual(errorAlert); + }); + }); + it('Makes API call successfully without proctoring_escalation_email if not proctortrack', async () => { await act(async () => render(intlWrapper())); From 5cd57ddc1fb94be7302fc7ab5f4199631d837e76 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 07:24:03 +0530 Subject: [PATCH 12/20] chore: Fix indentation in proctoring settings test --- plugins/course-apps/proctoring/Settings.test.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 17239e5739..7e34424608 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -570,7 +570,7 @@ describe('ProctoredExamSettings', () => { }); it('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { - await act(async () => render(intlWrapper()));Expand commentComment on line L610Code has comments. Press enter to view. + await act(async () => render(intlWrapper())); // Make a change to the provider to proctortrack and set the email const selectElement = screen.getByDisplayValue('mockproc'); fireEvent.change(selectElement, { target: { value: 'proctortrack' } }); From fa576c897f4363900f96142178e073d58d5df854 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 07:31:48 +0530 Subject: [PATCH 13/20] chore: Refactor proctoring provider handling in Settings --- plugins/course-apps/proctoring/Settings.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/course-apps/proctoring/Settings.jsx b/plugins/course-apps/proctoring/Settings.jsx index 5d59462120..0ffb8701d9 100644 --- a/plugins/course-apps/proctoring/Settings.jsx +++ b/plugins/course-apps/proctoring/Settings.jsx @@ -82,7 +82,6 @@ const ProctoringSettings = ({ onClose }) => { setFormValues({ ...formValues, [name]: value === 'true' }); } else if (name === 'proctoringProvider') { const newFormValues = { ...formValues, proctoringProvider: value }; - if (value === 'proctortrack') { setShowEscalationEmail(true); } else if (value === 'software_secure') { From 9ecc0eff1ef7a6e1eb3ca9689fef3d1d7b6d6ee2 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 07:38:06 +0530 Subject: [PATCH 14/20] chore: Fix test case description formatting for proctoring --- plugins/course-apps/proctoring/Settings.test.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 7e34424608..3f7d61ccfa 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -214,7 +214,7 @@ describe('ProctoredExamSettings', () => { expect(document.activeElement).toEqual(escalationEmailInput); }); - it.(`Creates an alert when invalid proctoring escalation email is provided with ${provider} selected`, async () => { + it(`Creates an alert when invalid proctoring escalation email is provided with ${provider} selected`, async () => { await waitFor(() => { screen.getByDisplayValue('proctortrack'); }); From 2a65c9633f69485b08dc692f7a14bf480c3090f2 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 07:57:12 +0530 Subject: [PATCH 15/20] chore: Remove unnecessary whitespace in Settings.test.jsx --- plugins/course-apps/proctoring/Settings.test.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 3f7d61ccfa..de6e27e02c 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -568,7 +568,7 @@ describe('ProctoredExamSettings', () => { submitButton = screen.getByTestId('submissionButton'); expect(submitButton).toHaveAttribute('disabled'); }); - + it('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { await act(async () => render(intlWrapper())); // Make a change to the provider to proctortrack and set the email @@ -599,7 +599,7 @@ describe('ProctoredExamSettings', () => { expect(document.activeElement).toEqual(errorAlert); }); }); - + it('Makes API call successfully without proctoring_escalation_email if not proctortrack', async () => { await act(async () => render(intlWrapper())); From 1af31bb4bad472f01a7be7f6001e89826d64b8a6 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 08:17:00 +0530 Subject: [PATCH 16/20] chore: Remove create_zendesk_tickets from settings test Removed the 'create_zendesk_tickets' property from the settings object in the test. --- plugins/course-apps/proctoring/Settings.test.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index de6e27e02c..283e494434 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -587,7 +587,6 @@ describe('ProctoredExamSettings', () => { allow_proctoring_opt_out: false, proctoring_provider: 'proctortrack', proctoring_escalation_email: 'proctortrack@example.com', - create_zendesk_tickets: false, }, }); From 31e9e7cb8e24f79f091692ba3089954711eb78af Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 08:38:39 +0530 Subject: [PATCH 17/20] chore: Update proctoring settings handling Add logic to set form values and show escalation email based on proctoring provider selection. --- plugins/course-apps/proctoring/Settings.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/course-apps/proctoring/Settings.jsx b/plugins/course-apps/proctoring/Settings.jsx index 0ffb8701d9..8725a1d685 100644 --- a/plugins/course-apps/proctoring/Settings.jsx +++ b/plugins/course-apps/proctoring/Settings.jsx @@ -83,6 +83,7 @@ const ProctoringSettings = ({ onClose }) => { } else if (name === 'proctoringProvider') { const newFormValues = { ...formValues, proctoringProvider: value }; if (value === 'proctortrack') { + setFormValues(newFormValues); setShowEscalationEmail(true); } else if (value === 'software_secure') { setFormValues({ ...newFormValues }); From 92b980798a6de4e3b8737f9127a18f50ff5a569a Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 12:24:03 +0530 Subject: [PATCH 18/20] chore: Enable test for escalation email field visibility --- plugins/course-apps/proctoring/Settings.test.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 283e494434..3da7f7147e 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -313,8 +313,8 @@ describe('ProctoredExamSettings', () => { expect(screen.queryByTestId('escalationEmail')).toBeNull(); }); - // Test skipped due to Proctortrack deprecation - it.skip(`Escalation email Field Show when proctoring backend is switched back to ${provider}`, async () => { + + it(`Escalation email Field Show when proctoring backend is switched back to ${provider}`, async () => { await waitFor(() => { screen.getByDisplayValue('proctortrack'); }); From a1ea9dcc61b8ab6ae770e6d5080e24ad984246ed Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 8 Oct 2025 12:28:25 +0530 Subject: [PATCH 19/20] chore: Remove unnecessary blank line in Settings.test.jsx --- plugins/course-apps/proctoring/Settings.test.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 3da7f7147e..30a2f25057 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -313,7 +313,6 @@ describe('ProctoredExamSettings', () => { expect(screen.queryByTestId('escalationEmail')).toBeNull(); }); - it(`Escalation email Field Show when proctoring backend is switched back to ${provider}`, async () => { await waitFor(() => { screen.getByDisplayValue('proctortrack'); From af03a5f0f82c1a68f677eb7ee9e28e081c5439d1 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 13 Oct 2025 10:43:15 +0530 Subject: [PATCH 20/20] feat: Remove createZendeskTickets from settings Removed createZendeskTickets from form values. --- plugins/course-apps/proctoring/Settings.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/course-apps/proctoring/Settings.jsx b/plugins/course-apps/proctoring/Settings.jsx index 8725a1d685..9a4a1329dc 100644 --- a/plugins/course-apps/proctoring/Settings.jsx +++ b/plugins/course-apps/proctoring/Settings.jsx @@ -544,7 +544,6 @@ const ProctoringSettings = ({ onClose }) => { proctoringProvider: selectedProvider, enableProctoredExams: proctoredExamSettings.enable_proctored_exams, allowOptingOut: proctoredExamSettings.allow_proctoring_opt_out, - createZendeskTickets: proctoredExamSettings.create_zendesk_tickets, // The backend API may return null for the proctoringEscalationEmail value, which is the default. // In order to keep our email input component controlled, we use the empty string as the default // and perform this conversion during GETs and POSTs.