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

New Web Service mod_feedback_get_feedback_access_information

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.1, 3.3
    • Fix Version/s: 3.3
    • Component/s: Feedback, Web Services
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57812-master

      Description

      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…)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jleyva Juan Leyva
                Reporter:
                jleyva Juan Leyva
                Peer reviewer:
                cameron1729
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Jun Pataleta
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Juan Leyva, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/17