How to create a Programs in discovery?

Unfortunately, this is a known bug in course-discovery(Link) in ulmo. Its fix PR was merged but later reverted as it didn’t work.
Meanwhile you can use discovery shell to add courses to the program, I am attaching an example shell script to add distinct courses to the program.

tutor local run discovery ./manage.py shell -c "
from course_discovery.apps.course_metadata.models import Program, Course
p=Program.objects.get(id=1)
qs=Course.objects.filter(
  partner=p.partner,
  draft=False,
  course_runs__status='published',
  course_runs__draft=False,
  course_runs__hidden=False,
).distinct()
p.courses.set(qs)
print('Attached:', p.courses.count())
"
1 Like