Help Creating New User Report in Gradebook

Help Creating New User Report in Gradebook

by Mark Haystead -
Number of replies: 0

I'm currently the primary administrator for a small number of courses on a server running Moodle 3.2.1 (Build: 20170109).

I found a resource that provides a tutorial on how to create a new report for the gradebook (https://docs.moodle.org/dev/Gradebook_reports). 

Currently, as a grader, viewing a student's user report in a course displays links back to the assignment activities for the course.

Activity Links

For our purposes, I need to create a version of the report that displays links back to the student's submissions instead of the assignment activity page. Doing so would reduce frustrations experienced by some in having to open the grader interface and search for the student. I've tried searching the various forms and read through several posts. Perhaps I'm not thinking of the most useful search terms to narrow my search correctly.

Reading through moodle/grade/report/overview/lib.php I found code that links back to the student's user reports for each enrolled course.

$courselink = html_writer::link(new moodle_url('/grade/report/user/index.php', array('id' => $course->id,'userid' => $this->user->id)), $coursename);

Alas, reading through the php files in moodle/grade/report/user, I haven't been able to find a similar link. 

I also thought about using the configurable reports block plugin to achieve the same modified user report, but so far I haven't found an example of SQL syntax I can use to retrieve gradebook data for a single student in the current course being viewed. At this point we don't have a need for other configurable reports, so I'm thinking creating a new version of the user report might be the preferred solution for us.

Does anyone know where the user report activity links are created in the php files?