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

New Web Service mod_feedback_get_feedback_access_information

XMLWordPrintable

    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • MDL-57812-master
    • Hide
      1. Create a course with a feedback (without questions) with a time restriction (not open yet)
      2. Enrol a couple of users as teacher and student in that course
      3. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      4. Create a Token in the mobile app service for the student in the course:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. Next, you can do a CURL REST call simulating a WS client with the student.
        • You need to replace the wstoken, feedbackid (feedback instance id) and the URL of your moodle instance

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

      6. Now check that the field isopen is set to false and isempty is set to true
      7. Now, as teacher, edit the feedback adding at least one question and removing the time restriction, do not allow multiple attempts of the feedback.
      8. Execute the same curl request again and check that this time isopen is set to true, isempty is set to false and: cancomplete is set to true, cansubmit is set to true, issubmitted to false
      9. Now, in the Moodle web site as student complete the feedback
      10. Now, check that isalreadysubmitted is set to true, cansubmit is set to false
      Show
      Create a course with a feedback (without questions) with a time restriction (not open yet) Enrol a couple of users as teacher and student in that course Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for the student in the course: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student. You need to replace the wstoken, feedbackid (feedback instance id) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'feedbackid=14&wsfunction=mod_feedback_get_feedback_access_information&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Now check that the field isopen is set to false and isempty is set to true Now, as teacher, edit the feedback adding at least one question and removing the time restriction, do not allow multiple attempts of the feedback. Execute the same curl request again and check that this time isopen is set to true, isempty is set to false and: cancomplete is set to true, cansubmit is set to true, issubmitted to false Now, in the Moodle web site as student complete the feedback Now, check that isalreadysubmitted is set to true, cansubmit is set to false

      To retrieve the current user status in a given feedback before starting or continuing it. With this information, the app will be able to print the appropriate messages before starting or continuing a feedback (maybe the user could not continue, re-takes are not allowed, etc…)

            jleyva Juan Leyva
            jleyva Juan Leyva
            cameron1729 cameron1729
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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