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

Multilang filter doesn't work in Course category names

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1, 1.8.2
    • Fix Version/s: 1.8.3, 1.9
    • Component/s: Filters
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      The multilang filter tags are filtered (i.e. deleted) in the Course category names once you submit a new name.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            mina Nicolas Martignoni added a comment -

            Sorry, my description is not correct. Here is a better one.

            1) From /course/index.php, if you type say "<span lang="en" class="multilang">Mathematics</span> <span lang="fr" class="multilang">Mathématiques</span>" in the "Add course category" field and click the button, the name is correctly saved and changes according to the lang selected.

            2) Now click on the name of the category just created, say "Mathematics".

            3) In the "Rename" field of the displayed page, you see only "Mathematics", but you should see the complete string with filter tags and so on. 4) If you click on the "Rename" button, just "Mathematics" is saved and the initial definition is lost.

            5) Now type "<span lang="en" class="multilang">Mathematics</span> <span lang="fr" class="multilang">Mathématiques</span>" in the Rename field and click on the "Rename" button. The filter tags are filtered and the category name is "Mathematics Mathématiques" !

            This occurs on 1.8.0, 1.8.1, 1.8.2 and 1.8.2+

            Show
            mina Nicolas Martignoni added a comment - Sorry, my description is not correct. Here is a better one. 1) From /course/index.php, if you type say "<span lang="en" class="multilang">Mathematics</span> <span lang="fr" class="multilang">Mathématiques</span>" in the "Add course category" field and click the button, the name is correctly saved and changes according to the lang selected. 2) Now click on the name of the category just created, say "Mathematics". 3) In the "Rename" field of the displayed page, you see only "Mathematics", but you should see the complete string with filter tags and so on. 4) If you click on the "Rename" button, just "Mathematics" is saved and the initial definition is lost. 5) Now type "<span lang="en" class="multilang">Mathematics</span> <span lang="fr" class="multilang">Mathématiques</span>" in the Rename field and click on the "Rename" button. The filter tags are filtered and the category name is "Mathematics Mathématiques" ! This occurs on 1.8.0, 1.8.1, 1.8.2 and 1.8.2+
            Hide
            muranyia Andras Muranyi added a comment -

            For me it does not change according to the lang selected, ie doesn't work at all. (1.8.2)
            I suppose my setup is OK because multilang does work with course titles, resource titles, however not with resource descriptions ("introductions") nor with course category names...

            Show
            muranyia Andras Muranyi added a comment - For me it does not change according to the lang selected, ie doesn't work at all. (1.8.2) I suppose my setup is OK because multilang does work with course titles, resource titles, however not with resource descriptions ("introductions") nor with course category names...
            Hide
            dougiamas Martin Dougiamas added a comment -

            The filter should not be applied until show-time (not store-time)

            Show
            dougiamas Martin Dougiamas added a comment - The filter should not be applied until show-time (not store-time)
            Hide
            nicolasconnault Nicolas Connault added a comment -

            The $rename param was obtained with PARAM_NOTAG, I changed that to PARAM_RAW. I also changed the rename field's value to htmlspecialchars($category->name)

            Show
            nicolasconnault Nicolas Connault added a comment - The $rename param was obtained with PARAM_NOTAG, I changed that to PARAM_RAW. I also changed the rename field's value to htmlspecialchars($category->name)
            Hide
            mina Nicolas Martignoni added a comment -

            Verified, closing.

            Show
            mina Nicolas Martignoni added a comment - Verified, closing.

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Oct/07