Skip to content
Snippets Groups Projects
Commit facf6357 authored by chris's avatar chris
Browse files

removing matching toolgroup

parent f0258bed
No related branches found
No related tags found
1 merge request!426Questions ToolGroup
......@@ -23,11 +23,10 @@ import {
MultipleChoiceQuestionService,
FillTheGapQuestionService,
FillTheGapToolGroupService,
MultipleChoiceDropDownToolGroupService,
QuestionsDropDownToolGroupService,
EssayService,
EssayToolGroupService,
MatchingService,
MatchingToolGroupService,
MultipleDropDownService,
MultipleDropDownToolGroupService,
} from 'wax-prosemirror-services';
......@@ -55,11 +54,10 @@ export default {
'Lists',
'Images',
'Tables',
'MultipleChoiceDropDown',
'QuestionsDropDown',
'Essay',
'FillTheGap',
'MultipleDropDown',
'Matching',
'FullScreen',
],
},
......@@ -72,11 +70,10 @@ export default {
services: [
new MatchingService(),
new MatchingToolGroupService(),
new FillTheGapQuestionService(),
new FillTheGapToolGroupService(),
new MultipleChoiceQuestionService(),
new MultipleChoiceDropDownToolGroupService(),
new QuestionsDropDownToolGroupService(),
new MultipleDropDownService(),
new MultipleDropDownToolGroupService(),
new EssayService(),
......
......@@ -63,9 +63,8 @@ export { default as TrackCommentOptionsToolGroupService } from './src/WaxToolGro
export { default as CustomTagInlineToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService';
export { default as CustomTagBlockToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService';
export { default as FillTheGapToolGroupService } from './src/WaxToolGroups/FillTheGapToolGroupService/FillTheGapToolGroupService';
export { default as MultipleChoiceDropDownToolGroupService } from './src/WaxToolGroups/MultipleChoiceDropDownToolGroupService/MultipleChoiceDropDownToolGroupService';
export { default as QuestionsDropDownToolGroupService } from './src/WaxToolGroups/QuestionsDropDownToolGroupService/QuestionsDropDownToolGroupService';
export { default as EssayToolGroupService } from './src/WaxToolGroups/EssayToolGroupService/EssayToolGroupService';
export { default as MatchingToolGroupService } from './src/WaxToolGroups/MatchingToolGroupService/MatchingToolGroupService';
export { default as MultipleDropDownToolGroupService } from './src/WaxToolGroups/MultipleDropDownToolGroupService/MultipleDropDownToolGroupService';
export { default as OENContainersToolGroupService } from './src/WaxToolGroups/OENContainersToolGroupService/OENContainersToolGroupService';
export { default as OENLeftToolGroupService } from './src/WaxToolGroups/OENLeftToolGroupService/OENLeftToolGroupService';
import { injectable, inject } from 'inversify';
import { ToolGroup } from 'wax-prosemirror-core';
@injectable()
class Matching extends ToolGroup {
tools = [];
constructor(@inject('MatchingQuestion') matchingQuestion) {
super();
this.tools = [matchingQuestion];
}
}
export default Matching;
import { Service } from 'wax-prosemirror-core';
import Matching from './Matching';
class MatchingToolGroupService extends Service {
register() {
this.container.bind('Matching').to(Matching);
}
}
export default MatchingToolGroupService;
import { Service } from 'wax-prosemirror-core';
import MultipleChoiceDropDown from './MultipleChoiceDropDown';
class MultipleChoiceDropDownToolGroupService extends Service {
register() {
this.container.bind('MultipleChoiceDropDown').to(MultipleChoiceDropDown);
}
}
export default MultipleChoiceDropDownToolGroupService;
......@@ -73,6 +73,11 @@ const DropDownComponent = ({ title, view, tools }) => {
value: '3',
item: tools[3],
},
{
label: 'Matching',
value: '4',
item: tools[4],
},
];
useEffect(() => {
......
......@@ -6,7 +6,7 @@ import { ToolGroup } from 'wax-prosemirror-core';
import DropDownComponent from './DropDownComponent';
@injectable()
class MultipleChoiceDropDown extends ToolGroup {
class QuestionsDropDown extends ToolGroup {
tools = [];
constructor(
@inject('MultipleChoiceQuestion') multipleChoiceQuestion,
......@@ -14,6 +14,7 @@ class MultipleChoiceDropDown extends ToolGroup {
multipleChoiceSingleCorrectQuestion,
@inject('TrueFalseQuestion') trueFalseQuestion,
@inject('TrueFalseSingleCorrectQuestion') trueFalseSingleCorrectQuestion,
@inject('MatchingQuestion') matchingQuestion,
) {
super();
this.tools = [
......@@ -21,6 +22,7 @@ class MultipleChoiceDropDown extends ToolGroup {
multipleChoiceSingleCorrectQuestion,
trueFalseQuestion,
trueFalseSingleCorrectQuestion,
matchingQuestion,
];
}
......@@ -36,4 +38,4 @@ class MultipleChoiceDropDown extends ToolGroup {
}
}
export default MultipleChoiceDropDown;
export default QuestionsDropDown;
import { Service } from 'wax-prosemirror-core';
import QuestionsDropDown from './QuestionsDropDown';
class QuestionsDropDownToolGroupService extends Service {
register() {
this.container.bind('QuestionsDropDown').to(QuestionsDropDown);
}
}
export default QuestionsDropDownToolGroupService;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment