Skip to main content
You can use all_courses to access a course by its ID. This returns the Course object for the specified course. If the course isn’t found, then null is returned. The all_courses object is decided on runtime, so it’s not a static object. It’s different for each user, based on what group they belong to, if they’ve classes unlocked now, etc.

Syntax

Scope

It’s accessible globally, in any template, section or block.

Example