You can use all_courses_values to list all courses the user has access to. Each element is a Course object. The all_courses_values list 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

{% all_courses_values.first %}

Scope

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

Example

{% for course in all_courses_values %}
  - {{ course.name }}
{% endfor %}
- Cooking 101
- Cooking Master