Closed nthetrack closed 6 months ago
ChatGPT is doing some bad practices by directly talking to the assign database tables in the module that is not related. If it was via the grading API instead that would be better. I suggest however creating another element and then you are free to do what you want and you can use the above example code as a starting point.
Hi, This plugin is great. It would be even greater if as well as Teacher name, you could select the teacher that graded that student in a specific activity in that course. e.g.:
Qualification 1. Grade A. Graded by: Teacher 1 Qualification 2. Grade C. Graded by: Teacher 2
ChatGPT suggested this: <?php function customcert_assignment_graderid($certificate, $course, $cm, $customcert, $userid) { // Get the submission record for the user and assignment $submission = $DB->get_record('assign_submission', array('assignment' => $cm->instance, 'userid' => $userid));
} ?>