Merge pull request #221 from eduNEXT/Jhony/fix_course_id_extraction_backport

fix: build the course_id properly when MFE is deployed in a subdirectory
This commit is contained in:
Sofiane Bébert
2021-12-20 17:08:42 +00:00
committed by GitHub

View File

@@ -5,7 +5,7 @@ import { filterQuery, stringifyUrl } from './utils';
const baseUrl = `${configuration.LMS_BASE_URL}`;
const courseId = window.location.pathname.slice(1);
const courseId = window.location.pathname.split('/').filter(Boolean).pop() || '';
const api = `${baseUrl}/api/`;
const bulkGrades = `${api}bulk_grades/course/${courseId}/`;