How do we fetch the name of each categoryid returned by gradereport_user_get_grade_items?

How do we fetch the name of each categoryid returned by gradereport_user_get_grade_items?

by Zadok Lindt -
Number of replies: 2

The gradereport_user_get_grade_items API call returns a categoryid field, but does not return the "full name" of the category. The name associated with the categoryid is found in the mdl_grade_categories table.

Is there an API call that would allow fetching the "full name" associated with the categories? It appears that there is not. But perhaps I have overlooked it?

See associated JIRA ticket https://tracker.moodle.org/browse/MDL-64399.

Average of ratings: -
In reply to Zadok Lindt

Re: How do we fetch the name of each categoryid returned by gradereport_user_get_grade_items?

by Pixi Flyer -

Hi Zadok

Have you possibly found anything around this as yet? I see something different in the index.php with regards to rendering, but i don't actually know which php files would need changing and it's not good to change core code, but i am just testing so it would be nice to know. I am also looking for the itemname for each category in the gradebook...  I am following you on MDL_tracker also..

Thank you 

Regards smile

In reply to Pixi Flyer

Re: How do we fetch the name of each categoryid returned by gradereport_user_get_grade_items?

by Pixi Flyer -
This is what i am looking for;

{"id":23,"itemname":"","itemtype":"category","itemmodule":null,"iteminstance":12,"itemnumber":null,"categoryid":null,"outcomeid":null,"scaleid":null,"locked":false,"weightraw":0.5,"weightformatted":"50.00 %","graderaw":0,"gradedatesubmitted":null,"gradedategraded":1570604344,"gradehiddenbydate":false,"gradeneedsupdate":false,"gradeishidden":true,"gradeislocked":false,"gradeisoverridden":false,"gradeformatted":"0.00","feedback":"","feedbackformat":0},