openedx / openedx/openedx-platform

Courseware base url should be taken from site configuration

Open
#32,639 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.2k
Forks
4.4k
Avg merge
6d 18h
Merged PRs (30d)
42

Description

I came across a situation where I had two different sites for LMS. The URL for courseware was generating wrong for one site due to following edx-platform code

        jump_to_courseware_url = reverse(
            'jump_to',
            kwargs={
                'course_id': str(block_key.course_key),
                'location': str(block_key),
            },
            request=self.context['request'],
        )

In code, mostly edx is using configuration_helpers to get env variables. Is it possible to get the base URL using configuration_helpers for courseware URLs, and also for the bookmark, resume course button, etc

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lms/djangoapps/course_api/blocks/serializers.py at the jump_to reverse call, then inspect existing configuration_helpers usage. Trace how courseware URLs are produced for bookmarks and resume-course actions across sites. Done means those URLs consistently use the applicable site configuration rather than the incorrect base URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.