Copy paste from the code:
if( isset($formats[$course->format]) ? $formats[$course->format] : !empty($formats['all'])) {
// Allowed
}
// Translation: if the course format is explicitly accepted/rejected, use
// that setting. Otherwise, fallback to the 'all' format. The empty() test
// uses the trick that empty() fails if 'all' is either !isset() or false.
Jon
Blocks
New Course Formats and Blocks
This discussion has been locked so you can no longer reply to it.