-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds management command to populate course cohorts for a course #269
base: develop-juniper
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added my feedback.
openedx/features/edly/management/commands/populate_cohorts_for_course.py
Outdated
Show resolved
Hide resolved
logger.info('Number of cohorts: %s', cohorts.count()) | ||
logger.info('Cohorts: %s', ', '.join(cohorts.values_list('name', flat=True))) | ||
for cohort in cohorts: | ||
CourseCohort.create(course_user_group=cohort) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we have some cohort groups already created? Maybe we need to use get/create
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zubair-arbi that is already handled inside this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool.
21d3414
to
2ae204a
Compare
Description
This PR adds a management command that populates course cohorts for a course whose cohorts are missing. Some courses on cliffx and theology sites were presenting a broken cohorts page on the instructor dashboard. After running this command against such a course, the cohorts page should be fixed.
How to run: