Skip to content
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

fix: compute normalized_metadata.enroll_by_date in enterprise-canonical fashion #909

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

iloveagent57
Copy link
Contributor

  • Take the seat upgrade_deadline_override into account, and prefer it over upgrade_deadline.
  • Prefer the course run's enrollment_end for exec ed 2u courses (over legacy registration_deadline).
  • Prefer the course run's enrollment_end for other course types when no advertised course run seat exists (or if the seat has no upgrade deadline).
    ENT-7472

Post-review

  • Squash commits into discrete sets of changes
  • Ensure that once the changes have been deployed to stage, prod is manually deployed

…al fashion

* Take the seat `upgrade_deadline_override` into account, and prefer it over `upgrade_deadline`.
* Prefer the course run's `enrollment_end` for exec ed 2u courses (over legacy `registration_deadline`).
* Prefer the course run's `enrollment_end` for other course types when no
advertised course run seat exists (or if the seat has no upgrade deadline).
ENT-7472
Comment on lines 130 to +136
if not self.advertised_course_run:
return None

if obj.is_exec_ed_2u_course:
return (
self.advertised_course_run.get('enrollment_end')
or self.additional_metadata.get('registration_deadline')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if we might have a course with no advertised run, but a populated additional_metadata section?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure - but in that case, maybe it's valid to assert that the enroll_by_date is null?

@iloveagent57 iloveagent57 merged commit fdb7d5b into master Aug 14, 2024
4 checks passed
@iloveagent57 iloveagent57 deleted the aed/enroll-by-date-correction branch August 14, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants