Internal: Use cid from CourseHome param - refs BT#20933

pull/4862/head
Angel Fernando Quiroz Campos 2 years ago
parent 0b2fe2bb09
commit 18c917416a
  1. 6
      assets/vue/router/index.js

@ -165,9 +165,13 @@ router.beforeEach((to, from, next) => {
router.beforeResolve(async (to) => {
const cidReqStore = useCidReqStore()
const cid = parseInt(to.query?.cid ?? 0)
let cid = parseInt(to.query?.cid ?? 0)
const sid = parseInt(to.query?.sid ?? 0)
if ("CourseHome" === to.name) {
cid = parseInt(to.params?.id ?? 0)
}
if (cid) {
await cidReqStore.setCourseAndSessionById(cid, sid)
} else {

Loading…
Cancel
Save