@@ -2,7 +2,17 @@
namespace gradeimporter;
+
+use context_user;
class feedback {
+ public static function is_capability() {
+ global $USER;
+ $usercontext = context_user::instance($USER->id);
+ return has_capability('moodle/course:update', $usercontext);
+ }
public static function get_comments() {
global $DB, $USER, $CFG;
$tp = $CFG->prefix; // gets moodle tables prefix, not everyone uses mdl_