{"version":3,"file":"connect-CkXTWk05.js","sources":["../../../client/app/bundles/Connect/actions/concepts.js","../../../client/app/bundles/Connect/components/fillInBlank/fillInBlankForm.jsx","../../../client/app/bundles/Connect/components/fillInBlank/editFillInBlank.jsx","../../../client/app/bundles/Connect/components/renderForQuestions/cues.jsx","../../../client/app/bundles/Connect/components/renderForQuestions/feedbackStatements.jsx","../../../client/app/bundles/Connect/components/renderForQuestions/updateResponseResource.js","../../../client/app/bundles/Connect/components/fillInBlank/testFillInBlankQuestionContainer.jsx","../../../client/app/bundles/Connect/actions/display.js","../../../client/app/bundles/Connect/actions/massEdit.js","../../../client/app/bundles/Connect/components/questions/boilerplateFeedback.jsx","../../../client/app/bundles/Connect/components/questions/conceptResultList.jsx","../../../client/app/bundles/Connect/components/questions/massEditContainer.jsx","../../../client/app/bundles/Connect/actions/filters.js","../../../client/app/bundles/Connect/libs/partsOfSpeechTagging.js","../../../client/app/bundles/Connect/libs/algorithms/changeObjects.js","../../../client/app/bundles/Connect/libs/algorithms/joiningWords.js","../../../client/app/bundles/Connect/libs/algorithms/spacingBeforePunctuation.js","../../../client/app/bundles/Connect/libs/quillNormalizer.js","../../../client/app/bundles/Connect/libs/requiredWords.js","../../../client/app/bundles/Connect/libs/sharedResponseFunctions.js","../../../client/app/bundles/Connect/libs/question.js","../../../client/app/bundles/Connect/libs/validEndingPunctuation.js","../../../client/app/bundles/Connect/libs/sentenceFragment.js","../../../client/app/bundles/Connect/components/questions/POSForResponse.jsx","../../../client/app/bundles/Connect/components/questions/POSIndex.jsx","../../../client/app/bundles/Connect/components/questions/POSForResponsesList.jsx","../../../client/app/bundles/Connect/components/questions/responseList.jsx","../../../client/app/bundles/Connect/components/questions/responseComponent.jsx","../../../client/app/bundles/Connect/components/questions/responseRouteWrapper.jsx","../../../client/app/bundles/Connect/components/fillInBlank/fillInBlankQuestion.jsx","../../../client/app/bundles/Connect/components/focusPoints/editFocusPointsContainer.jsx","../../../client/app/bundles/Connect/components/focusPoints/focusPointsContainer.jsx","../../../client/app/bundles/Connect/components/focusPoints/newFocusPointsContainer.jsx","../../../client/app/bundles/Connect/components/incorrectSequence/editIncorrectSequenceContainer.jsx","../../../client/app/bundles/Connect/components/incorrectSequence/incorrectSequenceContainer.jsx","../../../client/app/bundles/Connect/components/incorrectSequence/newIncorrectSequenceContainer.jsx","../../../client/app/bundles/Connect/components/questions/chooseModelContainer.jsx","../../../client/app/bundles/Connect/components/questions/questionForm.jsx","../../../client/app/bundles/Connect/components/renderForQuestions/renderEndState.jsx","../../../client/app/bundles/Connect/libs/markupUserResponses.js","../../../client/app/bundles/Connect/components/renderForQuestions/renderTextEditor.jsx","../../../client/app/bundles/Connect/components/renderForQuestions/renderFormForAnswer.jsx","../../../client/app/bundles/Connect/components/renderForQuestions/submitResponse.js","../../../client/app/bundles/Connect/components/questions/testQuestion.jsx","../../../client/app/bundles/Connect/components/questions/question.jsx","../../../client/app/bundles/Connect/components/sentenceFragments/chooseModelContainer.jsx","../../../client/app/bundles/Connect/components/sentenceFragments/sentenceFragmentForm.jsx","../../../client/app/bundles/Connect/components/studentLessons/sentenceFragment.jsx","../../../client/app/bundles/Connect/components/sentenceFragments/testSentenceFragmentContainer.jsx","../../../client/app/bundles/Connect/components/sentenceFragments/sentenceFragment.jsx","../../../client/app/bundles/Connect/libs/flagArray.js","../../../client/app/bundles/Connect/components/lessons/chooseModelContainer.jsx","../../../client/app/bundles/Connect/components/lessons/lessonForm.jsx","../../../client/app/bundles/Connect/components/lessons/lesson.jsx","../../../client/app/bundles/Connect/components/admin/adminLessonSidebar.jsx","../../../client/app/bundles/Connect/components/admin/adminLesson.jsx","../../../client/app/bundles/Connect/components/admin/adminMainSidebar.jsx","../../../client/app/bundles/Connect/components/concepts/concepts.jsx","../../../client/app/bundles/Connect/components/feedback/concept-feedback.jsx","../../../client/app/bundles/Connect/components/feedback/concepts-feedback.jsx","../../../client/app/bundles/Connect/components/fillInBlank/fillInBlankQuestions.jsx","../../../client/app/bundles/Connect/components/lessons/lessons.jsx","../../../client/app/bundles/Connect/components/questions/questions.jsx","../../../client/app/bundles/Connect/components/sentenceFragments/sentenceFragments.jsx","../../../client/app/bundles/Connect/components/admin/admin.jsx","../../../client/app/bundles/Connect/components/studentLessons/finished.jsx","../../../client/app/bundles/Connect/actions/sessions.js","../../../client/app/bundles/Connect/libs/formattedCues.js","../../../client/app/bundles/Connect/libs/conceptResults/sharedConceptResultsFunctions.js","../../../client/app/bundles/Connect/libs/conceptResults/sentenceCombiningLessonQuestion.js","../../../client/app/bundles/Connect/libs/conceptResults/sentenceFragment.js","../../../client/app/bundles/Connect/libs/conceptResults/fillInTheBlanks.js","../../../client/app/bundles/Connect/libs/conceptResults/lesson.js","../../../client/app/bundles/Connect/components/studentLessons/lesson.jsx","../../../client/app/bundles/Connect/actions/turk.js","../../../client/app/bundles/Connect/libs/conceptResults/sentenceCombining.js","../../../client/app/bundles/Connect/libs/conceptResults/diagnostic.js","../../../client/app/bundles/Connect/components/turk/diagnosticQuestions.jsx","../../../client/app/bundles/Connect/components/turk/finishedDiagnostic.jsx","../../../client/app/bundles/Connect/components/turk/landing.jsx","../../../client/app/bundles/Connect/components/turk/sentenceFragment.jsx","../../../client/app/bundles/Connect/components/turk/turkActivity.jsx","../../../client/app/bundles/Connect/utils/backOff.js","../../../client/app/bundles/Connect/reducers/activityHealth.js","../../../client/app/bundles/Connect/reducers/classroomLesson.js","../../../client/app/bundles/Connect/reducers/classroomLessons.js","../../../client/app/bundles/Connect/reducers/classroomLessonsReviews.js","../../../client/app/bundles/Connect/reducers/classroomSessions.js","../../../client/app/bundles/Connect/reducers/concepts.js","../../../client/app/bundles/Connect/reducers/concepts-feedback.js","../../../client/app/bundles/Connect/reducers/customize.js","../../../client/app/bundles/Connect/reducers/display.js","../../../client/app/bundles/Connect/reducers/fillInBlank.js","../../../client/app/bundles/Connect/reducers/filtersReducer.js","../../../client/app/bundles/Connect/reducers/generatedIncorrectSequences.js","../../../client/app/bundles/Connect/reducers/item-levels.js","../../../client/app/bundles/Connect/reducers/lessons.js","../../../client/app/bundles/Connect/reducers/massEdit.js","../../../client/app/bundles/Connect/reducers/questionReducer.js","../../../client/app/bundles/Connect/reducers/questionReducerV2.js","../../../client/app/bundles/Connect/reducers/questions.js","../../../client/app/bundles/Connect/reducers/responsesReducer.js","../../../client/app/bundles/Connect/reducers/sentenceFragments.js","../../../client/app/bundles/Connect/reducers/sessions.js","../../../client/app/bundles/Connect/reducers/titleCards.js","../../../client/app/bundles/Connect/reducers/turk.js","../../../client/app/bundles/Connect/reducers/combined.js","../../../client/app/bundles/Connect/utils/configureStore.js","../../../client/app/bundles/Connect/clientRegistration.js"],"sourcesContent":["import _ from 'underscore';\n\nimport { requestGet, } from '../../../modules/request/index';\n\nimport C from '../constants';\n\nconst conceptsEndpoint = `${process.env.DEFAULT_URL}/api/v1/concepts.json`;\n\n\nfunction splitInLevels(concepts) {\n return _.groupBy(concepts, 'level');\n}\n\nfunction getParentName(concept, concepts) {\n const parent = _.find(concepts['1'], { id: concept.parent_id, });\n const grandParent = _.find(concepts['2'], { id: parent.parent_id, });\n return `${grandParent.name} | ${parent.name}`;\n}\n\nconst actions = {\n startListeningToConcepts() {\n return (dispatch) => {\n requestGet(conceptsEndpoint, (body) => {\n const concepts = splitInLevels(body.concepts);\n concepts['0'] = concepts['0'].map((concept) => {\n concept.displayName = `${getParentName(concept, concepts)} | ${concept.name}`;\n return concept;\n });\n dispatch({ type: C.RECEIVE_CONCEPTS_DATA, data: concepts, });\n });\n };\n },\n};\n\nexport default actions;\n","import React, { Component } from 'react';\nimport { FlagDropdown, TextEditor, ConceptSelector, } from '../../../Shared/index';\nimport C from '../../constants.js';\n\nclass FillInBlankForm extends Component {\n constructor(props) {\n super(props);\n const { blankAllowed, caseInsensitive, conceptID, cues, cuesLabel, flag, instructions, prompt} = props\n this.state = {\n blankAllowed: blankAllowed || false,\n caseInsensitive: caseInsensitive || false,\n conceptID: conceptID || '',\n cues: cues || '',\n cuesLabel: cuesLabel || '',\n flag: flag || 'alpha',\n instructions: instructions || '',\n newQuestionOptimalResponse: '',\n prompt: prompt || '',\n showDefaultInstructions: false,\n };\n }\n\n clearForm = () => {\n this.setState({\n blankAllowed: false,\n caseInsensitive: false,\n newQuestionPrompt: '',\n newQuestionOptimalResponse: '',\n instructions: '',\n conceptID: null,\n flag: 'alpha',\n cuesLabel: '',\n showDefaultInstructions: false,\n });\n }\n\n handleCuesChange = e => {\n this.setState({cues: e.target.value});\n };\n\n handleCuesLabelChange = e => {\n this.setState({ cuesLabel: e.target.value, });\n };\n\n handleFlagChange = e => {\n this.setState({ flag: e.target.value, });\n };\n\n handleInstructionsChange = e => {\n this.setState({instructions: e.target.value});\n if (e.target.value == '/') {\n this.setState({ showDefaultInstructions: true})\n } else {\n this.setState({ showDefaultInstructions: false})\n }\n };\n\n handleNewQuestionOptimalResponseChange = e => {\n this.setState({newQuestionOptimalResponse: e.target.value});\n };\n\n handlePromptChange = prompt => {\n this.setState({ prompt });\n };\n\n handleSelectorChange = e => {\n this.setState({conceptID: e.value});\n };\n\n renderDefaultInstructions = () => {\n const { showDefaultInstructions } = this.state\n const defaultInstructionsDiv = C.DEFAULT_FILL_IN_BLANKS_INSTRUCTIONS.map((item, i) =>\n (\n {item}\n )\n )\n if (showDefaultInstructions) {\n return (\n
\n
\n {defaultInstructionsDiv}\n
\n
\n )\n }\n };\n\n submit = () => {\n const { questionID, newQuestionOptimalResponse, prompt, blankAllowed, caseInsensitive, cues, instructions, conceptID, flag, cuesLabel } = this.state\n const { action } = this.props\n const data = {\n prompt: prompt,\n blankAllowed: blankAllowed ? blankAllowed : false,\n caseInsensitive: caseInsensitive ? caseInsensitive : false,\n cues: cues.split(','),\n instructions: instructions,\n conceptID: conceptID,\n flag: flag ? flag : 'alpha',\n cuesLabel: cuesLabel\n };\n if (this.props.new && data.prompt != '') {\n action(\n data,\n {\n text: newQuestionOptimalResponse.trim(),\n optimal: true,\n count: 0,\n feedback: \"That's a strong sentence!\",\n concept_results: [{conceptUID: conceptID, correct: true}]\n }\n );\n } else {\n action(data, newQuestionOptimalResponse);\n }\n };\n\n toggleQuestionBlankAllowed = () => {\n this.setState({blankAllowed: !this.state.blankAllowed});\n };\n\n toggleQuestionCaseInsensitive = () => {\n this.setState(prevState => ({caseInsensitive: !prevState.caseInsensitive}));\n };\n\n renderButtonText = () => {\n return this.props.editing ? 'Submit Edit' : 'Add Question';\n }\n\n renderOptimalField = () => {\n if(!this.props.editing) {\n return(\n
\n \n

\n \n

\n
\n );\n }\n }\n\n render() {\n const { instructions } = this.state\n return(\n
\n
Create a new question
\n \n \n
\n \n

\n