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

New Web Service mod_workshop_get_grades

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.4
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with a workshop with Grading strategy set to comments
      2. Enrol a couple users as student (student2 and student1) and one user as teacher
      3. Edit the workshop assessment form creating only two evaluable comments
      4. As teacher, move the workshop to the submission phase (doing all the required configuration steps indicated by the activity)
      5. As the two students, do a submission (total of 2 submissions, one per sstudent).
      6. As teacher, in the submission phase, allocate the assessment of the submissions: student2 will assess student1 and vice versa.
      7. Move the workshop to the assessment phase,
      8. As student2 do the assessment of the student1 and vice versa
      9. Now, as teacher, switch to the Grading evaluation phase for assigning the final grades and then switch to the Closed phase
      10. As student1 and student2 access to the activity in Moodle web and check that you see your Grade for submission and grade for assessment under the "Your grades" section
      11. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      12. Create a Token in the mobile app service for student1 and the teacher:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      13. Next, you can do a CURL REST call simulating a WS client.
        • You need to replace the wstoken with the student1 one, workshopid with the id of the workshop
        • The workshipid is the id value for the record in the workshop table in the database

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

      14. Check that you receive the grades information and that it matches with the information in Moodle web
      15. Now replace the wstoken with the teacher one and add a new parameter userid pointing to student1
        • You can get the student's id by viewing their profile in Moodle (it will be in the URL params) or by looking at the record in the user table
      16. Check that you receive the student1 grades
      Show
      Create a course with a workshop with Grading strategy set to comments Enrol a couple users as student (student2 and student1) and one user as teacher Edit the workshop assessment form creating only two evaluable comments As teacher, move the workshop to the submission phase (doing all the required configuration steps indicated by the activity) As the two students, do a submission (total of 2 submissions, one per sstudent). As teacher, in the submission phase, allocate the assessment of the submissions: student2 will assess student1 and vice versa. Move the workshop to the assessment phase, As student2 do the assessment of the student1 and vice versa Now, as teacher, switch to the Grading evaluation phase for assigning the final grades and then switch to the Closed phase As student1 and student2 access to the activity in Moodle web and check that you see your Grade for submission and grade for assessment under the "Your grades" section Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for student1 and the teacher: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client. You need to replace the wstoken with the student1 one, workshopid with the id of the workshop The workshipid is the id value for the record in the workshop table in the database curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'workshopid=10&wsfunction=mod_workshop_get_grades&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Check that you receive the grades information and that it matches with the information in Moodle web Now replace the wstoken with the teacher one and add a new parameter userid pointing to student1 You can get the student's id by viewing their profile in Moodle (it will be in the URL params) or by looking at the record in the user table Check that you receive the student1 grades
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59251-master

      Description

      To return the assessment and submission grade for the given user.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17