There's general documentation about creating a new course format on the developer wiki: https://docs.moodle.org/dev/Course_formats
Other than that, the best examples are probably other course format plugins.
There's general documentation about creating a new course format on the developer wiki: https://docs.moodle.org/dev/Course_formats
Other than that, the best examples are probably other course format plugins.