@instructure/quiz-core 22.7.1-rc.9 → 22.9.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/es/banks/api/banks.js +2 -2
- package/es/banks/components/AddBankEntryModal/presenter.js +29 -17
- package/es/banks/components/AddToBankModal/presenter.js +44 -32
- package/es/banks/components/AsyncSearch/index.js +81 -69
- package/es/banks/components/Bank/presenter.js +79 -67
- package/es/banks/components/Bank/styles.js +2 -2
- package/es/banks/components/BankEntriesList/presenter.js +23 -11
- package/es/banks/components/BankEntry/presenter.js +81 -69
- package/es/banks/components/BankEntry/styles.js +2 -2
- package/es/banks/components/BankEntryRow/presenter.js +49 -37
- package/es/banks/components/BankSearch/presenter.js +26 -14
- package/es/banks/components/Banks/presenter.js +102 -90
- package/es/banks/components/BanksList/presenter.js +74 -62
- package/es/banks/components/CopyMoveBankEntryModal/presenter.js +82 -70
- package/es/banks/components/CreateBankModal/presenter.js +43 -31
- package/es/banks/components/EditBankModal/presenter.js +37 -25
- package/es/banks/components/HeaderBreadCrumb/index.js +19 -7
- package/es/banks/components/HeaderMenu/presenter.js +14 -2
- package/es/banks/components/NavWrapper/presenter.js +21 -9
- package/es/banks/components/NavWrapper/styles.js +2 -2
- package/es/banks/components/SharingModal/ContextualIconButton/index.js +22 -10
- package/es/banks/components/SharingModal/RootAccountSharing.js +19 -7
- package/es/banks/components/SharingModal/ShareList/index.js +29 -17
- package/es/banks/components/SharingModal/presenter.js +120 -108
- package/es/building/api/quizEntries.js +2 -2
- package/es/building/components/layout/Sidebar/Sidebar.examples.js +21 -9
- package/es/building/components/layout/Sidebar/SidebarItem/presenter.js +14 -2
- package/es/building/components/layout/Sidebar/Stimulus/presenter.js +14 -2
- package/es/building/components/layout/Sidebar/presenter.js +40 -28
- package/es/building/components/layout/Sidebar/styles.js +2 -2
- package/es/building/components/layout/header/BuildingButtons/presenter.js +35 -23
- package/es/building/components/layout/header/BuildingButtons/styles.js +2 -2
- package/es/building/components/resources/ActionButtons/presenter.js +28 -16
- package/es/building/components/resources/ActionButtons/styles.js +2 -2
- package/es/building/components/resources/AddToBankOptions/index.js +28 -16
- package/es/building/components/resources/BanksTray/presenter.js +33 -21
- package/es/building/components/resources/DeleteStimulusModal/presenter.js +62 -50
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +28 -16
- package/es/building/components/resources/MoveImmutableModal/presenter.js +28 -16
- package/es/building/components/resources/quiz/editButton/EditButton.js +21 -9
- package/es/building/components/resources/quiz/instructions/Edit/presenter.js +14 -2
- package/es/building/components/resources/quiz/instructions/Instructions/presenter.js +37 -25
- package/es/building/components/resources/quiz/instructions/Show/index.js +19 -7
- package/es/building/components/resources/quiz/title/Edit/index.js +38 -26
- package/es/building/components/resources/quiz/title/Show/index.js +19 -7
- package/es/building/components/resources/quiz/title/Title/presenter.js +37 -25
- package/es/building/components/resources/quiz/title/Title/styles.js +2 -2
- package/es/building/components/resources/quizEntry/QuizEntry/presenter.js +59 -47
- package/es/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +14 -2
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +55 -43
- package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +14 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +43 -31
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +2 -2
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +63 -51
- package/es/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +112 -100
- package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +50 -38
- package/es/building/components/resources/quizEntry/QuizEntryShow/styles.js +2 -2
- package/es/common/api/callHandlers.js +2 -2
- package/es/common/components/AccessCodeTextInput/index.js +20 -8
- package/es/common/components/ConfirmationModal/index.js +2 -2
- package/es/common/components/ConfirmationModal/presenter.js +40 -28
- package/es/common/components/ImportModal/ImportFileSelector/index.js +14 -2
- package/es/common/components/ImportModal/presenter.js +58 -46
- package/es/common/components/LearnosityCalculator/index.js +22 -10
- package/es/common/components/MaskedTextInput/index.js +16 -4
- package/es/common/components/Pin/presenter.js +19 -7
- package/es/common/components/PreviewFrame/index.js +14 -2
- package/es/common/components/PrintFontSizeModal/presenter.js +26 -14
- package/es/common/components/RceConfigProvider/presenter.js +2 -2
- package/es/common/components/SDKApp/index.js +21 -9
- package/es/common/components/alerts/presenter.js +22 -10
- package/es/common/components/layout/Page/index.js +14 -2
- package/es/common/components/layout/Page/styles.js +2 -2
- package/es/common/components/layout/header/Calculator/presenter.js +14 -2
- package/es/common/components/layout/header/HeaderMenuButton/presenter.js +22 -10
- package/es/common/components/layout/header/Timer/presenter.js +29 -17
- package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +14 -2
- package/es/common/components/layout/navbar/index.js +40 -28
- package/es/common/components/layout/navbar/styles.js +2 -2
- package/es/common/components/layout/sidebar/PositionSummary/index.js +16 -4
- package/es/common/components/layout/sidebar/Sidebar/Pin.js +19 -7
- package/es/common/components/layout/sidebar/Sidebar/index.js +36 -24
- package/es/common/components/layout/sidebar/Sidebar/styles.js +2 -2
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +20 -8
- package/es/common/components/layout/sidebar/SidebarItem/styles.js +2 -2
- package/es/common/components/layout/sidebar/Stimulus/Collection/presenter.js +24 -12
- package/es/common/components/layout/sidebar/Stimulus/Collection/styles.js +2 -2
- package/es/common/components/layout/sidebar/Stimulus/Summary/presenter.js +22 -10
- package/es/common/components/layout/sidebar/Stimulus/Title/index.js +14 -2
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +19 -7
- package/es/common/components/resources/BankSelection/presenter.js +28 -16
- package/es/common/components/resources/WarningWrapper/index.js +20 -8
- package/es/common/components/resources/entry/EntrySave/presenter.js +37 -25
- package/es/common/components/resources/item/ItemEdit/presenter.js +27 -15
- package/es/common/components/resources/item/ItemOverride/presenter.js +21 -9
- package/es/common/components/resources/item/ItemShow/index.js +14 -2
- package/es/common/components/resources/positionBox/PositionBox.js +14 -2
- package/es/common/components/resources/quiz/AddContent/Body/presenter.js +47 -35
- package/es/common/components/resources/quiz/AddContent/Button/index.js +19 -7
- package/es/common/components/resources/quiz/AddContent/Button/styles.js +2 -2
- package/es/common/components/resources/quiz/AddContent/Modal/presenter.js +14 -2
- package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +45 -33
- package/es/common/components/resources/quiz/info/QuizInfo.js +14 -2
- package/es/common/components/resources/quiz/instructions/Instructions.js +14 -2
- package/es/common/components/resources/quiz/title/Title.js +14 -2
- package/es/common/components/resources/quizSessionResult/Header/index.js +21 -9
- package/es/common/components/resources/quizSessionResult/Info/index.js +19 -7
- package/es/common/components/resources/sessionItemResult/ResultStimulus/index.js +19 -7
- package/es/common/components/resources/sessionItemResult/ResultStimulus/styles.js +2 -2
- package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +18 -6
- package/es/common/components/resources/sessionItemResult/SessionItemResult/styles.js +2 -2
- package/es/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +23 -11
- package/es/common/components/resources/stimulus/Stimulus/presenter.js +32 -20
- package/es/common/components/resources/stimulus/Stimulus/styles.js +2 -2
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +102 -90
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +30 -17
- package/es/common/components/resources/stimulus/StimulusShow/index.js +19 -7
- package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +14 -2
- package/es/common/components/shared/Card/CardContent/index.js +16 -4
- package/es/common/components/shared/Card/CardWrapper/index.js +16 -4
- package/es/common/components/shared/ExpandButton/index.js +14 -2
- package/es/common/components/shared/ExpandButton/styles.js +2 -2
- package/es/common/components/shared/FormattedDuration/index.js +16 -4
- package/es/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +61 -49
- package/es/common/components/shared/IfFeature/presenter.js +14 -2
- package/es/common/components/shared/InteractionTypes/presenter.js +38 -26
- package/es/common/components/shared/PaginatedCollection/presenter.js +19 -7
- package/es/common/components/shared/Paginator/index.js +17 -5
- package/es/common/components/shared/PrintTrigger/presenter.js +43 -31
- package/es/common/components/shared/TagDisplay/index.js +14 -2
- package/es/common/components/shared/TagSelect/presenter.js +55 -43
- package/es/common/components/shared/TagSuggestSelect/presenter.js +30 -18
- package/es/common/components/shared/TagWrapper/presenter.js +19 -7
- package/es/common/components/shared/TimeUnitsInput/index.js +53 -41
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/index.js +18 -6
- package/es/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +2 -2
- package/es/common/components/shared/drag_and_drop/DragHandle/presenter.js +31 -19
- package/es/common/components/shared/file_selector/FileSelector.js +18 -6
- package/es/common/components/shared/functionality/componentWithOutsideClick.js +24 -13
- package/es/common/components/shared/functionality/componentWithOutsideClickEmotion.js +18 -6
- package/es/common/components/shared/functionality/makeEditable.js +23 -11
- package/es/common/components/shared/functionality/makeScrollable.js +25 -13
- package/es/common/components/shared/overlay/index.js +14 -2
- package/es/common/components/shared/return_button/ReturnButton.js +14 -2
- package/es/common/components/shared/spinner/Spinner.js +21 -9
- package/es/common/kinesis/StreamQueue.js +2 -2
- package/es/common/records/Alert.js +14 -2
- package/es/common/records/Bank.js +14 -2
- package/es/common/records/BankEntry.js +17 -5
- package/es/common/records/Item.js +14 -2
- package/es/common/records/ItemAnalysis.js +14 -2
- package/es/common/records/QtiImport.js +14 -2
- package/es/common/records/Quiz.js +19 -7
- package/es/common/records/QuizAnalysis.js +14 -2
- package/es/common/records/QuizEntry.js +36 -25
- package/es/common/records/QuizSession.js +14 -2
- package/es/common/records/QuizSessionEvent.js +14 -2
- package/es/common/records/QuizSessionResult.js +14 -2
- package/es/common/records/Response.js +14 -2
- package/es/common/records/SessionItem.js +17 -5
- package/es/common/records/SessionItemResult.js +14 -2
- package/es/common/records/Stimulus.js +14 -2
- package/es/common/records/baseRecord.js +16 -4
- package/es/common/records/reduxRecord.js +14 -2
- package/es/common/reducers/modifications.js +2 -2
- package/es/common/util/ExhaustivePaginatedFetcher.js +23 -12
- package/es/common/util/Fetcher.js +2 -2
- package/es/common/util/PaginatedFetcher.js +24 -13
- package/es/common/util/ThunkQueue.js +3 -3
- package/es/common/util/jsonify.js +2 -2
- package/es/common/util/serializeEvent.js +2 -1
- package/es/common/util/withDynamoPagination.js +20 -8
- package/es/messages/StorageExhaustionError.js +18 -6
- package/es/messages/postMessageService.js +2 -2
- package/es/moderating/components/events/Event.js +47 -28
- package/es/moderating/components/events/PageBlurredEvent.js +23 -5
- package/es/moderating/components/events/PageFocusedEvent.js +23 -5
- package/es/moderating/components/events/RCEEvent.js +23 -7
- package/es/moderating/components/events/ResponseEvent.js +30 -23
- package/es/moderating/components/events/SessionStartEvent.js +19 -13
- package/es/moderating/components/events/SessionSubmitEvent.js +19 -13
- package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +20 -8
- package/es/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +30 -18
- package/es/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +33 -21
- package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +34 -22
- package/es/moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings/index.js +24 -12
- package/es/moderating/components/resources/AccommodationsModal/index.js +46 -34
- package/es/moderating/components/resources/ElapsedTime.js +14 -2
- package/es/moderating/components/resources/EventDetails.js +3 -27
- package/es/moderating/components/resources/ModerateTable/presenter.js +78 -66
- package/es/moderating/components/resources/ModerateTable/styles.js +2 -2
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +45 -33
- package/es/moderating/components/resources/OutstandingQuizzesModal/presenter.js +42 -30
- package/es/moderating/components/resources/util/extractSessionData.js +4 -2
- package/es/moderating/components/resources/util/renderEventSummary.js +26 -0
- package/es/moderating/components/sidebar/ModerateTray/presenter.js +52 -40
- package/es/moderating/components/sidebar/ResetQuiz/presenter.js +27 -15
- package/es/reporting/components/Caption/index.js +14 -2
- package/es/reporting/components/MetricsListItem/index.js +16 -4
- package/es/reporting/components/charts/CentileDistribution/presenter.js +28 -16
- package/es/reporting/components/charts/Distribution/presenter.js +35 -23
- package/es/reporting/components/charts/Legend/index.js +18 -6
- package/es/reporting/components/charts/Legend/styles.js +2 -2
- package/es/reporting/components/charts/QuintileDistribution/presenter.js +31 -19
- package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +22 -10
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +33 -21
- package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +20 -8
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +14 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +14 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +21 -9
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +21 -9
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +36 -24
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +19 -7
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +25 -13
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +21 -9
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +46 -34
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +27 -15
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +28 -16
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +59 -47
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +41 -29
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +28 -16
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +25 -13
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +21 -9
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +42 -30
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +27 -15
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +23 -11
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +52 -40
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +65 -53
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +34 -22
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +34 -22
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +14 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +63 -51
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +36 -24
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +58 -46
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +2 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +20 -8
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +74 -62
- package/es/reporting/components/resources/OutcomeAnalysis/presenter.js +14 -2
- package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +34 -22
- package/es/reporting/components/resources/ReportCard/index.js +14 -2
- package/es/reporting/components/resources/ReportList/index.js +14 -2
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +57 -45
- package/es/reporting/components/resources/StudentAnalysis/ReportCard/styles.js +2 -2
- package/es/reporting/components/resources/common/AnalysisUpdateDate/index.js +14 -2
- package/es/reporting/components/resources/common/propTypes.js +2 -8
- package/es/taking/api/taking.js +4 -2
- package/lib/banks/api/banks.js +2 -2
- package/lib/banks/components/AddBankEntryModal/index.js +2 -2
- package/lib/banks/components/AddBankEntryModal/presenter.js +31 -19
- package/lib/banks/components/AddToBankModal/index.js +2 -2
- package/lib/banks/components/AddToBankModal/presenter.js +46 -34
- package/lib/banks/components/AsyncSearch/index.js +83 -71
- package/lib/banks/components/Bank/index.js +2 -2
- package/lib/banks/components/Bank/presenter.js +81 -69
- package/lib/banks/components/Bank/styles.js +2 -2
- package/lib/banks/components/BankEntriesList/presenter.js +23 -11
- package/lib/banks/components/BankEntry/presenter.js +81 -69
- package/lib/banks/components/BankEntry/styles.js +2 -2
- package/lib/banks/components/BankEntryRow/index.js +2 -2
- package/lib/banks/components/BankEntryRow/presenter.js +51 -39
- package/lib/banks/components/BankSearch/presenter.js +26 -14
- package/lib/banks/components/Banks/index.js +2 -2
- package/lib/banks/components/Banks/presenter.js +104 -92
- package/lib/banks/components/BanksList/presenter.js +76 -64
- package/lib/banks/components/CopyMoveBankEntryModal/index.js +2 -2
- package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +84 -72
- package/lib/banks/components/CreateBankModal/index.js +2 -2
- package/lib/banks/components/CreateBankModal/presenter.js +45 -33
- package/lib/banks/components/EditBankModal/index.js +2 -2
- package/lib/banks/components/EditBankModal/presenter.js +39 -27
- package/lib/banks/components/HeaderBreadCrumb/index.js +21 -9
- package/lib/banks/components/HeaderMenu/index.js +2 -2
- package/lib/banks/components/HeaderMenu/presenter.js +14 -2
- package/lib/banks/components/NavWrapper/presenter.js +21 -9
- package/lib/banks/components/NavWrapper/styles.js +2 -2
- package/lib/banks/components/SharingModal/ContextualIconButton/index.js +24 -12
- package/lib/banks/components/SharingModal/RootAccountSharing.js +21 -9
- package/lib/banks/components/SharingModal/ShareList/index.js +29 -17
- package/lib/banks/components/SharingModal/presenter.js +122 -110
- package/lib/building/api/quizEntries.js +2 -2
- package/lib/building/components/layout/Sidebar/Sidebar.examples.js +21 -9
- package/lib/building/components/layout/Sidebar/SidebarItem/presenter.js +14 -2
- package/lib/building/components/layout/Sidebar/Stimulus/presenter.js +14 -2
- package/lib/building/components/layout/Sidebar/presenter.js +40 -28
- package/lib/building/components/layout/Sidebar/styles.js +2 -2
- package/lib/building/components/layout/header/BuildingButtons/index.js +2 -2
- package/lib/building/components/layout/header/BuildingButtons/presenter.js +35 -23
- package/lib/building/components/layout/header/BuildingButtons/styles.js +2 -2
- package/lib/building/components/resources/ActionButtons/presenter.js +28 -16
- package/lib/building/components/resources/ActionButtons/styles.js +2 -2
- package/lib/building/components/resources/AddToBankOptions/index.js +28 -16
- package/lib/building/components/resources/BanksTray/presenter.js +35 -23
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +64 -52
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +28 -16
- package/lib/building/components/resources/MoveImmutableModal/presenter.js +30 -18
- package/lib/building/components/resources/quiz/editButton/EditButton.js +23 -11
- package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +14 -2
- package/lib/building/components/resources/quiz/instructions/Instructions/presenter.js +37 -25
- package/lib/building/components/resources/quiz/instructions/Show/index.js +19 -7
- package/lib/building/components/resources/quiz/title/Edit/index.js +40 -28
- package/lib/building/components/resources/quiz/title/Show/index.js +19 -7
- package/lib/building/components/resources/quiz/title/Title/presenter.js +37 -25
- package/lib/building/components/resources/quiz/title/Title/styles.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntry/presenter.js +59 -47
- package/lib/building/components/resources/quizEntry/QuizEntry/quizEntryPresenterWrapper.js +14 -2
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/presenter.js +55 -43
- package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/index.js +14 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +43 -31
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/styles.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +63 -51
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/index.js +2 -2
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +114 -102
- package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +50 -38
- package/lib/building/components/resources/quizEntry/QuizEntryShow/styles.js +2 -2
- package/lib/common/api/callHandlers.js +2 -2
- package/lib/common/components/AccessCodeTextInput/index.js +22 -10
- package/lib/common/components/ApiFeatureFlagInitializer/index.js +2 -2
- package/lib/common/components/ConfirmationModal/index.js +2 -2
- package/lib/common/components/ConfirmationModal/presenter.js +42 -30
- package/lib/common/components/ImportModal/ImportFileSelector/index.js +14 -2
- package/lib/common/components/ImportModal/presenter.js +58 -46
- package/lib/common/components/LearnosityCalculator/index.js +24 -12
- package/lib/common/components/MaskedTextInput/index.js +18 -6
- package/lib/common/components/Pin/presenter.js +21 -9
- package/lib/common/components/PreviewFrame/index.js +16 -4
- package/lib/common/components/PrintFontSizeModal/presenter.js +26 -14
- package/lib/common/components/RceConfigProvider/presenter.js +4 -4
- package/lib/common/components/SDKApp/index.js +21 -9
- package/lib/common/components/alerts/presenter.js +22 -10
- package/lib/common/components/layout/Page/index.js +14 -2
- package/lib/common/components/layout/Page/styles.js +2 -2
- package/lib/common/components/layout/header/Calculator/presenter.js +16 -4
- package/lib/common/components/layout/header/HeaderMenuButton/presenter.js +22 -10
- package/lib/common/components/layout/header/Timer/presenter.js +31 -19
- package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +14 -2
- package/lib/common/components/layout/navbar/index.js +40 -28
- package/lib/common/components/layout/navbar/styles.js +2 -2
- package/lib/common/components/layout/sidebar/PositionSummary/index.js +16 -4
- package/lib/common/components/layout/sidebar/Sidebar/Pin.js +21 -9
- package/lib/common/components/layout/sidebar/Sidebar/index.js +36 -24
- package/lib/common/components/layout/sidebar/Sidebar/styles.js +2 -2
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +20 -8
- package/lib/common/components/layout/sidebar/SidebarItem/styles.js +2 -2
- package/lib/common/components/layout/sidebar/Stimulus/Collection/presenter.js +24 -12
- package/lib/common/components/layout/sidebar/Stimulus/Collection/styles.js +2 -2
- package/lib/common/components/layout/sidebar/Stimulus/Summary/presenter.js +22 -10
- package/lib/common/components/layout/sidebar/Stimulus/Title/index.js +14 -2
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +19 -7
- package/lib/common/components/resources/BankSelection/presenter.js +30 -18
- package/lib/common/components/resources/WarningWrapper/index.js +20 -8
- package/lib/common/components/resources/entry/EntrySave/presenter.js +39 -27
- package/lib/common/components/resources/item/ItemEdit/index.js +2 -2
- package/lib/common/components/resources/item/ItemEdit/presenter.js +29 -17
- package/lib/common/components/resources/item/ItemOverride/index.js +2 -2
- package/lib/common/components/resources/item/ItemOverride/presenter.js +23 -11
- package/lib/common/components/resources/item/ItemShow/index.js +16 -4
- package/lib/common/components/resources/positionBox/PositionBox.js +14 -2
- package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +47 -35
- package/lib/common/components/resources/quiz/AddContent/Button/index.js +19 -7
- package/lib/common/components/resources/quiz/AddContent/Button/styles.js +2 -2
- package/lib/common/components/resources/quiz/AddContent/Modal/presenter.js +16 -4
- package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +45 -33
- package/lib/common/components/resources/quiz/info/QuizInfo.js +16 -4
- package/lib/common/components/resources/quiz/instructions/Instructions.js +14 -2
- package/lib/common/components/resources/quiz/title/Title.js +14 -2
- package/lib/common/components/resources/quizSessionResult/Header/index.js +21 -9
- package/lib/common/components/resources/quizSessionResult/Info/index.js +19 -7
- package/lib/common/components/resources/sessionItemResult/ResultStimulus/index.js +19 -7
- package/lib/common/components/resources/sessionItemResult/ResultStimulus/styles.js +2 -2
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +18 -6
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/styles.js +2 -2
- package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/index.js +23 -11
- package/lib/common/components/resources/stimulus/Stimulus/presenter.js +32 -20
- package/lib/common/components/resources/stimulus/Stimulus/styles.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusEdit/index.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +102 -90
- package/lib/common/components/resources/stimulus/StimulusEditInfo/index.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +30 -17
- package/lib/common/components/resources/stimulus/StimulusShow/index.js +19 -7
- package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +16 -4
- package/lib/common/components/shared/Card/CardContent/index.js +16 -4
- package/lib/common/components/shared/Card/CardWrapper/index.js +16 -4
- package/lib/common/components/shared/ExpandButton/index.js +14 -2
- package/lib/common/components/shared/ExpandButton/styles.js +2 -2
- package/lib/common/components/shared/FormattedDuration/index.js +18 -6
- package/lib/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +63 -51
- package/lib/common/components/shared/IfFeature/presenter.js +14 -2
- package/lib/common/components/shared/InteractionTypes/presenter.js +38 -26
- package/lib/common/components/shared/PaginatedCollection/presenter.js +21 -9
- package/lib/common/components/shared/Paginator/index.js +17 -5
- package/lib/common/components/shared/PrintTrigger/index.js +2 -2
- package/lib/common/components/shared/PrintTrigger/presenter.js +45 -33
- package/lib/common/components/shared/TagDisplay/index.js +14 -2
- package/lib/common/components/shared/TagSelect/presenter.js +57 -45
- package/lib/common/components/shared/TagSuggestSelect/presenter.js +32 -20
- package/lib/common/components/shared/TagWrapper/presenter.js +21 -9
- package/lib/common/components/shared/TimeUnitsInput/index.js +55 -43
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/index.js +18 -6
- package/lib/common/components/shared/drag_and_drop/DragAndDropZone/styles.js +2 -2
- package/lib/common/components/shared/drag_and_drop/DragHandle/presenter.js +33 -21
- package/lib/common/components/shared/file_selector/FileSelector.js +18 -6
- package/lib/common/components/shared/functionality/componentWithOutsideClick.js +24 -13
- package/lib/common/components/shared/functionality/componentWithOutsideClickEmotion.js +18 -6
- package/lib/common/components/shared/functionality/makeEditable.js +25 -13
- package/lib/common/components/shared/functionality/makeScrollable.js +27 -15
- package/lib/common/components/shared/overlay/index.js +16 -4
- package/lib/common/components/shared/return_button/ReturnButton.js +16 -4
- package/lib/common/components/shared/spinner/Spinner.js +21 -9
- package/lib/common/kinesis/StreamQueue.js +2 -2
- package/lib/common/records/Alert.js +14 -2
- package/lib/common/records/Bank.js +14 -2
- package/lib/common/records/BankEntry.js +17 -5
- package/lib/common/records/Item.js +14 -2
- package/lib/common/records/ItemAnalysis.js +14 -2
- package/lib/common/records/QtiImport.js +14 -2
- package/lib/common/records/Quiz.js +19 -7
- package/lib/common/records/QuizAnalysis.js +14 -2
- package/lib/common/records/QuizEntry.js +38 -27
- package/lib/common/records/QuizSession.js +14 -2
- package/lib/common/records/QuizSessionEvent.js +14 -2
- package/lib/common/records/QuizSessionResult.js +14 -2
- package/lib/common/records/Response.js +14 -2
- package/lib/common/records/SessionItem.js +17 -5
- package/lib/common/records/SessionItemResult.js +14 -2
- package/lib/common/records/Stimulus.js +14 -2
- package/lib/common/records/baseRecord.js +16 -4
- package/lib/common/records/reduxRecord.js +14 -2
- package/lib/common/reducers/modifications.js +2 -2
- package/lib/common/util/ExhaustivePaginatedFetcher.js +23 -12
- package/lib/common/util/Fetcher.js +2 -2
- package/lib/common/util/PaginatedFetcher.js +24 -13
- package/lib/common/util/ThunkQueue.js +3 -3
- package/lib/common/util/componentForItem.js +2 -2
- package/lib/common/util/interactionTypeRecordForItem.js +2 -2
- package/lib/common/util/jsonify.js +2 -2
- package/lib/common/util/serializeEvent.js +2 -1
- package/lib/common/util/withDynamoPagination.js +20 -8
- package/lib/index.js +2 -2
- package/lib/messages/StorageExhaustionError.js +18 -6
- package/lib/messages/postMessageService.js +2 -2
- package/lib/moderating/components/events/Event.js +48 -29
- package/lib/moderating/components/events/PageBlurredEvent.js +23 -7
- package/lib/moderating/components/events/PageFocusedEvent.js +23 -7
- package/lib/moderating/components/events/RCEEvent.js +23 -9
- package/lib/moderating/components/events/ResponseEvent.js +31 -24
- package/lib/moderating/components/events/SessionStartEvent.js +20 -14
- package/lib/moderating/components/events/SessionSubmitEvent.js +20 -14
- package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/ExtraAttemptsInput/index.js +22 -10
- package/lib/moderating/components/resources/AccommodationsModal/ExtraAttemptSettings/index.js +32 -20
- package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +35 -23
- package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +36 -24
- package/lib/moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings/index.js +26 -14
- package/lib/moderating/components/resources/AccommodationsModal/index.js +48 -36
- package/lib/moderating/components/resources/ElapsedTime.js +16 -4
- package/lib/moderating/components/resources/EventDetails.js +3 -27
- package/lib/moderating/components/resources/ModerateTable/presenter.js +78 -66
- package/lib/moderating/components/resources/ModerateTable/styles.js +2 -2
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +47 -35
- package/lib/moderating/components/resources/OutstandingQuizzesModal/presenter.js +44 -32
- package/lib/moderating/components/resources/util/extractSessionData.js +4 -2
- package/lib/moderating/components/resources/util/renderEventSummary.js +33 -0
- package/lib/moderating/components/sidebar/ModerateTray/presenter.js +54 -42
- package/lib/moderating/components/sidebar/ResetQuiz/presenter.js +29 -17
- package/lib/reporting/components/Caption/index.js +14 -2
- package/lib/reporting/components/MetricsListItem/index.js +16 -4
- package/lib/reporting/components/charts/CentileDistribution/presenter.js +28 -16
- package/lib/reporting/components/charts/Distribution/presenter.js +35 -23
- package/lib/reporting/components/charts/Legend/index.js +18 -6
- package/lib/reporting/components/charts/Legend/styles.js +2 -2
- package/lib/reporting/components/charts/QuintileDistribution/presenter.js +31 -19
- package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +22 -10
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +35 -23
- package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +22 -10
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisMetric/presenter.js +14 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnalysisPopoverMetric/presenter.js +14 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/AggregationType/presenter.js +23 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/presenter.js +23 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/presenter.js +36 -24
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +19 -7
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/CategorizationType.js +27 -15
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingType.js +23 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/presenter.js +46 -34
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/MatchingTypeTable/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/MatchingType/OrderingType.js +29 -17
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/ChoiceTypeWithInfo/presenter.js +30 -18
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/NumericType/presenter.js +59 -47
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/ChoiceGroupTypeTable/presenter.js +41 -29
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/RichFillBlankType/presenter.js +30 -18
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +25 -13
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/index.js +23 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +44 -32
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +29 -17
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsTableWrapper/presenter.js +23 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +52 -40
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +65 -53
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ExpandableCard/presenter.js +34 -22
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/MetricPopover/presenter.js +34 -22
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/presenter.js +14 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +63 -51
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewQuizAnalysis/presenter.js +36 -24
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +58 -46
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/styles.js +2 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/presenter.js +22 -10
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +76 -64
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +2 -2
- package/lib/reporting/components/resources/OutcomeAnalysis/presenter.js +16 -4
- package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +34 -22
- package/lib/reporting/components/resources/ReportCard/index.js +14 -2
- package/lib/reporting/components/resources/ReportList/index.js +14 -2
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/presenter.js +59 -47
- package/lib/reporting/components/resources/StudentAnalysis/ReportCard/styles.js +2 -2
- package/lib/reporting/components/resources/StudentAnalysis/withStudentAnalysisReportStatePresenter.js +2 -2
- package/lib/reporting/components/resources/common/AnalysisUpdateDate/index.js +16 -4
- package/lib/reporting/components/resources/common/propTypes.js +3 -9
- package/lib/taking/api/taking.js +6 -4
- package/package.json +30 -34
- package/es/moderating/components/resources/SessionBreachAlert.js +0 -9
- package/es/moderating/components/resources/util/checkIsBreach.js +0 -28
- package/lib/moderating/components/resources/SessionBreachAlert.js +0 -16
- package/lib/moderating/components/resources/util/checkIsBreach.js +0 -35
|
@@ -5,8 +5,20 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
7
|
var _dec, _class, _StudentAnalysisReportCardPresenter;
|
|
8
|
-
function _callSuper(
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(_this, derived, args) {
|
|
9
|
+
function isNativeReflectConstruct() {
|
|
10
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
11
|
+
if (Reflect.construct.sham) return false;
|
|
12
|
+
if (typeof Proxy === "function") return true;
|
|
13
|
+
try {
|
|
14
|
+
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
15
|
+
} catch (e) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
derived = _getPrototypeOf(derived);
|
|
20
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
21
|
+
}
|
|
10
22
|
import React, { Component } from 'react';
|
|
11
23
|
import { Text } from '@instructure/ui-text';
|
|
12
24
|
import { Link } from '@instructure/ui-link';
|
|
@@ -21,16 +33,16 @@ import { Flex, STUDENT_ANALYSES, withStyleOverrides } from '@instructure/quiz-co
|
|
|
21
33
|
import { AnalysisUpdateDate } from '../../common/AnalysisUpdateDate';
|
|
22
34
|
export var StudentAnalysisReportCardPresenter = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_StudentAnalysisReportCardPresenter = /*#__PURE__*/function (_Component) {
|
|
23
35
|
function StudentAnalysisReportCardPresenter() {
|
|
24
|
-
var
|
|
36
|
+
var _this2;
|
|
25
37
|
_classCallCheck(this, StudentAnalysisReportCardPresenter);
|
|
26
38
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27
39
|
args[_key] = arguments[_key];
|
|
28
40
|
}
|
|
29
|
-
|
|
30
|
-
_defineProperty(
|
|
41
|
+
_this2 = _callSuper(this, StudentAnalysisReportCardPresenter, [].concat(args));
|
|
42
|
+
_defineProperty(_this2, "renderSpinner", function () {
|
|
31
43
|
var mainText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
32
44
|
return /*#__PURE__*/React.createElement("div", {
|
|
33
|
-
style:
|
|
45
|
+
style: _this2.props.styles.emptyCardBodyContainer
|
|
34
46
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
35
47
|
direction: "row"
|
|
36
48
|
}, /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(Spinner, {
|
|
@@ -42,27 +54,27 @@ export var StudentAnalysisReportCardPresenter = (_dec = withStyleOverrides(gener
|
|
|
42
54
|
"data-automation": "sdk-new-sa-report-card-spinner"
|
|
43
55
|
}))));
|
|
44
56
|
});
|
|
45
|
-
_defineProperty(
|
|
46
|
-
return
|
|
57
|
+
_defineProperty(_this2, "getAttemptType", function () {
|
|
58
|
+
return _this2.props.allAttemptsEnabled ? 'all_attempts' : 'last_attempt';
|
|
47
59
|
});
|
|
48
|
-
_defineProperty(
|
|
49
|
-
|
|
60
|
+
_defineProperty(_this2, "handleExport", function () {
|
|
61
|
+
_this2.props.exportReport('csv', _this2.getAttemptType(), STUDENT_ANALYSES);
|
|
50
62
|
});
|
|
51
|
-
_defineProperty(
|
|
52
|
-
|
|
63
|
+
_defineProperty(_this2, "handleGeneration", function () {
|
|
64
|
+
_this2.props.generateReport(_this2.getAttemptType(), STUDENT_ANALYSES);
|
|
53
65
|
});
|
|
54
|
-
_defineProperty(
|
|
55
|
-
var
|
|
56
|
-
studentAnalyses =
|
|
57
|
-
generationInProgress =
|
|
66
|
+
_defineProperty(_this2, "renderExportButton", function () {
|
|
67
|
+
var _this2$props = _this2.props,
|
|
68
|
+
studentAnalyses = _this2$props.studentAnalyses,
|
|
69
|
+
generationInProgress = _this2$props.generationInProgress;
|
|
58
70
|
return /*#__PURE__*/React.createElement(ExportButton, {
|
|
59
71
|
enabled: !generationInProgress && !!studentAnalyses,
|
|
60
|
-
handleExport:
|
|
72
|
+
handleExport: _this2.handleExport
|
|
61
73
|
});
|
|
62
74
|
});
|
|
63
|
-
_defineProperty(
|
|
75
|
+
_defineProperty(_this2, "renderGenerateReportButton", function () {
|
|
64
76
|
return /*#__PURE__*/React.createElement(Link, {
|
|
65
|
-
onClick:
|
|
77
|
+
onClick: _this2.handleGeneration,
|
|
66
78
|
role: "button",
|
|
67
79
|
"data-automation": "sdk-new-sa-report-card-generate-report-button"
|
|
68
80
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Generate Student Analysis Report')), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -70,13 +82,13 @@ export var StudentAnalysisReportCardPresenter = (_dec = withStyleOverrides(gener
|
|
|
70
82
|
"aria-hidden": "true"
|
|
71
83
|
}, t('Generate Report')));
|
|
72
84
|
});
|
|
73
|
-
_defineProperty(
|
|
74
|
-
var
|
|
75
|
-
name =
|
|
76
|
-
exportEnabled =
|
|
77
|
-
fetchInProgress =
|
|
85
|
+
_defineProperty(_this2, "renderReportCardHeader", function () {
|
|
86
|
+
var _this2$props2 = _this2.props,
|
|
87
|
+
name = _this2$props2.name,
|
|
88
|
+
exportEnabled = _this2$props2.exportEnabled,
|
|
89
|
+
fetchInProgress = _this2$props2.fetchInProgress;
|
|
78
90
|
return /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
style:
|
|
91
|
+
style: _this2.props.styles.titleContainer
|
|
80
92
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
81
93
|
direction: "row",
|
|
82
94
|
wrap: "wrap",
|
|
@@ -84,14 +96,14 @@ export var StudentAnalysisReportCardPresenter = (_dec = withStyleOverrides(gener
|
|
|
84
96
|
}, /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(Text, {
|
|
85
97
|
size: "medium",
|
|
86
98
|
weight: "bold"
|
|
87
|
-
}, name)), exportEnabled && !fetchInProgress && /*#__PURE__*/React.createElement(Flex.Item, null,
|
|
99
|
+
}, name)), exportEnabled && !fetchInProgress && /*#__PURE__*/React.createElement(Flex.Item, null, _this2.renderExportButton())));
|
|
88
100
|
});
|
|
89
|
-
_defineProperty(
|
|
90
|
-
var
|
|
91
|
-
generationInProgress =
|
|
92
|
-
analysisError =
|
|
101
|
+
_defineProperty(_this2, "renderReportCardFooter", function () {
|
|
102
|
+
var _this2$props3 = _this2.props,
|
|
103
|
+
generationInProgress = _this2$props3.generationInProgress,
|
|
104
|
+
analysisError = _this2$props3.analysisError;
|
|
93
105
|
return /*#__PURE__*/React.createElement("div", {
|
|
94
|
-
style:
|
|
106
|
+
style: _this2.props.styles.emptyCardBodyContainer
|
|
95
107
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
96
108
|
direction: "row",
|
|
97
109
|
justifyItems: "space-between"
|
|
@@ -104,44 +116,44 @@ export var StudentAnalysisReportCardPresenter = (_dec = withStyleOverrides(gener
|
|
|
104
116
|
color: "danger"
|
|
105
117
|
}, analysisError)), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
106
118
|
shouldShrink: !!analysisError && !generationInProgress
|
|
107
|
-
}, generationInProgress ?
|
|
119
|
+
}, generationInProgress ? _this2.renderSpinner(t('Generation In Progress')) : _this2.renderGenerateReportButton())));
|
|
108
120
|
});
|
|
109
|
-
_defineProperty(
|
|
110
|
-
var studentAnalyses =
|
|
121
|
+
_defineProperty(_this2, "renderDateBlock", function () {
|
|
122
|
+
var studentAnalyses = _this2.props.studentAnalyses;
|
|
111
123
|
return /*#__PURE__*/React.createElement("div", {
|
|
112
|
-
style:
|
|
124
|
+
style: _this2.props.styles.studentAnalysesSummary
|
|
113
125
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
114
126
|
direction: "row",
|
|
115
127
|
justifyItems: "space-between"
|
|
116
128
|
}, /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
style:
|
|
129
|
+
style: _this2.props.styles.dateContainer
|
|
118
130
|
}, /*#__PURE__*/React.createElement(AnalysisUpdateDate, {
|
|
119
131
|
date: studentAnalyses.created_timestamp,
|
|
120
132
|
multiline: true
|
|
121
133
|
}))));
|
|
122
134
|
});
|
|
123
|
-
return
|
|
135
|
+
return _this2;
|
|
124
136
|
}
|
|
125
137
|
_inherits(StudentAnalysisReportCardPresenter, _Component);
|
|
126
138
|
return _createClass(StudentAnalysisReportCardPresenter, [{
|
|
127
139
|
key: "componentDidMount",
|
|
128
140
|
value: function componentDidMount() {
|
|
129
|
-
var _this$props$makeStyle, _this$
|
|
130
|
-
(_this$props$makeStyle = (_this$
|
|
141
|
+
var _this$props$makeStyle, _this$props;
|
|
142
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 || _this$props$makeStyle.call(_this$props);
|
|
131
143
|
}
|
|
132
144
|
}, {
|
|
133
145
|
key: "componentDidUpdate",
|
|
134
146
|
value: function componentDidUpdate() {
|
|
135
|
-
var _this$props$makeStyle2, _this$
|
|
136
|
-
(_this$props$makeStyle2 = (_this$
|
|
147
|
+
var _this$props$makeStyle2, _this$props2;
|
|
148
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 || _this$props$makeStyle2.call(_this$props2);
|
|
137
149
|
}
|
|
138
150
|
}, {
|
|
139
151
|
key: "render",
|
|
140
152
|
value: function render() {
|
|
141
|
-
var _this$
|
|
142
|
-
studentAnalyses = _this$
|
|
143
|
-
fetchInProgress = _this$
|
|
144
|
-
styles = _this$
|
|
153
|
+
var _this$props3 = this.props,
|
|
154
|
+
studentAnalyses = _this$props3.studentAnalyses,
|
|
155
|
+
fetchInProgress = _this$props3.fetchInProgress,
|
|
156
|
+
styles = _this$props3.styles;
|
|
145
157
|
return /*#__PURE__*/React.createElement(Card, {
|
|
146
158
|
css: styles.reportCard,
|
|
147
159
|
customStyles: styles.reportCard,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
4
|
// this is 'any' temporarily, until we figure out the typing of the @withStyle decorator
|
|
5
5
|
|
|
6
6
|
export var generateStyle = function generateStyle(componentTheme, props) {
|
|
@@ -4,8 +4,20 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst
|
|
|
4
4
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
function _callSuper(
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(_this, derived, args) {
|
|
8
|
+
function isNativeReflectConstruct() {
|
|
9
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
10
|
+
if (Reflect.construct.sham) return false;
|
|
11
|
+
if (typeof Proxy === "function") return true;
|
|
12
|
+
try {
|
|
13
|
+
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
14
|
+
} catch (e) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
derived = _getPrototypeOf(derived);
|
|
19
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
20
|
+
}
|
|
9
21
|
import React, { Component } from 'react';
|
|
10
22
|
import PropTypes from 'prop-types';
|
|
11
23
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
@@ -164,17 +164,11 @@ export var afsFlags = PropTypes.shape({
|
|
|
164
164
|
essayEnabled: PropTypes.bool.isRequired,
|
|
165
165
|
fileUploadEnabled: PropTypes.bool.isRequired
|
|
166
166
|
});
|
|
167
|
-
export var sessionValidationErrorsPropType = PropTypes.shape({
|
|
168
|
-
isBreach: PropTypes.bool,
|
|
169
|
-
ipAddress: PropTypes.string,
|
|
170
|
-
browserSessionID: PropTypes.string,
|
|
171
|
-
browserString: PropTypes.string,
|
|
172
|
-
userPlatform: PropTypes.string
|
|
173
|
-
});
|
|
174
167
|
export var eventDataPropType = PropTypes.shape({
|
|
175
168
|
ipAddress: PropTypes.string,
|
|
176
169
|
browserSessionID: PropTypes.string,
|
|
177
170
|
eventDate: PropTypes.string,
|
|
178
171
|
browserString: PropTypes.string,
|
|
179
|
-
userPlatform: PropTypes.string
|
|
172
|
+
userPlatform: PropTypes.string,
|
|
173
|
+
multipleSessionAttempt: PropTypes.bool
|
|
180
174
|
});
|
package/es/taking/api/taking.js
CHANGED
|
@@ -74,9 +74,10 @@ export var submitStudentAccessCode = function submitStudentAccessCode(quizSessio
|
|
|
74
74
|
// OQAAT no backtracking call
|
|
75
75
|
// ====================================
|
|
76
76
|
var noBacktrackingNextQuestion = function noBacktrackingNextQuestion(quizSessionId, itemId, position, userResponse, largeFormatResponse, submit) {
|
|
77
|
+
var isPassage = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
77
78
|
return function (dispatch) {
|
|
78
79
|
var params = {};
|
|
79
|
-
if (itemId) {
|
|
80
|
+
if (itemId || isPassage) {
|
|
80
81
|
params.body = JSON.stringify({
|
|
81
82
|
sessionItemResponse: {
|
|
82
83
|
itemId: itemId,
|
|
@@ -107,13 +108,14 @@ var noBacktrackingNextQuestion = function noBacktrackingNextQuestion(quizSession
|
|
|
107
108
|
// ====================================
|
|
108
109
|
export var nextQuestion = function nextQuestion(quizSessionId, allowBacktracking, currentQuestionIsLast, position, itemId, userResponse, largeFormatResponse) {
|
|
109
110
|
var submit = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : submitQuiz;
|
|
111
|
+
var isPassage = arguments.length > 8 ? arguments[8] : undefined;
|
|
110
112
|
if (allowBacktracking) {
|
|
111
113
|
return function (dispatch) {
|
|
112
114
|
var action = currentQuestionIsLast ? submit(quizSessionId) : backtrackingNextQuestion();
|
|
113
115
|
if (action) dispatch(action);
|
|
114
116
|
};
|
|
115
117
|
} else {
|
|
116
|
-
return noBacktrackingNextQuestion(quizSessionId, itemId, position, userResponse, largeFormatResponse, submit);
|
|
118
|
+
return noBacktrackingNextQuestion(quizSessionId, itemId, position, userResponse, largeFormatResponse, submit, isPassage);
|
|
117
119
|
}
|
|
118
120
|
};
|
|
119
121
|
|
package/lib/banks/api/banks.js
CHANGED
|
@@ -23,8 +23,8 @@ var _copyingBanksPoller = require("./copyingBanksPoller");
|
|
|
23
23
|
var _quizCommon = require("@instructure/quiz-common");
|
|
24
24
|
var _lodash = require("lodash");
|
|
25
25
|
var _uuid = require("uuid");
|
|
26
|
-
function ownKeys(
|
|
27
|
-
function _objectSpread(
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
28
28
|
var banksApiEndpoint = '/api/banks';
|
|
29
29
|
var DEFAULT_PAGE_SIZE = 100;
|
|
30
30
|
var simpleFetchBanks = exports.simpleFetchBanks = function simpleFetchBanks() {
|
|
@@ -13,8 +13,8 @@ var _interactionTypes = require("../../../common/api/interactionTypes");
|
|
|
13
13
|
var _modalHelpers = require("../../../common/util/modalHelpers");
|
|
14
14
|
var _quizCommon = require("@instructure/quiz-common");
|
|
15
15
|
var _interactionTypes2 = require("../../../common/selectors/interactionTypes");
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
18
|
function mapStateToProps(state, props) {
|
|
19
19
|
return {
|
|
20
20
|
modalOpen: state.getIn(['modal', 'isOpen']) === _quizCommon.ADD_BANK_ENTRY_MODAL,
|
|
@@ -21,19 +21,31 @@ var _uiHeading = require("@instructure/ui-heading");
|
|
|
21
21
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
22
22
|
var _InteractionTypes = _interopRequireDefault(require("../../../common/components/shared/InteractionTypes"));
|
|
23
23
|
var _quizCommon = require("@instructure/quiz-common");
|
|
24
|
-
function _getRequireWildcardCache(
|
|
25
|
-
function _interopRequireWildcard(
|
|
26
|
-
function _callSuper(
|
|
27
|
-
function
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
|
+
function _callSuper(_this, derived, args) {
|
|
27
|
+
function isNativeReflectConstruct() {
|
|
28
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
29
|
+
if (Reflect.construct.sham) return false;
|
|
30
|
+
if (typeof Proxy === "function") return true;
|
|
31
|
+
try {
|
|
32
|
+
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
38
|
+
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
39
|
+
}
|
|
28
40
|
var AddBankEntryModal = exports.AddBankEntryModal = /*#__PURE__*/function (_Component) {
|
|
29
41
|
function AddBankEntryModal() {
|
|
30
|
-
var
|
|
42
|
+
var _this2;
|
|
31
43
|
(0, _classCallCheck2["default"])(this, AddBankEntryModal);
|
|
32
44
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
33
45
|
args[_key] = arguments[_key];
|
|
34
46
|
}
|
|
35
|
-
|
|
36
|
-
(0, _defineProperty2["default"])(
|
|
47
|
+
_this2 = _callSuper(this, AddBankEntryModal, [].concat(args));
|
|
48
|
+
(0, _defineProperty2["default"])(_this2, "addItem", function (interactionTypeData) {
|
|
37
49
|
var defaultInteractionData = interactionTypeData.getDefaultInteractionData();
|
|
38
50
|
var scoringData = interactionTypeData.getDefaultScoringData(defaultInteractionData);
|
|
39
51
|
var itemProps = {
|
|
@@ -45,25 +57,25 @@ var AddBankEntryModal = exports.AddBankEntryModal = /*#__PURE__*/function (_Comp
|
|
|
45
57
|
scoringData: scoringData,
|
|
46
58
|
userResponseType: (0, _first["default"])(interactionTypeData.userResponseTypeOptions)
|
|
47
59
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
_this2.props.createBankItem(_this2.props.bankId, 'Item', itemProps);
|
|
61
|
+
_this2.closeAction();
|
|
62
|
+
_this2.props.navigateToBankEntry('new', _this2.props.bankId);
|
|
51
63
|
});
|
|
52
|
-
(0, _defineProperty2["default"])(
|
|
64
|
+
(0, _defineProperty2["default"])(_this2, "addStimulus", function () {
|
|
53
65
|
var isPassage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
54
|
-
|
|
66
|
+
_this2.props.createBankItem(_this2.props.bankId, 'Stimulus', {
|
|
55
67
|
passage: isPassage
|
|
56
68
|
});
|
|
57
|
-
|
|
58
|
-
|
|
69
|
+
_this2.closeAction();
|
|
70
|
+
_this2.props.navigateToBankEntry('new', _this2.props.bankId);
|
|
59
71
|
});
|
|
60
|
-
(0, _defineProperty2["default"])(
|
|
61
|
-
if (
|
|
62
|
-
|
|
72
|
+
(0, _defineProperty2["default"])(_this2, "closeAction", function () {
|
|
73
|
+
if (_this2.props.modalTrigger) {
|
|
74
|
+
_this2.props.modalTrigger.focus();
|
|
63
75
|
}
|
|
64
|
-
|
|
76
|
+
_this2.props.closeModal();
|
|
65
77
|
});
|
|
66
|
-
return
|
|
78
|
+
return _this2;
|
|
67
79
|
}
|
|
68
80
|
(0, _inherits2["default"])(AddBankEntryModal, _Component);
|
|
69
81
|
return (0, _createClass2["default"])(AddBankEntryModal, [{
|
|
@@ -15,8 +15,8 @@ var _banks2 = require("../../../common/actions/banks");
|
|
|
15
15
|
var uiActions = _interopRequireWildcard(require("../../../common/actions/ui"));
|
|
16
16
|
var _quizCommon = require("@instructure/quiz-common");
|
|
17
17
|
var _modalHelpers = require("../../../common/util/modalHelpers");
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
20
|
function mapStateToProps(state, props) {
|
|
21
21
|
return {
|
|
22
22
|
modalTrigger: (0, _modalHelpers.getModalTrigger)(state),
|
|
@@ -22,78 +22,90 @@ var _presenter = _interopRequireDefault(require("../../../common/components/reso
|
|
|
22
22
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
23
23
|
var _quizCommon = require("@instructure/quiz-common");
|
|
24
24
|
var _featureCheck = require("../../../common/util/featureCheck");
|
|
25
|
-
function _getRequireWildcardCache(
|
|
26
|
-
function _interopRequireWildcard(
|
|
27
|
-
function _callSuper(
|
|
28
|
-
function
|
|
25
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
function _callSuper(_this, derived, args) {
|
|
28
|
+
function isNativeReflectConstruct() {
|
|
29
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
30
|
+
if (Reflect.construct.sham) return false;
|
|
31
|
+
if (typeof Proxy === "function") return true;
|
|
32
|
+
try {
|
|
33
|
+
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
34
|
+
} catch (e) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
39
|
+
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
40
|
+
}
|
|
29
41
|
var AddToBankModal = exports.AddToBankModal = /*#__PURE__*/function (_Component) {
|
|
30
42
|
function AddToBankModal() {
|
|
31
|
-
var
|
|
43
|
+
var _this2;
|
|
32
44
|
(0, _classCallCheck2["default"])(this, AddToBankModal);
|
|
33
45
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
46
|
args[_key] = arguments[_key];
|
|
35
47
|
}
|
|
36
|
-
|
|
37
|
-
(0, _defineProperty2["default"])(
|
|
48
|
+
_this2 = _callSuper(this, AddToBankModal, [].concat(args));
|
|
49
|
+
(0, _defineProperty2["default"])(_this2, "state", {
|
|
38
50
|
bankType: 'existing',
|
|
39
51
|
newBankTitle: '',
|
|
40
52
|
selectedBank: null
|
|
41
53
|
});
|
|
42
|
-
(0, _defineProperty2["default"])(
|
|
54
|
+
(0, _defineProperty2["default"])(_this2, "copyBankEntry", function (entryId, bankId) {
|
|
43
55
|
if ((0, _featureCheck.featureOn)('instfs_bank_entry_movement_endpoints')) {
|
|
44
|
-
return
|
|
56
|
+
return _this2.props.moveBankEntryFromQuizEntry(_this2.props.quizId, entryId, _this2.props.entryType, bankId);
|
|
45
57
|
} else {
|
|
46
|
-
return
|
|
58
|
+
return _this2.props.createBankEntry(bankId, _this2.props.entryType, entryId);
|
|
47
59
|
}
|
|
48
60
|
});
|
|
49
|
-
(0, _defineProperty2["default"])(
|
|
50
|
-
|
|
51
|
-
return
|
|
52
|
-
}).then(
|
|
61
|
+
(0, _defineProperty2["default"])(_this2, "addToBank", function (bankId) {
|
|
62
|
+
_this2.props.getEntry().then(function (entry) {
|
|
63
|
+
return _this2.copyBankEntry(entry.id, bankId);
|
|
64
|
+
}).then(_this2.props.onAdd)["catch"](function (e) {
|
|
53
65
|
if (e.validationErrorsFromApi) {
|
|
54
66
|
// Close the modal so the user can view the input validation errors and correct them
|
|
55
|
-
|
|
56
|
-
|
|
67
|
+
_this2.closeAction();
|
|
68
|
+
_this2.props.handleValidationErrorsFromApi(e.validationErrorsFromApi);
|
|
57
69
|
return;
|
|
58
70
|
}
|
|
59
71
|
// Some other type of error occurred
|
|
60
72
|
throw e;
|
|
61
73
|
});
|
|
62
74
|
});
|
|
63
|
-
(0, _defineProperty2["default"])(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (
|
|
75
|
+
(0, _defineProperty2["default"])(_this2, "continueAction", function () {
|
|
76
|
+
_this2.props.closeModal();
|
|
77
|
+
_this2.props.onContinue();
|
|
78
|
+
if (_this2.state.bankType === 'new') {
|
|
67
79
|
var newBank = _Bank["default"].create({
|
|
68
|
-
title:
|
|
69
|
-
language:
|
|
80
|
+
title: _this2.state.newBankTitle,
|
|
81
|
+
language: _this2.context.locale
|
|
70
82
|
});
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
_this2.props.createBank(newBank).then(function (bankData) {
|
|
84
|
+
_this2.addToBank(bankData.id);
|
|
73
85
|
});
|
|
74
86
|
} else {
|
|
75
|
-
|
|
87
|
+
_this2.addToBank(_this2.state.selectedBank.id);
|
|
76
88
|
}
|
|
77
89
|
});
|
|
78
|
-
(0, _defineProperty2["default"])(
|
|
79
|
-
|
|
90
|
+
(0, _defineProperty2["default"])(_this2, "closeAction", function () {
|
|
91
|
+
_this2.props.closeModal();
|
|
80
92
|
});
|
|
81
|
-
(0, _defineProperty2["default"])(
|
|
82
|
-
|
|
93
|
+
(0, _defineProperty2["default"])(_this2, "onBankSelection", function (e, option) {
|
|
94
|
+
_this2.setState({
|
|
83
95
|
selectedBank: new _Bank["default"](option)
|
|
84
96
|
});
|
|
85
97
|
});
|
|
86
|
-
(0, _defineProperty2["default"])(
|
|
87
|
-
|
|
98
|
+
(0, _defineProperty2["default"])(_this2, "handleRadioChange", function (event, value) {
|
|
99
|
+
_this2.setState({
|
|
88
100
|
bankType: value
|
|
89
101
|
});
|
|
90
102
|
});
|
|
91
|
-
(0, _defineProperty2["default"])(
|
|
92
|
-
|
|
103
|
+
(0, _defineProperty2["default"])(_this2, "onTitleChange", function (e) {
|
|
104
|
+
_this2.setState({
|
|
93
105
|
newBankTitle: e.target.value
|
|
94
106
|
});
|
|
95
107
|
});
|
|
96
|
-
return
|
|
108
|
+
return _this2;
|
|
97
109
|
}
|
|
98
110
|
(0, _inherits2["default"])(AddToBankModal, _Component);
|
|
99
111
|
return (0, _createClass2["default"])(AddToBankModal, [{
|