diff --git a/wax-questions-service/src/NumericalAnswerService/NumericalAnswerService.js b/wax-questions-service/src/NumericalAnswerService/NumericalAnswerService.js index 2a55b85b76c01289e3914a4afcf5b838e70a0c78..690653168db1facf332504d339e310f175b137c9 100644 --- a/wax-questions-service/src/NumericalAnswerService/NumericalAnswerService.js +++ b/wax-questions-service/src/NumericalAnswerService/NumericalAnswerService.js @@ -1,11 +1,12 @@ import { Service } from 'wax-prosemirror-core'; import NumericalAnswerContainerNode from './schema/NumericalAnswerContainerNode'; +import NumericalAnswerQuestion from './NumericalAnswerQuestion'; import './numericalAnswer.css'; class NumericalAnswerService extends Service { register() { - this.container.bind('').to(); + this.container.bind('NumericalAnswerQuestion').to(NumericalAnswerQuestion); const createNode = this.container.get('CreateNode'); const addPortal = this.container.get('AddPortal'); diff --git a/wax-questions-service/src/QuestionsDropDownToolGroupService/DropDownComponent.js b/wax-questions-service/src/QuestionsDropDownToolGroupService/DropDownComponent.js index eed85c98d782555c106a763872d95498f848b6cc..e67b0a92c2bbd11ae4d1b1cae27488d6b2cfb1ff 100644 --- a/wax-questions-service/src/QuestionsDropDownToolGroupService/DropDownComponent.js +++ b/wax-questions-service/src/QuestionsDropDownToolGroupService/DropDownComponent.js @@ -107,11 +107,11 @@ const DropDownComponent = ({ view, tools }) => { value: '7', item: tools[7], }, - // { - // label: 'Numerical answer', - // value: '8', - // item: tools[8], - // }, + { + label: 'Numerical answer', + value: '8', + item: tools[8], + }, ]; const context = useContext(WaxContext); diff --git a/wax-questions-service/src/QuestionsDropDownToolGroupService/QuestionsDropDown.js b/wax-questions-service/src/QuestionsDropDownToolGroupService/QuestionsDropDown.js index 395c8bedb5d1d4d89046b79d19a4f56aa8ad7a4e..94e612926602e279ac062a55e4f9c425df6d28a4 100644 --- a/wax-questions-service/src/QuestionsDropDownToolGroupService/QuestionsDropDown.js +++ b/wax-questions-service/src/QuestionsDropDownToolGroupService/QuestionsDropDown.js @@ -18,6 +18,7 @@ class QuestionsDropDown extends ToolGroup { @inject('EssayQuestion') essayQuestion, @inject('MultipleDropDownQuestion') MultipleDropDownQuestion, @inject('FillTheGapQuestion') FillTheGapQuestion, + @inject('NumericalAnswerQuestion') NumericalAnswerQuestion, ) { super(); this.tools = [ @@ -29,6 +30,7 @@ class QuestionsDropDown extends ToolGroup { essayQuestion, MultipleDropDownQuestion, FillTheGapQuestion, + NumericalAnswerQuestion, ]; } diff --git a/wax-questions-service/src/QuestionsService.js b/wax-questions-service/src/QuestionsService.js index 346fc5784d80271d39d0c02210fa6fc13f765f99..a8663f0628bf68d8a563ea44d4491047dd6c7a24 100644 --- a/wax-questions-service/src/QuestionsService.js +++ b/wax-questions-service/src/QuestionsService.js @@ -3,6 +3,7 @@ import EssayService from './EssayService/EssayService'; import FillTheGapQuestionService from './FillTheGapQuestionService/FillTheGapQuestionService'; import MatchingService from './MatchingService/MatchingService'; import MultipleDropDownService from './MultipleDropDownService/MultipleDropDownService'; +import NumericalAnswerService from './NumericalAnswerService/NumericalAnswerService'; import QuestionsDropDownToolGroupService from './QuestionsDropDownToolGroupService/QuestionsDropDownToolGroupService'; import MultipleChoiceQuestionService from './MultipleChoiceQuestionService/MultipleChoiceQuestionService'; @@ -15,6 +16,7 @@ class QuestionsService extends Service { new FillTheGapQuestionService(), new MatchingService(), new MultipleDropDownService(), + new NumericalAnswerService(), new QuestionsDropDownToolGroupService(), ]; }