{"version":3,"file":"diagnostic-Dq2UECPH.js","sources":["../../../client/app/bundles/Diagnostic/actions/concepts.js","../../../client/app/bundles/Diagnostic/components/questions/questionForm.jsx","../../../client/app/bundles/Diagnostic/components/concepts/concept.jsx","../../../client/app/bundles/Diagnostic/components/concepts/concepts.jsx","../../../client/app/bundles/Diagnostic/actions/massEdit.js","../../../client/app/bundles/Diagnostic/components/questions/conceptResultList.jsx","../../../client/app/bundles/Diagnostic/actions/display.js","../../../client/app/bundles/Diagnostic/components/questions/massEditContainer.jsx","../../../client/app/bundles/Diagnostic/actions/filters.js","../../../client/app/bundles/Diagnostic/libs/partsOfSpeechTagging.js","../../../client/app/bundles/Diagnostic/libs/algorithms/changeObjects.js","../../../client/app/bundles/Diagnostic/libs/algorithms/joiningWords.js","../../../client/app/bundles/Diagnostic/libs/algorithms/spacingBeforePunctuation.js","../../../client/app/bundles/Diagnostic/libs/quillNormalizer.js","../../../client/app/bundles/Diagnostic/libs/requiredWords.js","../../../client/app/bundles/Diagnostic/libs/sharedResponseFunctions.js","../../../client/app/bundles/Diagnostic/libs/question.js","../../../client/app/bundles/Diagnostic/libs/validEndingPunctuation.js","../../../client/app/bundles/Diagnostic/libs/sentenceFragment.js","../../../client/app/bundles/Diagnostic/components/questions/POSForResponse.jsx","../../../client/app/bundles/Diagnostic/components/questions/POSIndex.jsx","../../../client/app/bundles/Diagnostic/components/questions/POSForResponsesList.jsx","../../../client/app/bundles/Diagnostic/components/questions/responseComponent.jsx","../../../client/app/bundles/Diagnostic/components/questions/responseRouteWrapper.jsx","../../../client/app/bundles/Diagnostic/components/fillInBlank/fillInBlankForm.jsx","../../../client/app/bundles/Diagnostic/components/fillInBlank/editFillInBlank.jsx","../../../client/app/bundles/Diagnostic/components/renderForQuestions/submitResponse.js","../../../client/app/bundles/Diagnostic/components/renderForQuestions/updateResponseResource.js","../../../client/app/bundles/Diagnostic/components/fillInBlank/testFillInBlankQuestionContainer.jsx","../../../client/app/bundles/Diagnostic/components/fillInBlank/fillInBlankQuestion.jsx","../../../client/app/bundles/Diagnostic/components/fillInBlank/fillInBlankQuestions.jsx","../../../client/app/bundles/Diagnostic/components/fillInBlank/newFillInBlank.jsx","../../../client/app/bundles/Diagnostic/components/lessons/lesson.jsx","../../../client/app/bundles/Diagnostic/components/lessons/lessons.jsx","../../../client/app/bundles/Diagnostic/components/misc/diffedResponse.jsx","../../../client/app/bundles/Diagnostic/components/misc/answerVisualizer.jsx","../../../client/app/bundles/Diagnostic/components/focusPoints/editFocusPointsContainer.jsx","../../../client/app/bundles/Diagnostic/components/focusPoints/focusPointsContainer.jsx","../../../client/app/bundles/Diagnostic/components/focusPoints/newFocusPointsContainer.jsx","../../../client/app/bundles/Diagnostic/components/incorrectSequence/editIncorrectSequenceContainer.jsx","../../../client/app/bundles/Diagnostic/components/incorrectSequence/incorrectSequenceContainer.jsx","../../../client/app/bundles/Diagnostic/components/incorrectSequence/newIncorrectSequenceContainer.jsx","../../../client/app/bundles/Diagnostic/components/questions/boilerplateFeedback.jsx","../../../client/app/bundles/Diagnostic/components/questions/chooseModelContainer.jsx","../../../client/app/bundles/Diagnostic/actions.js","../../../client/app/bundles/Diagnostic/components/renderForQuestions/feedbackStatements.jsx","../../../client/app/bundles/Diagnostic/libs/markupUserResponses.js","../../../client/app/bundles/Diagnostic/components/renderForQuestions/renderTextEditor.jsx","../../../client/app/bundles/Diagnostic/components/diagnostics/sentenceCombining.jsx","../../../client/app/bundles/Diagnostic/components/questions/testQuestion.jsx","../../../client/app/bundles/Diagnostic/components/questions/question.jsx","../../../client/app/bundles/Diagnostic/components/questions/questions.jsx","../../../client/app/bundles/Diagnostic/components/sentenceFragments/chooseModelContainer.jsx","../../../client/app/bundles/Diagnostic/components/sentenceFragments/sentenceFragmentForm.jsx","../../../client/app/bundles/Diagnostic/components/sentenceFragments/newSentenceFragment.jsx","../../../client/app/bundles/Diagnostic/components/diagnostics/sentenceFragment.jsx","../../../client/app/bundles/Diagnostic/components/sentenceFragments/testSentenceFragmentContainer.jsx","../../../client/app/bundles/Diagnostic/components/sentenceFragments/sentenceFragment.jsx","../../../client/app/bundles/Diagnostic/components/sentenceFragments/sentenceFragments.jsx","../../../client/app/bundles/Diagnostic/components/diagnostics/finishedDiagnostic.jsx","../../../client/app/bundles/Diagnostic/components/diagnostics/landing.jsx","../../../client/app/bundles/Diagnostic/components/turk/finishedDiagnostic.jsx","../../../client/app/bundles/Diagnostic/libs/formattedCues.js","../../../client/app/bundles/Diagnostic/libs/conceptResults/fillInTheBlanks.js","../../../client/app/bundles/Diagnostic/libs/conceptResults/sentenceCombining.js","../../../client/app/bundles/Diagnostic/libs/conceptResults/sharedConceptResultsFunctions.js","../../../client/app/bundles/Diagnostic/libs/conceptResults/sentenceFragment.js","../../../client/app/bundles/Diagnostic/libs/conceptResults/diagnostic.js","../../../client/app/bundles/Diagnostic/components/diagnostics/studentDiagnostic.jsx","../../../client/app/bundles/Diagnostic/components/eslDiagnostic/finishedDiagnostic.jsx","../../../client/app/bundles/Shared/libs/translations/modules/languagePageInfo.js","../../../client/app/bundles/Diagnostic/components/eslDiagnostic/landingPage.jsx","../../../client/app/bundles/Diagnostic/components/eslDiagnostic/sentenceCombining.jsx","../../../client/app/bundles/Diagnostic/components/eslDiagnostic/sentenceFragment.jsx","../../../client/app/bundles/Shared/libs/translations/modules/commonText.js","../../../client/app/bundles/Diagnostic/components/eslDiagnostic/studentDiagnostic.jsx","../../../client/app/bundles/Diagnostic/components/admin/admin.jsx","../../../client/app/bundles/Diagnostic/utils/backOff.js","../../../client/app/bundles/Diagnostic/reducers/classroomLesson.js","../../../client/app/bundles/Diagnostic/reducers/classroomLessons.js","../../../client/app/bundles/Diagnostic/reducers/classroomLessonsReviews.js","../../../client/app/bundles/Diagnostic/reducers/classroomSessions.js","../../../client/app/bundles/Diagnostic/reducers/customize.js","../../../client/app/bundles/Diagnostic/reducers/diagnostics.js","../../../client/app/bundles/Diagnostic/reducers/display.js","../../../client/app/bundles/Diagnostic/reducers/filtersReducer.js","../../../client/app/bundles/Diagnostic/reducers/generatedIncorrectSequences.js","../../../client/app/bundles/Diagnostic/reducers/massEdit.js","../../../client/app/bundles/Diagnostic/reducers/questionReducer.js","../../../client/app/bundles/Diagnostic/reducers/questionReducerV2.js","../../../client/app/bundles/Diagnostic/reducers/responsesReducer.js","../../../client/app/bundles/Diagnostic/reducers/sessions.js","../../../client/app/bundles/Diagnostic/reducers/combined.js","../../../client/app/bundles/Diagnostic/utils/configureStore.js","../../../client/app/bundles/Diagnostic/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\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};\n\nexport default actions;\n","import React from 'react'\nimport {\n FlagDropdown,\n TextEditor,\n ConceptSelector,\n} from '../../../Shared/index'\n\nexport default class extends React.Component {\n state = {\n prompt: \"\",\n concept: this.props.question.conceptID,\n instructions: this.props.question.instructions ? this.props.question.instructions : \"\",\n flag: this.props.question.flag ? this.props.question.flag : \"alpha\",\n cuesLabel: this.props.question.cuesLabel ? this.props.question.cuesLabel : '',\n optimalResponseText: ''\n };\n\n submit = () => {\n const questionObj = {\n conceptUID: this.props.question.conceptUID,\n cuesLabel: this.props.question.cuesLabel,\n focusPoints: this.props.question.focusPoints,\n incorrectSequences: this.props.question.incorrectSequences,\n modelConceptUID: this.props.question.modelConceptUID,\n prompt: this.state.prompt,\n cues: this.refs.cues.value.split(','),\n instructions: this.state.instructions,\n flag: this.state.flag,\n cuesLabel: this.state.cuesLabel\n }\n if (this.props.new) {\n const optimalResponseObj = {text: this.state.optimalResponseText.trim(), optimal: true, count: 0, feedback: \"That's a strong sentence!\"}\n this.props.submit(questionObj, optimalResponseObj)\n } else {\n questionObj.conceptID = this.state.concept\n this.props.submit(questionObj)\n }\n };\n\n handleOptimalResponseText = (e) => {\n this.setState({ optimalResponseText: e.target.value });\n };\n\n handlePromptChange = (e) => {\n this.setState({prompt: e})\n };\n\n handleInstructionsChange = (e) => {\n this.setState({instructions: e.target.value})\n };\n\n renderConceptSelector = () => {\n if (!this.props.new) {\n return (\n
\n \n
\n \n
\n
\n )\n }\n };\n\n renderOptimalResponse = () => {\n if (this.props.new) {\n return (\n
\n \n

\n \n

\n
\n )\n }\n };\n\n handleSelectorChange = (e) => {\n this.setState({concept: e.value})\n };\n\n handleConceptChange = () => {\n this.setState({concept: this.refs.concept.value})\n };\n\n handleFlagChange = (e) => {\n this.setState({ flag: e.target.value, });\n };\n\n handleCuesLabelChange = (e) => {\n this.setState({ cuesLabel: e.target.value, });\n };\n\n render() {\n if(this.props.new || this.props.concepts.hasreceiveddata) {\n return (\n
\n
Create a new question
\n \n \n \n

\n