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

Add text search to the timeline block

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull Master Branch:
      MDL-72295-master
    • Testing Instructions:
      Hide

      Initial setup

      1. Create a new course called: Test course 1. (Make sure to set the Course start date to yesterday)
      2. Create a new course called: Test course 2. (Make sure to set the Course start date to yesterday)
      3. Create a new student account and enrol to the created course.
      4. Create the following activities

       

      Course Activity Name Open Time Close Time
      Test course 1 Choice Test choice 1 Yesterday Next 7 days
      Test course 2 Choice Test choice 2 Yesterday Next 7 days
      Test course 3 Choice Random name Yesterday Next 7 days
      Test course 1 Feedback Test feedback 1 Yesterday Next 7 days
      Test course 2 Feedback Test feedback 2 Yesterday Next 7 days
      Test course 3 Feedback Another random name Yesterday Next 7 days

       

      Note: Please test with both sort by dates and sort by course filter.

      Search by course name

      1. Login as student.
      2. Type 'Test course 1' to the search field in the Timeline block.
      3. Verify that you only see Test choice 1, Test feedback 1.
      4. Type 'Test course 2' to the search field in the Timeline block.
      5. Verify that you only see Test choice 2, Test feedback 2.

      Search by activity name

      1. Login as student.
      2. Type 'Test choice 1' to the search field in the Timeline block.
      3. Verify that you only see Test choice 1 choice activity.
      4. Type 'Random name' to the search field in the Timeline block.
      5. Verify that you will see Random name choice activity and Another random name feedback activity.
      6. Type 'Another random name' to the search field in the Timeline block.
      7. Verify that you only see Another random name feedback activity.

      Search by activity type

      1. Login as student.
      2. Type 'choice' to the search field in the Timeline block.
      3. Verify that you only see the choice activities.
      4. Verify that you do not see the feedback activities
      Show
      Initial setup Create a new course called: Test course 1. (Make sure to set the Course start date to yesterday) Create a new course called: Test course 2. (Make sure to set the Course start date to yesterday) Create a new student account and enrol to the created course. Create the following activities   Course Activity Name Open Time Close Time Test course 1 Choice Test choice 1 Yesterday Next 7 days Test course 2 Choice Test choice 2 Yesterday Next 7 days Test course 3 Choice Random name Yesterday Next 7 days Test course 1 Feedback Test feedback 1 Yesterday Next 7 days Test course 2 Feedback Test feedback 2 Yesterday Next 7 days Test course 3 Feedback Another random name Yesterday Next 7 days   Note : Please test with both sort by dates and sort by course filter. Search by course name Login as student. Type 'Test course 1' to the search field in the Timeline block. Verify that you only see Test choice 1, Test feedback 1. Type 'Test course 2' to the search field in the Timeline block. Verify that you only see Test choice 2, Test feedback 2. Search by activity name Login as student. Type 'Test choice 1' to the search field in the Timeline block. Verify that you only see Test choice 1 choice activity. Type 'Random name' to the search field in the Timeline block. Verify that you will see Random name choice activity and Another random name feedback activity. Type 'Another random name' to the search field in the Timeline block. Verify that you only see Another random name feedback activity. Search by activity type Login as student. Type 'choice' to the search field in the Timeline block. Verify that you only see the choice activities. Verify that you do not see the feedback activities
    • Story Points:
      0
    • Sprint:
      HQ Team International Sprint 8, HQ Team International Sprint 9, HQ Team International Sprin 10, HQ Team International CI H2-21

      Description

      To help filter content in the timeline block in a meaningful and flexible way, we need to add a search box to the top of the timeline block, as outlined in red here:

      For the base implementation, the search should include the following content relating to the events in the timeline block:

      1. Course name.
      2. Activity name.
      3. Activity type (eg quiz).

      Key implementation notes/requirements:

      1. Utilise and update existing timeline block web services (core_calendar_get_action_events_by_courses and core_calendar_get_action_events_by_timesort) and any other relevant services/methods to fetch and repopulate the timeline block consistent with the data they already provide, but applying the search term before returning the results. See MDL-58579 for ideas/any reusable content, as it implements a similar feature for course searching (rather than activity), and there may be some overlap.
      2. Implement the backend method(s) to perform the search on the relevant events.
      3. Ensure the fetching applies usual checks to ensure only those events intended for the user are returned.
      4. The other filters/layout options applied in the block should be maintained when the web service returns the results, as should pagination/results size.
      5. Investigate whether an caching is applied and/or additional caching is required. The course overview version (MDL-58579) does have some caching.

      The reason for implementing a backend search instead of just frontend searching the visible text in the block, is that the content fed to the block is paginated, and it will be more useful for students to be able to search and filter content from their whole timeline (within the filtered constraints), not just the visible content which might be as little as 5 items in a long total list.

        Attachments

        1. timeline-search-prototype.png
          timeline-search-prototype.png
          15 kB
        2. MDL-72295 timeline clear.png
          MDL-72295 timeline clear.png
          2 kB
        3. MDL-72295 search.png
          MDL-72295 search.png
          2 kB
        4. MDL-72295 clear course overview.png
          MDL-72295 clear course overview.png
          1 kB
        5. MDL-72295 clear.png
          MDL-72295 clear.png
          2 kB
        6. MDL-72295_Test Passed.png
          MDL-72295_Test Passed.png
          119 kB

          Issue Links

            Activity

              People

              Assignee:
              huongn@moodle.com Huong Nguyen
              Reporter:
              michaelh Michael Hawkins
              Peer reviewer:
              Simey Lameze Simey Lameze
              Integrator:
              Ilya Tregubov Ilya Tregubov
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 2 days, 5 hours, 5 minutes
                  1w 2d 5h 5m