Skip to content

[C2] Question types appear untranslated #6142

Open
@ywarnier

Description

@ywarnier

In the list of questions of a test (e.g. https://testing26.beeznest.com/main/exercise/admin.php?cid=1&sid=0&gid=0&gradebook=0&origin=&exerciseId=13), the question type is supposed to appear in the preview section of the question.

Image

This is due to a shortcut used in Chamilo 1.* to use the question type string (e.g. UniqueAnswer) as a language term.

Given the fact that Chamilo 2 works with Gettext, a camel-case string like UniqueAnswer is not found as a translated term (it should be Unique answer).

The issue is that it is based on a table that is also used to find the name of the class (in the "PHP class" sense) of the question itself. See https://github.com/chamilo/chamilo-lms/blob/master/public/main/exercise/question.class.php#L46-L74

So this array should be redefined to add a new "column" with the translatable name, and any calls to it should be adapted to use the right index (e.g. get_question_type_name() should be modified to use [2] instead of [1]).

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions