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

WS mod_feedback_get_responses_analysis is not returning correctly filled the anonattempts->number field

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3, 3.4
    • 3.3.1
    • Feedback
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MOODLE_33_STABLE
    • MDL-59132-master
    • Hide
      1. Create or use an existing anonymous feedback
      2. Complete the feedback with at least 2 students
      3. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      4. Create token for one teacher in the same course that the students
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. Next, you can do a CURL REST call simulating a WS client using the teacher token..
        • 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=16&wsfunction=mod_feedback_get_responses_analysis&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true' | python -m "json.tool"

      6. Confirm that the data returned by the WS match the information in the Show responses tab of the feedback when you are checking it as teacher in Moodle. (it is very important to first execute the WS request and then open the show responses tab using a teacher/manager account.)
      7. Double check that the anonattempts->number match the Response number in the Show responses tab.
      Show
      Create or use an existing anonymous feedback Complete the feedback with at least 2 students As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create token for one teacher in the same course that the students Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client using the teacher token.. 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=16&wsfunction=mod_feedback_get_responses_analysis&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true' | python -m "json.tool" Confirm that the data returned by the WS match the information in the Show responses tab of the feedback when you are checking it as teacher in Moodle. (it is very important to first execute the WS request and then open the show responses tab using a teacher/manager account.) Double check that the anonattempts->number match the Response number in the Show responses tab.

    Description

      It seems that anonattempts is always set to 0, but if the teacher access the Web version the WS will return a different value.

      It is like the web version is setting some additional information.

      Attachments

        Activity

          People

            jleyva Juan Leyva
            jleyva Juan Leyva
            Pau Ferrer Pau Ferrer
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Mark Nelson Mark Nelson
            Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10/Jul/17