* feat: [AA-950] Productize Streak Discount
- Change STREAK_DISCOUNT_EXPERIMENT_FLAG to STREAK_DISCOUNT_FLAG
- Remove references to "experiment" and ticket AA-759
- Made flag names more consistent
- Move segment event from get_bucket to streak calculation
- Streak discount event edx.bi.course.streak_discount_enabled is sent when celebrations are calculated
- Convert LegacyWaffleFlags to WaffleFlags
Co-authored-by: cdeery <cdeery@edx.edu>
* Add unsubscribe_token uuid field to CourseGoal model
* Add endpoint to unsubcribe from just a token (no login needed)
* Add admin page for the course_goals djangoapp
* Add get_course_overview_or_404 utility method
* Clean up URL handling in course_home_api
AA-907
feat: reimagine certificate display settings
The course settings `certificate_available_date` (CAD) and
`certificates_display_behavior` (CDB) were previously
acting indedependantly of one another. They now work in
tandem. This change:
- limits CDB to a dropdown
- removes "early_with_info" and adds "end_with_date"
- only takes CAD into account if "end_with_date" is selected
- Moves CDB to the main course schedule settings page
- updates CourseOverview model and CourseDetails objects to
validate these fields and choose sane defaults if they aren't
expected values
This work was previously done in bd9e7dd (complete with bugs), so this
version is toggleable via the ENABLE_V2_CERT_DISPLAY_SETTINGS setting
Previously, effort estimation was disabled by default and gated by
an experiment flag (effort_estimation.location).
Now, it is enabled by default and courses can opt-out by adding
course waffle override flags (effort_estimation.disabled).
* feat: Refactor out non REST portions of enrollment api from enrollment POST method
For use with edx-enterprise to avoid making REST calls for bulk enrollment and other use cases
ENT-4746
* feat: Remove unused test
Testing is covered by test_views
* refactor: isort
isort fixes
* docs: ADR for why this change
ADR
ENT-4746
* test: Fix test failure by restoring course_id to correct object
* test: Test fix
* refactor: pylint fixes
* refactor: raise from to avoid pylint error
* refactor: Start to work toward a util in enterprise_support instead of refactoring this endpoint
* feat: Add util function in enterprise_support to eventually handle enrollment, only used by bulk enrollment for now
* feat: One more revised idea, this time low risk in edx platform and also helps address enterprise specific flow. testing pending
* feat: syntax and unused constant
* feat: Restore view and add new util function to use in edx-enterprise instead
* feat: breakpoint
* unused import
* feat: don't fail on existing enrollment
* docs: ADR update
* docs: docstring minor update
* test: unit test add_user_to_course_cohort
* refactor: imports
* feat: remove unused error classes
* refactor: lint
* test: Test cases
* test: Two more tests for negative cases
* feat: missing init.py file
* test: Fix tests to use correct user mock
* unused import
* refactor: Review feedback, test fixes, needs rebase now
* feat: rebase changes
* feat: keep audit_log with similar logic as in the view
* refactor: Review feedback, test constant usage
We ignore the missed_deadlines because this endpoint is used in the Learning MFE for
learners who have remaining attempts on a problem and reset their due dates in order to
submit additional attempts. This can apply for 'completed' (submitted) content that would
not be marked as past_due
The course settings `certificate_available_date` (CAD) and
`certificates_display_behavior` (CDB) were previously acting indedependantly
of one another. They now work in tandem. This change:
- limits CDB to a dropdown
- removes "early_with_info" and adds "end_with_date"
- only takes CAD into account if "end_with_date" is selected
- Moves CDB to the main course schedule settings page
- updates CourseOverview to validate these fields and choose sane
defaults if they aren't expected values
Certificates will now show under the following circumstances:
"Immediately upon passing"
certificate_availability_date = null
certificates_display_behavior = "early_no_info"
"End date of course"
certificate_availability_date = null
certificates_display_behavior = "end"
"A date after the course end date"
certificate_availability_date = <date>
certificates_display_behavior = "end_with_date"
[MICROBA-1307]
Before this change a user would not be auto refunded if they had a
certificate in a course with any status. This had unintended
consequences. This change updates the logic to only block auto refund
for statuses that we do not want to refund on such as downloadable.
The Referrer header from the MFE hosted on a different origin does not
include the path, so make sure to ignore the path portion of the
learning MFE base URL when determining whether the request is coming
from the new MFE or the old courseware view.
Code in ./common/lib/xmodule/xmodule should
be imported as `from xmodule`, since `xmodule`
is a locally-installed package.
This is weird, but as long as it is the case,
we should be consistent.
(In BOM-2584, I propose moving the files to
./xmodule, which would quell this confusion.)
Even if a learner could technically continue to attempt a problem,
if they didn't have any missed deadlines in the course, we would
never display the ability to shift dates. This corrects that to
not require a missed deadline. The banner on the unit is still gated
by needing a missed deadline.
For self-paced courses, we have decided to switch to showing the end
date as long as it is within 365 days rather than the expected
duration of the course.
Also removes the remove_course_goal method as it is no longer
used anywhere and removes the functionality of deleting course goals
if a user unenrolls. Adds in fields for eventing to make them more
useful.
We discovered a subsection that contained a unit without any content
inside, but because of our logic requiring children, it would never be
marked complete (meaning the subsection, section, and course could thus
never be marked complete). This fixes that by removing the children
check from setting completion, but first gating that code path on the
xblock being an aggregator (to prevent leaves from marking as true
simply because there are no children).
Test fixes include adding a test for the empty aggregator case as
well as some changes to not have an entire course marked complete
because they are all empty aggregators.
In DE-1822, we believed we needed to switch to start_date and end_date.
It was determined this was not the case, so this updates the comment
to ensure future users use the correct fields (start and end) and
updates any pieces of code that may have used start_date or end_date.
This djangoapp was designed for talking to sailthru, in a fairly
edx.org-specific way. Nowadays, edx.org doesn't need this code and
if other installations do, it's better off as a more distinct
plugin anyway, rather than direct support in the platform.
I've moved the one signal that was still useful (calling
segment.identify() whenever user fields change) into user_authn.
And I've left the EmailMarketingConfiguration model alone for now,
but will remove that shortly. Nothing uses it as of this commit.
AA-607
DEPR-139