Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27316

Questiontype true/false answers hard-coded in db instead of get_string from lang pack each time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 1.9.9
    • Questions
    • None
    • MySQL
    • MOODLE_19_STABLE
    • Hide

      Moodle 1.9.9
      PHP 5.3
      Apache
      Linux

      Show
      Moodle 1.9.9 PHP 5.3 Apache Linux

      Hello,

      I am working with Moodle 1.9.9 (1.9.11 hasn't changed concerning this issue) on a multilingual Moodle website. There I noticed the following:

      When you create a true/false question, then the answer "True" and "False" is hard-coded in the database depending on course language or user language. If you alter the question or do export this question into another course, the language keeps the same.

      I created a true-false question in German, did an import into an English course, and it kept saying "Wahr" and "Falsch" instead of the English terms True and False.
      Same happened on import of such a course for translation into Finnish and Bulgarian, the German "Wahr" and "Falsch" stayed the same.

      Wouldn't it be better to just get the translation out of the language pack each time viewing the question instead of hard-coding it?

      On my Moodle-website I just did it that way, for displaying the label I used get_string('true','quiz) to get the right translation. (modification in question/truefalse/questiontype.php around line 195)

      Regards, Daniel

            timhunt Tim Hunt
            dascon Daniel Schimrik
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.