Out of the box, Drupal LMS doesn't completely support more than one language. Correcting this requires a systemic understanding of where the problem lies, and how to correct it which is both testable, and flexible for the majority of Drupal site builders.

Existing work

Challenges

While the above work is already in production on a site, there is some uncertainty if the above issues fix the issue in way consistent with Drupal core, or if it is limited to that site's particular configuration.

Furthermore, without a "neutral" testing site or multilingual test content, there's no way to confirm this configuration.

Comments

socketwench created an issue. See original summary.

graber’s picture

Status: Active » Needs work

Please note that Drupal LMS module currently has extensive automated test coverage, having some patches in place on production sites doesn't mean everything is covered and the solutions used are optimal.

I think we should use test-driven development in this case:

First we should have an MR with an automated test that installs a multilingual site (2 languages should be enough), creates LMS content (a course with 1 lesson and 2 activities should be enough) in both languages and asserts that (iterate over both languages):
1. The course page is displayed in the correct language
2. When taking the course the course:
a) Course title, lesson title and activity title is displayed in the correct language
b) Activity fields are displayed in the correct language
c) Activity widget is displayed in the correct language
d) The course navigation block is displayed in the correct language

If the test fails (expected), add fixes to make it pass.

The current test suite of the module already includes installing configuration and content and completing activities so code examples are there.

Let's do it in a separate test class.

When this is done, the next step should be looking at the translation UI so creating the desired content structure can be created without issues.

graber’s picture

Please also link child issues here but I think we should have one MR and one issue as no point solving this in small parts that don't fix the problem separately.

graber’s picture

Issue summary: View changes