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

Multilang string breaks navigation in question categories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.12, 2.0.3, 2.2, 2.3, 2.4
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      0. Ensure the multilang filter is turned on, and applies to content and headings.

      1. Create a new quiz containing multilang strings in quiz name,
      for example: <span lang="en" class="multilang">English name</span><span lang="fr" class="multilang">Nom Francaise</span>

      2. In the quiz settings block, select Question bank -> Categories. Ensure the quiz name, category name and description are all displayed properly (i.e. only the current lang shown).

      3. Check the other three question bank sub-links, and again ensure that everywhere the category name is displayed, it is displayed correctly.

      Show
      0. Ensure the multilang filter is turned on, and applies to content and headings. 1. Create a new quiz containing multilang strings in quiz name, for example: <span lang="en" class="multilang">English name</span><span lang="fr" class="multilang">Nom Francaise</span> 2. In the quiz settings block, select Question bank -> Categories. Ensure the quiz name, category name and description are all displayed properly (i.e. only the current lang shown). 3. Check the other three question bank sub-links, and again ensure that everywhere the category name is displayed, it is displayed correctly.
    • Workaround:
      Hide

      This bug can be fixed by overriding $this->icons['left'] and $this->icons['right'] and adding calls to format_string() in question/category_class.php as described in category_class-patch.txt.
      Alternatively format_string() calls could be added to lib/listlib.php like in listlib-patch.txt, but I'm not sure about any site-wide negative effects the patch could have.

      Show
      This bug can be fixed by overriding $this->icons ['left'] and $this->icons ['right'] and adding calls to format_string() in question/category_class.php as described in category_class-patch.txt. Alternatively format_string() calls could be added to lib/listlib.php like in listlib-patch.txt, but I'm not sure about any site-wide negative effects the patch could have.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Multilang string breaks navigation in question categories, /question/category.php?cmid=x.
      The multilang strings are not parsed which breaks the page's HTML-code.

        Attachments

        1. category_class-patch.txt
          3 kB
        2. categoryList.png
          categoryList.png
          11 kB
        3. listlib-patch.txt
          1 kB
        4. QuestionCategory.png
          QuestionCategory.png
          18 kB

          Issue Links

            Activity

              People

              • Assignee:
                timhunt Tim Hunt
                Reporter:
                schach Heiko Schach
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Rajesh Taneja
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/12