diff --git a/frontend/src/pages/Courses/CourseDetail.vue b/frontend/src/pages/Courses/CourseDetail.vue index 6cc5787a..a4135f99 100644 --- a/frontend/src/pages/Courses/CourseDetail.vue +++ b/frontend/src/pages/Courses/CourseDetail.vue @@ -156,20 +156,17 @@ const isAdmin = computed(() => { const exportCourse = async () => { try { const response = await fetch( - '/api/method/lms.lms.api.export_course_as_zip', + '/api/method/lms.lms.api.export_course_as_zip?course_name=' + + course.data.name, { method: 'GET', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - course_name: course.data.name, - }), credentials: 'include', } ) if (!response.ok) { + const errorText = await response.text() + console.error('Error response:', errorText) throw new Error('Download failed') }