Project: moodle
Issue MDL-46678: Move sql in index.php to an api
Index.php has the following hardcoded sql {code} $sql = "SELECT u.id, ".$DB->sql_concat('u.lastname', "' '", 'u.firstname')." FROM {user} u JOIN {grade_grades_history} ggh ON ggh.usermodified = u.id JOIN {grade_items} gi ON gi.id = ggh.itemid WHERE gi.courseid = :courseid GROUP BY u.id ORDER BY u.lastname ASC, u.firstname ASC"; {code} It needs to be moved to an api.
Story points: 5