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

New Web Service mod_feedback_view_feedback

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2.1
    • 3.3
    • Feedback, Web Services
    • MOODLE_32_STABLE
    • MOODLE_33_STABLE
    • MDL-57811-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_feedback activity with at least one question.
      4. Use as completion criteria "Student must view this activity to complete it"
      5. Log in as the student and complete the feedback
      6. Log in as teacher and check that the activity is marked as completed by the student and that the student action generated a new entry in the logs (course -> reports -> logs)
      7. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      8. Create a Token for the student user
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      9. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, feedbackid (the feedback instance value) and the URL of your moodle instance

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

      10. Confirm that
        • You can see new entries in the course log (feedback course module viewed) for that course and the user. The origin for the new log entries is "ws"
        • If you access via the web interface you will see the activity marked as completed, if you access the activity via the web interface with the student you will see log entries with origin "web" (feedback course module viewed)
          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_feedback activity with at least one question. Use as completion criteria "Student must view this activity to complete it" Log in as the student and complete the feedback Log in as teacher and check that the activity is marked as completed by the student and that the student action generated a new entry in the logs (course -> reports -> logs) 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, feedbackid (the feedback instance value) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'feedbackid=2&moduleviewed=1&wsfunction=mod_feedback_view_feedback&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed Confirm that You can see new entries in the course log (feedback course module viewed) for that course and the user. The origin for the new log entries is "ws" If you access via the web interface you will see the activity marked as completed, if you access the activity via the web interface with the student you will see log entries with origin "web" (feedback course module viewed) 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

      To mark view completed and optionally launch the mod viewed event

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Pau Ferrer Pau Ferrer
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Craig R Morton Craig R Morton
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona), Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                15/May/17