openedx / openedx/frontend-app-learning
App-learning does not support unicode in course id
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 70
- Forks
- 335
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 35
Description
Hellos
Found a problem that when writing cyrillic in the key fields of the course id (organization, course number, run), it does not open in LMS. In CMS (Studio) courses work fine because I added cyrillic support in mfe authoring
frontend-app-authoring/src/constants.js
export const REGEX_RULES = {
specialCharsRule: /^[a-zA-Zа-яА-ЯёЁ0-9_-.'~\s]+$/u,
noSpaceRule: /^\S$/,
};
But I do not see same regex rules in fronted-app-learning.
I undastand it’s because of url parsing. When I click on the link “https://apps.local.openedx.io:2001/learning/course/course-v1:009+ПН1+2024M01/home“ I get to a white page, and logs show
2025-08-29 15:39:11,131 WARNING 16 [common.djangoapps.track.contexts] [user 4] [ip 37.18.105.5] contexts.py:37 - unable to parse course_id "course-v1:009+%D0%9F%D0%9D1+2024M01"
Traceback (most recent call last):
File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/init.py", line 195, in from_string
return key_class._from_string(rest)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/edx/locator.py", line 288, in _from_string
parse = cls.parse_url(serialized)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/edx/locator.py", line 143, in parse_url
raise InvalidKeyError(cls, string)
opaque_keys.InvalidKeyError: <class 'opaque_keys.edx.locator.CourseLocator'>: 009+%D0%9F%D0%9D1+2024M01
How enable cyrillic in app-learning’s urls
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how frontend-app-learning constructs and handles course URLs, comparing its behavior with the REGEX_RULES example in frontend-app-authoring/src/constants.js. Reproduce the Cyrillic course link and follow the URL through the learning app and the reported opaque_keys parsing warning; done means the course opens instead of showing a white page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100