@openedx/frontend-app-gradebook 2.0.0-alpha.0
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/LICENSE +661 -0
- package/README.rst +279 -0
- package/dist/Main.d.ts +3 -0
- package/dist/Main.js +17 -0
- package/dist/Main.js.map +1 -0
- package/dist/app.d.ts +3 -0
- package/dist/app.js +10 -0
- package/dist/app.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/BulkManagementAlerts.d.ts +5 -0
- package/dist/components/BulkManagementHistoryView/BulkManagementAlerts.js +20 -0
- package/dist/components/BulkManagementHistoryView/BulkManagementAlerts.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/BulkManagementHistoryView.scss +6 -0
- package/dist/components/BulkManagementHistoryView/HistoryTable.d.ts +33 -0
- package/dist/components/BulkManagementHistoryView/HistoryTable.js +53 -0
- package/dist/components/BulkManagementHistoryView/HistoryTable.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/ResultsSummary.d.ts +16 -0
- package/dist/components/BulkManagementHistoryView/ResultsSummary.js +19 -0
- package/dist/components/BulkManagementHistoryView/ResultsSummary.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/data/api.d.ts +5 -0
- package/dist/components/BulkManagementHistoryView/data/api.js +16 -0
- package/dist/components/BulkManagementHistoryView/data/api.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/data/apiHook.d.ts +16 -0
- package/dist/components/BulkManagementHistoryView/data/apiHook.js +34 -0
- package/dist/components/BulkManagementHistoryView/data/apiHook.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/data/queryKeys.d.ts +5 -0
- package/dist/components/BulkManagementHistoryView/data/queryKeys.js +7 -0
- package/dist/components/BulkManagementHistoryView/data/queryKeys.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/data/utils.d.ts +34 -0
- package/dist/components/BulkManagementHistoryView/data/utils.js +45 -0
- package/dist/components/BulkManagementHistoryView/data/utils.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/index.d.ts +2 -0
- package/dist/components/BulkManagementHistoryView/index.js +12 -0
- package/dist/components/BulkManagementHistoryView/index.js.map +1 -0
- package/dist/components/BulkManagementHistoryView/messages.d.ts +24 -0
- package/dist/components/BulkManagementHistoryView/messages.js +20 -0
- package/dist/components/BulkManagementHistoryView/messages.js.map +1 -0
- package/dist/components/GradebookFilters/AssignmentFilter/index.d.ts +10 -0
- package/dist/components/GradebookFilters/AssignmentFilter/index.js +31 -0
- package/dist/components/GradebookFilters/AssignmentFilter/index.js.map +1 -0
- package/dist/components/GradebookFilters/AssignmentGradeFilter/hooks.d.ts +19 -0
- package/dist/components/GradebookFilters/AssignmentGradeFilter/hooks.js +31 -0
- package/dist/components/GradebookFilters/AssignmentGradeFilter/hooks.js.map +1 -0
- package/dist/components/GradebookFilters/AssignmentGradeFilter/index.d.ts +10 -0
- package/dist/components/GradebookFilters/AssignmentGradeFilter/index.js +17 -0
- package/dist/components/GradebookFilters/AssignmentGradeFilter/index.js.map +1 -0
- package/dist/components/GradebookFilters/AssignmentTypeFilter/index.d.ts +10 -0
- package/dist/components/GradebookFilters/AssignmentTypeFilter/index.js +38 -0
- package/dist/components/GradebookFilters/AssignmentTypeFilter/index.js.map +1 -0
- package/dist/components/GradebookFilters/CourseGradeFilter/hooks.d.ts +15 -0
- package/dist/components/GradebookFilters/CourseGradeFilter/hooks.js +34 -0
- package/dist/components/GradebookFilters/CourseGradeFilter/hooks.js.map +1 -0
- package/dist/components/GradebookFilters/CourseGradeFilter/index.d.ts +10 -0
- package/dist/components/GradebookFilters/CourseGradeFilter/index.js +17 -0
- package/dist/components/GradebookFilters/CourseGradeFilter/index.js.map +1 -0
- package/dist/components/GradebookFilters/GradebookFilters.scss +6 -0
- package/dist/components/GradebookFilters/PercentGroup.d.ts +22 -0
- package/dist/components/GradebookFilters/PercentGroup.js +16 -0
- package/dist/components/GradebookFilters/PercentGroup.js.map +1 -0
- package/dist/components/GradebookFilters/SelectGroup.d.ts +24 -0
- package/dist/components/GradebookFilters/SelectGroup.js +17 -0
- package/dist/components/GradebookFilters/SelectGroup.js.map +1 -0
- package/dist/components/GradebookFilters/StudentGroupsFilter/hooks.d.ts +16 -0
- package/dist/components/GradebookFilters/StudentGroupsFilter/hooks.js +46 -0
- package/dist/components/GradebookFilters/StudentGroupsFilter/hooks.js.map +1 -0
- package/dist/components/GradebookFilters/StudentGroupsFilter/index.d.ts +10 -0
- package/dist/components/GradebookFilters/StudentGroupsFilter/index.js +23 -0
- package/dist/components/GradebookFilters/StudentGroupsFilter/index.js.map +1 -0
- package/dist/components/GradebookFilters/data/api.d.ts +10 -0
- package/dist/components/GradebookFilters/data/api.js +27 -0
- package/dist/components/GradebookFilters/data/api.js.map +1 -0
- package/dist/components/GradebookFilters/data/apiHook.d.ts +16 -0
- package/dist/components/GradebookFilters/data/apiHook.js +24 -0
- package/dist/components/GradebookFilters/data/apiHook.js.map +1 -0
- package/dist/components/GradebookFilters/data/hooks.d.ts +7 -0
- package/dist/components/GradebookFilters/data/hooks.js +53 -0
- package/dist/components/GradebookFilters/data/hooks.js.map +1 -0
- package/dist/components/GradebookFilters/data/queryKeys.d.ts +10 -0
- package/dist/components/GradebookFilters/data/queryKeys.js +12 -0
- package/dist/components/GradebookFilters/data/queryKeys.js.map +1 -0
- package/dist/components/GradebookFilters/index.d.ts +10 -0
- package/dist/components/GradebookFilters/index.js +32 -0
- package/dist/components/GradebookFilters/index.js.map +1 -0
- package/dist/components/GradebookFilters/messages.d.ts +112 -0
- package/dist/components/GradebookFilters/messages.js +75 -0
- package/dist/components/GradebookFilters/messages.js.map +1 -0
- package/dist/components/GradebookHeader/hooks.d.ts +13 -0
- package/dist/components/GradebookHeader/hooks.js +28 -0
- package/dist/components/GradebookHeader/hooks.js.map +1 -0
- package/dist/components/GradebookHeader/index.d.ts +2 -0
- package/dist/components/GradebookHeader/index.js +14 -0
- package/dist/components/GradebookHeader/index.js.map +1 -0
- package/dist/components/GradebookHeader/messages.d.ts +48 -0
- package/dist/components/GradebookHeader/messages.js +35 -0
- package/dist/components/GradebookHeader/messages.js.map +1 -0
- package/dist/components/GradesView/BulkManagementControls/index.d.ts +2 -0
- package/dist/components/GradesView/BulkManagementControls/index.js +26 -0
- package/dist/components/GradesView/BulkManagementControls/index.js.map +1 -0
- package/dist/components/GradesView/BulkManagementControls/messages.d.ts +8 -0
- package/dist/components/GradesView/BulkManagementControls/messages.js +10 -0
- package/dist/components/GradesView/BulkManagementControls/messages.js.map +1 -0
- package/dist/components/GradesView/EditModal/HistoryHeader.d.ts +21 -0
- package/dist/components/GradesView/EditModal/HistoryHeader.js +20 -0
- package/dist/components/GradesView/EditModal/HistoryHeader.js.map +1 -0
- package/dist/components/GradesView/EditModal/ModalHeaders.d.ts +3 -0
- package/dist/components/GradesView/EditModal/ModalHeaders.js +26 -0
- package/dist/components/GradesView/EditModal/ModalHeaders.js.map +1 -0
- package/dist/components/GradesView/EditModal/OverrideTable/AdjustedGradeInput/index.d.ts +5 -0
- package/dist/components/GradesView/EditModal/OverrideTable/AdjustedGradeInput/index.js +23 -0
- package/dist/components/GradesView/EditModal/OverrideTable/AdjustedGradeInput/index.js.map +1 -0
- package/dist/components/GradesView/EditModal/OverrideTable/ReasonInput/index.d.ts +6 -0
- package/dist/components/GradesView/EditModal/OverrideTable/ReasonInput/index.js +25 -0
- package/dist/components/GradesView/EditModal/OverrideTable/ReasonInput/index.js.map +1 -0
- package/dist/components/GradesView/EditModal/OverrideTable/index.d.ts +5 -0
- package/dist/components/GradesView/EditModal/OverrideTable/index.js +39 -0
- package/dist/components/GradesView/EditModal/OverrideTable/index.js.map +1 -0
- package/dist/components/GradesView/EditModal/OverrideTable/messages.d.ts +32 -0
- package/dist/components/GradesView/EditModal/OverrideTable/messages.js +25 -0
- package/dist/components/GradesView/EditModal/OverrideTable/messages.js.map +1 -0
- package/dist/components/GradesView/EditModal/index.d.ts +2 -0
- package/dist/components/GradesView/EditModal/index.js +35 -0
- package/dist/components/GradesView/EditModal/index.js.map +1 -0
- package/dist/components/GradesView/EditModal/messages.d.ts +72 -0
- package/dist/components/GradesView/EditModal/messages.js +50 -0
- package/dist/components/GradesView/EditModal/messages.js.map +1 -0
- package/dist/components/GradesView/FilterBadges/FilterBadge.d.ts +9 -0
- package/dist/components/GradesView/FilterBadges/FilterBadge.js +27 -0
- package/dist/components/GradesView/FilterBadges/FilterBadge.js.map +1 -0
- package/dist/components/GradesView/FilterBadges/index.d.ts +8 -0
- package/dist/components/GradesView/FilterBadges/index.js +15 -0
- package/dist/components/GradesView/FilterBadges/index.js.map +1 -0
- package/dist/components/GradesView/FilterMenuToggle/index.d.ts +5 -0
- package/dist/components/GradesView/FilterMenuToggle/index.js +18 -0
- package/dist/components/GradesView/FilterMenuToggle/index.js.map +1 -0
- package/dist/components/GradesView/FilterMenuToggle/messages.d.ts +8 -0
- package/dist/components/GradesView/FilterMenuToggle/messages.js +10 -0
- package/dist/components/GradesView/FilterMenuToggle/messages.js.map +1 -0
- package/dist/components/GradesView/FilteredUsersLabel/index.d.ts +15 -0
- package/dist/components/GradesView/FilteredUsersLabel/index.js +27 -0
- package/dist/components/GradesView/FilteredUsersLabel/index.js.map +1 -0
- package/dist/components/GradesView/FilteredUsersLabel/messages.d.ts +8 -0
- package/dist/components/GradesView/FilteredUsersLabel/messages.js +10 -0
- package/dist/components/GradesView/FilteredUsersLabel/messages.js.map +1 -0
- package/dist/components/GradesView/GradebookTable/Fields.d.ts +2 -0
- package/dist/components/GradesView/GradebookTable/Fields.js +32 -0
- package/dist/components/GradesView/GradebookTable/Fields.js.map +1 -0
- package/dist/components/GradesView/GradebookTable/GradeButton.d.ts +26 -0
- package/dist/components/GradesView/GradebookTable/GradeButton.js +56 -0
- package/dist/components/GradesView/GradebookTable/GradeButton.js.map +1 -0
- package/dist/components/GradesView/GradebookTable/LabelReplacements.d.ts +3 -0
- package/dist/components/GradesView/GradebookTable/LabelReplacements.js +42 -0
- package/dist/components/GradesView/GradebookTable/LabelReplacements.js.map +1 -0
- package/dist/components/GradesView/GradebookTable/hooks.d.ts +11 -0
- package/dist/components/GradesView/GradebookTable/hooks.js +45 -0
- package/dist/components/GradesView/GradebookTable/hooks.js.map +1 -0
- package/dist/components/GradesView/GradebookTable/index.d.ts +5 -0
- package/dist/components/GradesView/GradebookTable/index.js +16 -0
- package/dist/components/GradesView/GradebookTable/index.js.map +1 -0
- package/dist/components/GradesView/GradebookTable/messages.d.ts +64 -0
- package/dist/components/GradesView/GradebookTable/messages.js +45 -0
- package/dist/components/GradesView/GradebookTable/messages.js.map +1 -0
- package/dist/components/GradesView/GradesView.scss +156 -0
- package/dist/components/GradesView/ImportGradesButton/index.d.ts +5 -0
- package/dist/components/GradesView/ImportGradesButton/index.js +38 -0
- package/dist/components/GradesView/ImportGradesButton/index.js.map +1 -0
- package/dist/components/GradesView/ImportGradesButton/messages.d.ts +16 -0
- package/dist/components/GradesView/ImportGradesButton/messages.js +15 -0
- package/dist/components/GradesView/ImportGradesButton/messages.js.map +1 -0
- package/dist/components/GradesView/ImportSuccessToast/hooks.d.ts +10 -0
- package/dist/components/GradesView/ImportSuccessToast/hooks.js +31 -0
- package/dist/components/GradesView/ImportSuccessToast/hooks.js.map +1 -0
- package/dist/components/GradesView/ImportSuccessToast/index.d.ts +5 -0
- package/dist/components/GradesView/ImportSuccessToast/index.js +15 -0
- package/dist/components/GradesView/ImportSuccessToast/index.js.map +1 -0
- package/dist/components/GradesView/ImportSuccessToast/messages.d.ts +17 -0
- package/dist/components/GradesView/ImportSuccessToast/messages.js +15 -0
- package/dist/components/GradesView/ImportSuccessToast/messages.js.map +1 -0
- package/dist/components/GradesView/InterventionsReport/index.d.ts +2 -0
- package/dist/components/GradesView/InterventionsReport/index.js +27 -0
- package/dist/components/GradesView/InterventionsReport/index.js.map +1 -0
- package/dist/components/GradesView/InterventionsReport/messages.d.ts +25 -0
- package/dist/components/GradesView/InterventionsReport/messages.js +20 -0
- package/dist/components/GradesView/InterventionsReport/messages.js.map +1 -0
- package/dist/components/GradesView/PageButtons/index.d.ts +5 -0
- package/dist/components/GradesView/PageButtons/index.js +14 -0
- package/dist/components/GradesView/PageButtons/index.js.map +1 -0
- package/dist/components/GradesView/PageButtons/messages.d.ts +16 -0
- package/dist/components/GradesView/PageButtons/messages.js +15 -0
- package/dist/components/GradesView/PageButtons/messages.js.map +1 -0
- package/dist/components/GradesView/ScoreViewInput/index.d.ts +5 -0
- package/dist/components/GradesView/ScoreViewInput/index.js +20 -0
- package/dist/components/GradesView/ScoreViewInput/index.js.map +1 -0
- package/dist/components/GradesView/ScoreViewInput/messages.d.ts +24 -0
- package/dist/components/GradesView/ScoreViewInput/messages.js +20 -0
- package/dist/components/GradesView/ScoreViewInput/messages.js.map +1 -0
- package/dist/components/GradesView/SearchControls/hooks.d.ts +9 -0
- package/dist/components/GradesView/SearchControls/hooks.js +34 -0
- package/dist/components/GradesView/SearchControls/hooks.js.map +1 -0
- package/dist/components/GradesView/SearchControls/index.d.ts +5 -0
- package/dist/components/GradesView/SearchControls/index.js +14 -0
- package/dist/components/GradesView/SearchControls/index.js.map +1 -0
- package/dist/components/GradesView/SearchControls/messages.d.ts +16 -0
- package/dist/components/GradesView/SearchControls/messages.js +15 -0
- package/dist/components/GradesView/SearchControls/messages.js.map +1 -0
- package/dist/components/GradesView/SpinnerIcon.d.ts +5 -0
- package/dist/components/GradesView/SpinnerIcon.js +15 -0
- package/dist/components/GradesView/SpinnerIcon.js.map +1 -0
- package/dist/components/GradesView/StatusAlerts/index.d.ts +5 -0
- package/dist/components/GradesView/StatusAlerts/index.js +16 -0
- package/dist/components/GradesView/StatusAlerts/index.js.map +1 -0
- package/dist/components/GradesView/StatusAlerts/messages.d.ts +24 -0
- package/dist/components/GradesView/StatusAlerts/messages.js +20 -0
- package/dist/components/GradesView/StatusAlerts/messages.js.map +1 -0
- package/dist/components/GradesView/data/api.d.ts +44 -0
- package/dist/components/GradesView/data/api.js +64 -0
- package/dist/components/GradesView/data/api.js.map +1 -0
- package/dist/components/GradesView/data/apiHook.d.ts +92 -0
- package/dist/components/GradesView/data/apiHook.js +191 -0
- package/dist/components/GradesView/data/apiHook.js.map +1 -0
- package/dist/components/GradesView/data/hooks.d.ts +32 -0
- package/dist/components/GradesView/data/hooks.js +242 -0
- package/dist/components/GradesView/data/hooks.js.map +1 -0
- package/dist/components/GradesView/data/queryKeys.d.ts +13 -0
- package/dist/components/GradesView/data/queryKeys.js +15 -0
- package/dist/components/GradesView/data/queryKeys.js.map +1 -0
- package/dist/components/GradesView/data/utils.d.ts +96 -0
- package/dist/components/GradesView/data/utils.js +103 -0
- package/dist/components/GradesView/data/utils.js.map +1 -0
- package/dist/components/GradesView/index.d.ts +10 -0
- package/dist/components/GradesView/index.js +35 -0
- package/dist/components/GradesView/index.js.map +1 -0
- package/dist/components/GradesView/messages.d.ts +24 -0
- package/dist/components/GradesView/messages.js +20 -0
- package/dist/components/GradesView/messages.js.map +1 -0
- package/dist/components/NetworkButton/index.d.ts +23 -0
- package/dist/components/NetworkButton/index.js +54 -0
- package/dist/components/NetworkButton/index.js.map +1 -0
- package/dist/components/WithSidebar/WithSidebar.scss +36 -0
- package/dist/components/WithSidebar/index.d.ts +9 -0
- package/dist/components/WithSidebar/index.js +34 -0
- package/dist/components/WithSidebar/index.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -0
- package/dist/containers/GradebookPage/GradebookDataLoader.d.ts +10 -0
- package/dist/containers/GradebookPage/GradebookDataLoader.js +19 -0
- package/dist/containers/GradebookPage/GradebookDataLoader.js.map +1 -0
- package/dist/containers/GradebookPage/index.d.ts +2 -0
- package/dist/containers/GradebookPage/index.js +40 -0
- package/dist/containers/GradebookPage/index.js.map +1 -0
- package/dist/data/api.d.ts +20 -0
- package/dist/data/api.js +36 -0
- package/dist/data/api.js.map +1 -0
- package/dist/data/apiHook.d.ts +40 -0
- package/dist/data/apiHook.js +65 -0
- package/dist/data/apiHook.js.map +1 -0
- package/dist/data/constants/app.d.ts +13 -0
- package/dist/data/constants/app.js +58 -0
- package/dist/data/constants/app.js.map +1 -0
- package/dist/data/constants/errors.d.ts +2 -0
- package/dist/data/constants/errors.js +3 -0
- package/dist/data/constants/errors.js.map +1 -0
- package/dist/data/constants/filters.d.ts +15 -0
- package/dist/data/constants/filters.js +71 -0
- package/dist/data/constants/filters.js.map +1 -0
- package/dist/data/constants/filters.messages.d.ts +56 -0
- package/dist/data/constants/filters.messages.js +40 -0
- package/dist/data/constants/filters.messages.js.map +1 -0
- package/dist/data/constants/grades.d.ts +6 -0
- package/dist/data/constants/grades.js +17 -0
- package/dist/data/constants/grades.js.map +1 -0
- package/dist/data/filtersContext.d.ts +60 -0
- package/dist/data/filtersContext.js +212 -0
- package/dist/data/filtersContext.js.map +1 -0
- package/dist/data/filtersSnapshot.d.ts +20 -0
- package/dist/data/filtersSnapshot.js +15 -0
- package/dist/data/filtersSnapshot.js.map +1 -0
- package/dist/data/formatUtils.d.ts +15 -0
- package/dist/data/formatUtils.js +35 -0
- package/dist/data/formatUtils.js.map +1 -0
- package/dist/data/gradebookUiContext.d.ts +99 -0
- package/dist/data/gradebookUiContext.js +143 -0
- package/dist/data/gradebookUiContext.js.map +1 -0
- package/dist/data/queryClient.d.ts +10 -0
- package/dist/data/queryClient.js +34 -0
- package/dist/data/queryClient.js.map +1 -0
- package/dist/data/queryKeys.d.ts +11 -0
- package/dist/data/queryKeys.js +21 -0
- package/dist/data/queryKeys.js.map +1 -0
- package/dist/data/services/lms/api.d.ts +2 -0
- package/dist/data/services/lms/api.js +104 -0
- package/dist/data/services/lms/api.js.map +1 -0
- package/dist/data/services/lms/constants.d.ts +3 -0
- package/dist/data/services/lms/constants.js +16 -0
- package/dist/data/services/lms/constants.js.map +1 -0
- package/dist/data/services/lms/index.d.ts +2 -0
- package/dist/data/services/lms/index.js +8 -0
- package/dist/data/services/lms/index.js.map +1 -0
- package/dist/data/services/lms/messages.d.ts +2 -0
- package/dist/data/services/lms/messages.js +8 -0
- package/dist/data/services/lms/messages.js.map +1 -0
- package/dist/data/services/lms/urls.d.ts +19 -0
- package/dist/data/services/lms/urls.js +47 -0
- package/dist/data/services/lms/urls.js.map +1 -0
- package/dist/data/services/lms/utils.d.ts +4 -0
- package/dist/data/services/lms/utils.js +34 -0
- package/dist/data/services/lms/utils.js.map +1 -0
- package/dist/data/services/segment/constants.d.ts +8 -0
- package/dist/data/services/segment/constants.js +26 -0
- package/dist/data/services/segment/constants.js.map +1 -0
- package/dist/data/services/segment/events.d.ts +14 -0
- package/dist/data/services/segment/events.js +32 -0
- package/dist/data/services/segment/events.js.map +1 -0
- package/dist/data/utils.d.ts +10 -0
- package/dist/data/utils.js +14 -0
- package/dist/data/utils.js.map +1 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/utils.d.ts +2 -0
- package/dist/i18n/utils.js +21 -0
- package/dist/i18n/utils.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +8 -0
- package/dist/messages.js +10 -0
- package/dist/messages.js.map +1 -0
- package/dist/providers.d.ts +3 -0
- package/dist/providers.js +13 -0
- package/dist/providers.js.map +1 -0
- package/dist/routes.d.ts +11 -0
- package/dist/routes.js +16 -0
- package/dist/routes.js.map +1 -0
- package/dist/style.scss +13 -0
- package/dist/utils/StrictDict.d.ts +2 -0
- package/dist/utils/StrictDict.js +19 -0
- package/dist/utils/StrictDict.js.map +1 -0
- package/dist/utils/formatDate.d.ts +15 -0
- package/dist/utils/formatDate.js +19 -0
- package/dist/utils/formatDate.js.map +1 -0
- package/dist/utils/hoc.d.ts +3 -0
- package/dist/utils/hoc.js +21 -0
- package/dist/utils/hoc.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/keyStore.d.ts +2 -0
- package/dist/utils/keyStore.js +4 -0
- package/dist/utils/keyStore.js.map +1 -0
- package/package.json +89 -0
package/README.rst
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
frontend-app-gradebook
|
|
2
|
+
#######################
|
|
3
|
+
|
|
4
|
+
|Codecov| |npm_version| |npm_downloads| |license| |semantic-release|
|
|
5
|
+
|
|
6
|
+
Purpose
|
|
7
|
+
*******
|
|
8
|
+
|
|
9
|
+
Gradebook allows course staff to view, filter, and override subsection grades for a course. Additionally for Masters courses, Gradebook enables bulk management of subsection grades.
|
|
10
|
+
|
|
11
|
+
Jump to:
|
|
12
|
+
|
|
13
|
+
- `Should I use Gradebook in my course?`_
|
|
14
|
+
- Quickstart_
|
|
15
|
+
|
|
16
|
+
For existing documentation see:
|
|
17
|
+
|
|
18
|
+
- Basic Usage: `Review Learner Grades (read-the-docs) <https://docs.openedx.org/en/latest/educators/how-tos/data/view_learner_grades.html>`_
|
|
19
|
+
- Bulk Grade Management: `Override Learner Subsection Scores in Bulk (read-the-docs) <https://docs.openedx.org/en/latest/educators/how-tos/data/manage_learner_grades.html#override-learner-subsection-scores-in-bulk>`_
|
|
20
|
+
|
|
21
|
+
Branches and releases
|
|
22
|
+
*********************
|
|
23
|
+
|
|
24
|
+
This repository follows `OEP-10 ADR 0002
|
|
25
|
+
<https://docs.openedx.org/projects/openedx-proposals/en/latest/processes/oep-0010/decisions/0002-frontend-stable-branches.html>`_:
|
|
26
|
+
|
|
27
|
+
- ``master`` is the unstable development branch; every conventional commit
|
|
28
|
+
publishes a prerelease of ``@openedx/frontend-app-gradebook`` to npm.
|
|
29
|
+
- ``stable`` carries the current stable major, published on the ``latest``
|
|
30
|
+
dist-tag. Older stable lines live on ``n.x`` / ``n.m.x`` branches as needed.
|
|
31
|
+
- The repository no longer participates in Open edX releases by branch: the
|
|
32
|
+
legacy micro-frontend and any further ``release/RELEASENAME`` branches for it
|
|
33
|
+
live on the `legacy-mfe
|
|
34
|
+
<https://github.com/openedx/frontend-app-gradebook/tree/legacy-mfe>`_ branch.
|
|
35
|
+
|
|
36
|
+
Should I use Gradebook in my course?
|
|
37
|
+
*************************************
|
|
38
|
+
|
|
39
|
+
What does this offer over the legacy gradebook?
|
|
40
|
+
================================================
|
|
41
|
+
|
|
42
|
+
This frontend app offers a great deal more granularity when searching for problems, an easy interface for editing grades, an
|
|
43
|
+
audit trail for seeing who edited what grade and what reason they gave (if any) for doing so.
|
|
44
|
+
|
|
45
|
+
Problems can be filtered by student as in the traditional gradebook, but can also be filtered by scores to see who
|
|
46
|
+
scored within a certain range, and by assignment types (note: Not problem types, but categories like 'Exams' or
|
|
47
|
+
'Homework').
|
|
48
|
+
|
|
49
|
+
What does the legacy gradebook offer that this project does not?
|
|
50
|
+
=================================================================
|
|
51
|
+
|
|
52
|
+
This project does not (yet, at least) create any graphs, which the traditional gradebook does. It also does not give
|
|
53
|
+
quick links to the problems for the instructor to visit. It expects the instructor to be familiar with the problems they
|
|
54
|
+
are grading and which unit they refer to.
|
|
55
|
+
|
|
56
|
+
The gradebook is expected to be much more performant for larger numbers of students as well. The Instructor Dashboard
|
|
57
|
+
link for the legacy gradebook reports that "this feature is available only to courses with a small number of enrolled
|
|
58
|
+
learners." However, this project comes with no such warning.
|
|
59
|
+
|
|
60
|
+
Who should not change to this gradebook?
|
|
61
|
+
=========================================
|
|
62
|
+
|
|
63
|
+
Groups whose instructors need not ever manually override grades do not need this project, but may not be any worse off
|
|
64
|
+
depending on their needs. Instructors that expect to review grades infrequently enough that not having a direct link
|
|
65
|
+
to the problem in question will have a worse UX than the legacy gradebook provides. Instructors that rely on the graphs
|
|
66
|
+
generated by the current gradebook might find the lack of autogenerated graphs to be frustrating.
|
|
67
|
+
|
|
68
|
+
Getting Started
|
|
69
|
+
***************
|
|
70
|
+
|
|
71
|
+
Installation
|
|
72
|
+
============
|
|
73
|
+
|
|
74
|
+
To install gradebook into your project:
|
|
75
|
+
|
|
76
|
+
.. code-block:: bash
|
|
77
|
+
|
|
78
|
+
npm i --save @openedx/frontend-app-gradebook
|
|
79
|
+
|
|
80
|
+
Quickstart
|
|
81
|
+
==========
|
|
82
|
+
|
|
83
|
+
Cloning and Setup
|
|
84
|
+
-----------------
|
|
85
|
+
|
|
86
|
+
1. Clone your new repo:
|
|
87
|
+
|
|
88
|
+
.. code-block:: bash
|
|
89
|
+
|
|
90
|
+
git clone https://github.com/openedx/frontend-app-gradebook.git
|
|
91
|
+
|
|
92
|
+
2. Use the version of Node specified in ``.nvmrc``
|
|
93
|
+
|
|
94
|
+
3. Stop Tutor, if it's running:
|
|
95
|
+
|
|
96
|
+
.. code-block:: bash
|
|
97
|
+
|
|
98
|
+
tutor dev stop
|
|
99
|
+
|
|
100
|
+
4. Tell Tutor that we're going to be running this repo in development mode, so it should be excluded from the container that otherwise runs every frontend app. Run this:
|
|
101
|
+
|
|
102
|
+
.. code-block:: bash
|
|
103
|
+
|
|
104
|
+
tutor mounts add /path/to/frontend-app-gradebook
|
|
105
|
+
|
|
106
|
+
5. Start Tutor in development mode. This command will start the LMS and Studio,
|
|
107
|
+
and other required frontend apps like ``authn`` and ``account``, but will not start
|
|
108
|
+
Gradebook, which we're going to run on the host instead of in a container
|
|
109
|
+
managed by Tutor. Run:
|
|
110
|
+
|
|
111
|
+
.. code-block:: bash
|
|
112
|
+
|
|
113
|
+
tutor dev start lms cms mfe
|
|
114
|
+
|
|
115
|
+
Startup
|
|
116
|
+
-------
|
|
117
|
+
|
|
118
|
+
1. Install npm dependencies:
|
|
119
|
+
|
|
120
|
+
.. code-block:: bash
|
|
121
|
+
|
|
122
|
+
cd frontend-app-gradebook && npm install
|
|
123
|
+
|
|
124
|
+
2. Start the dev server:
|
|
125
|
+
|
|
126
|
+
.. code-block:: bash
|
|
127
|
+
|
|
128
|
+
npm run dev
|
|
129
|
+
|
|
130
|
+
Running the UI Standalone
|
|
131
|
+
==========================
|
|
132
|
+
|
|
133
|
+
To install the project please refer to the `Tutor MFE plugin <https://github.com/overhangio/tutor-mfe?tab=readme-ov-file#mfe-development>`_ instructions.
|
|
134
|
+
|
|
135
|
+
When not mounted, gradebook runs in the shared frontend app container at http://apps.local.openedx.io/gradebook/course-v1:edX+DemoX+Demo_Course.
|
|
136
|
+
|
|
137
|
+
When mounted in the tutor ``gradebook`` container, or when running a local (host) dev server, the app runs on port **1994**, so when you go to http://apps.local.openedx.io:1994/gradebook/course-v1:edX+DemoX+Demo_Course you should see the UI (assuming you have such a Demo Course in your Tutor instance). Note that you always have to provide a course id to actually see a gradebook.
|
|
138
|
+
|
|
139
|
+
Starting the dev server hot-reloads JavaScript and Sass changes, so you should (:crossed_fingers:) not need to do anything (other than wait) when making changes.
|
|
140
|
+
|
|
141
|
+
Developing against a local frontend-base
|
|
142
|
+
=========================================
|
|
143
|
+
|
|
144
|
+
This frontend app supports `npm workspaces <https://docs.npmjs.com/cli/using-npm/workspaces>`_ so you can develop against a local ``frontend-base`` checkout and see changes reflected automatically. See the ``dev:packages`` script in ``package.json`` and the workspace-related targets in the ``Makefile``.
|
|
145
|
+
|
|
146
|
+
Plugins
|
|
147
|
+
*******
|
|
148
|
+
|
|
149
|
+
This frontend app is built on `frontend-base <https://github.com/openedx/frontend-base>`_ and can be customized through the shell's plugin slot mechanism (``<Slot />``). Any slots this app exposes for host sites to override live under ``src/slots``.
|
|
150
|
+
|
|
151
|
+
Running tests
|
|
152
|
+
*************
|
|
153
|
+
|
|
154
|
+
Run:
|
|
155
|
+
|
|
156
|
+
.. code-block:: bash
|
|
157
|
+
|
|
158
|
+
nvm use
|
|
159
|
+
|
|
160
|
+
npm ci
|
|
161
|
+
|
|
162
|
+
npm test
|
|
163
|
+
|
|
164
|
+
Directory Structure
|
|
165
|
+
*******************
|
|
166
|
+
|
|
167
|
+
* ``public``
|
|
168
|
+
|
|
169
|
+
* Static assets served at the site root when running the dev harness.
|
|
170
|
+
|
|
171
|
+
* ``src``
|
|
172
|
+
|
|
173
|
+
* ``Main.tsx``
|
|
174
|
+
|
|
175
|
+
* Root component the routed entry lazy-loads; sets the document title with ``<Helmet>`` and mounts the app's providers around the page tree.
|
|
176
|
+
|
|
177
|
+
* ``app.ts``
|
|
178
|
+
|
|
179
|
+
* The ``App`` object consumed by ``site.config.*.tsx`` — wires ``appId``, ``routes``, and ``providers`` for frontend-base to register.
|
|
180
|
+
|
|
181
|
+
* ``routes.tsx``
|
|
182
|
+
|
|
183
|
+
* React Router route definitions for the app.
|
|
184
|
+
|
|
185
|
+
* ``providers.tsx``
|
|
186
|
+
|
|
187
|
+
* App-scoped context providers registered with frontend-base.
|
|
188
|
+
|
|
189
|
+
* ``slots``
|
|
190
|
+
|
|
191
|
+
* Slots this app exposes for host sites to plug into.
|
|
192
|
+
|
|
193
|
+
* ``components``
|
|
194
|
+
|
|
195
|
+
* Presentational and container React components.
|
|
196
|
+
|
|
197
|
+
* ``containers``
|
|
198
|
+
|
|
199
|
+
* Route-level container components.
|
|
200
|
+
|
|
201
|
+
* ``data``
|
|
202
|
+
|
|
203
|
+
* API hooks, query keys, React Query client, and shared context (filters, gradebook UI).
|
|
204
|
+
|
|
205
|
+
* ``i18n``
|
|
206
|
+
|
|
207
|
+
* i18n entry point and generated messages (managed via ``openedx translations:pull``).
|
|
208
|
+
|
|
209
|
+
* ``site.config.dev.tsx``
|
|
210
|
+
|
|
211
|
+
* Dev harness configuration — registers the shell, header, footer, and this app for local development.
|
|
212
|
+
|
|
213
|
+
License
|
|
214
|
+
*******
|
|
215
|
+
|
|
216
|
+
The code in this repository is licensed under the AGPLv3 unless otherwise
|
|
217
|
+
noted.
|
|
218
|
+
|
|
219
|
+
Please see `LICENSE <LICENSE>`_ for details.
|
|
220
|
+
|
|
221
|
+
Contributing
|
|
222
|
+
************
|
|
223
|
+
|
|
224
|
+
Contributions are very welcome. Please read `How To Contribute`_ for details.
|
|
225
|
+
|
|
226
|
+
.. _How To Contribute: https://openedx.org/r/how-to-contribute
|
|
227
|
+
|
|
228
|
+
This project is currently accepting all types of contributions, bug fixes,
|
|
229
|
+
security fixes, maintenance work, or new features. However, please make sure
|
|
230
|
+
to have a discussion about your new feature idea with the maintainers prior to
|
|
231
|
+
beginning development to maximize the chances of your change being accepted.
|
|
232
|
+
You can start a conversation by creating a new issue on this repo summarizing
|
|
233
|
+
your idea.
|
|
234
|
+
|
|
235
|
+
Getting Help
|
|
236
|
+
************
|
|
237
|
+
|
|
238
|
+
If you're having trouble, we have discussion forums at
|
|
239
|
+
https://discuss.openedx.org where you can connect with others in the community.
|
|
240
|
+
|
|
241
|
+
Our real-time conversations are on Slack. You can request a `Slack
|
|
242
|
+
invitation`_, then join our `community Slack workspace`_. Because this is a
|
|
243
|
+
frontend repository, the best place to discuss it would be in the
|
|
244
|
+
`#wg-frontend channel`_.
|
|
245
|
+
|
|
246
|
+
For anything non-trivial, the best path is to open an issue in this repository
|
|
247
|
+
with as many details about the issue you are facing as you can provide.
|
|
248
|
+
|
|
249
|
+
https://github.com/openedx/frontend-app-gradebook/issues
|
|
250
|
+
|
|
251
|
+
For more information about these options, see the `Getting Help`_ page.
|
|
252
|
+
|
|
253
|
+
.. _Slack invitation: https://openedx.org/slack
|
|
254
|
+
.. _community Slack workspace: https://openedx.slack.com/
|
|
255
|
+
.. _#wg-frontend channel: https://openedx.slack.com/archives/C04BM6YC7A6
|
|
256
|
+
.. _Getting Help: https://openedx.org/community/connect
|
|
257
|
+
|
|
258
|
+
The Open edX Code of Conduct
|
|
259
|
+
*****************************
|
|
260
|
+
|
|
261
|
+
All community members are expected to follow the `Open edX Code of Conduct`_.
|
|
262
|
+
|
|
263
|
+
.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/
|
|
264
|
+
|
|
265
|
+
Reporting Security Issues
|
|
266
|
+
**************************
|
|
267
|
+
|
|
268
|
+
Please do not report security issues in public. Please email security@openedx.org.
|
|
269
|
+
|
|
270
|
+
.. |Codecov| image:: https://img.shields.io/codecov/c/gh/openedx/frontend-app-gradebook
|
|
271
|
+
:target: https://app.codecov.io/gh/openedx/frontend-app-gradebook
|
|
272
|
+
.. |npm_version| image:: https://img.shields.io/npm/v/@openedx/frontend-app-gradebook.svg
|
|
273
|
+
:target: @openedx/frontend-app-gradebook
|
|
274
|
+
.. |npm_downloads| image:: https://img.shields.io/npm/dt/@openedx/frontend-app-gradebook.svg
|
|
275
|
+
:target: @openedx/frontend-app-gradebook
|
|
276
|
+
.. |license| image:: https://img.shields.io/npm/l/@openedx/frontend-app-gradebook.svg
|
|
277
|
+
:target: @openedx/frontend-app-gradebook
|
|
278
|
+
.. |semantic-release| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
|
|
279
|
+
:target: https://github.com/semantic-release/semantic-release
|
package/dist/Main.d.ts
ADDED
package/dist/Main.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CurrentAppProvider, PageWrap, getSiteConfig, useIntl } from '@openedx/frontend-base';
|
|
3
|
+
import { Helmet } from 'react-helmet';
|
|
4
|
+
import { appId } from './constants';
|
|
5
|
+
import { FiltersProvider } from './data/filtersContext';
|
|
6
|
+
import { GradebookUiProvider } from './data/gradebookUiContext';
|
|
7
|
+
import GradebookPage from './containers/GradebookPage';
|
|
8
|
+
import messages from './messages';
|
|
9
|
+
import './style.scss';
|
|
10
|
+
const Main = () => {
|
|
11
|
+
const { formatMessage } = useIntl();
|
|
12
|
+
return (_jsxs(CurrentAppProvider, { appId: appId, children: [_jsx(Helmet, { children: _jsx("title", { children: formatMessage(messages['gradebook.page.title'], {
|
|
13
|
+
siteName: getSiteConfig().siteName,
|
|
14
|
+
}) }) }), _jsx(FiltersProvider, { children: _jsx(GradebookUiProvider, { children: _jsx(PageWrap, { children: _jsx(GradebookPage, {}) }) }) })] }));
|
|
15
|
+
};
|
|
16
|
+
export default Main;
|
|
17
|
+
//# sourceMappingURL=Main.js.map
|
package/dist/Main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Main.js","sourceRoot":"","sources":["../src/Main.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,cAAc,CAAC;AAEtB,MAAM,IAAI,GAAG,GAAG,EAAE;IAChB,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,OAAO,CACL,MAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,aAC9B,KAAC,MAAM,cACL,0BACG,aAAa,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE;wBAC/C,QAAQ,EAAE,aAAa,EAAE,CAAC,QAAQ;qBACnC,CAAC,GACI,GACD,EACT,KAAC,eAAe,cACd,KAAC,mBAAmB,cAClB,KAAC,QAAQ,cACP,KAAC,aAAa,KAAG,GACR,GACS,GACN,IACC,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import { CurrentAppProvider, PageWrap, getSiteConfig, useIntl } from '@openedx/frontend-base';\nimport { Helmet } from 'react-helmet';\nimport { appId } from './constants';\nimport { FiltersProvider } from '@src/data/filtersContext';\nimport { GradebookUiProvider } from '@src/data/gradebookUiContext';\nimport GradebookPage from '@src/containers/GradebookPage';\nimport messages from './messages';\nimport './style.scss';\n\nconst Main = () => {\n const { formatMessage } = useIntl();\n return (\n <CurrentAppProvider appId={appId}>\n <Helmet>\n <title>\n {formatMessage(messages['gradebook.page.title'], {\n siteName: getSiteConfig().siteName,\n })}\n </title>\n </Helmet>\n <FiltersProvider>\n <GradebookUiProvider>\n <PageWrap>\n <GradebookPage />\n </PageWrap>\n </GradebookUiProvider>\n </FiltersProvider>\n </CurrentAppProvider>\n );\n};\n\nexport default Main;\n"]}
|
package/dist/app.d.ts
ADDED
package/dist/app.js
ADDED
package/dist/app.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,GAAG,GAAQ;IACf,KAAK;IACL,MAAM;IACN,SAAS;CACV,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { App } from '@openedx/frontend-base';\nimport { appId } from './constants';\nimport routes from './routes';\nimport providers from './providers';\n\nconst app: App = {\n appId,\n routes,\n providers,\n};\n\nexport default app;\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FormattedMessage } from '@openedx/frontend-base';
|
|
3
|
+
import { Alert } from '@openedx/paragon';
|
|
4
|
+
import { useGradebookUi } from '../../data/gradebookUiContext';
|
|
5
|
+
import messages from './messages';
|
|
6
|
+
/**
|
|
7
|
+
* <BulkManagementAlerts />
|
|
8
|
+
* Alerts to display at the top of the BulkManagement tab.
|
|
9
|
+
*/
|
|
10
|
+
export const BulkManagementAlerts = () => {
|
|
11
|
+
const { csvUploadSuccess, csvUploadErrorMessages } = useGradebookUi();
|
|
12
|
+
// Mirrors the old `selectors.grades.bulkImportError` string formatting.
|
|
13
|
+
const bulkImportError = csvUploadErrorMessages.length
|
|
14
|
+
? `Errors while processing: ${csvUploadErrorMessages.join('; ')};`
|
|
15
|
+
: '';
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx(Alert, { variant: "danger", show: !!bulkImportError, dismissible: false, children: bulkImportError }), _jsx(Alert, { variant: "success", show: csvUploadSuccess, dismissible: false, children: _jsx(FormattedMessage, Object.assign({}, messages.successDialog)) })] }));
|
|
17
|
+
};
|
|
18
|
+
BulkManagementAlerts.propTypes = {};
|
|
19
|
+
export default BulkManagementAlerts;
|
|
20
|
+
//# sourceMappingURL=BulkManagementAlerts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BulkManagementAlerts.js","sourceRoot":"","sources":["../../../src/components/BulkManagementHistoryView/BulkManagementAlerts.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,MAAM,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,GAAG,cAAc,EAAE,CAAC;IACtE,wEAAwE;IACxE,MAAM,eAAe,GAAG,sBAAsB,CAAC,MAAM;QACnD,CAAC,CAAC,4BAA4B,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QAClE,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,CACL,8BACE,KAAC,KAAK,IACJ,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAE,CAAC,CAAC,eAAe,EACvB,WAAW,EAAE,KAAK,YAEjB,eAAe,GACV,EACR,KAAC,KAAK,IACJ,OAAO,EAAC,SAAS,EACjB,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,KAAK,YAElB,KAAC,gBAAgB,oBAAK,QAAQ,CAAC,aAAa,EAAI,GAC1C,IACP,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,SAAS,GAAG,EAAE,CAAC;AAEpC,eAAe,oBAAoB,CAAC","sourcesContent":["import { FormattedMessage } from '@openedx/frontend-base';\n\nimport { Alert } from '@openedx/paragon';\n\nimport { useGradebookUi } from '@src/data/gradebookUiContext';\nimport messages from './messages';\n\n/**\n * <BulkManagementAlerts />\n * Alerts to display at the top of the BulkManagement tab.\n */\nexport const BulkManagementAlerts = () => {\n const { csvUploadSuccess, csvUploadErrorMessages } = useGradebookUi();\n // Mirrors the old `selectors.grades.bulkImportError` string formatting.\n const bulkImportError = csvUploadErrorMessages.length\n ? `Errors while processing: ${csvUploadErrorMessages.join('; ')};`\n : '';\n\n return (\n <>\n <Alert\n variant=\"danger\"\n show={!!bulkImportError}\n dismissible={false}\n >\n {bulkImportError}\n </Alert>\n <Alert\n variant=\"success\"\n show={csvUploadSuccess}\n dismissible={false}\n >\n <FormattedMessage {...messages.successDialog} />\n </Alert>\n </>\n );\n};\n\nBulkManagementAlerts.propTypes = {};\n\nexport default BulkManagementAlerts;\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function mapHistoryRows({ resultsSummary, originalFilename, user, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
resultsSummary: any;
|
|
4
|
+
originalFilename: any;
|
|
5
|
+
user: any;
|
|
6
|
+
}): {
|
|
7
|
+
resultsSummary: import("react").JSX.Element;
|
|
8
|
+
filename: import("react").JSX.Element;
|
|
9
|
+
user: import("react").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export function HistoryTable({ bulkManagementHistory, }: {
|
|
12
|
+
bulkManagementHistory: any;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export namespace HistoryTable {
|
|
15
|
+
namespace defaultProps {
|
|
16
|
+
let bulkManagementHistory: never[];
|
|
17
|
+
}
|
|
18
|
+
namespace propTypes {
|
|
19
|
+
let bulkManagementHistory_1: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
20
|
+
originalFilename: PropTypes.Validator<string>;
|
|
21
|
+
user: PropTypes.Validator<string>;
|
|
22
|
+
timeUploaded: PropTypes.Validator<string>;
|
|
23
|
+
resultsSummary: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
|
+
rowId: PropTypes.Validator<number>;
|
|
25
|
+
text: PropTypes.Validator<string>;
|
|
26
|
+
}>>;
|
|
27
|
+
}> | null | undefined)[]>;
|
|
28
|
+
export { bulkManagementHistory_1 as bulkManagementHistory };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function HistoryTableContainer(): import("react").JSX.Element;
|
|
32
|
+
export default HistoryTableContainer;
|
|
33
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
14
|
+
import { DataTable } from '@openedx/paragon';
|
|
15
|
+
import { bulkManagementColumns } from '../../data/constants/app';
|
|
16
|
+
import { useBulkManagementHistoryEntries } from './data/apiHook';
|
|
17
|
+
import ResultsSummary from './ResultsSummary';
|
|
18
|
+
export const mapHistoryRows = (_a) => {
|
|
19
|
+
var { resultsSummary, originalFilename, user } = _a, rest = __rest(_a, ["resultsSummary", "originalFilename", "user"]);
|
|
20
|
+
return (Object.assign({ resultsSummary: (_jsx(ResultsSummary, Object.assign({}, resultsSummary))), filename: (_jsx("span", { className: "wrap-text-in-cell", children: originalFilename })), user: (_jsx("span", { className: "wrap-text-in-cell", children: user })) }, rest));
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* <HistoryTable />
|
|
24
|
+
* Table with history of bulk management uploads, including a results summary which
|
|
25
|
+
* displays total, skipped, and failed uploads
|
|
26
|
+
*/
|
|
27
|
+
export const HistoryTable = ({ bulkManagementHistory, }) => (_jsx(DataTable, { data: bulkManagementHistory.map(mapHistoryRows), hasFixedColumnWidths: true, columns: bulkManagementColumns, className: "table-striped", itemCount: bulkManagementHistory.length }));
|
|
28
|
+
HistoryTable.defaultProps = {
|
|
29
|
+
bulkManagementHistory: [],
|
|
30
|
+
};
|
|
31
|
+
HistoryTable.propTypes = {
|
|
32
|
+
// redux
|
|
33
|
+
bulkManagementHistory: PropTypes.arrayOf(PropTypes.shape({
|
|
34
|
+
originalFilename: PropTypes.string.isRequired,
|
|
35
|
+
user: PropTypes.string.isRequired,
|
|
36
|
+
timeUploaded: PropTypes.string.isRequired,
|
|
37
|
+
resultsSummary: PropTypes.shape({
|
|
38
|
+
rowId: PropTypes.number.isRequired,
|
|
39
|
+
text: PropTypes.string.isRequired,
|
|
40
|
+
}),
|
|
41
|
+
})),
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* <HistoryTableContainer />
|
|
45
|
+
* Supplies the bulk-management history (now from React Query) to the
|
|
46
|
+
* presentational <HistoryTable />.
|
|
47
|
+
*/
|
|
48
|
+
export const HistoryTableContainer = () => {
|
|
49
|
+
const bulkManagementHistory = useBulkManagementHistoryEntries();
|
|
50
|
+
return _jsx(HistoryTable, { bulkManagementHistory: bulkManagementHistory });
|
|
51
|
+
};
|
|
52
|
+
export default HistoryTableContainer;
|
|
53
|
+
//# sourceMappingURL=HistoryTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HistoryTable.js","sourceRoot":"","sources":["../../../src/components/BulkManagementHistoryView/HistoryTable.jsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAK9B,EAAE,EAAE;QAL0B,EAC7B,cAAc,EACd,gBAAgB,EAChB,IAAI,OAEL,EADI,IAAI,cAJsB,8CAK9B,CADQ;IACH,OAAA,iBACJ,cAAc,EAAE,CAAC,KAAC,cAAc,oBAAK,cAAc,EAAI,CAAC,EACxD,QAAQ,EAAE,CAAC,eAAM,SAAS,EAAC,mBAAmB,YAAE,gBAAgB,GAAQ,CAAC,EACzE,IAAI,EAAE,CAAC,eAAM,SAAS,EAAC,mBAAmB,YAAE,IAAI,GAAQ,CAAC,IACtD,IAAI,EACP,CAAA;CAAA,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,qBAAqB,GACtB,EAAE,EAAE,CAAC,CACJ,KAAC,SAAS,IACR,IAAI,EAAE,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC,EAC/C,oBAAoB,QACpB,OAAO,EAAE,qBAAqB,EAC9B,SAAS,EAAC,eAAe,EACzB,SAAS,EAAE,qBAAqB,CAAC,MAAM,GACvC,CACH,CAAC;AACF,YAAY,CAAC,YAAY,GAAG;IAC1B,qBAAqB,EAAE,EAAE;CAC1B,CAAC;AACF,YAAY,CAAC,SAAS,GAAG;IACvB,QAAQ;IACR,qBAAqB,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;QACvD,gBAAgB,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;QAC7C,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;QACjC,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;QACzC,cAAc,EAAE,SAAS,CAAC,KAAK,CAAC;YAC9B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;YAClC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;SAClC,CAAC;KACH,CAAC,CAAC;CACJ,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,qBAAqB,GAAG,+BAA+B,EAAE,CAAC;IAChE,OAAO,KAAC,YAAY,IAAC,qBAAqB,EAAE,qBAAqB,GAAI,CAAC;AACxE,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { DataTable } from '@openedx/paragon';\n\nimport { bulkManagementColumns } from '@src/data/constants/app';\nimport { useBulkManagementHistoryEntries } from './data/apiHook';\n\nimport ResultsSummary from './ResultsSummary';\n\nexport const mapHistoryRows = ({\n resultsSummary,\n originalFilename,\n user,\n ...rest\n}) => ({\n resultsSummary: (<ResultsSummary {...resultsSummary} />),\n filename: (<span className=\"wrap-text-in-cell\">{originalFilename}</span>),\n user: (<span className=\"wrap-text-in-cell\">{user}</span>),\n ...rest,\n});\n\n/**\n * <HistoryTable />\n * Table with history of bulk management uploads, including a results summary which\n * displays total, skipped, and failed uploads\n */\nexport const HistoryTable = ({\n bulkManagementHistory,\n}) => (\n <DataTable\n data={bulkManagementHistory.map(mapHistoryRows)}\n hasFixedColumnWidths\n columns={bulkManagementColumns}\n className=\"table-striped\"\n itemCount={bulkManagementHistory.length}\n />\n);\nHistoryTable.defaultProps = {\n bulkManagementHistory: [],\n};\nHistoryTable.propTypes = {\n // redux\n bulkManagementHistory: PropTypes.arrayOf(PropTypes.shape({\n originalFilename: PropTypes.string.isRequired,\n user: PropTypes.string.isRequired,\n timeUploaded: PropTypes.string.isRequired,\n resultsSummary: PropTypes.shape({\n rowId: PropTypes.number.isRequired,\n text: PropTypes.string.isRequired,\n }),\n })),\n};\n\n/**\n * <HistoryTableContainer />\n * Supplies the bulk-management history (now from React Query) to the\n * presentational <HistoryTable />.\n */\nexport const HistoryTableContainer = () => {\n const bulkManagementHistory = useBulkManagementHistoryEntries();\n return <HistoryTable bulkManagementHistory={bulkManagementHistory} />;\n};\n\nexport default HistoryTableContainer;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default ResultsSummary;
|
|
2
|
+
/**
|
|
3
|
+
* <ResultsSummary {...{ courseId, rowId, text }} />
|
|
4
|
+
* displays a result summary cell for a single bulk management upgrade history entry.
|
|
5
|
+
* @param {string} courseId - course identifier
|
|
6
|
+
* @param {number} rowId - row/error identifier
|
|
7
|
+
* @param {string} text - summary string
|
|
8
|
+
*/
|
|
9
|
+
declare function ResultsSummary({ rowId, text, }: string): import("react").JSX.Element;
|
|
10
|
+
declare namespace ResultsSummary {
|
|
11
|
+
namespace propTypes {
|
|
12
|
+
let rowId: PropTypes.Validator<number>;
|
|
13
|
+
let text: PropTypes.Validator<string>;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Hyperlink, Icon } from '@openedx/paragon';
|
|
4
|
+
import { Download } from '@openedx/paragon/icons';
|
|
5
|
+
import lms from '../../data/services/lms';
|
|
6
|
+
/**
|
|
7
|
+
* <ResultsSummary {...{ courseId, rowId, text }} />
|
|
8
|
+
* displays a result summary cell for a single bulk management upgrade history entry.
|
|
9
|
+
* @param {string} courseId - course identifier
|
|
10
|
+
* @param {number} rowId - row/error identifier
|
|
11
|
+
* @param {string} text - summary string
|
|
12
|
+
*/
|
|
13
|
+
const ResultsSummary = ({ rowId, text, }) => (_jsxs(Hyperlink, { destination: lms.urls.bulkGradesUrlByRow(rowId), target: "_blank", showLaunchIcon: false, children: [_jsx(Icon, { src: Download, className: "d-inline-block" }), text] }));
|
|
14
|
+
ResultsSummary.propTypes = {
|
|
15
|
+
rowId: PropTypes.number.isRequired,
|
|
16
|
+
text: PropTypes.string.isRequired,
|
|
17
|
+
};
|
|
18
|
+
export default ResultsSummary;
|
|
19
|
+
//# sourceMappingURL=ResultsSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResultsSummary.js","sourceRoot":"","sources":["../../../src/components/BulkManagementHistoryView/ResultsSummary.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,GAAG,MAAM,wBAAwB,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,EACL,IAAI,GACL,EAAE,EAAE,CAAC,CACJ,MAAC,SAAS,IACR,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAC/C,MAAM,EAAC,QAAQ,EACf,cAAc,EAAE,KAAK,aAErB,KAAC,IAAI,IAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,gBAAgB,GAAG,EACjD,IAAI,IACK,CACb,CAAC;AAEF,cAAc,CAAC,SAAS,GAAG;IACzB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IAClC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;CAClC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { Hyperlink, Icon } from '@openedx/paragon';\nimport { Download } from '@openedx/paragon/icons';\n\nimport lms from '@src/data/services/lms';\n\n/**\n * <ResultsSummary {...{ courseId, rowId, text }} />\n * displays a result summary cell for a single bulk management upgrade history entry.\n * @param {string} courseId - course identifier\n * @param {number} rowId - row/error identifier\n * @param {string} text - summary string\n */\nconst ResultsSummary = ({\n rowId,\n text,\n}) => (\n <Hyperlink\n destination={lms.urls.bulkGradesUrlByRow(rowId)}\n target=\"_blank\"\n showLaunchIcon={false}\n >\n <Icon src={Download} className=\"d-inline-block\" />\n {text}\n </Hyperlink>\n);\n\nResultsSummary.propTypes = {\n rowId: PropTypes.number.isRequired,\n text: PropTypes.string.isRequired,\n};\n\nexport default ResultsSummary;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import lms from '../../../data/services/lms';
|
|
11
|
+
/**
|
|
12
|
+
* getBulkOperationHistory()
|
|
13
|
+
* Fetches the bulk grade-override upload history for the course.
|
|
14
|
+
*/
|
|
15
|
+
export const getBulkOperationHistory = () => __awaiter(void 0, void 0, void 0, function* () { return lms.api.fetch.gradeBulkOperationHistory(); });
|
|
16
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/components/BulkManagementHistoryView/data/api.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,GAAG,MAAM,wBAAwB,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAS,EAAE,kDAAC,OAAA,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAA,GAAA,CAAC","sourcesContent":["import lms from '@src/data/services/lms';\n\n/**\n * getBulkOperationHistory()\n * Fetches the bulk grade-override upload history for the course.\n */\nexport const getBulkOperationHistory = async () => lms.api.fetch.gradeBulkOperationHistory();\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useBulkOperationHistory()
|
|
3
|
+
* Bulk grade-override upload history. Single-responsibility query hook: the
|
|
4
|
+
* caller decides when it may run via `courseId` and `enabled`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useBulkOperationHistory: (courseId: string, { enabled }?: {
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
9
|
+
/**
|
|
10
|
+
* useBulkManagementHistoryEntries()
|
|
11
|
+
* Read-model for the history table: wires the roles + assignment-types gates
|
|
12
|
+
* into `useBulkOperationHistory` and shapes the results with
|
|
13
|
+
* `transformHistoryEntry`. Replaces the former facade selector
|
|
14
|
+
* `selectors.grades.useBulkManagementHistoryEntries`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useBulkManagementHistoryEntries: () => any;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useQuery } from '@tanstack/react-query';
|
|
2
|
+
import { useAssignmentTypes, useCourseIdWithGate } from '../../../data/apiHook';
|
|
3
|
+
import { getBulkOperationHistory } from './api';
|
|
4
|
+
import { bulkOperationHistoryQueryKeys } from './queryKeys';
|
|
5
|
+
import { transformHistoryEntry } from './utils';
|
|
6
|
+
// Stable empty reference so the shaped read-model hook doesn't return a fresh
|
|
7
|
+
// array on every render while the query is still loading.
|
|
8
|
+
const EMPTY_ARRAY = [];
|
|
9
|
+
/**
|
|
10
|
+
* useBulkOperationHistory()
|
|
11
|
+
* Bulk grade-override upload history. Single-responsibility query hook: the
|
|
12
|
+
* caller decides when it may run via `courseId` and `enabled`.
|
|
13
|
+
*/
|
|
14
|
+
export const useBulkOperationHistory = (courseId, { enabled = true } = {}) => useQuery({
|
|
15
|
+
queryKey: bulkOperationHistoryQueryKeys.byCourse(courseId),
|
|
16
|
+
queryFn: getBulkOperationHistory,
|
|
17
|
+
enabled: !!courseId && enabled,
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* useBulkManagementHistoryEntries()
|
|
21
|
+
* Read-model for the history table: wires the roles + assignment-types gates
|
|
22
|
+
* into `useBulkOperationHistory` and shapes the results with
|
|
23
|
+
* `transformHistoryEntry`. Replaces the former facade selector
|
|
24
|
+
* `selectors.grades.useBulkManagementHistoryEntries`.
|
|
25
|
+
*/
|
|
26
|
+
export const useBulkManagementHistoryEntries = () => {
|
|
27
|
+
const { courseId, enabled } = useCourseIdWithGate();
|
|
28
|
+
const { data: assignmentTypesData } = useAssignmentTypes(courseId, { enabled });
|
|
29
|
+
const { data } = useBulkOperationHistory(courseId, {
|
|
30
|
+
enabled: enabled && !!(assignmentTypesData === null || assignmentTypesData === void 0 ? void 0 : assignmentTypesData.bulkManagementAvailable),
|
|
31
|
+
});
|
|
32
|
+
return (data !== null && data !== void 0 ? data : EMPTY_ARRAY).map(transformHistoryEntry);
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=apiHook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiHook.js","sourceRoot":"","sources":["../../../../src/components/BulkManagementHistoryView/data/apiHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,8EAA8E;AAC9E,0DAA0D;AAC1D,MAAM,WAAW,GAAY,EAAE,CAAC;AAEhC;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,QAAgB,EAChB,EAAE,OAAO,GAAG,IAAI,KAA4B,EAAE,EAC9C,EAAE,CAAC,QAAQ,CAAC;IACZ,QAAQ,EAAE,6BAA6B,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC1D,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,CAAC,CAAC,QAAQ,IAAI,OAAO;CAC/B,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,EAAE;IAClD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,mBAAmB,EAAE,CAAC;IACpD,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,kBAAkB,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAChF,MAAM,EAAE,IAAI,EAAE,GAAG,uBAAuB,CAAC,QAAQ,EAAE;QACjD,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,CAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,uBAAuB,CAAA;KACnE,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,WAAW,CAAC,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAC1D,CAAC,CAAC","sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { useAssignmentTypes, useCourseIdWithGate } from '@src/data/apiHook';\n\nimport { getBulkOperationHistory } from './api';\nimport { bulkOperationHistoryQueryKeys } from './queryKeys';\nimport { transformHistoryEntry } from './utils';\n\n// Stable empty reference so the shaped read-model hook doesn't return a fresh\n// array on every render while the query is still loading.\nconst EMPTY_ARRAY: never[] = [];\n\n/**\n * useBulkOperationHistory()\n * Bulk grade-override upload history. Single-responsibility query hook: the\n * caller decides when it may run via `courseId` and `enabled`.\n */\nexport const useBulkOperationHistory = (\n courseId: string,\n { enabled = true }: { enabled?: boolean } = {},\n) => useQuery({\n queryKey: bulkOperationHistoryQueryKeys.byCourse(courseId),\n queryFn: getBulkOperationHistory,\n enabled: !!courseId && enabled,\n});\n\n/**\n * useBulkManagementHistoryEntries()\n * Read-model for the history table: wires the roles + assignment-types gates\n * into `useBulkOperationHistory` and shapes the results with\n * `transformHistoryEntry`. Replaces the former facade selector\n * `selectors.grades.useBulkManagementHistoryEntries`.\n */\nexport const useBulkManagementHistoryEntries = () => {\n const { courseId, enabled } = useCourseIdWithGate();\n const { data: assignmentTypesData } = useAssignmentTypes(courseId, { enabled });\n const { data } = useBulkOperationHistory(courseId, {\n enabled: enabled && !!assignmentTypesData?.bulkManagementAvailable,\n });\n return (data ?? EMPTY_ARRAY).map(transformHistoryEntry);\n};\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BASE_KEY } from '../../../data/queryKeys';
|
|
2
|
+
/** Bulk grade-override upload history for the course. */
|
|
3
|
+
export const bulkOperationHistoryQueryKeys = {
|
|
4
|
+
all: BASE_KEY,
|
|
5
|
+
byCourse: (courseId) => [...BASE_KEY, courseId, 'bulkOperationHistory'],
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=queryKeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryKeys.js","sourceRoot":"","sources":["../../../../src/components/BulkManagementHistoryView/data/queryKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,yDAAyD;AACzD,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,GAAG,EAAE,QAAQ;IACb,QAAQ,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,QAAQ,EAAE,QAAQ,EAAE,sBAAsB,CAAU;CACzF,CAAC","sourcesContent":["import { BASE_KEY } from '@src/data/queryKeys';\n\n/** Bulk grade-override upload history for the course. */\nexport const bulkOperationHistoryQueryKeys = {\n all: BASE_KEY,\n byCourse: (courseId: string) => [...BASE_KEY, courseId, 'bulkOperationHistory'] as const,\n};\n"]}
|