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

Function fetchDataMySchools

app/core/store/modules/schoolAdminDashboard.js:213–223  ·  view source on GitHub ↗
({ state, dispatch, getters }, options = {})

Source from the content-addressed store, hash-verified

211
212 // My Schools page
213 async fetchDataMySchools ({ state, dispatch, getters }, options = {}) {
214 await dispatch('schoolAdministrator/fetchTeachers', undefined, { root: true }) // fetches for me.id
215
216 const fetchPromises = []
217 const teachers = getters.getAdministratedTeachers
218 teachers.forEach((t) => {
219 fetchPromises.push(dispatch('userStats/fetchStatsForUser', t._id, { root: true }))
220 })
221
222 await Promise.all(fetchPromises)
223 },
224
225 // Administrated teachers' pages
226 async fetchDataAdministratedTeachers ({ state, dispatch, getters }, options = {}) {

Callers

nothing calls this directly

Calls 1

dispatchFunction · 0.85

Tested by

no test coverage detected