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

Filters not supported in conversation names in get_conversations()

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Ensure the multilang filter is enabled and set to "Content and headings"
      2. Ensure your site debugging mode is set to developer
      3. Ensure that the French language pack is installed
      4. Create two courses
      5. Enrol a user in each course as a student
      6. Create a group within each course, with 'Group messaging' set to 'Yes', and using the following group name (which sets it as a multilang string):

        <span lang="en" class="multilang">English group name</span><span lang="fr" class="multilang">French group name</span>
        

      7. Assign the enrolled student to the group
      8. On the second course navigate to the course page, then from the Cog menu choose "Filters"
      9. Disable the Multilang filter
      10. Log in as the student
      11. Open the messaging pane
        1. Verify you don't see any error modals
      12. Expand the group conversations section
        1. Confirm that you see "English group name" for the group in the first course
        2. Confirm that you see "English group nameFrench group name" for the group in the name course
      13. Click on each conversation
        1. Confirm that you see "English group name" for the group in the first course
        2. Confirm that you see "English group nameFrench group name" for the group in the name course
      14. Change language to French in the header
      15. Open the messaging pane
        1. Verify you don't see any error modals
      16. Expand the group conversations section
        1. Confirm that you see "French group name" for the group in the first course
        2. Confirm that you see "English group nameFrench group name" for the group in the name course
      17. Click on the conversation
        1. Confirm that you see "French group name" for the group in the first course
        2. Confirm that you see "English group nameFrench group name" for the group in the name course
      Show
      Ensure the multilang filter is enabled and set to "Content and headings" Ensure your site debugging mode is set to developer Ensure that the French language pack is installed Create two courses Enrol a user in each course as a student Create a group within each course, with 'Group messaging' set to 'Yes', and using the following group name (which sets it as a multilang string): <span lang="en" class="multilang">English group name</span><span lang="fr" class="multilang">French group name</span> Assign the enrolled student to the group On the second course navigate to the course page, then from the Cog menu choose "Filters" Disable the Multilang filter Log in as the student Open the messaging pane Verify you don't see any error modals Expand the group conversations section Confirm that you see " English group name " for the group in the first course Confirm that you see " English group nameFrench group name " for the group in the name course Click on each conversation Confirm that you see " English group name " for the group in the first course Confirm that you see " English group nameFrench group name " for the group in the name course Change language to French in the header Open the messaging pane Verify you don't see any error modals Expand the group conversations section Confirm that you see " French group name " for the group in the first course Confirm that you see " English group nameFrench group name " for the group in the name course Click on the conversation Confirm that you see " French group name " for the group in the first course Confirm that you see " English group nameFrench group name " for the group in the name course
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.6 Branch:
      MDL-64426-36-2
    • Pull Master Branch:
      MDL-64426-master-2

      Description

      Thanks to Michael Hawkins for spotting this one while working on another issue.

      At the moment, only group conversations get names (and subnames). If the course group to which the conversation is linked has a multilang string for its name, that breaks the get_conversations() call. The value of name is expected to be NOTAGS and the multilang value won't validate.

      This name value should support filters via format_string, and the param should be updated accordingly in the web service. The subname is already output using format_string, so just needs a param change in the web service to PARAM_TEXT I believe.

      To replicate:

      1. Make sure multilang is enabled
      2. Create a course with a group - make sure the group name is a multilang string
      3. Enrol a user in the group and enable group messaging
      4. log in as the user and open the messaging pane

      Observe the exception.

        Attachments

        1. screenshot-1.png
          121 kB
          Janelle Barcega

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 12 minutes
                  12m