{"version":3,"file":"connect-BjVtJz2K.js","sources":["../../../client/app/bundles/Shared/quill-marking-logic/src/libs/matchers/words_out_of_order_match.ts","../../../client/app/bundles/Shared/quill-marking-logic/src/libs/matchers/min_length_match.ts","../../../client/app/bundles/Shared/quill-marking-logic/src/libs/matchers/max_length_match.ts","../../../client/app/bundles/Shared/quill-marking-logic/src/libs/graders/sentence_combining.ts","../../../client/app/bundles/Shared/quill-marking-logic/src/libs/matchers/spacy_pos_match.ts","../../../client/app/bundles/Shared/quill-marking-logic/src/libs/graders/sentence_fragment.ts","../../../client/app/bundles/Shared/components/studentLessons/multipleChoice.tsx","../../../client/app/bundles/Shared/components/studentLessons/register.tsx","../../../client/app/bundles/Connect/actions/concepts.js","../../../client/app/bundles/Connect/libs/concept_feedback_api.ts","../../../client/app/bundles/Connect/actions/concepts-feedback.ts","../../../client/app/bundles/Connect/actions/fillInBlank.ts","../../../client/app/bundles/Connect/actions/sentenceFragments.ts","../../../client/app/bundles/Connect/actions/titleCards.ts","../../../client/app/bundles/Connect/components/navbar/navbar.tsx","../../../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/answerState.ts","../../../client/app/bundles/Connect/components/renderForQuestions/feedback.tsx","../../../client/app/bundles/Connect/components/renderForQuestions/feedbackStatements.jsx","../../../client/app/bundles/Connect/components/renderForQuestions/updateResponseResource.js","../../../client/app/bundles/Connect/components/studentLessons/fillInBlank.tsx","../../../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/grading/rematching.ts","../../../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/response.tsx","../../../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/libs/EditCaretPositioning.ts","../../../client/app/bundles/Connect/components/renderForQuestions/checkAnswer.ts","../../../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/studentLessons/question.tsx","../../../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/sentenceFragments/sentenceFragmentTemplateComponentML.tsx","../../../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/components/titleCards/showTitleCard.tsx","../../../client/app/bundles/Connect/components/titleCards/titleCardForm.tsx","../../../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/activityHealth/promptHealth.tsx","../../../client/app/bundles/Connect/actions/activityHealth.ts","../../../client/app/bundles/Connect/components/activityHealth/activityHealth.tsx","../../../client/app/bundles/Connect/components/concepts/concept.tsx","../../../client/app/bundles/Connect/components/shared/linkListItem.tsx","../../../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/shared/questionList.tsx","../../../client/app/bundles/Connect/components/fillInBlank/fillInBlankQuestions.jsx","../../../client/app/bundles/Connect/components/lessons/expandLessonQuestions.tsx","../../../client/app/bundles/Connect/components/lessons/lessons.jsx","../../../client/app/bundles/Connect/components/shared/questionListByConcept.tsx","../../../client/app/bundles/Connect/components/questions/questions.jsx","../../../client/app/bundles/Connect/components/sentenceFragments/sentenceFragments.jsx","../../../client/app/bundles/Connect/components/titleCards/titleCards.tsx","../../../client/app/bundles/Connect/components/admin/admin.jsx","../../../client/app/bundles/Connect/components/studentLessons/finished.jsx","../../../client/app/bundles/Connect/libs/sessions_api.ts","../../../client/app/bundles/Connect/actions/sessions.js","../../../client/app/bundles/Connect/libs/calculateProgress.ts","../../../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/fillInBlank.tsx","../../../client/app/bundles/Connect/components/turk/finishedDiagnostic.jsx","../../../client/app/bundles/Connect/components/turk/landing.jsx","../../../client/app/bundles/Connect/components/turk/question.tsx","../../../client/app/bundles/Connect/components/turk/sentenceFragment.jsx","../../../client/app/bundles/Connect/components/turk/turkActivity.jsx","../../../client/app/bundles/Connect/routes.tsx","../../../client/app/bundles/Connect/components/home.tsx","../../../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/app.tsx","../../../client/app/bundles/Connect/clientRegistration.js"],"sourcesContent":["import * as _ from 'underscore'\nimport {getOptimalResponses} from '../sharedResponseFunctions'\nimport {stringNormalize} from 'quill-string-normalizer'\nimport {Response, PartialResponse} from '../../interfaces'\nimport {conceptResultTemplate} from '../helpers/concept_result_template'\nimport {feedbackStrings} from '../constants/feedback_strings'\nimport {removePunctuation} from './punctuation_and_case_insensitive_match'\n\nexport function wordsOutOfOrderMatch (response:string, responses: Array \n \n {sentence} {sentence} {question.instructions} {question.instructions} Fill in the blank with the correct option. Combine the sentences into one sentence. Use the joining word. Combine the sentences into one sentence. Use one of the joining words. Combine the sentences into one sentence. Combine the sentences into one sentence. {feedbackText} Author: {author} Feedback: {feedback} Loading... this.removeResponseFromMassEditArray(response)} style={{ marginRight: '0.5em', }} type=\"checkbox\" />{this.state.responses[response].text} Revise your sentence. You don't need to have a space before a ${fb}. Revise your work. Use all the words from the prompt, and make it complete by adding to it. Revise your sentence to include the word ${caseSensitiveWord}. You may have misspelled it. Revise your work. Always put a space after a comma. Revise your work. Always put a space after a comma. ***No more responses match this pattern*** {response.text} {response.count} {this.props.tagsToRender.join('---')} {this.props.tag.responses[0].text} {this.props.icon} {this.props.tag.count === undefined ? 0 : this.props.tag.count} {this.props.tag.responses[0].count === undefined ? 0 : this.props.tag.responses[0].count} Loading... \n \n {message} Loading... {question.instructions || 'Fill in the blank with the correct option.'} \n Edit Question\n 404: No Question Found {val.name}\n {val.correct ? Correct\n : Incorrect }\n this.deleteConceptResult(key, focusPointKey)} style={{ cursor: 'pointer', marginLeft: 5, }}>Delete\n \n {this.renderTextInputFields(fp.text, fp.key)}\n \n \n {fp.order}\n {val.name}\n {val.correct ? Correct\n : Incorrect }\n this.deleteConceptResult(key, sequenceKey)} style={{ cursor: 'pointer', marginLeft: 5, }}>Delete\n \n {this.renderTextInputFields(sequence.text, sequence.key)}\n \n \n {sequence.order}\n \n \n \n \n The activity that this question belongs to has the following Model Concept: \"{concept.displayName}\" Add a concept to save this question \n \n \n \n \n \n \n \n \n {translate('Quill Connect Fragments Intro^Welcome to Quill Connect Fragments!')}\n
\n \n
\n {this.renderButton(showIntro)}\n
\n \n Welcome to Quill Connect Fragments!\n
\n \n
\n {this.renderButton(showIntro)}\n
\n \n {translate('Quill Connect Intro^Welcome to Quill Connect!')}\n
\n \n
\n {this.renderButton(showIntro)}\n
\n \n Welcome to Quill Connect!\n
\n \n
\n {this.renderButton(showIntro)}\n
\n
\n \n : null\n text = this.renderExplanation()\n } else {\n arrowPicture = \n text = \n }\n if (question.cues && question.cues.length > 0 && question.cues[0] !== '') {\n const cueDivs = question.cues.map((cue, i) =>
\n
{selectedResponses.length} Responses Selected for Mass Editing:
\n Modify Feedback for {selectedResponses.length} Responses
\n FEEDBACK
\n Add Concept Results for {selectedResponses.length} Responses
\n CONCEPT RESULTS All other concept results associated with selected responses will be overwritten
\n
)\n ]\n } else {\n const diffText = this.applyDiff(parent.text, response.text);\n parentDetails = [\n (Parent Text: {parent.text}),\n (
),\n (Parent Feedback: {parent.feedback}),\n (
),\n (Differences: {diffText}),\n (
),\n (
)\n ];\n }\n }\n\n if (isEditing) {\n content =\n (
\n\n
\n \n
\n \n \n {this.renderConceptResults('Viewing')}\n
\n {authorDetails}\n {childDetails}\n \n Overview - Total Attempts: {this.getTotalAttempts()} | Unique Responses: {this.getResponseCount()} | Percentage of weak responses: {this.getPercentageWeakResponses()}%\n
\n Flag: {data[questionID].flag}
\n \n
\n
\n Focus Points
\n Add Focus Point\n {this.renderfPButton()}\n Loading...
\n );\n }\n }\n}\n\nfunction select(props) {\n return {\n sentenceFragments: props.sentenceFragments,\n questions: props.questions,\n }\n}\n\nexport default connect(select)(NewFocusPointsContainer);\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\nimport ResponseComponent from '../questions/responseComponent'\nimport questionActions from '../../actions/questions';\nimport sentenceFragmentActions from '../../actions/sentenceFragments';\nimport { hashToCollection, IncorrectSequencesInputAndConceptSelectorForm, } from '../../../Shared/index'\n\nclass EditIncorrectSequencesContainer extends Component {\n constructor() {\n super();\n\n const questionType = window.location.href.includes('sentence-fragments') ? 'sentenceFragments' : 'questions'\n const questionTypeLink = questionType === 'sentenceFragments' ? 'sentence-fragments' : 'questions'\n const actionFile = questionType === 'sentenceFragments' ? sentenceFragmentActions : questionActions\n\n this.state = {\n questionType,\n questionTypeLink,\n actionFile\n }\n }\n\n componentDidMount() {\n const { actionFile } = this.state\n const { getUsedSequences } = actionFile\n const { dispatch, generatedIncorrectSequences, match } = this.props\n const { used } = generatedIncorrectSequences\n const { params } = match\n const { questionID } = params\n if (!used[questionID] && getUsedSequences) {\n dispatch(actionFile.getUsedSequences(questionID))\n }\n }\n\n getIncorrectSequence = () => {\n const { questionType } = this.state\n const { match } = this.props\n const { params } = match\n const { incorrectSequenceID, questionID } = params\n\n const { incorrectSequences, } = this.props[questionType].data[questionID]\n const sequencesArray = Array.isArray(incorrectSequences) && incorrectSequences.every(is => is.key) ? incorrectSequences : hashToCollection(incorrectSequences)\n return sequencesArray.find(is => is.key === incorrectSequenceID);\n }\n\n submitForm = (data, incorrectSequenceID) => {\n const { actionFile } = this.state\n const { submitEditedIncorrectSequence } = actionFile\n const { dispatch, match } = this.props\n const { params } = match\n const { questionID } = params\n delete data.conceptResults.null;\n dispatch(submitEditedIncorrectSequence(questionID, data, incorrectSequenceID));\n setTimeout(() => {window.history.back()}, 2000);\n };\n\n render() {\n const { generatedIncorrectSequences, match, questions, sentenceFragments, } = this.props\n const { params } = match\n const { incorrectSequenceID, questionID } = params\n return (\n
\n {this.renderConceptResults(sequence.conceptResults, sequence.key)}\n Incorrect Sequences
\n Add Incorrect Sequence\n {this.renderSaveButton()}\n Choose Model
\n {this.renderLessonModelNote()}\n Create a new question
\n \n
\n \n
Loading...
);\n }\n}\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { clearData, loadData, nextQuestion } from '../../actions.js';\nimport PlayLessonQuestion from '../studentLessons/question';\n\nclass TestQuestion extends Component {\n constructor() {\n super();\n this.state = {\n responsesForGrading: [],\n allResponses: [],\n key: 0,\n };\n }\n\n componentDidMount() {\n this.reset();\n }\n\n componentWillUnmount() {\n const { dispatch } = this.props\n dispatch(clearData());\n }\n\n getQuestion = () => {\n const { match, questions } = this.props\n const { data } = questions\n const { params } = match\n const { questionID } = params\n return data[questionID];\n }\n\n questionsForLesson = () => {\n let question = this.getQuestion();\n const { match } = this.props\n const { params } = match\n const { questionID } = params\n question.key = questionID;\n return [\n {\n type: 'SC',\n question,\n }\n ];\n }\n\n reset = () => {\n const { dispatch } = this.props\n dispatch(clearData());\n this.startActivity();\n this.setState(prevState => ({ key: prevState.key + 1 }));\n };\n\n startActivity = (name = 'Triangle') => {\n const { dispatch } = this.props\n const action = loadData(this.questionsForLesson());\n dispatch(action);\n const next = nextQuestion();\n dispatch(next);\n }\n\n render() {\n const { key } = this.state\n const { playLesson, conceptsFeedback, dispatch, } = this.props\n const { currentQuestion } = playLesson\n if (currentQuestion) {\n const { question } = currentQuestion;\n return (\nLoading...
\n );\n }\n }\n}\n\nfunction select(props) {\n return {\n questions: props.questions,\n playLesson: props.playLesson,\n conceptsFeedback: props.conceptsFeedback\n };\n}\n\nexport default connect(select)(TestQuestion);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { NavLink, Route, Switch, withRouter } from 'react-router-dom';\nimport _ from 'underscore';\nimport { Modal, UploadOptimalResponses, } from '../../../Shared/index';\nimport questionActions from '../../actions/questions';\nimport {\n submitOptimalResponses,\n submitResponse\n} from '../../actions/responses';\nimport C from '../../constants';\nimport EditFocusPointsContainer from '../focusPoints/editFocusPointsContainer.jsx';\nimport FocusPointsContainer from '../focusPoints/focusPointsContainer.jsx';\nimport NewFocusPointsContainer from '../focusPoints/newFocusPointsContainer.jsx';\nimport EditIncorrectSequenceContainer from '../incorrectSequence/editIncorrectSequenceContainer.jsx';\nimport IncorrectSequenceContainer from '../incorrectSequence/incorrectSequenceContainer.jsx';\nimport NewIncorrectSequenceContainer from '../incorrectSequence/newIncorrectSequenceContainer.jsx';\nimport Cues from '../renderForQuestions/cues.jsx';\nimport getBoilerplateFeedback from './boilerplateFeedback.jsx';\nimport ChooseModelContainer from './chooseModelContainer.jsx';\nimport MassEditContainer from './massEditContainer.jsx';\nimport EditForm from './questionForm.jsx';\nimport ResponseComponentWrapper from './responseRouteWrapper.jsx';\nimport TestQuestionContainer from './testQuestion';\n\nconst icon = `${window.postbuildEnv.CDN_URL}/images/icons/direction.svg`\n\nexport class Question extends React.Component {\n constructor(props) {\n super(props)\n\n this.state = {\n selectedBoilerplateCategory: '',\n responses: [],\n loadedResponses: false,\n addingNewResponse: false,\n uploadingNewOptimalResponses: false\n }\n }\n\n onCloseNewResponseModal = () => this.setState({ addingNewResponse: false, })\n\n onCloseUploadOptimalResponsesModal = () => this.setState({ uploadingNewOptimalResponses: false })\n\n getQuestion = () => {\n const { match, questions, } = this.props\n const { params } = match\n const { data, } = questions;\n const { questionID, } = params;\n return data[questionID];\n }\n\n boilerplateCategoriesToOptions = () => {\n return getBoilerplateFeedback().map(category => (\n \n ));\n }\n\n boilerplateSpecificFeedbackToOptions = (selectedCategory) =>{\n return selectedCategory.children.map(childFeedback => (\n \n ));\n }\n\n cancelEditingQuestion = () => {\n const { dispatch, match } = this.props\n const { params } = match\n const { questionID } = params\n dispatch(questionActions.cancelQuestionEdit(questionID));\n }\n\n chooseBoilerplateCategory = (e) => {\n this.setState({ selectedBoilerplateCategory: e.target.value, });\n }\n\n chooseSpecificBoilerplateFeedback = (e) => {\n if (e.target.value === 'Select specific boilerplate feedback') {\n this.refs.newResponseFeedback.value = '';\n } else {\n this.refs.newResponseFeedback.value = e.target.value;\n }\n }\n\n handleClickAddNewResponse = () => {\n this.setState({ addingNewResponse: true, });\n }\n\n handleClickStartEditingQuestion = () => {\n const { dispatch, match } = this.props\n const { params } = match\n const { questionID } = params\n dispatch(questionActions.startQuestionEdit(questionID));\n }\n\n handleClickUploadOptimalResponses = () => {\n this.setState({ uploadingNewOptimalResponses: true, });\n }\n\n isLoading = () => {\n const { questions } = this.props\n const { hasreceiveddata } = questions\n return !hasreceiveddata;\n }\n\n saveQuestionEdits = (vals) => {\n const { dispatch, match } = this.props\n const { params } = match\n const { questionID } = params\n dispatch(questionActions.submitQuestionEdit(questionID, vals));\n }\n\n submitOptimalResponses = (responses) => {\n const { dispatch, match, concepts } = this.props\n const { params } = match\n const { questionID } = params\n const conceptUID = this.getQuestion().conceptID\n dispatch(\n submitOptimalResponses(questionID, conceptUID, responses, concepts)\n )\n this.setState({ uploadingNewOptimalResponses: false, })\n }\n\n submitResponse = () => {\n const { match, dispatch, } = this.props\n const { params } = match\n const { questionID } = params\n\n const newResp = {\n vals: {\n text: this.refs.newResponseText.value,\n feedback: this.refs.newResponseFeedback.value,\n optimal: this.refs.newResponseOptimal.checked,\n questionUID: questionID,\n gradeIndex: `human${questionID}`,\n count: 1,\n }\n };\n this.refs.newResponseText.value = null;\n this.refs.newResponseFeedback.value = null;\n this.refs.newResponseOptimal.checked = false;\n dispatch(submitResponse(newResp.vals));\n this.setState({ addingNewResponse: false, });\n }\n\n renderBoilerplateCategoryDropdown = (onChangeEvent) => {\n const style = { marginRight: '20px', };\n return (\n \n \n \n );\n }\n\n renderBoilerplateCategoryOptionsDropdown = (onChangeEvent, description) => {\n const selectedCategory = _.find(getBoilerplateFeedback(), { description, });\n if (selectedCategory) {\n return (\n \n \n \n );\n } else {\n return ();\n }\n }\n\n renderEditForm = () => {\n const { questions, match, concepts, itemLevels, } = this.props\n const { data, states } = questions\n const { params } = match\n const { questionID, } = params;\n const question = (data[questionID]);\n if (states[questionID] === C.EDITING_QUESTION) {\n return (\n\n \n
\n \n\n \n
\n \n\n \n
\n \nLoading...
);\n } else if (data[questionID]) {\n const activeLink = massEdit.numSelectedResponses > 1\n ?{instructionText}
\n\n Edit Question\n Add New Response\n Upload Optimal Responses\n
\n404: No Question Found
\n );\n }\n }\n}\n\nfunction select(state) {\n return {\n concepts: state.concepts,\n questions: state.questions,\n itemLevels: state.itemLevels,\n routing: state.routing,\n massEdit: state.massEdit\n };\n}\n\nexport default withRouter(connect(select)(Question));\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { ConceptExplanation, ConceptSelector, } from '../../../Shared/index';\nimport sentenceFragmentActions from '../../actions/sentenceFragments';\n\nclass ChooseModelContainer extends Component {\n constructor(props) {\n super(props);\n const { match, sentenceFragments } = props\n const { data } = sentenceFragments\n const { params } = match\n const { questionID } = params\n this.state = {\n modelConceptUID: data[questionID].modelConceptUID\n }\n }\n\n getModelConceptUID = () => {\n const { modelConceptUID } = this.state\n const { match, sentenceFragments } = this.props\n const { data } = sentenceFragments\n const { params } = match\n const { questionID } = params\n return modelConceptUID || data[questionID].modelConceptUID;\n }\n\n removeModelConcept = () => {\n const { dispatch, match, sentenceFragments } = this.props\n const { data } = sentenceFragments\n const { params } = match\n const { questionID } = params\n let questionData = Object.assign({}, data[questionID], {modelConceptUID: null});\n dispatch(sentenceFragmentActions.submitSentenceFragmentEdit(questionID, questionData));\n window.history.back();\n };\n\n saveModelConcept = () => {\n const { modelConceptUID } = this.state\n const { dispatch, match, sentenceFragments } = this.props\n const { data } = sentenceFragments\n const { params } = match\n const { questionID } = params\n dispatch(sentenceFragmentActions.submitSentenceFragmentEdit(questionID,\n Object.assign({}, data[questionID], {modelConceptUID: modelConceptUID})));\n window.history.back();\n };\n\n selectConcept = e => {\n this.setState({modelConceptUID: e.value});\n };\n\n renderButtons = () => {\n const { modelConceptUID } = this.state\n const { match, sentenceFragments } = this.props\n const { data } = sentenceFragments\n const { params } = match\n const { questionID } = params\n return(\n\n \n \n \n
\n )\n }\n\n render() {\n const { conceptsFeedback } = this.props\n const { data } = conceptsFeedback\n return(\n\n \n
)\n ]\n );\n };\n\n renderDefaultInstructions = () => {\n const { showDefaultInstructions } = this.state\n const defaultInstructionsDiv = C.DEFAULT_SENTENCE_FRAGMENT_INSTRUCTIONS.map((item, i) =>\n ()\n )\n if (showDefaultInstructions) {\n return\n \n
\n \n\n \n
\n {this.renderDefaultInstructions()}\n\n \n
\n\n \n
\n \n
\n \n
\n {this.renderOptimalResponseTextInput()}\n\n \n
Is this a complete or an incomplete sentence?
\n{question ? question.prompt : ''}
\nLoading...
\n );\n }\n }\n\n}\n\nfunction select(props) {\n return {\n conceptsFeedback: props.conceptsFeedback,\n sentenceFragments: props.sentenceFragments,\n playLesson: props.playLesson,\n };\n}\n\nexport default connect(select)(TestQuestion);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { NavLink, Route, Switch, withRouter } from 'react-router-dom';\nimport { Modal, UploadOptimalResponses, } from '../../../Shared/index';\nimport {\n submitOptimalResponses\n} from '../../actions/responses';\nimport fragmentActions from '../../actions/sentenceFragments';\nimport C from '../../constants';\nimport EditFocusPointsContainer from '../focusPoints/editFocusPointsContainer.jsx';\nimport FocusPointsContainer from '../focusPoints/focusPointsContainer.jsx';\nimport NewFocusPointsContainer from '../focusPoints/newFocusPointsContainer.jsx';\nimport EditIncorrectSequenceContainer from '../incorrectSequence/editIncorrectSequenceContainer.jsx';\nimport IncorrectSequenceContainer from '../incorrectSequence/incorrectSequenceContainer.jsx';\nimport NewIncorrectSequenceContainer from '../incorrectSequence/newIncorrectSequenceContainer.jsx';\nimport MassEditContainer from '../questions/massEditContainer.jsx';\nimport ResponseComponent from '../questions/responseComponent.jsx';\nimport ResponseComponentWrapper from '../questions/responseRouteWrapper.jsx';\nimport ChooseModelContainer from './chooseModelContainer.jsx';\nimport EditForm from './sentenceFragmentForm.jsx';\nimport TestQuestionContainer from './testSentenceFragmentContainer';\n\nconst icon = `${window.postbuildEnv.CDN_URL}/images/icons/direction.svg`\n\nclass SentenceFragment extends React.Component {\n constructor(props) {\n super(props)\n\n this.state = {\n selectedBoilerplateCategory: '',\n responses: [],\n loadedResponses: false,\n uploadingNewOptimalResponses: false\n }\n }\n\n getQuestion = () => {\n const { sentenceFragments, match } = this.props\n const { params } = match\n const { questionID } = params\n const { data } = sentenceFragments\n return data[questionID];\n }\n\n cancelEditingSentenceFragment = () => {\n const { dispatch, match } = this.props\n const { params } = match\n const { questionID } = params\n dispatch(fragmentActions.cancelSentenceFragmentEdit(questionID));\n }\n\n closeModal = () => {\n this.setState({ uploadingNewOptimalResponses: false, })\n }\n\n handleEditFragmentClick = () => {\n const { dispatch, match } = this.props\n const { params } = match\n const { questionID } = params\n dispatch(fragmentActions.startSentenceFragmentEdit(questionID));\n }\n\n handleUploadOptimalResponsesClick = () => {\n this.setState({ uploadingNewOptimalResponses: true, });\n }\n\n saveSentenceFragmentEdits = (data) => {\n const { dispatch, match } = this.props\n const { params } = match\n const { questionID } = params\n dispatch(fragmentActions.submitSentenceFragmentEdit(questionID, data));\n }\n\n submitOptimalResponses(responses) {\n const { dispatch, match } = this.props\n const { params } = match\n const { questionID } = params\n const conceptUID = this.getQuestion().conceptID\n dispatch(submitOptimalResponses(questionID, conceptUID, responses, concepts))\n this.setState({ uploadingNewOptimalResponses: false, })\n }\n\n renderEditForm = () => {\n const { sentenceFragments, match, concepts, } = this.props\n const { data, states } = sentenceFragments\n const { params } = match\n const { questionID } = params\n if (states[questionID] === C.EDITING_SENTENCE_FRAGMENT) {\n return (\n{data[questionID].instructions || 'Combine the sentences into one sentence.'}
\n<\\/p>/g, '
').replace(/ /g, '
')\n this.setState({content: formattedContent})\n }\n\n renderHeaderText = () => {\n const { match } = this.props\n const { params } = match\n const { titleCardID } = params\n if (titleCardID) {\n return 'Edit this title card'\n } else {\n return 'Create a new title card'\n }\n }\n\n render() {\n const { content, title } = this.state\n return (\n
\n \n
\n )\n }\n\n render() {\n return (\n\n {promptOrTitle}\n {'\\t\\t'}\n \n
\n );\n });\n return\n \n \n
\n\n \n
\n\n \n \n \n \n
\n\n \n \n \n \n
\n\n \n
\n\n \n
\n\n \n \n \n Play Activity\n
\nLoading...
);\n }\n return (\n404: No Concept Found
\n );\n }\n};\n\nfunction select(state) {\n return {\n lessons: state.lessons,\n questions: state.questions,\n routing: state.routing,\n sentenceFragments: state.sentenceFragments,\n fillInBlank: state.fillInBlank,\n titleCards: state.titleCards\n };\n}\n\nexport default connect(select)(Lesson);\n","import React from 'react';\nimport Lesson from '../lessons/lesson.jsx';\n\nconst AdminLessonSidebar = ({ match }) => {\n return (\n