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

add essay

parent c375485b
No related branches found
No related tags found
1 merge request!426Questions ToolGroup
...@@ -25,7 +25,6 @@ import { ...@@ -25,7 +25,6 @@ import {
FillTheGapToolGroupService, FillTheGapToolGroupService,
QuestionsDropDownToolGroupService, QuestionsDropDownToolGroupService,
EssayService, EssayService,
EssayToolGroupService,
MatchingService, MatchingService,
MultipleDropDownService, MultipleDropDownService,
MultipleDropDownToolGroupService, MultipleDropDownToolGroupService,
...@@ -55,7 +54,6 @@ export default { ...@@ -55,7 +54,6 @@ export default {
'Images', 'Images',
'Tables', 'Tables',
'QuestionsDropDown', 'QuestionsDropDown',
'Essay',
'FillTheGap', 'FillTheGap',
'MultipleDropDown', 'MultipleDropDown',
'FullScreen', 'FullScreen',
...@@ -77,7 +75,6 @@ export default { ...@@ -77,7 +75,6 @@ export default {
new MultipleDropDownService(), new MultipleDropDownService(),
new MultipleDropDownToolGroupService(), new MultipleDropDownToolGroupService(),
new EssayService(), new EssayService(),
new EssayToolGroupService(),
new ListsService(), new ListsService(),
new LinkService(), new LinkService(),
new InlineAnnotationsService(), new InlineAnnotationsService(),
......
...@@ -64,7 +64,6 @@ export { default as CustomTagInlineToolGroupService } from './src/WaxToolGroups/ ...@@ -64,7 +64,6 @@ export { default as CustomTagInlineToolGroupService } from './src/WaxToolGroups/
export { default as CustomTagBlockToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService'; export { default as CustomTagBlockToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService';
export { default as FillTheGapToolGroupService } from './src/WaxToolGroups/FillTheGapToolGroupService/FillTheGapToolGroupService'; export { default as FillTheGapToolGroupService } from './src/WaxToolGroups/FillTheGapToolGroupService/FillTheGapToolGroupService';
export { default as QuestionsDropDownToolGroupService } from './src/WaxToolGroups/QuestionsDropDownToolGroupService/QuestionsDropDownToolGroupService'; export { default as QuestionsDropDownToolGroupService } from './src/WaxToolGroups/QuestionsDropDownToolGroupService/QuestionsDropDownToolGroupService';
export { default as EssayToolGroupService } from './src/WaxToolGroups/EssayToolGroupService/EssayToolGroupService';
export { default as MultipleDropDownToolGroupService } from './src/WaxToolGroups/MultipleDropDownToolGroupService/MultipleDropDownToolGroupService'; export { default as MultipleDropDownToolGroupService } from './src/WaxToolGroups/MultipleDropDownToolGroupService/MultipleDropDownToolGroupService';
export { default as OENContainersToolGroupService } from './src/WaxToolGroups/OENContainersToolGroupService/OENContainersToolGroupService'; export { default as OENContainersToolGroupService } from './src/WaxToolGroups/OENContainersToolGroupService/OENContainersToolGroupService';
export { default as OENLeftToolGroupService } from './src/WaxToolGroups/OENLeftToolGroupService/OENLeftToolGroupService'; export { default as OENLeftToolGroupService } from './src/WaxToolGroups/OENLeftToolGroupService/OENLeftToolGroupService';
import { injectable, inject } from 'inversify';
import { ToolGroup } from 'wax-prosemirror-core';
@injectable()
class Essay extends ToolGroup {
tools = [];
constructor(@inject('EssayQuestion') essayQuestion) {
super();
this.tools = [essayQuestion];
}
}
export default Essay;
import { Service } from 'wax-prosemirror-core';
import Essay from './Essay';
class EssayToolGroupService extends Service {
register() {
this.container.bind('Essay').to(Essay);
}
}
export default EssayToolGroupService;
...@@ -78,6 +78,11 @@ const DropDownComponent = ({ title, view, tools }) => { ...@@ -78,6 +78,11 @@ const DropDownComponent = ({ title, view, tools }) => {
value: '4', value: '4',
item: tools[4], item: tools[4],
}, },
{
label: 'Essay',
value: '5',
item: tools[5],
},
]; ];
useEffect(() => { useEffect(() => {
......
...@@ -15,6 +15,7 @@ class QuestionsDropDown extends ToolGroup { ...@@ -15,6 +15,7 @@ class QuestionsDropDown extends ToolGroup {
@inject('TrueFalseQuestion') trueFalseQuestion, @inject('TrueFalseQuestion') trueFalseQuestion,
@inject('TrueFalseSingleCorrectQuestion') trueFalseSingleCorrectQuestion, @inject('TrueFalseSingleCorrectQuestion') trueFalseSingleCorrectQuestion,
@inject('MatchingQuestion') matchingQuestion, @inject('MatchingQuestion') matchingQuestion,
@inject('EssayQuestion') essayQuestion,
) { ) {
super(); super();
this.tools = [ this.tools = [
...@@ -23,6 +24,7 @@ class QuestionsDropDown extends ToolGroup { ...@@ -23,6 +24,7 @@ class QuestionsDropDown extends ToolGroup {
trueFalseQuestion, trueFalseQuestion,
trueFalseSingleCorrectQuestion, trueFalseSingleCorrectQuestion,
matchingQuestion, matchingQuestion,
essayQuestion,
]; ];
} }
......
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