(idOrSlug, options = {})
| 77 | * @param {'javascript'|'python'} options.json.codeLanguage - session language |
| 78 | */ |
| 79 | export const putSession = (idOrSlug, options = {}) => { |
| 80 | if (!idOrSlug) { |
| 81 | throw new Error('No slug/id supplied') |
| 82 | } |
| 83 | if (!(options.json || {}).codeLanguage) { |
| 84 | throw new Error('CodeLanguage required to post interactive submission') |
| 85 | } |
| 86 | if (!(options.json || {}).submission) { |
| 87 | throw new Error('Need to post a submission') |
| 88 | } |
| 89 | |
| 90 | return fetchJson(`/db/interactive/${idOrSlug}/submission`, { |
| 91 | method: 'POST', |
| 92 | |
| 93 | ...options |
| 94 | }) |
| 95 | } |
| 96 | |
| 97 | export const fetchInteractiveSessionForAllClassroomMembers = (classroom, options = {}) => { |
| 98 | const limit = 10 |
nothing calls this directly
no outgoing calls
no test coverage detected