({ commit }, { interactiveIdOrSlug, sessionOptions })
| 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) |
nothing calls this directly
no test coverage detected