ubc / iPeer

Peer Evaluation System
http://ipeer.ctlt.ubc.ca
Other
17 stars 18 forks source link

Grade sync does not import users if they already exist in the system #594

Closed wynnset closed 6 years ago

wynnset commented 6 years ago

As reported by Tim Kato, this is an unexpected behavior that needs to be fixed.

Steps to reproduce:

  1. Access a course on iPeer (or create one) that is linked with a Canvas course and ensure some (or all) of the users from the Canvas course are also in the iPeer course.
  2. Try to export the grades to Canvas.
  3. You should get an error

Fix required:

kitsook commented 6 years ago

The grade sync issue is caused by iPeer failed to (1) create Canvas assignment, and (2) post grades.

With fd07a32, when calling POST methods on Canvas APIs, parameters need to be in nested JSON format.

As for the group import issue, there was a typo in the array key. Should be updated_users instead of updated_students: https://github.com/ubc/iPeer/blob/1b3dd75e2bd5d65a4324167ac93d8f28feb02373/app/controllers/groups_controller.php#L1134-L1136