Spaces:
Running
Running
Download frontend/src/components/admin/questionUtils.js from banu4prasad/Gateprep: direct link, hf CLI and curl.
- Browser
- Download file 381 Bytes
-
https://huggingface.co/spaces/banu4prasad/Gateprep/resolve/main/frontend/src/components/admin/questionUtils.js
- Command line
-
hf download hf://spaces/banu4prasad/Gateprep/frontend/src/components/admin/questionUtils.js
-
curl -L -o questionUtils.js https://huggingface.co/spaces/banu4prasad/Gateprep/resolve/main/frontend/src/components/admin/questionUtils.js
381 Bytes
| export const OPTION_LETTERS = ['A', 'B', 'C', 'D'] | |
| export const EMPTY_QUESTION = { | |
| question_type: 'mcq', | |
| question_text: '', | |
| options: ['', '', '', ''], | |
| correct_answer: 'A', | |
| marks: 1, | |
| negative_marks: 0.33, | |
| subject: '', | |
| topic: '', | |
| } | |
| export const optionsFromQuestion = (options) => | |
| OPTION_LETTERS.map((_, idx) => (Array.isArray(options) ? options[idx] || '' : '')) | |