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

Workshop WS get_assessment_form_definition is not returning enough data for Accumulative grading

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with a workshop
      2. Configure the workshop to use "Accumulative grading" as Grading strategy (in the module settings)
      3. Enrol a couple users as student (student2 and student1) and one user as teacher
      4. In the module main page, in the Setup phase of the table describing all the phases click on "Edit assessment form"
      5. Configure a couple of Aspects to use an existing scale (via the "Best possible grade / Scale to use " setting), and leave a couple of aspects more using Points
      6. As teacher, move the workshop to the submission phase
      7. As the two students, do a submission (total of 2 submissions, one per sstudent).
      8. As teacher, move the workshop to the assessment phase, allocating the assessment of the submissions: student2 will assess student1 and vice versa.
      9. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      10. Create a Token in the mobile app service for one of the students and the teacher:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      11. Next, you can do a CURL REST call simulating a WS client with the student.
        • You need to replace the wstoken with the student1 one, assessmentid with the id of the assessment assigned to this user during the allocation (the id from table workshop_assessments where the reviewerid is the student1 id)

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

      12. Now check that you receive in the "dimensionsinfo" field information about the aspects you created when editing the assessment form:
        • You should see id, min, max and weight in all the aspects received and also the scale (comma separated) in those aspects using scales
      Show
      Create a course with a workshop Configure the workshop to use "Accumulative grading" as Grading strategy (in the module settings) Enrol a couple users as student (student2 and student1) and one user as teacher In the module main page, in the Setup phase of the table describing all the phases click on "Edit assessment form" Configure a couple of Aspects to use an existing scale (via the "Best possible grade / Scale to use " setting), and leave a couple of aspects more using Points As teacher, move the workshop to the submission phase As the two students, do a submission (total of 2 submissions, one per sstudent). As teacher, move the workshop to the assessment phase, allocating the assessment of the submissions: student2 will assess student1 and vice versa. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for one of the students and the teacher: 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 with the student1 one, assessmentid with the id of the assessment assigned to this user during the allocation (the id from table workshop_assessments where the reviewerid is the student1 id) curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assessmentid=3&wsfunction=mod_workshop_get_assessment_form_definition&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Now check that you receive in the "dimensionsinfo" field information about the aspects you created when editing the assessment form: You should see id, min, max and weight in all the aspects received and also the scale (comma separated) in those aspects using scales
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60378-master

      Description

      When developing the app client Pau Ferrer has noticed that we are not retrieving the scale used (we get the id, but we need the scale elements).

      We should:

      • Extend the WS to allow plugins to return additional data via a callback (get_config_for_external()) like we did for database or assignment
      • Or create a new generic WS to return scales information based on id "core_grades_get_scale" (the problem here is that there is no way to validate if the user can see the scale or not because they are no-context/permission based).

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

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