Skip to content

Instantly share code, notes, and snippets.

@mikebuchanon
Created May 13, 2013 21:17
Show Gist options
  • Save mikebuchanon/5571609 to your computer and use it in GitHub Desktop.
Save mikebuchanon/5571609 to your computer and use it in GitHub Desktop.
Turn off gradebook override for one user for one assignment in one course.
UPDATE mdl_grade_grades AS mgg
SET overridden=0
FROM mdl_grade_items mgi,
mdl_user mu,
mdl_course mc
WHERE mgi.id=mgg.itemid
AND mu.id=mgg.userid
AND mc.id=mgi.courseid
AND mgg.overridden != 0
AND mc.shortname='mdc03'
AND mu.username ilike 'test%'
AND mgi.itemname ILIKE 'week 01 assignment 1%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment