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

block_timeline: Get rid of double quotes around activity name and course name

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Login as admin
      2. Create a course A
      3. Create a user S
      4. Enrol the user S into course A as student
      5. Go to the course A
      6. Add an assignment activity to the course
      7. Set the assignment title to "Homework"
      8. Set a due date to tomorrow
      9. Logout
      10. Login as user S
      11. Go to your dashboard
      12. If not shown, add the timeline block to the Dashboard
      13. Have a look at the timeline block
      14. Make sure that the assignment title line just says "Homework" and that this word is not embraced with any quote signs
      15. Make sure that the date line just gives the date of tomorrow, but that this date is not embraced with any quote signs
      Show
      Login as admin Create a course A Create a user S Enrol the user S into course A as student Go to the course A Add an assignment activity to the course Set the assignment title to "Homework" Set a due date to tomorrow Logout Login as user S Go to your dashboard If not shown, add the timeline block to the Dashboard Have a look at the timeline block Make sure that the assignment title line just says "Homework" and that this word is not embraced with any quote signs Make sure that the date line just gives the date of tomorrow, but that this date is not embraced with any quote signs
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-70342-310
    • Pull Master Branch:
      MDL-70342-master

      Description

      During the work on MDL-65183, double quotes around the activity name and course name have sneaked into block_timeline's view:

      Looking at the diff https://github.com/moodle/moodle/commit/6c97045e5e71a8b5c5b5998c9975e4551c59b9f5, you clearly see that the quotes around the HTML attributes were replaced with

      {{#quote}}

      correctly, but there wasn't any need to surround the activity and course name with quotes as well.

      This should be handled as a regression and be reverted with an easy patch:

      [abias@moodle-test1 moodle_ng]$ git diff
      diff --git a/blocks/timeline/templates/event-list-item.mustache b/blocks/timeline/templates/event-list-item.mustache
      index c483c28..a33a10e 100644
      --- a/blocks/timeline/templates/event-list-item.mustache
      +++ b/blocks/timeline/templates/event-list-item.mustache
      @@ -52,9 +52,9 @@
                   <a href="{{url}}"
                      title={{#quote}}{{{name}}}{{/quote}}
                      aria-label='{{#str}} ariaeventlistitem, block_timeline, { "name": {{#quote}}{{{name}}}{{/quote}}, "cou
      -            ><h6 class="event-name text-truncate mb-0">{{#quote}}{{{name}}}{{/quote}}</h6></a>
      +            ><h6 class="event-name text-truncate mb-0">{{{name}}}</h6></a>
                   {{#course.fullnamedisplay}}
      -            <small class="text-muted text-truncate mb-0">{{#quote}}{{{course.fullnamedisplay}}}{{/quote}}</small>
      +            <small class="text-muted text-truncate mb-0">{{{course.fullnamedisplay}}}</small>
                   {{/course.fullnamedisplay}}
                   {{#action.actionable}}
                   <h6 class="mb-0 pt-2">
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abias Alexander Bias
              Reporter:
              abias Alexander Bias
              Peer reviewer:
              Ferran Recio
              Integrator:
              Sara Arjona (@sarjona)
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Jan/21

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 35 minutes
                  1h 35m