No setattributes when editing not allowed

Do not fire setAttributes when `editing-allowed` is not set.

`editing-allowed` is only set when in a completely learner-only course. This is to not potentially break existing behaviour when authoring, even though that behaviour may be erroneous.

Fixes e.g. the Markdown gadget giving 403 errors in the console.
Sweet, better! Done in d68589133a882d33c1be6265b360ce8b212e03d9 (just committed right to master).