File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,8 @@ def create_contract_run(
291291 live = True ,
292292 b2b_contract = contract ,
293293 courseware_url_path = urljoin (
294- settings .OPENEDX_COURSE_BASE_URL , quote (new_readable_id )
294+ settings .OPENEDX_COURSE_BASE_URL ,
295+ f"{ quote (new_readable_id )} { settings .OPENEDX_COURSE_BASE_URL_SUFFIX } " ,
295296 ),
296297 )
297298 course_run .save ()
Original file line number Diff line number Diff line change @@ -1247,7 +1247,7 @@ def import_courserun_from_edx( # noqa: C901, PLR0913
12471247 is_source_run = is_source_run ,
12481248 courseware_url_path = urljoin (
12491249 settings .OPENEDX_COURSE_BASE_URL ,
1250- f"/{ edx_course_run .course_id } /course " ,
1250+ f"/{ edx_course_run .course_id } { settings . OPENEDX_COURSE_BASE_URL_SUFFIX } " ,
12511251 ),
12521252 )
12531253
Original file line number Diff line number Diff line change 11701170 default = "http://edx.odl.local:18000/learn/course/" ,
11711171 description = "The base URL to use to construct URLs to a course" ,
11721172)
1173+ OPENEDX_COURSE_BASE_URL_SUFFIX = get_string (
1174+ name = "OPENEDX_COURSE_BASE_URL_SUFFIX" ,
1175+ default = "/home" ,
1176+ description = "The suffix (with leading slash) to append to a course URL." ,
1177+ )
11731178
11741179OPENEDX_BASE_REDIRECT_URL = get_string (
11751180 name = "OPENEDX_BASE_REDIRECT_URL" ,
You can’t perform that action at this time.
0 commit comments