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
Replace readAttribute with getAttribute

`readAttribute` is a function monkey-patched by Prototype, so it won't
be available after removing Prototype. The standard function is
`getAttribute`.

Tested:
- local server
Replace dataset and ensure parseInt have radices
Merge pull request #1651 from zhangsu/readAttribute

Replace readAttribute with getAttribute
Merge pull request #1652 from arkon/js-dataset

Replace dataset and ensure parseInt have radices
Merge pull request #1650 from zhangsu/assign_grader_criteria_error

Fix error when toggling "assign criteria"