-
Notifications
You must be signed in to change notification settings - Fork 8
Description
This issue has occurred on a few multilingual courses within the last year. I am not sure if I have pinpointed the exact cause, but at least the symptoms are the same on all courses.
MOOC-Grader crashes here when the exercise is loaded (it might only crash on one of the course languages, Finnish or English):
https://github.com/apluslms/mooc-grader/blob/e6fdfe826acd50b055148a696587afad619cb53c/util/importer.py#L51
https://github.com/apluslms/mooc-grader/blob/e6fdfe826acd50b055148a696587afad619cb53c/access/views.py#L288
In import_named, path is None because in the function exercise, exercise['view_type'] returns None. Most values in the dictionary exercise are None, because mooc-grader has stored/received exercise configurations only for one language. The other language gets only None values that crash the code.
In the mooc-grader filesystem, the configuration JSON file for the exercise contains language keys in the top level. For example,
{
"fi": ....,
"en": ....
}
In this issue, only one language exists in the exercise configuration file, hence the other language is loaded with broken None values.
After I fix the course settings with a workaround, then the mooc-grader filesystem contains both languages in the exercise configuration JSON. The workaround is to change the title in the exercise config.yaml file in the course git repo. The title is changed from the monolingual version to the multilingual title|i18n format. For example,
a title like title: Multidimensional arrays is changed to the following:
title|i18n:
en: Multidimensional arrays
fi: Moniulotteiset taulukotIn the C course (spring 2023), this issue occurred when the multilingual course has some assignments that are only provided in English. In the A+ RST configurations, both root index RST files for the Finnish and English versions point to the same module index RST file and thus the same chapter RST file. In the chapter RST file, the assignment is of course defined only with one config.yaml file (it is not possible to define different language versions inside a single chapter RST file). Both languages use the same exercise config.yaml file. However, since the content is defined only in one language even though the course is multilingual, it is natural that the exercise config.yaml defines the exercise title only in one language. The platform should work with it, but currently, it is mandatory to add the title in the multilingual format or the system just crashes.
In this case, gitmanager should send the exercise configurations in the multilingual format to the mooc-grader even though the configurations are the same in both languages. Or alternatively, mooc-grader should not crash when the requested language version is missing in the exercise configurations. But that might become misleading when you are trying to create different language versions and some language has been lost somewhere (there would be no clear error that some intended language is really missing).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status