Skip to content

App-learning does not support unicode in course id #1802

@AlibekDalgat

Description

@AlibekDalgat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions