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

Prefetch data after synching and when leaving an activity

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.6.0
    • Fix Version/s: 3.6.1
    • Component/s: Others
    • Labels:
    • Testing Instructions:
      Hide

      This issue should only be tested in 1 OS, the one you prefer.

      1. In Moodle, create 1 SCORM, 1 choice (allow choice to be updated), 1 survey, 1 lesson (with offline enabled) and 1 quiz (with offline enabled).
      2. In the app, login as a student and open the course.
      3. Enable download options and download the activities created in the first step.
      4. Open the choice in online and answer it. When done, go back to the course and perform a PTR. Check that the choice is still displayed as downloaded and not outdated.
      5. Now open the choice in offline and answer it. 
      6. Go online and synchronize the choice using the context menu option or performing a PTR. 
      7. When done, go back to the course and perform a PTR. Check that the choice is still displayed as downloaded and not outdated.
      8. Open the survey in online and answer it. When done, go back to the course and perform a PTR. Check that the survey is still displayed as downloaded and not outdated.
      9. Open the SCORM in online and generate some data in it.
      10. Go back to the SCORM entry page and wait for the page to be refreshed. Open the top-right menu and check that there is no option to download the SCORM (this means it's still downloaded and not outdated).
      11. Go offline and open the SCORM again. Check that no error is displayed.
      12. Generate some data again (in offline), go back to the SCORM entry page and wait for the page to be refreshed. Check that you see the warning saying there's offline data to be synchronized.
      13. Go online and synchronize the SCORM using the context menu option or performing a PTR. 
      14. When done, go back to the course and perform a PTR. Check that the SCORM is still displayed as downloaded and not outdated.
      15. Now play the lesson in online and answer/change at least 1 page.
      16. Go back to the lesson entry page and wait for the page to be refreshed. Open the top-right menu and check that there is no option to download the lesson (this means it's still downloaded and not outdated).
      17. Go offline and open the lesson again. Check that no error is displayed.
      18. Generate some data again (in offline), go back to the lesson entry page and wait for the page to be refreshed. Check that you see the warning saying there's offline data to be synchronized.
      19. Go online and synchronize the lesson using the context menu option or performing a PTR. 
      20. When done, go back to the course and perform a PTR. Check that the lesson is still displayed as downloaded and not outdated.
      21. Now play the quiz in online and answer at least 1 question.
      22. Go back to the quiz entry page and wait for the page to be refreshed. Open the top-right menu and check that there is no option to download the quiz (this means it's still downloaded and not outdated).
      23. Go offline and open the quiz again. Check that no error is displayed.
      24. Generate some data again (in offline), go back to the quiz entry page and wait for the page to be refreshed. Check that you see the warning saying there's offline data to be synchronized.
      25. Go online and synchronize the quiz using the context menu option or performing a PTR. 
      26. When done, go back to the course and perform a PTR. Check that the quiz is still displayed as downloaded and not outdated.
      Show
      This issue should only be tested in 1 OS, the one you prefer. In Moodle, create 1 SCORM, 1 choice (allow choice to be updated), 1 survey, 1 lesson (with offline enabled) and 1 quiz (with offline enabled). In the app, login as a student and open the course. Enable download options and download the activities created in the first step. Open the choice in online and answer it. When done, go back to the course and perform a PTR. Check that the choice is still displayed as downloaded and not outdated. Now open the choice in offline and answer it.  Go online and synchronize the choice using the context menu option or performing a PTR.  When done, go back to the course and perform a PTR. Check that the choice is still displayed as downloaded and not outdated. Open the survey in online and answer it. When done, go back to the course and perform a PTR. Check that the survey is still displayed as downloaded and not outdated. Open the SCORM in online and generate some data in it. Go back to the SCORM entry page and wait for the page to be refreshed. Open the top-right menu and check that there is no option to download the SCORM (this means it's still downloaded and not outdated). Go offline and open the SCORM again. Check that no error is displayed. Generate some data again (in offline), go back to the SCORM entry page and wait for the page to be refreshed. Check that you see the warning saying there's offline data to be synchronized. Go online and synchronize the SCORM using the context menu option or performing a PTR.  When done, go back to the course and perform a PTR. Check that the SCORM is still displayed as downloaded and not outdated. Now play the lesson in online and answer/change at least 1 page. Go back to the lesson entry page and wait for the page to be refreshed. Open the top-right menu and check that there is no option to download the lesson (this means it's still downloaded and not outdated). Go offline and open the lesson again. Check that no error is displayed. Generate some data again (in offline), go back to the lesson entry page and wait for the page to be refreshed. Check that you see the warning saying there's offline data to be synchronized. Go online and synchronize the lesson using the context menu option or performing a PTR.  When done, go back to the course and perform a PTR. Check that the lesson is still displayed as downloaded and not outdated. Now play the quiz in online and answer at least 1 question. Go back to the quiz entry page and wait for the page to be refreshed. Open the top-right menu and check that there is no option to download the quiz (this means it's still downloaded and not outdated). Go offline and open the quiz again. Check that no error is displayed. Generate some data again (in offline), go back to the quiz entry page and wait for the page to be refreshed. Check that you see the warning saying there's offline data to be synchronized. Go online and synchronize the quiz using the context menu option or performing a PTR.  When done, go back to the course and perform a PTR. Check that the quiz is still displayed as downloaded and not outdated.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Sprint:
      Moodle Mobile 3.6.1

      Description

      With the check updates WS, we now have a new problem regarding activities that can be prefetched and done in offline.

      When the user generates some data in the app, the WS check_updates detects that there are some changes in the data (the one that was created by the app) so the activity is marked as outdated.

      This is a major problem in scorm, lesson and quiz, since we require the user to have the data up to date before being able to continue the activity. This causes the following behaviour:

      1. The user prefetches the activity.
      2. The user opens the activity in online and generates some new data.
      3. The user leaves the activity and goes offline.
      4. The user tries to continue the activity in offline. He can't because the activity isn't up to date.

      For lesson I thought we could be able to store the last time we prefetched the pages viewed/answered (not the whole module) and then compare that value with the result of check_updates, but the check_updates WS only returns the IDs of the items, not the date so it isn't possible.

      The only option left is to re-download the whole module everytime the user leaves the activity, but that can increase the data usage a lot, specially if some file changes while the user was doing the activity. Maybe we should re-download only if the user is on wifi? Should we add a new setting?

      Any idea will be appreciated

        Attachments

        1. 2850_quiz.png
          196 kB
          Isabel Renedo Rouco

          Issue Links

            Activity

              People

              Assignee:
              dpalou Dani Palou
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Pau Ferrer
              Integrator:
              Juan Leyva
              Tester:
              Isabel Renedo Rouco
              Participants:
              Component watchers:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                29/Mar/19