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];
    }
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];
    }
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 ] ; }
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
Get a course completion for a user