original_string: public function get_criteria() {
  
          if (!$this->_criteria) {
              global $DB;
  
              $params = array(
                  'id'    => $this->criteriaid
              );
  
              $record = $DB->get_record('course_completion_criteria', $params);
  
              $this->attach_criteria(completion_criteria::factory((array) $record));
          }
  
          return $this->_criteria;
      }
code: public function get_criteria() {
  
          if (!$this->_criteria) {
              global $DB;
  
              $params = array(
                  'id'    => $this->criteriaid
              );
  
              $record = $DB->get_record('course_completion_criteria', $params);
  
              $this->attach_criteria(completion_criteria::factory((array) $record));
          }
  
          return $this->_criteria;
      }
code_tokens: public function get_criteria ( ) { if ( ! $ this -> _criteria ) { global $ DB ; $ params = array ( 'id' => $ this -> criteriaid ) ; $ record = $ DB -> get_record ( 'course_completion_criteria' , $ params ) ; $ this -> attach_criteria ( completion_criteria :: factory ( ( array ) $ record ) ) ; } return $ this -> _criteria ; }
docstring: Return the associated criteria with this completion
  If nothing attached, load from the db
  
  @return completion_criteria
docstring_tokens: Return the associated criteria with this completion If nothing attached load from the db