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.