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

Calendar Export: multilang assignment titles are exported without processing the multilang tags

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.4, 3.1, 3.2
    • Fix Version/s: 3.2.4, 3.3.1
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      Setup

      Note - enter descriptions using HTML mode

      1. Login as an admin.
      2. Activate both English and German language packs.
      3. Activate Multi-Language Content filter. Set it to apply both to content and headings.
      4. Create a course, enrol a teacher and a student.
      5. Create a group in the course and add the student to the group.
      6. Create an assignment with the following settings:
        • Name:

          <span lang="en" class="multilang">Assignment 1 EN</span><span lang="de" class="multilang">Assignment 1 DE</span>

        • Description:

          <span lang="en" class="multilang">Assignment 1 description EN</span><span lang="de" class="multilang">Assignment 1 description DE</span>

        • Make sure the description also contains multiple paragraphs and at least one of each: images, equations and links.
        • Set a "Due date" to a date in the current month.
        • Submission types: Online text
      7. Create the following calendar events:
        As Type Event name Event description
        admin Site event <span lang="en" class="multilang">Site event EN</span><span lang="de" class="multilang">Site event DE</span> <span lang="en" class="multilang">Site event description EN</span><span lang="de" class="multilang">Site event description DE</span>
        teacher Course event <span lang="en" class="multilang">Course event EN</span><span lang="de" class="multilang">Course event DE</span> <span lang="en" class="multilang">Course event description EN</span><span lang="de" class="multilang">Course event description DE</span>
        teacher Group event <span lang="en" class="multilang">Group event EN</span><span lang="de" class="multilang">Group event DE</span> <span lang="en" class="multilang">Group event description EN</span><span lang="de" class="multilang">Group event description DE</span>
        student User event <span lang="en" class="multilang">User event EN</span><span lang="de" class="multilang">User event DE</span> <span lang="en" class="multilang">User event description EN</span><span lang="de" class="multilang">User event description DE</span>
        • Make sure the description of these events also contains multiple paragraphs and at least one of each: images, equations and links.
      Testing
      1. Login as a student.
      2. Select the English language in the language selector
      3. Click on 'Export calendar', use the settings 'All events' and 'This month', then click on the button 'Export'.
      4. Select the German language in the language selector
      5. Click on 'Export calendar', use the settings 'All events' and 'This month', then click on the button 'Export'.
      6. Compare the SUMMARY fields for the exported calendar files with a text editor:
        • Confirm that the English calendar file's summary shows xx EN while the German calendar file shows xx DE.
        • Confirm that the summary for both files do not contain any HTML tags.
      7. Compare the DESCRIPTION fields for the exported calendar files:
        • Confirm that the English calendar file's description shows xx EN while the German calendar file shows xx DE.
        • Confirm that the summary for both files do not contain any HTML tags.
        • Confirm that the <p> and <br> tags have been replaced by the new line character "\n"
      Show
      Setup Note - enter descriptions using HTML mode Login as an admin. Activate both English and German language packs. Activate Multi-Language Content filter. Set it to apply both to content and headings. Create a course, enrol a teacher and a student. Create a group in the course and add the student to the group. Create an assignment with the following settings: Name: <span lang="en" class="multilang">Assignment 1 EN</span><span lang="de" class="multilang">Assignment 1 DE</span> Description: <span lang="en" class="multilang">Assignment 1 description EN</span><span lang="de" class="multilang">Assignment 1 description DE</span> Make sure the description also contains multiple paragraphs and at least one of each: images, equations and links. Set a " Due date " to a date in the current month. Submission types: Online text Create the following calendar events: As Type Event name Event description admin Site event <span lang="en" class="multilang">Site event EN</span><span lang="de" class="multilang">Site event DE</span> <span lang="en" class="multilang">Site event description EN</span><span lang="de" class="multilang">Site event description DE</span> teacher Course event <span lang="en" class="multilang">Course event EN</span><span lang="de" class="multilang">Course event DE</span> <span lang="en" class="multilang">Course event description EN</span><span lang="de" class="multilang">Course event description DE</span> teacher Group event <span lang="en" class="multilang">Group event EN</span><span lang="de" class="multilang">Group event DE</span> <span lang="en" class="multilang">Group event description EN</span><span lang="de" class="multilang">Group event description DE</span> student User event <span lang="en" class="multilang">User event EN</span><span lang="de" class="multilang">User event DE</span> <span lang="en" class="multilang">User event description EN</span><span lang="de" class="multilang">User event description DE</span> Make sure the description of these events also contains multiple paragraphs and at least one of each: images, equations and links. Testing Login as a student. Select the English language in the language selector Click on 'Export calendar', use the settings 'All events' and 'This month', then click on the button 'Export'. Select the German language in the language selector Click on 'Export calendar', use the settings 'All events' and 'This month', then click on the button 'Export'. Compare the SUMMARY fields for the exported calendar files with a text editor: Confirm that the English calendar file's summary shows xx EN while the German calendar file shows xx DE . Confirm that the summary for both files do not contain any HTML tags. Compare the DESCRIPTION fields for the exported calendar files: Confirm that the English calendar file's description shows xx EN while the German calendar file shows xx DE . Confirm that the summary for both files do not contain any HTML tags. Confirm that the <p> and <br> tags have been replaced by the new line character " \n "
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-54887-master

      Description

      Hi there,

      a teacher told us that he uses the multilanguage tags in assignment titles. The assignment due dates are exported to the Moodle calendar. When he exports the calendar or subscribe to it via ICS, the multilanguage tagged strings are displayed as plain text and aren't exported in the user's language.

      For example:
      Assignement title: <span lang="en" class="multilang">Assignment 1</span><span lang="de" class="multilang">Aufgabe 1</span>
      Result in Export right now: <span lang="en" class="multilang">Assignment 1</span><span lang="de" class="multilang">Aufgabe 1</span>
      Result as it should be exported if user's language is set to German: Aufgabe 1

      Hint for improvement:
      The tagged string should be processed by the function format_string() before export is done.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Jul/17