original_string: public function get_completion($user_id, $criteriatype) {
          $completions = $this->get_completions($user_id, $criteriatype);
  
          if (empty($completions)) {
              return false;
          } elseif (count($completions) > 1) {
              print_error('multipleselfcompletioncriteria', 'completion');
          }
  
          return $completions[0];
      }
code: public function get_completion($user_id, $criteriatype) {
          $completions = $this->get_completions($user_id, $criteriatype);
  
          if (empty($completions)) {
              return false;
          } elseif (count($completions) > 1) {
              print_error('multipleselfcompletioncriteria', 'completion');
          }
  
          return $completions[0];
      }
code_tokens: public function get_completion ( $ user_id , $ criteriatype ) { $ completions = $ this -> get_completions ( $ user_id , $ criteriatype ) ; if ( empty ( $ completions ) ) { return false ; } elseif ( count ( $ completions ) > 1 ) { print_error ( 'multipleselfcompletioncriteria' , 'completion' ) ; } return $ completions [ 0 ] ; }
docstring: Get a course completion for a user
  
  @param int $user_id User id
  @param int $criteriatype Specific criteria type to return
  @return bool|completion_criteria_completion returns false on fail
docstring_tokens: Get a course completion for a user