Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-10986 QA tests no longer needed
  3. MDLQA-10393

A lesson activity may be attempted offline

XMLWordPrintable

    • Icon: Functional Test Functional Test
    • Icon: Minor Minor
    • None
    • Moodle QA non-runners
    • Lesson, Mobile, Student, Teacher
    • None

      1. Log in as a teacher and create a lesson with at least two content pages.
      2. In the lesson settings, set 'Allow lesson to be attempted offline using the mobile app' to Yes.
      3. Enrol one user as student in the course containing the lesson.
      4. Log in as the student and view the first page of the lesson, then log out.
      5. Log in as an admin and enable 'Mobile services' in the Site administration.
      6. Create a web services token for the student user in 'Manage tokens' in the Site administration.
      7. Next, you can do a CURL REST call simulating a WS client with the student user.
        • You need to replace the wstoken, lessonid (the lesson instance value).

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'lessonid=4&wsfunction=mod_lesson_finish_attempt&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool"

      8. Log in as a student again and access the lesson activity.
      9. Check that you see this message: You have worked on this attempt using a mobile device. Data was last saved to this site XYZ ago. Please check that you do not have any unsaved work.

            Unassigned Unassigned
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

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