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

Regression - fix for MDL-37138 breaks beep, and / commands in chat

    XMLWordPrintable

Details

    • Any
    • MOODLE_30_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-55274-master
    • Hide
      1. Start chat.
      2. Type "beep all".
      3. If message comes through as-is, beep is broken.
      4. If it comes back with "Admin User beeps everyone!" (or similar, depending on logged-in user), beep is working.
      5. Type "/me rocks".
      6. If message comes back as-is, / commands are broken.
      7. If it comes back as "*** Admin rocks" (or similar, depending on logged-in user), / commands are working.
      8. Type a word that should be automatically turned into a link to a course resource.
      9. If resulting link has target set to "_blank", MDL-37138 fix is still effective.
      10. If resulting link has no target set, link target setting is broken.
      Show
      Start chat. Type "beep all". If message comes through as-is, beep is broken. If it comes back with "Admin User beeps everyone!" (or similar, depending on logged-in user), beep is working. Type "/me rocks". If message comes back as-is, / commands are broken. If it comes back as "*** Admin rocks" (or similar, depending on logged-in user), / commands are working. Type a word that should be automatically turned into a link to a course resource. If resulting link has target set to "_blank", MDL-37138 fix is still effective. If resulting link has no target set, link target setting is broken.

    Description

      The introduction of blanktarget to mod_chat lib.php has broken beep and use of / commands.

      Reason is that format_text call at line 927 of chat_format_message_theme now causes <p> to be added to the front of $text.

      This means that substr matches further down can never match, and type of message is never recognised.

      I haven't yet investigated how/whether format_text in weblib.php can be fixed to avoid this, but setting blanktarget option to "false" at line 926 of chat_format_message_theme regains beep functionality.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nwpotago Nick Phillips
              Simey Lameze Simey Lameze
              Andrew Lyons Andrew Lyons
              Jun Pataleta Jun Pataleta
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Sep/16