original_string: public static function has_records_for_framework($frameworkid) {
          global $DB;
  
          $sql = "SELECT 'x'
                    FROM {" . self::TABLE . "} uc
                    JOIN {" . competency::TABLE . "} c
                      ON uc.competencyid = c.id
                   WHERE c.competencyframeworkid = ?";
          $params = array($frameworkid);
  
          return $DB->record_exists_sql($sql, $params);
      }
code: public static function has_records_for_framework($frameworkid) {
          global $DB;
  
          $sql = "SELECT 'x'
                    FROM {" . self::TABLE . "} uc
                    JOIN {" . competency::TABLE . "} c
                      ON uc.competencyid = c.id
                   WHERE c.competencyframeworkid = ?";
          $params = array($frameworkid);
  
          return $DB->record_exists_sql($sql, $params);
      }
code_tokens: public static function has_records_for_framework ( $ frameworkid ) { global $ DB ; $ sql = "SELECT 'x'
                    FROM {" . self :: TABLE . "} uc
                    JOIN {" . competency :: TABLE . "} c
                      ON uc.competencyid = c.id
                   WHERE c.competencyframeworkid = ?" ; $ params = array ( $ frameworkid ) ; return $ DB -> record_exists_sql ( $ sql , $ params ) ; }
docstring: Checks if any of the competencies of a framework has a user competency record.
  
  @param  int $frameworkid The competency framework ID.
  @return boolean
docstring_tokens: Checks if any of the competencies of a framework has a user competency record .