-
Notifications
You must be signed in to change notification settings - Fork 2
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
Catalog card should show Start Anytime if the course is archived #2359
Conversation
01d1bed
to
d026e62
Compare
68c11dc
to
d62abcd
Compare
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.
Not sure what the verdict is on enrollment_end date - I asked a question below. Once we get that conclusion, we can approve
courses/serializers/v1/base.py
Outdated
def get_is_archived(self, instance): | ||
return ( | ||
instance.is_enrollable | ||
and instance.enrollment_end is None |
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.
In the get_archived_courseruns
function, we defined enrollment end as able to be null or future. Here we're ONLY defining it as None. Is this the case? Should the other function be updated? Should this one?
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.
yep, that's a mistake.
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.
that condition is not needed there at all.
for more information, see https://pre-commit.ci
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.
Good to go
What are the relevant tickets?
Fix #2357
Description (What does it do?)
This PR changes the front end to use a single source of is_archived and makes the catalog display "Start Anytime" even when the course is not `is_self_paced=True'
Is archived is used in many places in the frontend, but it's value is not dynamic, so it's better to compute it in the backend.
Screenshots (if appropriate):
How can this be tested?