(state, _getters, _rootState, rootGetters)
| 181 | ] |
| 182 | }, |
| 183 | getCurrentClassroom (state, _getters, _rootState, rootGetters) { |
| 184 | if (state.teacherId && state.classroomId) { |
| 185 | const classrooms = [ |
| 186 | ...(rootGetters['classrooms/getActiveClassroomsByTeacher'](state.teacherId) || []), |
| 187 | ...(rootGetters['classrooms/getSharedClassroomsByTeacher'](state.teacherId) || []), |
| 188 | ] |
| 189 | if (!classrooms || classrooms.length === 0) { |
| 190 | return rootGetters['classrooms/getClassroomById'](state.classroomId) || {} |
| 191 | } |
| 192 | return classrooms.find((c) => c._id === state.classroomId) || {} |
| 193 | } else { |
| 194 | return {} |
| 195 | } |
| 196 | }, |
| 197 | getCoursesCurrentClassroom (state, getters, _rootState, rootGetters) { |
| 198 | if (state.classroomId) { |
| 199 | const classroom = getters.getCurrentClassroom |
nothing calls this directly
no outgoing calls
no test coverage detected