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

Prefetch data after syncing and just when leaving a SCORM activity

    XMLWordPrintable

    Details

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

      This issue only needs to be tested with 1 device, you don't need to test it in all of them.

      1. Install the app in a device and go to Mobile Master > MM Dev Testing > SCORM > Basic Single SCO "Golf explained" SCORM package.
      2. Open the SCORM (if your last attempt is finished, start a new one). This will download the SCORM.
      3. Once inside, change at least 1 page (with the Previous or Next button), but be careful not to reach the last page since that will finish the attempt.
      4. Remember the last page you were in, leave the SCORM and wait for the page refresh to finish.
      5. Go offline and open the SCORM again. Check that you don't see any connection error and the SCORM is opened with the last page you saw before leaving.
      6. Change at least 1 page (with the Previous or Next button), but be careful not to reach the last page since that will finish the attempt.
      7. Remember the last page you were in, leave the SCORM and wait for the page refresh to finish. Check that in the page you see a warning saying that you have data to be synchronized.
      8. Go online and synchronize the data (either doing a PTR or with the top-right menu).
      9. Once the synchronization is done, go offline again and open the SCORM again. Check that you don't see any connection error and the SCORM is opened with the last page you saw before leaving.
      Show
      This issue only needs to be tested with 1 device, you don't need to test it in all of them. Install the app in a device and go to Mobile Master > MM Dev Testing > SCORM > Basic Single SCO "Golf explained" SCORM package. Open the SCORM (if your last attempt is finished, start a new one). This will download the SCORM. Once inside, change at least 1 page (with the Previous or Next button), but be careful not to reach the last page since that will finish the attempt. Remember the last page you were in, leave the SCORM and wait for the page refresh to finish. Go offline and open the SCORM again. Check that you don't see any connection error and the SCORM is opened with the last page you saw before leaving. Change at least 1 page (with the Previous or Next button), but be careful not to reach the last page since that will finish the attempt. Remember the last page you were in, leave the SCORM and wait for the page refresh to finish. Check that in the page you see a warning saying that you have data to be synchronized. Go online and synchronize the data (either doing a PTR or with the top-right menu). Once the synchronization is done, go offline again and open the SCORM again. Check that you don't see any connection error and the SCORM is opened with the last page you saw before leaving.
    • 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

          Issue Links

            Activity

              People

              Assignee:
              dpalou Dani Palou
              Reporter:
              dpalou Dani Palou
              Peer reviewer:
              Albert Gasset
              Integrator:
              Juan Leyva
              Tester:
              Isabel Renedo Rouco
              Participants:
              Component watchers:
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

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

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 2 hours, 30 minutes
                  1d 2h 30m