original_string: public static function get_by_courseid($courseid) {
          global $DB;
  
          $params = array(
              'courseid' => $courseid
          );
  
          $settings = new static(null, (object) $params);
          if ($record = $DB->get_record(self::TABLE, $params)) {
              $settings->from_record($record);
          }
  
          return $settings;
      }
code: public static function get_by_courseid($courseid) {
          global $DB;
  
          $params = array(
              'courseid' => $courseid
          );
  
          $settings = new static(null, (object) $params);
          if ($record = $DB->get_record(self::TABLE, $params)) {
              $settings->from_record($record);
          }
  
          return $settings;
      }
code_tokens: public static function get_by_courseid ( $ courseid ) { global $ DB ; $ params = array ( 'courseid' => $ courseid ) ; $ settings = new static ( null , ( object ) $ params ) ; if ( $ record = $ DB -> get_record ( self :: TABLE , $ params ) ) { $ settings -> from_record ( $ record ) ; } return $ settings ; }
docstring: Get a the course settings for a single course.
  
  @param int $courseid The course id
  @return course_competency_settings
docstring_tokens: Get a the course settings for a single course .