From f8b51903bee0a62086bada6e801b1f858708dd6c Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Wed, 22 Jun 2022 20:55:30 -0500 Subject: [PATCH] Fix query params in breadcrumb for legacy agenda --- assets/vue/components/Breadcrumb.vue | 5 +++-- public/main/calendar/agenda.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/vue/components/Breadcrumb.vue b/assets/vue/components/Breadcrumb.vue index b94d306d17..d61757a545 100644 --- a/assets/vue/components/Breadcrumb.vue +++ b/assets/vue/components/Breadcrumb.vue @@ -99,6 +99,7 @@ const foo = computed(() => { let queryParams = ''; Object.keys(route.query) + .filter(key => !!key) .forEach(key => { if ('' !== queryParams) { queryParams += "&"; @@ -124,11 +125,11 @@ const foo = computed(() => { const lastItem = matched[matched.length - 1]; if (resourceNode.value) { - resourceNode.value.path.split('/').forEach((pathItem, i, parthItems) => { + resourceNode.value.path.split('/').forEach((pathItem, i, pathItems) => { let itemParts = pathItem.split('-'); if (0 === i) { - let firstParts = parthItems[i + 1].split('-'); + let firstParts = pathItems[i + 1].split('-'); items.push({ label: matched[0].name, diff --git a/public/main/calendar/agenda.php b/public/main/calendar/agenda.php index 1a34ba345a..d63857d783 100644 --- a/public/main/calendar/agenda.php +++ b/public/main/calendar/agenda.php @@ -17,7 +17,7 @@ if (!empty($course_info)) { $action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : null; $this_section = SECTION_COURSES; -$url = null; +$url = '/resources/ccalendarevent'; if (empty($action)) { if (!empty($course_info)) { $url = api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=course&'.api_get_cidreq();