diff --git a/wax-prosemirror-core/src/WaxView.js b/wax-prosemirror-core/src/WaxView.js index 226b5702ed64ba2d16211bb69247bd92e58a4359..0ac0dd1a0f0207668390cdd9fdaf5b61b2f045ce 100644 --- a/wax-prosemirror-core/src/WaxView.js +++ b/wax-prosemirror-core/src/WaxView.js @@ -103,9 +103,9 @@ const WaxView = forwardRef((props, ref) => { if (debug) applyDevTools(view); setTimeout(() => { if (autoFocus && view) { - view.focus(); view.state.tr.insertText('', 0); view.dispatch(view.state.tr.scrollIntoView()); + view.focus(); } }, 500); diff --git a/wax-prosemirror-services/src/FillTheGapQuestionService/components/FillTheGapContainerComponent.js b/wax-prosemirror-services/src/FillTheGapQuestionService/components/FillTheGapContainerComponent.js index f3b7a26663b304b9e488a8643cb18042b0ca6cb4..cf57a30d4c237ea6ec94a5ce239a153479653bb1 100644 --- a/wax-prosemirror-services/src/FillTheGapQuestionService/components/FillTheGapContainerComponent.js +++ b/wax-prosemirror-services/src/FillTheGapQuestionService/components/FillTheGapContainerComponent.js @@ -40,11 +40,12 @@ export default ({ node, view, getPos }) => { }); const readOnly = !isEditable; + const { feedback } = node.attrs; return ( <FillTheGapWrapper> <div> - <span> Fill The Gap</span> + {/* <span> Fill The Gap</span> */} {!testMode && !readOnly && ( <FillTheGapContainerTool> <FillTheGapTool /> @@ -54,7 +55,7 @@ export default ({ node, view, getPos }) => { <FillTheGapContainer className="fill-the-gap"> <ContainerEditor getPos={getPos} node={node} view={view} /> - {!testMode && ( + {!testMode && !(readOnly && feedback === '') && ( <FeedbackComponent getPos={getPos} node={node} diff --git a/wax-prosemirror-services/src/MatchingService/components/MatchingContainerComponent.js b/wax-prosemirror-services/src/MatchingService/components/MatchingContainerComponent.js index eb373c58e91f3c51bfb942c95cc29e6adac22401..7732e052a93747fef331d2212642b18f023b0e38 100644 --- a/wax-prosemirror-services/src/MatchingService/components/MatchingContainerComponent.js +++ b/wax-prosemirror-services/src/MatchingService/components/MatchingContainerComponent.js @@ -214,10 +214,11 @@ export default ({ node, view, getPos }) => { }; const { testMode } = customProps; + const { feedback } = node.attrs; return ( <MatchingWrapper> - <span>Matching</span> + {/* <span>Matching</span> */} <MatchingContainer className="matching"> <QuestionWrapper> <ContainerEditor getPos={getPos} node={node} view={view} /> @@ -267,7 +268,7 @@ export default ({ node, view, getPos }) => { )} </CreateOptions> )} - {!testMode && ( + {!testMode && !(readOnly && feedback === '') && ( <FeedbackComponent getPos={getPos} node={node} diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/MultipleChoiceSingleCorrectQuestionService/components/AnswerComponent.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/MultipleChoiceSingleCorrectQuestionService/components/AnswerComponent.js index adff16960d5d20f3f424f44056c6a76f8aaae211..1210e87c4b439fac88f218e75534666e896c7c56 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/MultipleChoiceSingleCorrectQuestionService/components/AnswerComponent.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/MultipleChoiceSingleCorrectQuestionService/components/AnswerComponent.js @@ -204,6 +204,7 @@ export default ({ node, view, getPos }) => { const readOnly = !isEditable; const { testMode } = customProps; + const { feedback } = node.attrs; return ( <Wrapper> @@ -216,7 +217,7 @@ export default ({ node, view, getPos }) => { <QuestionData> <EditorComponent getPos={getPos} node={node} view={view} /> </QuestionData> - {!testMode && ( + {!testMode && !(readOnly && feedback === '') && ( <FeedbackComponent getPos={getPos} node={node} diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseQuestionService/components/AnswerComponent.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseQuestionService/components/AnswerComponent.js index 6776dc5fced31672f7a70e23f644a326349cb603..c96a6251f7560067298c4f390545f72ba4c6cc71 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseQuestionService/components/AnswerComponent.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseQuestionService/components/AnswerComponent.js @@ -204,6 +204,7 @@ export default ({ node, view, getPos }) => { const readOnly = !isEditable; const { testMode } = customProps; + const { feedback } = node.attrs; return ( <Wrapper> @@ -216,7 +217,7 @@ export default ({ node, view, getPos }) => { <QuestionData> <EditorComponent getPos={getPos} node={node} view={view} /> </QuestionData> - {!testMode && ( + {!testMode && !(readOnly && feedback === '') && ( <FeedbackComponent getPos={getPos} node={node} diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseSingleCorrectQuestionService/components/AnswerComponent.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseSingleCorrectQuestionService/components/AnswerComponent.js index cdd395ec47e4af7788805d9839caaf5dbf5ffd3e..707d0eaf585ca185c4e1ab91cf5e1e88366f7915 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseSingleCorrectQuestionService/components/AnswerComponent.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/TrueFalseSingleCorrectQuestionService/components/AnswerComponent.js @@ -204,6 +204,7 @@ export default ({ node, view, getPos }) => { const readOnly = !isEditable; const { testMode } = customProps; + const { feedback } = node.attrs; return ( <Wrapper> @@ -216,7 +217,7 @@ export default ({ node, view, getPos }) => { <QuestionData> <EditorComponent getPos={getPos} node={node} view={view} /> </QuestionData> - {!testMode && ( + {!testMode && !(readOnly && feedback === '') && ( <FeedbackComponent getPos={getPos} node={node} diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/AnswerComponent.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/AnswerComponent.js index 85b9a5eb44534f81e98379aac3c892c5cf767380..bd696b59e21cc48e6ed37e435b9efb76d4c3d17e 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/AnswerComponent.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/AnswerComponent.js @@ -202,6 +202,7 @@ export default ({ node, view, getPos }) => { const readOnly = !isEditable; const { testMode } = customProps; + const { feedback } = node.attrs; return ( <Wrapper> @@ -214,7 +215,7 @@ export default ({ node, view, getPos }) => { <QuestionData> <EditorComponent getPos={getPos} node={node} view={view} /> </QuestionData> - {!testMode && ( + {!testMode && !(readOnly && feedback === '') && ( <FeedbackComponent getPos={getPos} node={node} diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/multipleQuestionStyles.css b/wax-prosemirror-services/src/MultipleChoiceQuestionService/multipleQuestionStyles.css index 7982754a5140574dae07e471d0c5b0bfe3149996..f35d630133fada470ad4809d2d207459caf3ac0c 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/multipleQuestionStyles.css +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/multipleQuestionStyles.css @@ -29,7 +29,7 @@ } -.multiple-choice:before { +/* .multiple-choice:before { content: 'Multiple Choice' ; } @@ -43,7 +43,7 @@ .true-false-single-correct:before { content: 'True False Single Correct'; -} +} */ .rc-switch { position: relative; diff --git a/wax-prosemirror-services/src/MultipleDropDownService/components/MultipleDropDownContainerComponent.js b/wax-prosemirror-services/src/MultipleDropDownService/components/MultipleDropDownContainerComponent.js index 8dab27986035f46e8d1fd2d012ddd8be0b41542f..15ca6308ebdfbdf8b972a9efda7fb05e53718e85 100644 --- a/wax-prosemirror-services/src/MultipleDropDownService/components/MultipleDropDownContainerComponent.js +++ b/wax-prosemirror-services/src/MultipleDropDownService/components/MultipleDropDownContainerComponent.js @@ -40,11 +40,12 @@ export default ({ node, view, getPos }) => { const readOnly = !isEditable; const { testMode } = customProps; + const { feedback } = node.attrs; return ( <MultipleDropDownpWrapper> <div> - <span>Multiple Drop Down</span> + {/* <span>Multiple Drop Down</span> */} {!testMode && !readOnly && ( <MultipleDropDownContainerTool> <MultipleDropDown /> @@ -53,7 +54,7 @@ export default ({ node, view, getPos }) => { </div> <MultipleDropDownpContainer className="multiple-drop-down"> <ContainerEditor getPos={getPos} node={node} view={view} /> - {!testMode && ( + {!testMode && !(readOnly && feedback === '') && ( <FeedbackComponent getPos={getPos} node={node}