hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Incorrect behaviour with "Scale"-type grading in Moodle #1167

Open seanh opened 4 years ago

seanh commented 4 years ago
  1. Create or edit an assignment in Moodle
  2. Set the grade type to Scale
  3. Our app just asks for a grade from 0-10 as usual and if you enter a grade at first it appears to work. But the number that actually appears in the gradebook, and will appear in our app the next time you reload it, is -10. It seems to always be -10, no matter what grade was entered

Screenshot from 2019-11-13 19-11-36

seanh commented 4 years ago

I did a bit more investigation into Moodle today: it definitely looks to me like we have no way of telling, from the LTI launch params, whether the assignment's grading type has been set to Point, Scale or None. The launch params are exactly the same in all cases.

I also looked at the Outcomes Service's XML responses both when we get and set the grades: there's also no indication of Point/Scale/None grade type there. The XML responses look exactly the same in all cases. When the grade type is set to None Moodle sends us a 200 OK "success" response that looks exactly the same as the success response for Point-type, but in fact Moodle has not saved the grade we sent.

I suspect it may be possible to find out the assignment's grading type by calling the Moodle API (and similarly the Blackboard API and Brightspace API's for their grading types) but we have no support for calling these APIs yet (a lot of authentication and error handling stuff would need to be implemented for them).

So basically, these bugs where teachers can change the grading "type" and break our app: I suspect they can probably be fixed but:

  1. It will require adding support for the Moodle, Brightspace and Blackboard APIs (and other LMS APIs) which will be a chunk of work

  2. It will have to be fixed separately for each LMS

I'll add this note to the GitHub issues for this