MDL-19488 - allow the creation of a "Public" feedback
[moodle.git] / mod / feedback / edit.php
index 4b7299e..c0bc995 100644 (file)
@@ -99,7 +99,7 @@ if(isset($create_template_formdata->savetemplate) && $create_template_formdata->
         $savereturn = 'notsaved_name';
     }else {
         //if the feedback is located on the frontpage then templates can be public
-        if(SITEID === $course->id && has_capability('mod/feedback:createpublictemplate', $context)) {
+        if(has_capability('mod/feedback:createpublictemplate', get_system_context())) {
             $create_template_formdata->ispublic = isset($create_template_formdata->ispublic) ? 1 : 0;
         }else {
             $create_template_formdata->ispublic = 0;