MCPcopy Create free account
hub / github.com/codecombat/codecombat / fetchDataSingleClass

Function fetchDataSingleClass

app/core/store/modules/teacherDashboard.js:356–370  ·  view source on GitHub ↗
({ state, dispatch }, options = {})

Source from the content-addressed store, hash-verified

354 // Single class progress page
355 // options.data = { users: '', levelSessions: '' } -> properties needed for these objects, i.e. will be used as `project` in db queries
356 async fetchDataSingleClass ({ state, dispatch }, options = {}) {
357 const fetchPromises = []
358
359 fetchPromises.push(dispatch('courseInstances/fetchCourseInstancesForClassroom', state.classroomId, { root: true }))
360 fetchPromises.push(dispatch('courses/fetchReleased', undefined, { root: true }))
361
362 if (utils.isCodeCombat) {
363 options.fetchInteractiveSessions = me.showOzCourses()
364 } else {
365 options.fetchInteractiveSessions = true
366 }
367 fetchPromises.push(dispatch('teacherDashboard/fetchClassroomData', options, { root: true }))
368
369 await Promise.all(fetchPromises)
370 },
371
372 // Single class progress page - without blocking loading indicator
373 async fetchDataSingleClassAsync ({ state, dispatch, getters }, options = {}) {

Callers

nothing calls this directly

Calls 2

dispatchFunction · 0.85
showOzCoursesMethod · 0.80

Tested by

no test coverage detected