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

Don't refresh course if a completed activity doesn't restrict other content

XMLWordPrintable

    • Hide

      This issue should be tested by a developer because it requires inspecting network requests.

      This issue only needs to be tested in 1 device (it can be webapp).

      1. In a course, create 3 pages:
        1. In the first 2, in "Completion conditions", set automatic completion that is completed when the student views the activity. Don't enable any other conditions.
        2. In the 3rd page, in "Restrict access", click "Add restriction > Activity completion" and set that the page 1 must be marked complete (only the page 1, don't set any restriction with page 2). Also, click the eye icon next to the restriction (this means activity won't be seen until available).
      2. In the app, open the course page. Check that you only see the first 2 pages but not the 3rd page.
      3. Inspect Network requests and open the page that does NOT restrict the 3rd page. Check that, after the view_page WS is called, the WS calls to core_course_get_contents always pass a cmid, there is no call to core_course_get_contents without cmid (this means the course isn't reloaded).
      4. Go back to the course page and now open the other page. Check that, after the view_page WS is called, there is at least 1 WS call to core_course_get_contents without passing a cmid. Please notice there could be more than 1 request, we have MOBILE-4326 to improve this part.
      5. Go back to course page. Check that now you see the 3rd page.
      Show
      This issue should be tested by a developer because it requires inspecting network requests. This issue only needs to be tested in 1 device (it can be webapp). In a course, create 3 pages: In the first 2, in "Completion conditions", set automatic completion that is completed when the student views the activity. Don't enable any other conditions. In the 3rd page, in "Restrict access", click "Add restriction > Activity completion" and set that the page 1 must be marked complete (only the page 1, don't set any restriction with page 2). Also, click the eye icon next to the restriction (this means activity won't be seen until available). In the app, open the course page. Check that you only see the first 2 pages but not the 3rd page. Inspect Network requests and open the page that does NOT restrict the 3rd page. Check that, after the view_page WS is called, the WS calls to core_course_get_contents always pass a cmid , there is no call to core_course_get_contents without cmid (this means the course isn't reloaded). Go back to the course page and now open the other page.  Check that, after the view_page WS is called, there is at least 1 WS call to core_course_get_contents without passing a cmid. Please notice there could be more than 1 request, we have MOBILE-4326 to improve this part. Go back to course page. Check that now you see the 3rd page.
    • MOODLE_405_STABLE

      In the Moodle app we've always refreshed the course page when an automatic activity is completed in the app, to display restricted activities that weren't seen before. However, we should check if valueused is true to avoid refreshing it when the completed activity doesn't restrict any other content.

      This property is checked for manual completion but not for automatic completion.

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

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