Уберите GROUP BY, оберните ваш запрос еще одним допишите условие на MAX( ggh.timemodified) и группируйте уже эти данные, т.е примерно так:
select * from (
SELECT u.firstname AS 'First' , u.lastname AS 'Last',
c.fullname AS 'Course',
cc.name AS 'Category',
gi.itemname AS 'Mark name',
ROUND (ggh.finalgrade) AS Grade,
ggh.timemodified
FROM prefix_course AS c
JOIN prefix_context AS ctx ON c.id = ctx.instanceid
JOIN prefix_role_assignments AS ra ON ra.contextid = ctx.id
JOIN prefix_user AS u ON u.id = ra.userid
JOIN prefix_grade_grades_history AS ggh ON ggh.userid = u.id
JOIN prefix_grade_items AS gi ON gi.id = ggh.itemid AND gi.courseid = c.id
JOIN prefix_course_categories AS cc ON cc.id = c.category
WHERE ggh.source LIKE '%attendance%' AND ggh.finalgrade<85 AND ggh.timemodified<=1420786524
) as t
where t.`timemodified` = max(t.`timemodified`)
GROUP BY t.`First`, t.`Last`, t.`Course`, t.`Category`, t.`Mark name`