mitodl / mitx-grading-library

The MITx Grading Library, a python grading library for edX
https://edge.edx.org/courses/course-v1:MITx+grading-library+examples/
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Infer expect #151

Closed ChristopherChudzicki closed 6 years ago

ChristopherChudzicki commented 6 years ago

This addresses #150 for ItemGraders only. Implementing this for ItemGrader only was very easy because ItemGraders have a strictly specified answers schema.

I suspect we could do something that works in general, but I would need to think a bit more about it.

I wrote this fairly quickly in case you wanted it for today's workshop. I think it should be safe to merge, but feel free to reject if you want a more general solution =).

jolyonb commented 6 years ago

This is exactly what I was after -- I'm a bit surprised it was this simple though! I found that I've been copying code a lot and just changing the "answers" tag, which was getting really annoying. Also, copy paste errors where I put the answer in the expect but forgot to change the answers tag... We should update documentation to reflect this too, but I'm happy with this for the moment.

ChristopherChudzicki commented 6 years ago

I found that I've been copying code a lot and just changing the "answers" tag, which was getting really annoying

Yeah, I can see that. For all the work I've done on this library, I've probably only written a dozen problems outside the demo course, so I forget about workflow issues sometimes 😦

We should update documentation to reflect this too

Yes!