How to retrieve assignments using advanced grading

How to retrieve assignments using advanced grading

by Marcus Green -
Number of replies: 1
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I want a query or function call to retrieve all assignments (or all assignmnets on a course) using a particular advanced grading method, e.g. get a list of all assignments that use rubrics.

It is driving me nuts as I can create them, see the various places where the data is used but not tie the grading method back to the actual assignment. Any ideas?

 

Average of ratings: -
In reply to Marcus Green

Re: How to retrieve assignments using advanced grading

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
The grading_manager class defined in grade/grading/lib.php is the best place to look at. You will probably need to fetch data from {grading_areas} and couple of joined tables. You will notice that advanced grading forms attach to so called "areas" identified by component+context+itemid+areaname rather than activity module id.