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

Update forum display to use templates

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.7
    • 3.7
    • Forum
    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • mod_forum-discussion-poc
    • Hide

      Test

      The main purpose of these changes is to convert the rendering of the forums over to using templates while initially still looking and behaving the same as the old interface.

      Testing this will require 2 sites, one running the new template rendering code and one running the old rendering code.

      You should complete each part of the testing on both sites simultaneously and comparing them to make sure that they appear (relatively) the same.

      To begin:

      1. Create a site with a course
      2. Add some users to the site and enrol them in the course with various roles (student, teacher etc). Make sure at least one user isn’t enrolled

      Create a standard forum

      1. Create a standard forum
      2. Add a new discussion
      3. Add a few posts to the discussion from a few different users
        • Include images in the post message for a few of them
      4. Log in as each user from different roles and view the discussion
      5. Change the display mode between each of the 4 display modes (nested, threaded, sort asc, desc)
      6. Try each of the different features of the discussion
        1. Pin it
        2. Move it
        3. Subscribe
        4. All of the post functionality (edit, delete, split etc)
          • When on the page for editing/deleting etc have a look at the post preview that gets rendered on that page and make sure it looks the same
          • Note: The actions have been removed from the preview on that page

      Add some posts with tags

      1. Create a post and add some tags to it
      2. View the post and click on the tags

      Add some posts with attachments

      1. Create one or more posts with attachments.
      2. Add a combination of files and images

      Deleted post

      1. View the forum_posts records in the database
      2. Set one (or more) of the posts to have the “deleted” value set to 1
      3. View the discussion with those posts
      4. Confirm that those “deleted” posts appear in the list of posts as placeholders with text saying that the post is deleted

      User read tracking

      1. Log in as a user with access to the forum
      2. Go to the user’s preference page (from the user menu up the top right)
      3. Click on “forum preferences”
      4. Turn on forum tracking
      5. View the forum
      6. You should see that there are unread posts in the discussion
      7. View the discussion and the unread posts should be highlighted
      8. If you navigate away and then back to the discussion the posts should no longer be highlighted (since you’ve seen them)

      Word counts

      1. Edit the forum and turn on display word counts
      2. View a discussion to see the word counts

      Ratings

      1. Edit the form and enable ratings
      2. Setting the “Aggregate type” to “Average of ratings” and leaving the scale as point should do it
      3. View the discussion to see the ratings
      4. Log in as a few different users to check visibility of the ratings
      5. Add some ratings if the user has the capability

      Exporting (portfolios)

      1. Log in as admin
      2. Enable portfolios (see docs)
        • The file download portfolio works well
      3. After enabling portfolios log in as different users and view some discussions
      4. You should have the option to export posts created by that user

      View a user’s forum activity report

      1. Log in as admin
      2. View one of the other user’s profiles (one that has posted in the forums)
      3. Under the reports section click “Complete report”
      4. Make sure the look the same there

      Searching the forum

      1. Search the forum for different posts
      2. Make sure the posts render correctly in the search results

      Group forum

      1. Create some groups in the course (make sure you add a group image)
      2. Add some users to the groups
      3. Create a forum in a group mode (under “Common module settings”)
      4. Log in as a few different users in different groups and try to create and view discussions
      5. Try creating discussions for specific groups (the group setting when creating a discussion)
      6. Try changing the group mode for the forum to the other mode

      Create different forum types

      1. Create each of the different forum types (single, each person, q and a, and blog)
      2. Log in with different users, create discussions / posts to check that they all work the same
      Show
      Test The main purpose of these changes is to convert the rendering of the forums over to using templates while initially still looking and behaving the same as the old interface. Testing this will require 2 sites, one running the new template rendering code and one running the old rendering code. You should complete each part of the testing on both sites simultaneously and comparing them to make sure that they appear (relatively) the same. To begin: Create a site with a course Add some users to the site and enrol them in the course with various roles (student, teacher etc). Make sure at least one user isn’t enrolled Create a standard forum Create a standard forum Add a new discussion Add a few posts to the discussion from a few different users Include images in the post message for a few of them Log in as each user from different roles and view the discussion Change the display mode between each of the 4 display modes (nested, threaded, sort asc, desc) Try each of the different features of the discussion Pin it Move it Subscribe All of the post functionality (edit, delete, split etc) When on the page for editing/deleting etc have a look at the post preview that gets rendered on that page and make sure it looks the same Note: The actions have been removed from the preview on that page Add some posts with tags Create a post and add some tags to it View the post and click on the tags Add some posts with attachments Create one or more posts with attachments. Add a combination of files and images Deleted post View the forum_posts records in the database Set one (or more) of the posts to have the “deleted” value set to 1 View the discussion with those posts Confirm that those “deleted” posts appear in the list of posts as placeholders with text saying that the post is deleted User read tracking Log in as a user with access to the forum Go to the user’s preference page (from the user menu up the top right) Click on “forum preferences” Turn on forum tracking View the forum You should see that there are unread posts in the discussion View the discussion and the unread posts should be highlighted If you navigate away and then back to the discussion the posts should no longer be highlighted (since you’ve seen them) Word counts Edit the forum and turn on display word counts View a discussion to see the word counts Ratings Edit the form and enable ratings Setting the “Aggregate type” to “Average of ratings” and leaving the scale as point should do it View the discussion to see the ratings Log in as a few different users to check visibility of the ratings Add some ratings if the user has the capability Exporting (portfolios) Log in as admin Enable portfolios (see docs ) The file download portfolio works well After enabling portfolios log in as different users and view some discussions You should have the option to export posts created by that user View a user’s forum activity report Log in as admin View one of the other user’s profiles (one that has posted in the forums) Under the reports section click “Complete report” Make sure the look the same there Searching the forum Search the forum for different posts Make sure the posts render correctly in the search results Group forum Create some groups in the course (make sure you add a group image) Add some users to the groups Create a forum in a group mode (under “Common module settings”) Log in as a few different users in different groups and try to create and view discussions Try creating discussions for specific groups (the group setting when creating a discussion) Try changing the group mode for the forum to the other mode Create different forum types Create each of the different forum types (single, each person, q and a, and blog) Log in with different users, create discussions / posts to check that they all work the same

      Forum is a very old module in Moodle and has slowly evolved over time into a pretty complex system with lots of features. That evolution has made it costly (in terms of time and complexity) to add some of the more modern features we want. We need to change the forum rendering code to render using templates rather than HTML writer.

      Part of the process to transition over to using templates will require us to model the forum data a bit better, add renderers, add exporters, and more formally structure the code.

      The key benefit for moving to templates will be unlocking the ability to render parts of the forum using JavaScript which means we can add features such as inline replies, inline editing, starring, etc. Themers can also freely override templates to easily change the look and feel of the forum in their theme.

      In addition, we will be able to structure the code a bit better to make it more maintainable for the future.

            ryanwyllie Ryan Wyllie
            dobedobedoh Andrew Lyons
            Jun Pataleta Jun Pataleta
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 weeks, 2 days, 30 minutes
                5w 2d 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.