Fix error when toggling "assign criteria"

The current JavaScript throws an error when clicking on the checkbox
"Assign Graders to Criteria" because it is trying to use an undefined
variable `element`, which should really be `this`.

Tested:
- local server