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

Update display of discussion in discussion list table

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup
      1. A course with a teacher (let's call this t1) and at least 3 students. (11 course participants might be good so that we'll have more than 100 discussions)
      2. Two groups A and B. Assign a group picture for group A. Assign a relatively long group name for group B (more than 30 characters).
      3. Assign at least one student per group (let's say s1's in group A, s2's in group B, while s3 and the rest are not in any groups)
      4. 2 forums (f1 and f2), with f1's Group mode set to "Visible groups" and it's subscription mode set to optional. On the other hand, set f2's subscription mode to disabled.
      5. Run the attached script makediscussions.php to generate discussions for each user in each of the forums.
      Forum tracking
      1. Log in as s1 and edit s1's forum preference and set the "Forum tracking" preference to "Yes: highlight new posts for me"
      2. Go to forum f1
      3. Check the Replies column.
      4. Confirm that you see a badge number beside the number of replies.
      5. Hover over the badge
      6. Confirm that the tooltip indicates the number of unread posts.
      7. Click on the badge.
      8. Confirm that you are redirected to the discussion page with the unread posts highlighted.
      9. Go back to the discussion list.
      10. Click on the menu on the discussion that you just read.
      11. Confirm that there's no "Mark as read" menu item
      12. Click on the menu on one of the discussions with unread posts.
      13. Confirm that you see a "Mark as read" menu item
      14. Click "Mark as read" option
      15. Confirm that the unread badge for the discussion that you marked as read has disappeared.
      16. Confirm that the "Mark as read" menu item on that discussion's menu has also disappeared.
      17. Click on the check icon on the "Replies" column header to mark all the discussions in the forum as read.
      18. Confirm that all the discussions have been marked as read
      Groups
      1. Still on forum 1, set the "Visible groups" selector to "All participants"
      2. Check the contents of the group column.
      3. Confirm that group A is rendered with its name and group picture.
      4. Confirm that group B is rendered with a generic default picture and that its name has been truncated to 30 characters or less.
      5. Confirm that discussions without groups are simply blank.
      6. Go to forum 2.
      7. Confirm that there is no group column.
      Started by and Last post columns
      1. Check the "Started by" column.
      2. Confirm that you see the profile pic and full name of the discussion starter.
      3. Confirm that underneath the discussion starter's name, you see the date the discussion was created.
      4. Check the Last post column
      5. Confirm that you see the date of the last reply to the discussion in month and day format.
      6. Hover over the date.
      7. Confirm that you see a tooltip showing the full date of that last post date.
      Discussion subscription
      1. Open the menu of a discussion in f1.
      2. Confirm that you see a "Subscribe" menu item.
      3. Click on the "Subscribe" menu item.
      4. Confirm that you see a "Subscribed" label under the discussion name.
      5. Refresh the page.
      6. Confirm that the "Subscribed" label remains.
      7. Open the discussion's action menu again.
      8. Confirm that you have the option to unsubscribe from the discussion.
      9. Click "Unsubscribe from this discussion"
      10. Confirm that the "Subscribed" label disappears.
      11. Refresh the page.
      12. Confirm that the "Subscribed" remains undisplayed.
      13. Open the discussion's action menu again.
      14. Confirm that you have the option to subscribe from the discussion.
      15. Go to the forum f2.
      16. Open the action menu of the discussions.
      17. Confirm that there's no option to subscribe/unsubscribe to the discussions in f2.
      Discussion subscription within the discussion
      1. Go to one of the discussions.
      2. Use any discussion view except for modern (nested would do, subscription toggle for the modern view will be covered by MDL-66477).
      3. Confirm that the old "Subscribe" link is now an item in the discussion settings dropdown.
      4. Toggle the "Subscribe" action menu item.
      5. Confirm that you get a notification that you have been subscribed/unsubscribed from the discussion.
      6. Open the discussion settings menu.
      7. Confirm that the subscribe action menu item's label text has been updated appropriately as well.
      8. Go to one of the discussions in the forum f2.
      9. Open discussion settings menu.
      10. Confirm that there's no option to subscribe/unsubscribe to the discussion.
      Starring discussions
      1. Unstar/star the discussions using the star icon.
      2. Confirm that you can successfully Unstar/Star discussion using this method.
      3. Unstar/star the discussions using the discussion's action menu.
      4. Confirm that you can successfully Unstar/Star discussion using this method.
      Locking discussions
      1. Log in as a teacher t1 and go to forum f1.
      2. Open the action menu of one of the discussions.
      3. Confirm that you are presented with an option to lock/unlock discussions.
      4. Lock a discussion.
      5. Confirm that you see a label under the discussion name indicating that the discussion has been locked.
      6. Refresh the discussions list page.
      7. Confirm that the "Locked" label for that discussion remains.
      8. Unlock the discussion.
      9. Confirm that the "Locked" label disappears.
      10. Refresh the discussions list page.
      11. Confirm that the "Locked" label for that discussion remains undisplayed.
      Pinning discussions
      1. Open the action menu of one of the discussions.
      2. Confirm that you are presented with an option to pin/unpin discussions.
      3. Pin a discussion.
      4. Confirm that you see an icon on the first column of the table for that discussion indicating that the discussion has been pinned
      5. Unpin the discussion.
      6. Confirm that the "Pinned" icon disappears.
      Timed discussions
      1. Still as a teacher, create the following discussions in forum f1 with the following settings:
        Timed discussion Display period
        1 Display start in the past
        Display end in the future
        2 Display start in the past
        Display end not set.
        3 Display start not set
        Display end in the past
        4 Display start not set
        Display end in the future
        5 Display start in the future
        Display end not set
      2. Check these discussions in the discussions list table.
      3. Confirm that all of these discussions have a "Timed" label beneath the discussion name.
      4. Click on the "Timed" label.
      5. Confirm that a popover shows up.
      6. Check the content of the popover for the timed discussions you created.
      7. Confirm the following display:
        Timed discussion Display
        1 Display start shown
        Display end shown
        Visible to all users
        2 Display start shown
        Display end not shown.
        Visible to all users
        3 Display start not shown
        Display end shown
        Hidden from students
        4 Display start not shown
        Display end shown
        Visible to all users
        5 Display start shown
        Display end not shown
        Hidden from students
      8. Log in as a student
      9. Go to the forum f1.
      10. Confirm that you see the timed discussions 1, 2, and 4 on the list.
      11. Confirm that you don't see the "Timed" label.
      12. Confirm that you see the timed discussions 3 and 5 on the list.
      Long discussion names
      1. Create a discussion with a relatively long subject. (greater than 100 characters)
      2. Go to the discussions list.
      3. Confirm that the discussion's name is shortened to 100 characters or less.
      4. Hover over the discussion name.
      5. Confirm that the tooltip shows the whole discussion name.
      Discussion sorting and pagination
      1. Pin about 3 discussions
      2. Star about 3 discussions
      3. Sort the discussions list by clicking on the column headers.
      4. Confirm the following behaviours:
        • the discussions are sorted according to that column.
        • the pinned discussions are still shown on the top followed by the starred discussions.
        • the pinned discussions and starred discussions are ordered according to the sorted column
        • the discussions can be sorted in ascending or descending order
        • going to the other pages of the discussion list retains the column sorting that you selected.
      Sorting by discussion starter with a different fullnamedisplay setting
      1. Go to "Site administration / Users / Permissions / User policies"
      2. Set the fullnamedisplay setting to "lastname firstname"
      3. Save the changes.
      4. Go to f1.
      5. Confirm that the discussion starter names are shown in the "lastname firstname" format.
      6. Sort the discussions list by the discussion starter.
      7. Confirm that the discussions are sorted by the discussion starter's last name.
      8. Set the fullnamedisplay setting to "firstname lastname"
      9. Go back to f1 and sort the discussions by the discussion starter.
      10. Confirm that the discussions are sorted by the discussion starter's first name.
      Show
      Setup A course with a teacher (let's call this t1) and at least 3 students. (11 course participants might be good so that we'll have more than 100 discussions) Two groups A and B. Assign a group picture for group A. Assign a relatively long group name for group B (more than 30 characters). Assign at least one student per group (let's say s1's in group A, s2's in group B, while s3 and the rest are not in any groups) 2 forums (f1 and f2), with f1's Group mode set to "Visible groups" and it's subscription mode set to optional. On the other hand, set f2's subscription mode to disabled. Run the attached script makediscussions.php to generate discussions for each user in each of the forums. Forum tracking Log in as s1 and edit s1's forum preference and set the " Forum tracking " preference to " Yes: highlight new posts for me " Go to forum f1 Check the Replies column. Confirm that you see a badge number beside the number of replies. Hover over the badge Confirm that the tooltip indicates the number of unread posts. Click on the badge. Confirm that you are redirected to the discussion page with the unread posts highlighted. Go back to the discussion list. Click on the menu on the discussion that you just read. Confirm that there's no " Mark as read " menu item Click on the menu on one of the discussions with unread posts. Confirm that you see a " Mark as read " menu item Click " Mark as read " option Confirm that the unread badge for the discussion that you marked as read has disappeared. Confirm that the " Mark as read " menu item on that discussion's menu has also disappeared. Click on the check icon on the " Replies " column header to mark all the discussions in the forum as read. Confirm that all the discussions have been marked as read Groups Still on forum 1, set the " Visible groups " selector to " All participants " Check the contents of the group column. Confirm that group A is rendered with its name and group picture. Confirm that group B is rendered with a generic default picture and that its name has been truncated to 30 characters or less. Confirm that discussions without groups are simply blank. Go to forum 2. Confirm that there is no group column. Started by and Last post columns Check the " Started by " column. Confirm that you see the profile pic and full name of the discussion starter. Confirm that underneath the discussion starter's name, you see the date the discussion was created. Check the Last post column Confirm that you see the date of the last reply to the discussion in month and day format. Hover over the date. Confirm that you see a tooltip showing the full date of that last post date. Discussion subscription Open the menu of a discussion in f1. Confirm that you see a " Subscribe " menu item. Click on the " Subscribe " menu item. Confirm that you see a " Subscribed " label under the discussion name. Refresh the page. Confirm that the " Subscribed " label remains. Open the discussion's action menu again. Confirm that you have the option to unsubscribe from the discussion. Click " Unsubscribe from this discussion " Confirm that the " Subscribed " label disappears. Refresh the page. Confirm that the " Subscribed " remains undisplayed. Open the discussion's action menu again. Confirm that you have the option to subscribe from the discussion. Go to the forum f2. Open the action menu of the discussions. Confirm that there's no option to subscribe/unsubscribe to the discussions in f2. Discussion subscription within the discussion Go to one of the discussions. Use any discussion view except for modern (nested would do, subscription toggle for the modern view will be covered by MDL-66477 ). Confirm that the old " Subscribe " link is now an item in the discussion settings dropdown. Toggle the " Subscribe " action menu item. Confirm that you get a notification that you have been subscribed/unsubscribed from the discussion. Open the discussion settings menu. Confirm that the subscribe action menu item's label text has been updated appropriately as well. Go to one of the discussions in the forum f2. Open discussion settings menu. Confirm that there's no option to subscribe/unsubscribe to the discussion. Starring discussions Unstar/star the discussions using the star icon. Confirm that you can successfully Unstar/Star discussion using this method. Unstar/star the discussions using the discussion's action menu. Confirm that you can successfully Unstar/Star discussion using this method. Locking discussions Log in as a teacher t1 and go to forum f1. Open the action menu of one of the discussions. Confirm that you are presented with an option to lock/unlock discussions. Lock a discussion. Confirm that you see a label under the discussion name indicating that the discussion has been locked. Refresh the discussions list page. Confirm that the " Locked " label for that discussion remains. Unlock the discussion. Confirm that the " Locked " label disappears. Refresh the discussions list page. Confirm that the " Locked " label for that discussion remains undisplayed. Pinning discussions Open the action menu of one of the discussions. Confirm that you are presented with an option to pin/unpin discussions. Pin a discussion. Confirm that you see an icon on the first column of the table for that discussion indicating that the discussion has been pinned Unpin the discussion. Confirm that the "Pinned" icon disappears. Timed discussions Still as a teacher, create the following discussions in forum f1 with the following settings: Timed discussion Display period 1 Display start in the past Display end in the future 2 Display start in the past Display end not set. 3 Display start not set Display end in the past 4 Display start not set Display end in the future 5 Display start in the future Display end not set Check these discussions in the discussions list table. Confirm that all of these discussions have a " Timed " label beneath the discussion name. Click on the " Timed " label. Confirm that a popover shows up. Check the content of the popover for the timed discussions you created. Confirm the following display: Timed discussion Display 1 Display start shown Display end shown Visible to all users 2 Display start shown Display end not shown. Visible to all users 3 Display start not shown Display end shown Hidden from students 4 Display start not shown Display end shown Visible to all users 5 Display start shown Display end not shown Hidden from students Log in as a student Go to the forum f1. Confirm that you see the timed discussions 1, 2, and 4 on the list. Confirm that you don't see the " Timed " label. Confirm that you see the timed discussions 3 and 5 on the list. Long discussion names Create a discussion with a relatively long subject. (greater than 100 characters) Go to the discussions list. Confirm that the discussion's name is shortened to 100 characters or less. Hover over the discussion name. Confirm that the tooltip shows the whole discussion name. Discussion sorting and pagination Pin about 3 discussions Star about 3 discussions Sort the discussions list by clicking on the column headers. Confirm the following behaviours: the discussions are sorted according to that column. the pinned discussions are still shown on the top followed by the starred discussions. the pinned discussions and starred discussions are ordered according to the sorted column the discussions can be sorted in ascending or descending order going to the other pages of the discussion list retains the column sorting that you selected. Sorting by discussion starter with a different fullnamedisplay setting Go to " Site administration / Users / Permissions / User policies " Set the fullnamedisplay setting to " lastname firstname " Save the changes. Go to f1. Confirm that the discussion starter names are shown in the " lastname firstname " format. Sort the discussions list by the discussion starter. Confirm that the discussions are sorted by the discussion starter's last name. Set the fullnamedisplay setting to " firstname lastname " Go back to f1 and sort the discussions by the discussion starter. Confirm that the discussions are sorted by the discussion starter's first name.
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-66481-master-6
    • Story Points:
      1
    • Sprint:
      Sprint 5 - Sander's special, Sprint 6 - Looney Tunes, Sprint 7 - Race to the freeze

      Description

      Update the display of the discussion list table on the discussion list page (mod/forum/view.php) to match the prototype:
      https://projects.invisionapp.com/share/9GQ8R2O3H7J#/screens/350489135

      Acceptance criteria

      • Table can be sorted by the columns
      • Clicking on the unread replies label takes the user to the first unread reply on the discussion
      • "Following" in the prototype is actually "Subscribed"
      • The star toggle should be visible unless the discussion is pinned, in which case the pin will be displayed
      • Clicking the star toggle should star or unstar the discussion

        Attachments

        1. after-patch.png
          after-patch.png
          153 kB
        2. before-patch.png
          before-patch.png
          198 kB
        3. makediscussions.php
          3 kB
        4. MDL-66481_01.png
          MDL-66481_01.png
          108 kB
        5. MDL-66481_02.png
          MDL-66481_02.png
          150 kB
        6. MDL-66481_03.png
          MDL-66481_03.png
          140 kB
        7. MDL-66481_04.png
          MDL-66481_04.png
          116 kB
        8. MDL-66481_05.png
          MDL-66481_05.png
          79 kB
        9. MDL-66481_06.png
          MDL-66481_06.png
          141 kB
        10. MDL-66481_07.png
          MDL-66481_07.png
          129 kB
        11. MDL-66481_08.png
          MDL-66481_08.png
          143 kB

          Issue Links

            Activity

              People

              Assignee:
              jpataleta Jun Pataleta
              Reporter:
              ryanwyllie Ryan Wyllie
              Peer reviewer:
              Ryan Wyllie
              Integrator:
              Jake Dallimore
              Tester:
              Jennifer Bauzon
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day, 3 hours, 45 minutes
                  1w 1d 3h 45m