@openedx/frontend-app-instructor-dashboard 1.0.0-alpha.25 → 1.0.0-alpha.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/certificates/CertificatesPage.d.ts +1 -1
- package/dist/certificates/CertificatesPage.js +107 -55
- package/dist/certificates/CertificatesPage.js.map +1 -1
- package/dist/certificates/CertificatesPage.scss +9 -0
- package/dist/certificates/components/CertificateTable.d.ts +1 -1
- package/dist/certificates/components/CertificateTable.js +9 -6
- package/dist/certificates/components/CertificateTable.js.map +1 -1
- package/dist/certificates/components/CertificatesPageHeader.js +3 -3
- package/dist/certificates/components/CertificatesPageHeader.js.map +1 -1
- package/dist/certificates/components/CertificatesToolbar.d.ts +2 -1
- package/dist/certificates/components/CertificatesToolbar.js +23 -3
- package/dist/certificates/components/CertificatesToolbar.js.map +1 -1
- package/dist/certificates/components/DisableCertificatesModal.js +1 -1
- package/dist/certificates/components/DisableCertificatesModal.js.map +1 -1
- package/dist/certificates/components/FilterDropdown.d.ts +1 -1
- package/dist/certificates/components/FilterDropdown.js +2 -2
- package/dist/certificates/components/FilterDropdown.js.map +1 -1
- package/dist/certificates/components/GenerationHistoryTable.d.ts +2 -2
- package/dist/certificates/components/GenerationHistoryTable.js +3 -18
- package/dist/certificates/components/GenerationHistoryTable.js.map +1 -1
- package/dist/certificates/components/GrantExceptionsModal.d.ts +1 -1
- package/dist/certificates/components/GrantExceptionsModal.js +2 -2
- package/dist/certificates/components/GrantExceptionsModal.js.map +1 -1
- package/dist/certificates/components/InvalidateCertificateModal.d.ts +1 -1
- package/dist/certificates/components/InvalidateCertificateModal.js +2 -2
- package/dist/certificates/components/InvalidateCertificateModal.js.map +1 -1
- package/dist/certificates/components/IssuedCertificatesTab.d.ts +1 -1
- package/dist/certificates/components/IssuedCertificatesTab.js +2 -2
- package/dist/certificates/components/IssuedCertificatesTab.js.map +1 -1
- package/dist/certificates/components/LearnerActionModal.d.ts +1 -1
- package/dist/certificates/components/LearnerActionModal.js +7 -2
- package/dist/certificates/components/LearnerActionModal.js.map +1 -1
- package/dist/certificates/components/RemoveExceptionModal.d.ts +9 -0
- package/dist/certificates/components/RemoveExceptionModal.js +10 -0
- package/dist/certificates/components/RemoveExceptionModal.js.map +1 -0
- package/dist/certificates/components/RemoveInvalidationModal.js +1 -1
- package/dist/certificates/components/RemoveInvalidationModal.js.map +1 -1
- package/dist/certificates/data/api.d.ts +17 -3
- package/dist/certificates/data/api.js +60 -8
- package/dist/certificates/data/api.js.map +1 -1
- package/dist/certificates/data/apiHook.d.ts +25 -5
- package/dist/certificates/data/apiHook.js +30 -2
- package/dist/certificates/data/apiHook.js.map +1 -1
- package/dist/certificates/data/queryKeys.d.ts +2 -1
- package/dist/certificates/data/queryKeys.js +1 -0
- package/dist/certificates/data/queryKeys.js.map +1 -1
- package/dist/certificates/messages.d.ts +30 -0
- package/dist/certificates/messages.js +30 -0
- package/dist/certificates/messages.js.map +1 -1
- package/dist/certificates/types.d.ts +7 -2
- package/dist/certificates/types.js.map +1 -1
- package/dist/certificates/utils/filterUtils.d.ts +1 -1
- package/dist/certificates/utils/filterUtils.js +1 -1
- package/dist/certificates/utils/filterUtils.js.map +1 -1
- package/dist/certificates/utils/index.d.ts +2 -2
- package/dist/certificates/utils/index.js +1 -1
- package/dist/certificates/utils/index.js.map +1 -1
- package/dist/components/SpecifyLearnerField.js +10 -4
- package/dist/components/SpecifyLearnerField.js.map +1 -1
- package/dist/components/messages.d.ts +5 -0
- package/dist/components/messages.js +6 -1
- package/dist/components/messages.js.map +1 -1
- package/dist/courseInfo/types.d.ts +2 -0
- package/dist/courseInfo/types.js.map +1 -1
- package/dist/courseTeam/CourseTeamPage.js +7 -2
- package/dist/courseTeam/CourseTeamPage.js.map +1 -1
- package/dist/courseTeam/messages.d.ts +5 -0
- package/dist/courseTeam/messages.js +5 -0
- package/dist/courseTeam/messages.js.map +1 -1
- package/dist/specialExams/SpecialExamsPage.js +6 -2
- package/dist/specialExams/SpecialExamsPage.js.map +1 -1
- package/dist/specialExams/components/AddAllowanceModal.d.ts +6 -0
- package/dist/specialExams/components/AddAllowanceModal.js +84 -0
- package/dist/specialExams/components/AddAllowanceModal.js.map +1 -0
- package/dist/specialExams/components/Allowances.js +28 -2
- package/dist/specialExams/components/Allowances.js.map +1 -1
- package/dist/specialExams/components/AllowancesList.d.ts +8 -0
- package/dist/specialExams/components/AllowancesList.js +58 -0
- package/dist/specialExams/components/AllowancesList.js.map +1 -0
- package/dist/specialExams/components/AttemptsList.js +8 -7
- package/dist/specialExams/components/AttemptsList.js.map +1 -1
- package/dist/specialExams/components/DeleteAllowanceModal.d.ts +8 -0
- package/dist/specialExams/components/DeleteAllowanceModal.js +29 -0
- package/dist/specialExams/components/DeleteAllowanceModal.js.map +1 -0
- package/dist/specialExams/components/EditAllowanceModal.d.ts +8 -0
- package/dist/specialExams/components/EditAllowanceModal.js +62 -0
- package/dist/specialExams/components/EditAllowanceModal.js.map +1 -0
- package/dist/specialExams/constants.d.ts +43 -0
- package/dist/specialExams/constants.js +19 -0
- package/dist/specialExams/constants.js.map +1 -0
- package/dist/specialExams/data/api.d.ts +5 -1
- package/dist/specialExams/data/api.js +28 -2
- package/dist/specialExams/data/api.js.map +1 -1
- package/dist/specialExams/data/apiHook.d.ts +5 -1
- package/dist/specialExams/data/apiHook.js +30 -2
- package/dist/specialExams/data/apiHook.js.map +1 -1
- package/dist/specialExams/data/queryKeys.d.ts +4 -1
- package/dist/specialExams/data/queryKeys.js +4 -1
- package/dist/specialExams/data/queryKeys.js.map +1 -1
- package/dist/specialExams/messages.d.ts +165 -0
- package/dist/specialExams/messages.js +165 -0
- package/dist/specialExams/messages.js.map +1 -1
- package/dist/specialExams/types.d.ts +55 -4
- package/dist/specialExams/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/certificates/data/dummyData.d.ts +0 -2
- package/dist/certificates/data/dummyData.js +0 -234
- package/dist/certificates/data/dummyData.js.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useParams } from 'react-router-dom';
|
|
3
|
+
import { useIntl } from '@openedx/frontend-base';
|
|
4
|
+
import { Button, ModalDialog } from '@openedx/paragon';
|
|
5
|
+
import { useDeleteAllowance } from '../../specialExams/data/apiHook';
|
|
6
|
+
import messages from '../../specialExams/messages';
|
|
7
|
+
import { useAlert } from '../../providers/AlertProvider';
|
|
8
|
+
const DeleteAllowanceModal = ({ allowance, isOpen, onClose }) => {
|
|
9
|
+
const { courseId = '' } = useParams();
|
|
10
|
+
const intl = useIntl();
|
|
11
|
+
const { mutate: deleteAllowance, isPending } = useDeleteAllowance(courseId);
|
|
12
|
+
const { showModal } = useAlert();
|
|
13
|
+
const handleDelete = () => {
|
|
14
|
+
deleteAllowance({ examId: allowance.proctoredExam.id, userIds: [allowance.user.id], allowanceType: allowance.key }, {
|
|
15
|
+
onSuccess: () => {
|
|
16
|
+
onClose();
|
|
17
|
+
},
|
|
18
|
+
onError: () => {
|
|
19
|
+
showModal({
|
|
20
|
+
message: intl.formatMessage(messages.deleteError),
|
|
21
|
+
variant: 'danger',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
return (_jsxs(ModalDialog, { isOpen: isOpen, onClose: onClose, title: intl.formatMessage(messages.deleteAllowance), isOverflowVisible: false, children: [_jsx(ModalDialog.Body, { className: "pt-4 px-4 pb-2.5", children: _jsx("p", { children: intl.formatMessage(messages.deleteConfirmation, { user: allowance.user.username, examName: allowance.proctoredExam.examName }) }) }), _jsxs(ModalDialog.Footer, { className: "pt-2", children: [_jsx(Button, { variant: "tertiary", onClick: onClose, children: intl.formatMessage(messages.cancel) }), _jsx(Button, { className: "ml-2", onClick: handleDelete, disabled: isPending, children: intl.formatMessage(messages.delete) })] })] }));
|
|
27
|
+
};
|
|
28
|
+
export default DeleteAllowanceModal;
|
|
29
|
+
//# sourceMappingURL=DeleteAllowanceModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteAllowanceModal.js","sourceRoot":"","sources":["../../../src/specialExams/components/DeleteAllowanceModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAQxD,MAAM,oBAAoB,GAAG,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAwB,EAAE,EAAE;IACpF,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,SAAS,EAAE,CAAC;IACtC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC5E,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,CAAC;IACjC,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,eAAe,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,SAAS,CAAC,GAAG,EAAE,EAAE;YAClH,SAAS,EAAE,GAAG,EAAE;gBACd,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,OAAO,EAAE,GAAG,EAAE;gBACZ,SAAS,CAAC;oBACR,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC;oBACjD,OAAO,EAAE,QAAQ;iBAClB,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,iBAAiB,EAAE,KAAK,aAC1H,KAAC,WAAW,CAAC,IAAI,IAAC,SAAS,EAAC,kBAAkB,YAC5C,sBAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,GAAK,GACtH,EACnB,MAAC,WAAW,CAAC,MAAM,IAAC,SAAS,EAAC,MAAM,aAClC,KAAC,MAAM,IAAC,OAAO,EAAC,UAAU,EAAC,OAAO,EAAE,OAAO,YAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAU,EAC3F,KAAC,MAAM,IACL,SAAS,EAAC,MAAM,EAChB,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,SAAS,YAElB,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,GAC7B,IACU,IACT,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { useParams } from 'react-router-dom';\nimport { useIntl } from '@openedx/frontend-base';\nimport { Button, ModalDialog } from '@openedx/paragon';\nimport { useDeleteAllowance } from '@src/specialExams/data/apiHook';\nimport messages from '@src/specialExams/messages';\nimport { Allowance } from '@src/specialExams/types';\nimport { useAlert } from '@src/providers/AlertProvider';\n\ninterface DeleteAllowanceProps {\n allowance: Allowance,\n isOpen: boolean,\n onClose: () => void,\n}\n\nconst DeleteAllowanceModal = ({ allowance, isOpen, onClose }: DeleteAllowanceProps) => {\n const { courseId = '' } = useParams();\n const intl = useIntl();\n const { mutate: deleteAllowance, isPending } = useDeleteAllowance(courseId);\n const { showModal } = useAlert();\n const handleDelete = () => {\n deleteAllowance({ examId: allowance.proctoredExam.id, userIds: [allowance.user.id], allowanceType: allowance.key }, {\n onSuccess: () => {\n onClose();\n },\n onError: () => {\n showModal({\n message: intl.formatMessage(messages.deleteError),\n variant: 'danger',\n });\n }\n });\n };\n\n return (\n <ModalDialog isOpen={isOpen} onClose={onClose} title={intl.formatMessage(messages.deleteAllowance)} isOverflowVisible={false}>\n <ModalDialog.Body className=\"pt-4 px-4 pb-2.5\">\n <p>{intl.formatMessage(messages.deleteConfirmation, { user: allowance.user.username, examName: allowance.proctoredExam.examName })}</p>\n </ModalDialog.Body>\n <ModalDialog.Footer className=\"pt-2\">\n <Button variant=\"tertiary\" onClick={onClose}>{intl.formatMessage(messages.cancel)}</Button>\n <Button\n className=\"ml-2\"\n onClick={handleDelete}\n disabled={isPending}\n >\n {intl.formatMessage(messages.delete)}\n </Button>\n </ModalDialog.Footer>\n </ModalDialog>\n );\n};\n\nexport default DeleteAllowanceModal;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Allowance } from '../../specialExams/types';
|
|
2
|
+
interface EditAllowanceModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
allowance: Allowance;
|
|
6
|
+
}
|
|
7
|
+
declare const EditAllowanceModal: ({ isOpen, onClose, allowance }: EditAllowanceModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export default EditAllowanceModal;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { useParams } from 'react-router-dom';
|
|
4
|
+
import { useIntl } from '@openedx/frontend-base';
|
|
5
|
+
import { ActionRow, Button, Form, ModalDialog } from '@openedx/paragon';
|
|
6
|
+
import SpecifyLearnerField from '../../components/SpecifyLearnerField';
|
|
7
|
+
import { useLearner } from '../../data/apiHook';
|
|
8
|
+
import { addLabel, addPlaceholder, allowanceTypesOptions } from '../../specialExams/constants';
|
|
9
|
+
import { useAddAllowance } from '../../specialExams/data/apiHook';
|
|
10
|
+
import messages from '../../specialExams/messages';
|
|
11
|
+
import { useAlert } from '../../providers/AlertProvider';
|
|
12
|
+
const EditAllowanceModal = ({ isOpen, onClose, allowance }) => {
|
|
13
|
+
const intl = useIntl();
|
|
14
|
+
const { courseId = '' } = useParams();
|
|
15
|
+
const { mutate: editAllowance } = useAddAllowance(courseId);
|
|
16
|
+
const { data: learner, refetch } = useLearner(courseId, allowance.user.username);
|
|
17
|
+
const [editedAllowance, setEditedAllowance] = useState({
|
|
18
|
+
allowanceType: allowance.key,
|
|
19
|
+
value: allowance.value,
|
|
20
|
+
});
|
|
21
|
+
const { showModal } = useAlert();
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (isOpen) {
|
|
24
|
+
// Refetch learner data when modal opens to ensure we have the most up-to-date information
|
|
25
|
+
refetch();
|
|
26
|
+
}
|
|
27
|
+
}, [isOpen, refetch]);
|
|
28
|
+
const handleChanges = (e) => {
|
|
29
|
+
const { name, value } = e.target;
|
|
30
|
+
setEditedAllowance(prev => (Object.assign(Object.assign({}, prev), { [name]: value })));
|
|
31
|
+
};
|
|
32
|
+
const hasChanges = useMemo(() => {
|
|
33
|
+
return (editedAllowance.allowanceType !== allowance.key && editedAllowance.allowanceType !== '')
|
|
34
|
+
|| editedAllowance.value !== allowance.value;
|
|
35
|
+
}, [editedAllowance, allowance]);
|
|
36
|
+
const handleEdit = (e) => {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
editAllowance({
|
|
39
|
+
examType: allowance.proctoredExam.examType,
|
|
40
|
+
allowanceType: editedAllowance.allowanceType,
|
|
41
|
+
value: editedAllowance.value,
|
|
42
|
+
userIds: [allowance.user.username],
|
|
43
|
+
examIds: [allowance.proctoredExam.id],
|
|
44
|
+
}, {
|
|
45
|
+
onSuccess: () => {
|
|
46
|
+
onClose();
|
|
47
|
+
},
|
|
48
|
+
onError: () => {
|
|
49
|
+
showModal({
|
|
50
|
+
message: intl.formatMessage(messages.editAllowanceError),
|
|
51
|
+
variant: 'danger',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
if (!(learner === null || learner === void 0 ? void 0 : learner.username)) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return (_jsxs(ModalDialog, { isOpen: isOpen, onClose: onClose, title: intl.formatMessage(messages.editAllowance), isOverflowVisible: false, size: "lg", children: [_jsx(ModalDialog.Header, { className: "border-bottom border-light-700", children: _jsx(ModalDialog.Title, { className: "text-primary-700", children: intl.formatMessage(messages.editAllowance) }) }), _jsxs(Form, { className: "position-relative overflow-auto", onSubmit: handleEdit, children: [_jsxs(ModalDialog.Body, { children: [_jsx(Form.Group, { controlId: "learner-info", children: _jsx(SpecifyLearnerField, { learner: learner, onClickSelect: () => { } }) }), _jsxs(Form.Group, { controlId: "select-exam-type", children: [_jsxs(Form.Label, { className: "text-primary-500 x-small", children: [intl.formatMessage(messages.selectExamType), ":"] }), _jsx(Form.Control, { as: "select", disabled: true, children: _jsx("option", { value: "", children: allowance.proctoredExam.examType }) })] }), _jsxs(Form.Group, { controlId: "select-exams", children: [_jsxs(Form.Label, { className: "text-primary-500 x-small", children: [intl.formatMessage(messages.selectExams), ":"] }), _jsx("div", { children: _jsx(Form.Checkbox, { className: "mt-2", checked: true, disabled: true, labelClassName: "text-primary-500", children: allowance.proctoredExam.examName }, allowance.proctoredExam.examName) })] }), _jsxs(Form.Group, { controlId: "select-allowance-type", children: [_jsxs(Form.Label, { className: "text-primary-500 x-small", children: [intl.formatMessage(messages.selectAllowanceType), ":"] }), _jsx(Form.Control, { as: "select", name: "allowanceType", onChange: handleChanges, value: editedAllowance.allowanceType, children: allowanceTypesOptions.map(option => (_jsx("option", { value: option.value, children: intl.formatMessage(option.label) }, option.value))) })] }), _jsxs(Form.Group, { controlId: "allowance-value", children: [_jsxs(Form.Label, { className: "text-primary-500 x-small", children: [intl.formatMessage(addLabel[editedAllowance.allowanceType || 'additional_time_granted']), ":"] }), _jsx(Form.Control, { type: editedAllowance.allowanceType === 'review_policy_exception' ? 'text' : 'number', placeholder: intl.formatMessage(addPlaceholder[editedAllowance.allowanceType || 'additional_time_granted']), name: "value", value: editedAllowance.value, onChange: handleChanges })] })] }), _jsx(ModalDialog.Footer, { className: "border-top border-light-700", children: _jsxs(ActionRow, { children: [_jsx(Button, { variant: "tertiary", onClick: onClose, children: intl.formatMessage(messages.cancel) }), _jsx(Button, { variant: "primary", type: "submit", disabled: !hasChanges, children: intl.formatMessage(messages.editAllowance) })] }) })] })] }));
|
|
60
|
+
};
|
|
61
|
+
export default EditAllowanceModal;
|
|
62
|
+
//# sourceMappingURL=EditAllowanceModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditAllowanceModal.js","sourceRoot":"","sources":["../../../src/specialExams/components/EditAllowanceModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,mBAAmB,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,QAAQ,MAAM,4BAA4B,C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J,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { useIntl } from '@openedx/frontend-base';\nimport { ActionRow, Button, Form, ModalDialog } from '@openedx/paragon';\nimport SpecifyLearnerField from '@src/components/SpecifyLearnerField';\nimport { useLearner } from '@src/data/apiHook';\nimport { addLabel, addPlaceholder, allowanceTypesOptions } from '@src/specialExams/constants';\nimport { useAddAllowance } from '@src/specialExams/data/apiHook';\nimport messages from '@src/specialExams/messages';\nimport { Allowance } from '@src/specialExams/types';\nimport { useAlert } from '@src/providers/AlertProvider';\n\ninterface EditAllowanceModalProps {\n isOpen: boolean,\n onClose: () => void,\n allowance: Allowance,\n}\n\nconst EditAllowanceModal = ({ isOpen, onClose, allowance }: EditAllowanceModalProps) => {\n const intl = useIntl();\n const { courseId = '' } = useParams<{ courseId: string }>();\n const { mutate: editAllowance } = useAddAllowance(courseId);\n const { data: learner, refetch } = useLearner(courseId, allowance.user.username);\n const [editedAllowance, setEditedAllowance] = useState({\n allowanceType: allowance.key,\n value: allowance.value,\n });\n const { showModal } = useAlert();\n\n useEffect(() => {\n if (isOpen) {\n // Refetch learner data when modal opens to ensure we have the most up-to-date information\n refetch();\n }\n }, [isOpen, refetch]);\n\n const handleChanges = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>) => {\n const { name, value } = e.target;\n setEditedAllowance(prev => ({ ...prev, [name]: value }));\n };\n\n const hasChanges = useMemo(() => {\n return (editedAllowance.allowanceType !== allowance.key && editedAllowance.allowanceType !== '')\n || editedAllowance.value !== allowance.value;\n }, [editedAllowance, allowance]);\n\n const handleEdit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n editAllowance({\n examType: allowance.proctoredExam.examType,\n allowanceType: editedAllowance.allowanceType,\n value: editedAllowance.value,\n userIds: [allowance.user.username],\n examIds: [allowance.proctoredExam.id],\n }, {\n onSuccess: () => {\n onClose();\n },\n onError: () => {\n showModal({\n message: intl.formatMessage(messages.editAllowanceError),\n variant: 'danger',\n });\n }\n });\n };\n\n if (!learner?.username) {\n return null;\n }\n\n return (\n <ModalDialog isOpen={isOpen} onClose={onClose} title={intl.formatMessage(messages.editAllowance)} isOverflowVisible={false} size=\"lg\">\n <ModalDialog.Header className=\"border-bottom border-light-700\">\n <ModalDialog.Title className=\"text-primary-700\">{intl.formatMessage(messages.editAllowance)}</ModalDialog.Title>\n </ModalDialog.Header>\n <Form className=\"position-relative overflow-auto\" onSubmit={handleEdit}>\n <ModalDialog.Body>\n <Form.Group controlId=\"learner-info\">\n <SpecifyLearnerField learner={learner} onClickSelect={() => {}} />\n </Form.Group>\n <Form.Group controlId=\"select-exam-type\">\n <Form.Label className=\"text-primary-500 x-small\">{intl.formatMessage(messages.selectExamType)}:</Form.Label>\n <Form.Control as=\"select\" disabled>\n <option value=\"\">{allowance.proctoredExam.examType}</option>\n </Form.Control>\n </Form.Group>\n <Form.Group controlId=\"select-exams\">\n <Form.Label className=\"text-primary-500 x-small\">{intl.formatMessage(messages.selectExams)}:</Form.Label>\n <div>\n <Form.Checkbox className=\"mt-2\" key={allowance.proctoredExam.examName} checked disabled labelClassName=\"text-primary-500\">\n {allowance.proctoredExam.examName}\n </Form.Checkbox>\n </div>\n </Form.Group>\n <Form.Group controlId=\"select-allowance-type\">\n <Form.Label className=\"text-primary-500 x-small\">{intl.formatMessage(messages.selectAllowanceType)}:</Form.Label>\n <Form.Control as=\"select\" name=\"allowanceType\" onChange={handleChanges} value={editedAllowance.allowanceType}>\n {allowanceTypesOptions.map(option => (\n <option key={option.value} value={option.value}>{intl.formatMessage(option.label)}</option>\n ))}\n </Form.Control>\n </Form.Group>\n <Form.Group controlId=\"allowance-value\">\n <Form.Label className=\"text-primary-500 x-small\">{intl.formatMessage(addLabel[editedAllowance.allowanceType || 'additional_time_granted'])}:</Form.Label>\n <Form.Control\n type={editedAllowance.allowanceType === 'review_policy_exception' ? 'text' : 'number'}\n placeholder={intl.formatMessage(addPlaceholder[editedAllowance.allowanceType || 'additional_time_granted'])}\n name=\"value\"\n value={editedAllowance.value}\n onChange={handleChanges}\n />\n </Form.Group>\n </ModalDialog.Body>\n <ModalDialog.Footer className=\"border-top border-light-700\">\n <ActionRow>\n <Button variant=\"tertiary\" onClick={onClose}>{intl.formatMessage(messages.cancel)}</Button>\n <Button variant=\"primary\" type=\"submit\" disabled={!hasChanges}>{intl.formatMessage(messages.editAllowance)}</Button>\n </ActionRow>\n </ModalDialog.Footer>\n </Form>\n </ModalDialog>\n );\n};\n\nexport default EditAllowanceModal;\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const ALLOWANCES_PAGE_SIZE = 25;
|
|
2
|
+
export declare const addLabel: {
|
|
3
|
+
additional_time_granted: {
|
|
4
|
+
id: string;
|
|
5
|
+
defaultMessage: string;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
review_policy_exception: {
|
|
9
|
+
id: string;
|
|
10
|
+
defaultMessage: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
time_multiplier: {
|
|
14
|
+
id: string;
|
|
15
|
+
defaultMessage: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const addPlaceholder: {
|
|
20
|
+
additional_time_granted: {
|
|
21
|
+
id: string;
|
|
22
|
+
defaultMessage: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
review_policy_exception: {
|
|
26
|
+
id: string;
|
|
27
|
+
defaultMessage: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
time_multiplier: {
|
|
31
|
+
id: string;
|
|
32
|
+
defaultMessage: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export declare const allowanceTypesOptions: {
|
|
37
|
+
value: string;
|
|
38
|
+
label: {
|
|
39
|
+
id: string;
|
|
40
|
+
defaultMessage: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
}[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import messages from '../specialExams/messages';
|
|
2
|
+
export const ALLOWANCES_PAGE_SIZE = 25;
|
|
3
|
+
export const addLabel = {
|
|
4
|
+
additional_time_granted: messages.addAdditionalTimeGranted,
|
|
5
|
+
review_policy_exception: messages.addReviewPolicyException,
|
|
6
|
+
time_multiplier: messages.addTimeMultiplier,
|
|
7
|
+
};
|
|
8
|
+
export const addPlaceholder = {
|
|
9
|
+
additional_time_granted: messages.addTimePlaceholder,
|
|
10
|
+
review_policy_exception: messages.exceptionPlaceholder,
|
|
11
|
+
time_multiplier: messages.timeMultiplierPlaceholder,
|
|
12
|
+
};
|
|
13
|
+
export const allowanceTypesOptions = [
|
|
14
|
+
{ value: '', label: messages.allowanceType },
|
|
15
|
+
{ value: 'additional_time_granted', label: messages.additionalTime },
|
|
16
|
+
{ value: 'review_policy_exception', label: messages.reviewPolicy },
|
|
17
|
+
{ value: 'time_multiplier', label: messages.timeMultiplier },
|
|
18
|
+
];
|
|
19
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/specialExams/constants.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAElD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,uBAAuB,EAAE,QAAQ,CAAC,wBAAwB;IAC1D,uBAAuB,EAAE,QAAQ,CAAC,wBAAwB;IAC1D,eAAe,EAAE,QAAQ,CAAC,iBAAiB;CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,uBAAuB,EAAE,QAAQ,CAAC,kBAAkB;IACpD,uBAAuB,EAAE,QAAQ,CAAC,oBAAoB;IACtD,eAAe,EAAE,QAAQ,CAAC,yBAAyB;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,aAAa,EAAE;IAC5C,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,QAAQ,CAAC,cAAc,EAAE;IACpE,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,QAAQ,CAAC,YAAY,EAAE;IAClE,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,CAAC,cAAc,EAAE;CAC7D,CAAC","sourcesContent":["import messages from '@src/specialExams/messages';\n\nexport const ALLOWANCES_PAGE_SIZE = 25;\n\nexport const addLabel = {\n additional_time_granted: messages.addAdditionalTimeGranted,\n review_policy_exception: messages.addReviewPolicyException,\n time_multiplier: messages.addTimeMultiplier,\n};\n\nexport const addPlaceholder = {\n additional_time_granted: messages.addTimePlaceholder,\n review_policy_exception: messages.exceptionPlaceholder,\n time_multiplier: messages.timeMultiplierPlaceholder,\n};\n\nexport const allowanceTypesOptions = [\n { value: '', label: messages.allowanceType },\n { value: 'additional_time_granted', label: messages.additionalTime },\n { value: 'review_policy_exception', label: messages.reviewPolicy },\n { value: 'time_multiplier', label: messages.timeMultiplier },\n];\n"]}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { DataList } from '../../types';
|
|
2
|
-
import { Attempt, AttemptsParams } from '../types';
|
|
2
|
+
import { AddAllowanceParams, Allowance, Attempt, AttemptsParams, DeleteAllowanceParams, SpecialExam } from '../types';
|
|
3
3
|
export declare const getAttempts: (courseId: string, params: AttemptsParams) => Promise<DataList<Attempt>>;
|
|
4
|
+
export declare const getAllowances: (courseId: string, params: AttemptsParams) => Promise<DataList<Allowance>>;
|
|
5
|
+
export declare const addAllowance: (courseId: string, newAllowance: AddAllowanceParams) => Promise<Allowance[]>;
|
|
6
|
+
export declare const deleteAllowance: (courseId: string, params: DeleteAllowanceParams) => Promise<void>;
|
|
7
|
+
export declare const getSpecialExams: (courseId: string, examType: string) => Promise<SpecialExam[]>;
|
|
@@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { getAuthenticatedHttpClient, camelCaseObject } from '@openedx/frontend-base';
|
|
10
|
+
import { getAuthenticatedHttpClient, camelCaseObject, snakeCaseObject } from '@openedx/frontend-base';
|
|
11
11
|
import { getApiBaseUrl } from '../../data/api';
|
|
12
|
-
|
|
12
|
+
const getQueryParams = (params) => {
|
|
13
13
|
const queryParams = new URLSearchParams({
|
|
14
14
|
page: (params.page + 1).toString(),
|
|
15
15
|
page_size: params.pageSize.toString(),
|
|
@@ -17,7 +17,33 @@ export const getAttempts = (courseId, params) => __awaiter(void 0, void 0, void
|
|
|
17
17
|
if (params.emailOrUsername) {
|
|
18
18
|
queryParams.append('search', params.emailOrUsername);
|
|
19
19
|
}
|
|
20
|
+
return queryParams;
|
|
21
|
+
};
|
|
22
|
+
export const getAttempts = (courseId, params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
const queryParams = getQueryParams(params);
|
|
20
24
|
const { data } = yield getAuthenticatedHttpClient().get(`${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams/attempts?${queryParams.toString()}`);
|
|
21
25
|
return camelCaseObject(data);
|
|
22
26
|
});
|
|
27
|
+
export const getAllowances = (courseId, params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
+
const queryParams = getQueryParams(params);
|
|
29
|
+
const { data } = yield getAuthenticatedHttpClient().get(`${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams/allowances?${queryParams.toString()}`);
|
|
30
|
+
return camelCaseObject(data);
|
|
31
|
+
});
|
|
32
|
+
export const addAllowance = (courseId, newAllowance) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
+
const newAllowanceSnakeCase = snakeCaseObject(newAllowance);
|
|
34
|
+
const { data } = yield getAuthenticatedHttpClient().post(`${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams/allowances`, newAllowanceSnakeCase);
|
|
35
|
+
return camelCaseObject(data);
|
|
36
|
+
});
|
|
37
|
+
export const deleteAllowance = (courseId, params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
+
const snakeCaseParams = snakeCaseObject(params);
|
|
39
|
+
yield getAuthenticatedHttpClient().delete(`${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams/${params.examId}/allowance`, {
|
|
40
|
+
data: snakeCaseParams
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
export const getSpecialExams = (courseId, examType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
+
const { data } = yield getAuthenticatedHttpClient().get(`${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams`, {
|
|
45
|
+
params: { exam_type: examType }
|
|
46
|
+
});
|
|
47
|
+
return camelCaseObject(data);
|
|
48
|
+
});
|
|
23
49
|
//# sourceMappingURL=api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/specialExams/data/api.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/specialExams/data/api.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI9C,MAAM,cAAc,GAAG,CAAC,MAAsB,EAAE,EAAE;IAChD,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC;QACtC,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,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BAA2B,EACnF,qBAAqB,CACtB,CAAC;IACF,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAO,QAAgB,EAAE,MAA6B,EAAiB,EAAE;IACtG,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,0BAA0B,EAAE,CAAC,MAAM,CACvC,GAAG,aAAa,EAAE,8BAA8B,QAAQ,kBAAkB,MAAM,CAAC,MAAM,YAAY,EAAE;QACnG,IAAI,EAAE,eAAe;KACtB,CACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAO,QAAgB,EAAE,QAAgB,EAA0B,EAAE;IAClG,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,0BAA0B,EAAE,CAAC,GAAG,CACrD,GAAG,aAAa,EAAE,8BAA8B,QAAQ,gBAAgB,EAAE;QACxE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;KAChC,CACF,CAAC;IACF,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAA,CAAC","sourcesContent":["import { getAuthenticatedHttpClient, camelCaseObject, snakeCaseObject } from '@openedx/frontend-base';\nimport { getApiBaseUrl } from '@src/data/api';\nimport { DataList } from '@src/types';\nimport { AddAllowanceParams, Allowance, Attempt, AttemptsParams, DeleteAllowanceParams, SpecialExam } from '../types';\n\nconst getQueryParams = (params: AttemptsParams) => {\n const queryParams = new URLSearchParams({\n page: (params.page + 1).toString(),\n page_size: params.pageSize.toString(),\n });\n\n if (params.emailOrUsername) {\n queryParams.append('search', params.emailOrUsername);\n }\n\n return queryParams;\n};\n\nexport const getAttempts = async (courseId: string, params: AttemptsParams): Promise<DataList<Attempt>> => {\n const queryParams = getQueryParams(params);\n\n const { data } = await getAuthenticatedHttpClient().get(\n `${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams/attempts?${queryParams.toString()}`\n );\n return camelCaseObject(data);\n};\n\nexport const getAllowances = async (courseId: string, params: AttemptsParams): Promise<DataList<Allowance>> => {\n const queryParams = getQueryParams(params);\n\n const { data } = await getAuthenticatedHttpClient().get(\n `${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams/allowances?${queryParams.toString()}`\n );\n return camelCaseObject(data);\n};\n\nexport const addAllowance = async (courseId: string, newAllowance: AddAllowanceParams): Promise<Allowance[]> => {\n const newAllowanceSnakeCase = snakeCaseObject(newAllowance);\n const { data } = await getAuthenticatedHttpClient().post(\n `${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams/allowances`,\n newAllowanceSnakeCase\n );\n return camelCaseObject(data);\n};\n\nexport const deleteAllowance = async (courseId: string, params: DeleteAllowanceParams): Promise<void> => {\n const snakeCaseParams = snakeCaseObject(params);\n await getAuthenticatedHttpClient().delete(\n `${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams/${params.examId}/allowance`, {\n data: snakeCaseParams\n }\n );\n};\n\nexport const getSpecialExams = async (courseId: string, examType: string): Promise<SpecialExam[]> => {\n const { data } = await getAuthenticatedHttpClient().get(\n `${getApiBaseUrl()}/api/instructor/v2/courses/${courseId}/special_exams`, {\n params: { exam_type: examType }\n }\n );\n return camelCaseObject(data);\n};\n"]}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { AttemptsParams } from '../types';
|
|
1
|
+
import { AddAllowanceParams, AttemptsParams, DeleteAllowanceParams } from '../types';
|
|
2
2
|
export declare const useAttempts: (courseId: string, params: AttemptsParams) => import("@tanstack/react-query").UseQueryResult<import("../../types").DataList<import("../types").Attempt>, Error>;
|
|
3
|
+
export declare const useAllowances: (courseId: string, params: AttemptsParams) => import("@tanstack/react-query").UseQueryResult<import("../../types").DataList<import("../types").Allowance>, Error>;
|
|
4
|
+
export declare const useAddAllowance: (courseId: string) => import("@tanstack/react-query").UseMutationResult<import("../types").Allowance[], Error, AddAllowanceParams, unknown>;
|
|
5
|
+
export declare const useDeleteAllowance: (courseId: string) => import("@tanstack/react-query").UseMutationResult<void, Error, DeleteAllowanceParams, unknown>;
|
|
6
|
+
export declare const useSpecialExams: (courseId: string, examType: string) => import("@tanstack/react-query").UseQueryResult<import("../types").SpecialExam[], Error>;
|
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { getAttempts } from './api';
|
|
1
|
+
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { addAllowance, deleteAllowance, getAllowances, getAttempts, getSpecialExams } from './api';
|
|
3
3
|
import { specialExamsQueryKeys } from './queryKeys';
|
|
4
4
|
export const useAttempts = (courseId, params) => (useQuery({
|
|
5
5
|
queryKey: specialExamsQueryKeys.attempts(courseId, params),
|
|
6
6
|
queryFn: () => getAttempts(courseId, params),
|
|
7
7
|
enabled: !!courseId,
|
|
8
8
|
}));
|
|
9
|
+
export const useAllowances = (courseId, params) => (useQuery({
|
|
10
|
+
queryKey: specialExamsQueryKeys.allowances(courseId, params),
|
|
11
|
+
queryFn: () => getAllowances(courseId, params),
|
|
12
|
+
enabled: !!courseId,
|
|
13
|
+
}));
|
|
14
|
+
export const useAddAllowance = (courseId) => {
|
|
15
|
+
const queryClient = useQueryClient();
|
|
16
|
+
return useMutation({
|
|
17
|
+
mutationFn: (newAllowance) => addAllowance(courseId, newAllowance),
|
|
18
|
+
onSuccess: () => {
|
|
19
|
+
queryClient.invalidateQueries({ queryKey: specialExamsQueryKeys.allowances(courseId), exact: false });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export const useDeleteAllowance = (courseId) => {
|
|
24
|
+
const queryClient = useQueryClient();
|
|
25
|
+
return useMutation({
|
|
26
|
+
mutationFn: (params) => deleteAllowance(courseId, params),
|
|
27
|
+
onSuccess: () => {
|
|
28
|
+
queryClient.invalidateQueries({ queryKey: specialExamsQueryKeys.allowances(courseId), exact: false });
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export const useSpecialExams = (courseId, examType) => (useQuery({
|
|
33
|
+
queryKey: specialExamsQueryKeys.specialExams(courseId, examType),
|
|
34
|
+
queryFn: () => getSpecialExams(courseId, examType),
|
|
35
|
+
enabled: !!courseId && !!examType,
|
|
36
|
+
}));
|
|
9
37
|
//# sourceMappingURL=apiHook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiHook.js","sourceRoot":"","sources":["../../../src/specialExams/data/apiHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"apiHook.js","sourceRoot":"","sources":["../../../src/specialExams/data/apiHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,MAAsB,EAAE,EAAE,CAAC,CACvE,QAAQ,CAAC;IACP,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1D,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,QAAQ;CACpB,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,MAAsB,EAAE,EAAE,CAAC,CACzE,QAAQ,CAAC;IACP,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC5D,OAA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AAE,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ;CAClC,CAAC,CACH,CAAC","sourcesContent":["import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { addAllowance, deleteAllowance, getAllowances, getAttempts, getSpecialExams } from './api';\nimport { specialExamsQueryKeys } from './queryKeys';\nimport { AddAllowanceParams, AttemptsParams, DeleteAllowanceParams } from '../types';\n\nexport const useAttempts = (courseId: string, params: AttemptsParams) => (\n useQuery({\n queryKey: specialExamsQueryKeys.attempts(courseId, params),\n queryFn: () => getAttempts(courseId, params),\n enabled: !!courseId,\n })\n);\n\nexport const useAllowances = (courseId: string, params: AttemptsParams) => (\n useQuery({\n queryKey: specialExamsQueryKeys.allowances(courseId, params),\n queryFn: () => getAllowances(courseId, params),\n enabled: !!courseId,\n })\n);\n\nexport const useAddAllowance = (courseId: string) => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (newAllowance: AddAllowanceParams) =>\n addAllowance(courseId, newAllowance),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: specialExamsQueryKeys.allowances(courseId), exact: false });\n },\n });\n};\n\nexport const useDeleteAllowance = (courseId: string) => {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (params: DeleteAllowanceParams) => deleteAllowance(courseId, params),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: specialExamsQueryKeys.allowances(courseId), exact: false });\n },\n });\n};\n\nexport const useSpecialExams = (courseId: string, examType: string) => (\n useQuery({\n queryKey: specialExamsQueryKeys.specialExams(courseId, examType),\n queryFn: () => getSpecialExams(courseId, examType),\n enabled: !!courseId && !!examType,\n })\n);\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { AttemptsParams } from '../types';
|
|
2
2
|
export declare const specialExamsQueryKeys: {
|
|
3
3
|
all: readonly ["org.openedx.frontend.app.instructorDashboard", "specialExams"];
|
|
4
|
-
|
|
4
|
+
byCourse: (courseId: string) => readonly ["org.openedx.frontend.app.instructorDashboard", "specialExams", string];
|
|
5
|
+
attempts: (courseId: string, params: AttemptsParams) => readonly ["org.openedx.frontend.app.instructorDashboard", "specialExams", string, "attempts", number, string];
|
|
6
|
+
allowances: (courseId: string, params?: AttemptsParams) => readonly ["org.openedx.frontend.app.instructorDashboard", "specialExams", string, "allowances", number, string];
|
|
7
|
+
specialExams: (courseId: string, examType: string) => readonly ["org.openedx.frontend.app.instructorDashboard", "specialExams", string, "specialExams", string];
|
|
5
8
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { appId } from '../../constants';
|
|
2
2
|
export const specialExamsQueryKeys = {
|
|
3
3
|
all: [appId, 'specialExams'],
|
|
4
|
-
|
|
4
|
+
byCourse: (courseId) => [...specialExamsQueryKeys.all, courseId],
|
|
5
|
+
attempts: (courseId, params) => [...specialExamsQueryKeys.byCourse(courseId), 'attempts', params.page, params.emailOrUsername],
|
|
6
|
+
allowances: (courseId, params) => [...specialExamsQueryKeys.byCourse(courseId), 'allowances', (params === null || params === void 0 ? void 0 : params.page) || 1, (params === null || params === void 0 ? void 0 : params.emailOrUsername) || ''],
|
|
7
|
+
specialExams: (courseId, examType) => [...specialExamsQueryKeys.byCourse(courseId), 'specialExams', examType],
|
|
5
8
|
};
|
|
6
9
|
//# sourceMappingURL=queryKeys.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryKeys.js","sourceRoot":"","sources":["../../../src/specialExams/data/queryKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,GAAG,EAAE,CAAC,KAAK,EAAE,cAAc,CAAU;IACrC,QAAQ,EAAE,CAAC,QAAgB,EAAE,MAAsB,EAAE,EAAE,CAAC,CAAC,GAAG,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"queryKeys.js","sourceRoot":"","sources":["../../../src/specialExams/data/queryKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,GAAG,EAAE,CAAC,KAAK,EAAE,cAAc,CAAU;IACrC,QAAQ,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,QAAQ,CAAU;IACjF,QAAQ,EAAE,CAAC,QAAgB,EAAE,MAAsB,EAAE,EAAE,CAAC,CAAC,GAAG,qBAAqB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,eAAe,CAAU;IAC/J,UAAU,EAAE,CAAC,QAAgB,EAAE,MAAuB,EAAE,EAAE,CAAC,CAAC,GAAG,qBAAqB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,KAAI,CAAC,EAAE,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,eAAe,KAAI,EAAE,CAAU;IACjL,YAAY,EAAE,CAAC,QAAgB,EAAE,QAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,qBAAqB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,QAAQ,CAAU;CACvI,CAAC","sourcesContent":["import { appId } from '@src/constants';\nimport { AttemptsParams } from '../types';\n\nexport const specialExamsQueryKeys = {\n all: [appId, 'specialExams'] as const,\n byCourse: (courseId: string) => [...specialExamsQueryKeys.all, courseId] as const,\n attempts: (courseId: string, params: AttemptsParams) => [...specialExamsQueryKeys.byCourse(courseId), 'attempts', params.page, params.emailOrUsername] as const,\n allowances: (courseId: string, params?: AttemptsParams) => [...specialExamsQueryKeys.byCourse(courseId), 'allowances', params?.page || 1, params?.emailOrUsername || ''] as const,\n specialExams: (courseId: string, examType: string) => [...specialExamsQueryKeys.byCourse(courseId), 'specialExams', examType] as const,\n};\n"]}
|
|
@@ -54,5 +54,170 @@ declare const messages: {
|
|
|
54
54
|
defaultMessage: string;
|
|
55
55
|
description: string;
|
|
56
56
|
};
|
|
57
|
+
noAllowances: {
|
|
58
|
+
id: string;
|
|
59
|
+
defaultMessage: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
editAllowance: {
|
|
63
|
+
id: string;
|
|
64
|
+
defaultMessage: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
email: {
|
|
68
|
+
id: string;
|
|
69
|
+
defaultMessage: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
allowanceType: {
|
|
73
|
+
id: string;
|
|
74
|
+
defaultMessage: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
allowanceValue: {
|
|
78
|
+
id: string;
|
|
79
|
+
defaultMessage: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
addAllowance: {
|
|
83
|
+
id: string;
|
|
84
|
+
defaultMessage: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
cancel: {
|
|
88
|
+
id: string;
|
|
89
|
+
defaultMessage: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
createAllowance: {
|
|
93
|
+
id: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
specifyLearners: {
|
|
98
|
+
id: string;
|
|
99
|
+
defaultMessage: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
specifyLearnersPlaceholder: {
|
|
103
|
+
id: string;
|
|
104
|
+
defaultMessage: string;
|
|
105
|
+
description: string;
|
|
106
|
+
};
|
|
107
|
+
selectExamType: {
|
|
108
|
+
id: string;
|
|
109
|
+
defaultMessage: string;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
selectExams: {
|
|
113
|
+
id: string;
|
|
114
|
+
defaultMessage: string;
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
selectAllowanceType: {
|
|
118
|
+
id: string;
|
|
119
|
+
defaultMessage: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
addTime: {
|
|
123
|
+
id: string;
|
|
124
|
+
defaultMessage: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
addTimePlaceholder: {
|
|
128
|
+
id: string;
|
|
129
|
+
defaultMessage: string;
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
actions: {
|
|
133
|
+
id: string;
|
|
134
|
+
defaultMessage: string;
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
proctored: {
|
|
138
|
+
id: string;
|
|
139
|
+
defaultMessage: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
timed: {
|
|
143
|
+
id: string;
|
|
144
|
+
defaultMessage: string;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
timeMultiplier: {
|
|
148
|
+
id: string;
|
|
149
|
+
defaultMessage: string;
|
|
150
|
+
description: string;
|
|
151
|
+
};
|
|
152
|
+
additionalTime: {
|
|
153
|
+
id: string;
|
|
154
|
+
defaultMessage: string;
|
|
155
|
+
description: string;
|
|
156
|
+
};
|
|
157
|
+
reviewPolicy: {
|
|
158
|
+
id: string;
|
|
159
|
+
defaultMessage: string;
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
exceptionPlaceholder: {
|
|
163
|
+
id: string;
|
|
164
|
+
defaultMessage: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
timeMultiplierPlaceholder: {
|
|
168
|
+
id: string;
|
|
169
|
+
defaultMessage: string;
|
|
170
|
+
description: string;
|
|
171
|
+
};
|
|
172
|
+
edit: {
|
|
173
|
+
id: string;
|
|
174
|
+
defaultMessage: string;
|
|
175
|
+
description: string;
|
|
176
|
+
};
|
|
177
|
+
delete: {
|
|
178
|
+
id: string;
|
|
179
|
+
defaultMessage: string;
|
|
180
|
+
description: string;
|
|
181
|
+
};
|
|
182
|
+
deleteAllowance: {
|
|
183
|
+
id: string;
|
|
184
|
+
defaultMessage: string;
|
|
185
|
+
description: string;
|
|
186
|
+
};
|
|
187
|
+
deleteConfirmation: {
|
|
188
|
+
id: string;
|
|
189
|
+
defaultMessage: string;
|
|
190
|
+
description: string;
|
|
191
|
+
};
|
|
192
|
+
deleteError: {
|
|
193
|
+
id: string;
|
|
194
|
+
defaultMessage: string;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
addAdditionalTimeGranted: {
|
|
198
|
+
id: string;
|
|
199
|
+
defaultMessage: string;
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
202
|
+
addReviewPolicyException: {
|
|
203
|
+
id: string;
|
|
204
|
+
defaultMessage: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
addTimeMultiplier: {
|
|
208
|
+
id: string;
|
|
209
|
+
defaultMessage: string;
|
|
210
|
+
description: string;
|
|
211
|
+
};
|
|
212
|
+
addAllowanceError: {
|
|
213
|
+
id: string;
|
|
214
|
+
defaultMessage: string;
|
|
215
|
+
description: string;
|
|
216
|
+
};
|
|
217
|
+
editAllowanceError: {
|
|
218
|
+
id: string;
|
|
219
|
+
defaultMessage: string;
|
|
220
|
+
description: string;
|
|
221
|
+
};
|
|
57
222
|
};
|
|
58
223
|
export default messages;
|