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;
    }
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;
    }
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 ; }
Get a the course settings for a single course.

@param int $courseid The course id
@return course_competency_settings
Get a the course settings for a single course .