feat: added markdown editor for editing problems in markdown format (#1805)

This commit is contained in:
Muhammad Anas
2025-04-24 01:24:27 +05:00
committed by GitHub
parent 74d7d66c59
commit 380f3be164
54 changed files with 1415 additions and 243 deletions

View File

@@ -0,0 +1,18 @@
/* eslint-disable */
const olx = `<problem>
<optionresponse>
<optioninput>
<option correct="True"></option>
<option correct="False"></option>
<option correct="False"></option>
</optioninput>
</optionresponse>
</problem>`
const markdown = `[[
an incorrect answer
(the correct answer)
an incorrect answer
]]`
export default { olx, markdown };

View File

@@ -0,0 +1,10 @@
import { StrictDict } from '../../../utils';
import dropdown from './dropdown';
import multiSelect from './multiSelect';
import numeric from './numeric';
import singleSelect from './singleSelect';
import textInput from './textInput';
export default StrictDict({
dropdown, multiSelect, numeric, singleSelect, textInput,
});

View File

@@ -0,0 +1,18 @@
/* eslint-disable */
const olx= `<problem>
<choiceresponse>
<checkboxgroup>
<choice correct="true"></choice>
<choice correct="false"></choice>
<choice correct="false"></choice>
</checkboxgroup>
</choiceresponse>
</problem>`
const markdown = `[x] a correct answer
[ ] an incorrect answer
[ ] an incorrect answer
[x] a correct answer
`
export default { olx, markdown };

View File

@@ -0,0 +1,11 @@
/* eslint-disable */
const olx = `<problem>
<numericalresponse>
<responseparam type="tolerance" default="5"/>
<formulaequationinput/>
</numericalresponse>
</problem>`
const markdown = `= 100 +-5`
export default { olx, markdown };

View File

@@ -0,0 +1,17 @@
/* eslint-disable */
const olx = `<problem>
<multiplechoiceresponse>
<choicegroup>
<choice correct="true"></choice>
<choice correct="false"></choice>
<choice correct="false"></choice>
</choicegroup>
</multiplechoiceresponse>
</problem>`
const markdown = `( ) an incorrect answer
(x) the correct answer
( ) an incorrect answer
`
export default { olx, markdown };

View File

@@ -0,0 +1,13 @@
/* eslint-disable */
const olx =`<problem>
<stringresponse type="ci">
<additional_answer />
<textline size="20"/>
</stringresponse>
</problem>`
const markdown = `= the correct answer
or= optional acceptable variant of the correct answer
`
export default { olx, markdown };