original_string: public function check_permissions() {
          $context = context_module::instance($this->cm->id);
          return has_capability('mod/glossary:exportentry', $context)
              || ($this->entry->userid == $this->user->id && has_capability('mod/glossary:exportownentry', $context));
      }
code: public function check_permissions() {
          $context = context_module::instance($this->cm->id);
          return has_capability('mod/glossary:exportentry', $context)
              || ($this->entry->userid == $this->user->id && has_capability('mod/glossary:exportownentry', $context));
      }
code_tokens: public function check_permissions ( ) { $ context = context_module :: instance ( $ this -> cm -> id ) ; return has_capability ( 'mod/glossary:exportentry' , $ context ) || ( $ this -> entry -> userid == $ this -> user -> id && has_capability ( 'mod/glossary:exportownentry' , $ context ) ) ; }
docstring: make sure that the current user is allowed to do this
  
  @return boolean
docstring_tokens: make sure that the current user is allowed to do this