Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-55162

New Web Service mod_assign_view_assign

    XMLWordPrintable

Details

    • MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • MDL-55162-master
    • Hide
      1. Create a course with a student, the course must have at least one section.
      2. Enable completion at site level and course level.
      3. Create a mod_assign activity using as completion criteria "Student must view this activity to complete it"
      4. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      5. Create a Token for the student user
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, assignid (the assign instance value) and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid=2&wsfunction=mod_assign_view_assign&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed

      7. Confirm that
        • If you access via the web interface you will see the activity marked as completed
          NOTE: If you don't see the activity marked as completed you should logout and login again, Moodle session cache sometimes does not upgrade the completion status for activities.
      Show
      Create a course with a student, the course must have at least one section. Enable completion at site level and course level. Create a mod_assign activity using as completion criteria "Student must view this activity to complete it" As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student user Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student user . You need to replace the wstoken, assignid (the assign instance value) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid=2&wsfunction=mod_assign_view_assign&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed Confirm that If you access via the web interface you will see the activity marked as completed NOTE: If you don't see the activity marked as completed you should logout and login again, Moodle session cache sometimes does not upgrade the completion status for activities.

    Description

      This Web Service is just for launching $completion->set_module_viewed

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Mark Nelson Mark Nelson
              David Monllaó David Monllaó
              Jun Pataleta Jun Pataleta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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