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

Function loadInteractiveSession

app/core/store/modules/interactives.js:131–147  ·  view source on GitHub ↗
({ commit }, { interactiveIdOrSlug, sessionOptions })

Source from the content-addressed store, hash-verified

129 },
130
131 async loadInteractiveSession ({ commit }, { interactiveIdOrSlug, sessionOptions }) {
132 commit('toggleInteractiveSessionLoading')
133
134 try {
135 const interactiveSession = await getSession(interactiveIdOrSlug, sessionOptions)
136 if (!interactiveSession) {
137 throw new Error('Invalid interactive session received')
138 }
139
140 commit('addInteractiveSession', interactiveSession)
141 } catch (e) {
142 // TODO handle_error_ozaria
143 throw new Error('Failed to load interactive session')
144 } finally {
145 commit('toggleInteractiveSessionLoading')
146 }
147 },
148
149 async fetchSessionsForClassroomMembers ({ commit, dispatch }, classroom) {
150 commit('toggleLoadingForClassroom', classroom._id)

Callers

nothing calls this directly

Calls 1

getSessionFunction · 0.90

Tested by

no test coverage detected