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

add answers

parent c210c6b2
No related branches found
No related tags found
No related merge requests found
......@@ -42,9 +42,15 @@ const EditorWrapper = styled.span`
}
`;
const StudentAnswer = styled.span``;
const StudentAnswer = styled.span`
border-bottom: 1px solid black;
margin-right: 5px;
`;
const CorrectAnswers = styled.span``;
const CorrectAnswers = styled.span`
border-bottom: 1px solid green;
margin-right: 5px;
`;
const EditorComponent = ({ node, view, getPos }) => {
const editorRef = useRef();
......@@ -175,8 +181,8 @@ const EditorComponent = ({ node, view, getPos }) => {
)) ||
(showFeedBack && !testMode && (
<>
<StudentAnswer>Answer: {node.attrs.answer}</StudentAnswer>
<CorrectAnswers>Possible Answers : </CorrectAnswers>
<StudentAnswer>{node.attrs.answer}</StudentAnswer>
<CorrectAnswers>{`(Aceepted Answers : ${node.textContent.replaceAll(';', ' -')})`}</CorrectAnswers>
</>
)) || <InputComponent getPos={getPos} node={node} view={view} />
);
......
......@@ -21,7 +21,7 @@ export default ({ node }) => {
pmViews: { main },
} = context;
const [answer, setAnswer] = useState(' ');
const [answer, setAnswer] = useState('');
const answerRef = useRef(null);
useEffect(() => {}, []);
......
......@@ -103,7 +103,7 @@ const DropDownComponent = ({ view, tools }) => {
item: tools[6],
},
{
label: 'Fill The Gap',
label: 'Fill in the blank',
value: '7',
item: tools[7],
},
......
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