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
Merge pull request #1650 from zhangsu/assign_grader_criteria_error

Fix error when toggling "assign criteria"