apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
68 stars 73 forks source link

Error message garbled when graders down #1259

Closed jsorva closed 1 year ago

jsorva commented 1 year ago

When there’s grader trouble — like there is now — A+ shows a banner warning at the top. I assume this is an automatic message that is shown to students as well. Which is a good idea... probably, maybe.

But the message should not look like this: image

markkuriekkinen commented 1 year ago

Is the list format a problem or only the dump of all the language versions of the names?

It is easy to fix the multilingual names. The alert can render the assignment names in the currently active language.

https://github.com/apluslms/a-plus/blob/a932c5104504f3367e81448ca8a42584f88f27a1/exercise/submission_models.py#L852

pick_localized() selects one language version from the name (or the whole name if there are no language versions). Something like:

lang = get_language()
pick_localized(entry['submission__exercise__name'], lang)

https://github.com/apluslms/a-plus/blob/a932c5104504f3367e81448ca8a42584f88f27a1/lib/localization_syntax.py#L13-L30

jsorva commented 1 year ago

The language dump is the main problem. I don’t know how useful the list really is — I guess it depends on what sort of problem(s) the grader(s) have. I guess it’s OK to list the assignments, even though it’s not particularly informative in the case of a course like O1 (with a zillion assignments that generally break all at once if there’s grader trouble)