original_string: public static function can_comment_user($userid) {
          global $USER;
  
          $capabilities = array('moodle/competency:usercompetencycomment');
          if ($USER->id == $userid) {
              $capabilities[] = 'moodle/competency:usercompetencycommentown';
          }
  
          if (has_any_capability($capabilities, context_user::instance($userid))) {
              return true;
          }
  
          return false;
      }
code: public static function can_comment_user($userid) {
          global $USER;
  
          $capabilities = array('moodle/competency:usercompetencycomment');
          if ($USER->id == $userid) {
              $capabilities[] = 'moodle/competency:usercompetencycommentown';
          }
  
          if (has_any_capability($capabilities, context_user::instance($userid))) {
              return true;
          }
  
          return false;
      }
code_tokens: public static function can_comment_user ( $ userid ) { global $ USER ; $ capabilities = array ( 'moodle/competency:usercompetencycomment' ) ; if ( $ USER -> id == $ userid ) { $ capabilities [ ] = 'moodle/competency:usercompetencycommentown' ; } if ( has_any_capability ( $ capabilities , context_user :: instance ( $ userid ) ) ) { return true ; } return false ; }
docstring: Can the current user comment on a user's competency?
  
  @param int $userid The user ID the competency belongs to.
  @return bool
docstring_tokens: Can the current user comment on a user s competency?