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

Multilanguage filter does not work in pages for badges

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.5.3
    • Component/s: Badges
    • Labels:
    • Testing Instructions:
      Hide

      For testing you need site and course badges enabled.

      1. Enable multi-lang filters for headings and content.

      2. Make sure that your web site full name uses multi-lang filter (e.g. <span lang="en" class="multilang">XXXXXXX</span><span lang="de" class="multilang">YYYYYYY</span>).

      3. Go to "My badges" page (under "My profile" section).

      4. Make sure that the first "My badges..." section on the page has heading "My badges from XXXXXX" (and not "My badges from XXXXXXYYYYYY").

      5. Create a course with milti-lang setting in its full name. Similar to site name.

      5. Go to Course "Badges > Manage Badges" page.

      6. Make sure that page title is "COURSENAME: Manage badges" and course name is properly displayed only in one language.

      Show
      For testing you need site and course badges enabled. 1. Enable multi-lang filters for headings and content. 2. Make sure that your web site full name uses multi-lang filter (e.g. <span lang="en" class="multilang">XXXXXXX</span><span lang="de" class="multilang">YYYYYYY</span>). 3. Go to "My badges" page (under "My profile" section). 4. Make sure that the first "My badges..." section on the page has heading "My badges from XXXXXX" (and not "My badges from XXXXXXYYYYYY"). 5. Create a course with milti-lang setting in its full name. Similar to site name. 5. Go to Course "Badges > Manage Badges" page. 6. Make sure that page title is "COURSENAME: Manage badges" and course name is properly displayed only in one language.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-41659_master

      Description

      I use multilanguage filter to show the full site name in English ('My site') and in Bulgarian ('Моят сайт'), but in all pages of badges module the full site name is shown without filtering the current language as 'My siteМоят сайт'.

      For example on My badges page I see a title:

      'My badges from My siteМоят сайт web site' - in English or
      'Моите значки от сайт My siteМоят сайт' - in Bulgarian

      instead of

      'My badges from My site web site' - in English or
      'Моите значки от сайт Моят сайт' - in Bulgarian

        Gliffy Diagrams

          Activity

          Hide
          ybozhko Yuliya Bozhko added a comment - - edited

          Hi Vanyo,

          My bad... Initially, I thought that $SITE->fullname doesn't need to go through format_string(). I fixed this in MDL-41662 when I noticed the issue. It is already submitted for review.

          Yuliya

          Show
          ybozhko Yuliya Bozhko added a comment - - edited Hi Vanyo, My bad... Initially, I thought that $SITE->fullname doesn't need to go through format_string(). I fixed this in MDL-41662 when I noticed the issue. It is already submitted for review. Yuliya
          Hide
          poltawski Dan Poltawski added a comment -

          +1, sending for integration

          Show
          poltawski Dan Poltawski added a comment - +1, sending for integration
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Hi Yuliya,

          Sorry about this but those format_string calls need one to have the relevant context sent along with them.
          An instance of where not specifying the relevant context may cause issues would be if a filter (say multilang) was enabled but off by default for the site and then turned on for the course context.
          Third arg to format_string is an options array.

          Sorry again about the delay but best to get these things spot on.

          Many thanks
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Hi Yuliya, Sorry about this but those format_string calls need one to have the relevant context sent along with them. An instance of where not specifying the relevant context may cause issues would be if a filter (say multilang) was enabled but off by default for the site and then turned on for the course context. Third arg to format_string is an options array. Sorry again about the delay but best to get these things spot on. Many thanks Sam
          Hide
          ybozhko Yuliya Bozhko added a comment -

          Sure, will fix that. Is it only for course names or for SITE->fullname as well?

          Show
          ybozhko Yuliya Bozhko added a comment - Sure, will fix that. Is it only for course names or for SITE->fullname as well?
          Hide
          cibot CiBoT added a comment -

          Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

          Show
          cibot CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
          Hide
          poltawski Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          poltawski Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          damyon Damyon Wiese added a comment -

          Thanks Yuliya,

          Related to this - is the FRONTEND team have been standardising the headings for activities across Moodle for 2.6.

          The docs they wrote for this are: http://docs.moodle.org/dev/HTML_Guidelines

          Badges are not an activity as such - but where the badge page is specific to a course at least I think it would make sense to closely match the example there for headings, so that title == Badges, heading == Course name. This can be a separate issue.

          Show
          damyon Damyon Wiese added a comment - Thanks Yuliya, Related to this - is the FRONTEND team have been standardising the headings for activities across Moodle for 2.6. The docs they wrote for this are: http://docs.moodle.org/dev/HTML_Guidelines Badges are not an activity as such - but where the badge page is specific to a course at least I think it would make sense to closely match the example there for headings, so that title == Badges, heading == Course name. This can be a separate issue.
          Hide
          damyon Damyon Wiese added a comment -

          Thanks Yuliya,

          Looks OK to me. Integrated to 25 and master.

          Show
          damyon Damyon Wiese added a comment - Thanks Yuliya, Looks OK to me. Integrated to 25 and master.
          Hide
          ybozhko Yuliya Bozhko added a comment -

          Thank you, Damyon! I will have a look at the link you provided and will open a new tracker issue.

          Show
          ybozhko Yuliya Bozhko added a comment - Thank you, Damyon! I will have a look at the link you provided and will open a new tracker issue.
          Hide
          phalacee Jason Fowler added a comment -

          Works perfectly Yuliya, thanks.

          Show
          phalacee Jason Fowler added a comment - Works perfectly Yuliya, thanks.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Yes, it's happening (somewhere in the French Polynesia, right now). And you did it, raising Moodle to new excellency levels.

          Or, if you prefer, yes, you fixed that boring issue.

          Thanks anyway! Ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Yes, it's happening (somewhere in the French Polynesia, right now). And you did it, raising Moodle to new excellency levels. Or, if you prefer, yes, you fixed that boring issue. Thanks anyway! Ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Nov/13