Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3900

Course overview block does not honour "coursegraceperiodbefore" and "coursegraceperiodafter"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.5
    • 4.0.0
    • Blocks
    • Hide

      Test on any device of your choice.

      On site:

      1. Log in as admin
      2. Create a course (CourseA) with Course start date 1 month in the future and no end date.
      3. Create a course (CourseB) with Course start date 1 year in the past and course end date 1 month in the past.
      4. In Site administration > Appearance > Courses set "Grace period for future courses" to 60, "Grace period for past courses" to 60, and save changes.
      5. Enrol a user (User1) on CourseA and CourseB.

      On app:

      1. Connect to the site and log in as User1.
      2. In the My courses page, select the In progress filter.
      3. Check CourseA and CourseB are displayed.
      Show
      Test on any device of your choice. On site: Log in as admin Create a course (CourseA) with Course start date 1 month in the future and no end date. Create a course (CourseB) with Course start date 1 year in the past and course end date 1 month in the past. In Site administration > Appearance > Courses set "Grace period for future courses" to 60, "Grace period for past courses" to 60, and save changes. Enrol a user (User1) on CourseA and CourseB. On app: Connect to the site and log in as User1. In the My courses page, select the In progress filter. Check CourseA and CourseB are displayed.
    • MOODLE_39_STABLE
    • MOODLE_400_STABLE
    • Moodle App 4.0

    Description

      Steps to reproduce:

      • Log in as admin
      • Create a course (CourseA) with Course start date 1 month in the future and no end date.
      • Create a course (CourseB) with Course start date 1 year in the past and course end date 1 month in the past.
      • Enrol a user (User1) on CourseA and CourseB
      • Log in as User1 and view the dashboard page.
      • In the "Course overview" block, select the "Past" filter
        • CourseB should be displayed
      • Select the "Future" filter
        • CourseA should be displayed
      • Switch back to admin. In Site administration > Appearance > Courses set "Grace period for future courses" to 60, "Grace period for past courses" to 60, and save changes.
      • Switch to User1 and view the dashboard page.
      • In the "Course overview" block, CourseA and CourseB should now show when the "In progress" filter is selected, not "Past" or "Future".
      • Launch the Moodle app. Connect to the site and log in as User1.
      • In the Course overview block, select the In progress filter
        • EXPECTED: CourseA and CourseB are displayed
        • ACTUAL: CourseA and CourseB are not displayed. CourseA appears when Future is selected, and CourseB appears when Past is selected.

      This behaviour is due to initCourseFilters() in src/addons/block/myoverview/components/myoverview/myoverview.ts not using the coursegradeperiodbefore and coursegradeperiodafter settings when deciding whether a date is "Past", "Future" or "In progress".

      The logic used should be the same as course_classify_for_timeline() in Moodle core's course/lib.php

      Attachments

        Issue Links

          Activity

            People

              pferre22 Pau Ferrer
              marxjohnson Mark Johnson
              Dani Palou Dani Palou
              Isabel Renedo Rouco Isabel Renedo Rouco
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                22/Apr/22