}
function applicable_formats() {
- //TODO: add 'my' only if user has role assigned in system or any course category context
- return array('site' => true, 'admin' => true, 'my' => true);
+ if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
+ return array('site' => true, 'admin' => true, 'my' => true);
+ } else {
+ return array('site' => true, 'admin' => true);
+ }
}
function preferred_width() {