Commit Graph

1227 Commits

Author SHA1 Message Date
Chris Deery
8d682cb447 feat: [AA-950] Productize Streak Discount (#28582)
* 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>
2021-09-01 10:55:32 -04:00
Phillip Shiu
9dc20e1432 fix: add accent to e in resumé in html files
Fixes: REV-2214
2021-08-25 13:33:06 -04:00
Michael Terry
2176dd7890 feat: allow unsubcribing from a course goal with just a token
* 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
2021-08-23 12:07:32 -04:00
Michael Terry
012ffc3969 Merge pull request #28462 from edx/mikix/banner-style
fix: modernize look of in-xblock shift-dates banner
2021-08-16 09:51:53 -04:00
Michael Terry
033497d1d7 fix: modernize look of in-xblock shift-dates banner
Specifically, use our standard warning-banner colors and add a
drop shadow. Also, updates the text to match the text used
elsewhere.

AA-835
2021-08-16 09:18:05 -04:00
Bianca Severino
d0da23058d chore: set runtime service for name affirmation
If special exams are enabled, set a runtime service for Name Affirmation
in order to enable it for use in proctored exam attempts.
2021-08-09 11:38:26 -04:00
Matthew Piatetsky
5db6cbb795 Merge pull request #28320 from edx/AA-902
feat: update course goals with new fields and a waffle flag to toggle the new behavior
2021-08-06 09:13:22 -04:00
Matthew Piatetsky
8183a5ae64 address comments 2021-08-05 21:45:58 -04:00
Jawayria
542da2ef6a Merge pull request #28356 from edx/jawayria/openedx-codemod
chore: Executed codemods on openedx module
2021-08-04 20:30:08 +05:00
Jawayria
27b52c4279 chore: Executed codemods on openedx module 2021-08-02 21:06:32 +05:00
Matt Tuchfarber
622d56026c Certificate Display Settings revamp (round 2) (#28286)
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
2021-08-02 11:30:15 -04:00
Michael Terry
61b9a523e7 Merge pull request #28290 from edx/mikix/effort-cleanup
feat: enable effort estimation feature by default
2021-07-30 11:46:57 -04:00
Awais Qureshi
82ef28b43f chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-29 18:24:39 +05:00
Michael Terry
721282233e feat: enable effort estimation feature by default
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).
2021-07-27 13:13:32 -04:00
Binod Pant
33cdf634b4 refactor: Extract core functionality of enrollment api in a python api to avoid REST calls from edx-enterprise (#28202)
* 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
2021-07-21 16:59:45 -04:00
Michael Terry
e81fcbf5d7 Merge pull request #27879 from open-craft/mtyaka/FAL-1938-support-learning-mfe-on-subpath
Support Learning MFE hosted on subpath.
2021-07-20 13:16:38 -04:00
Dillon Dumesnil
33ccd05df0 Merge pull request #28195 from edx/ddumesnil/update-shift-dates-logic-aa-856
fix: AA-856: update shift dates logic to ignore missed_deadlines
2021-07-16 05:56:00 -07:00
Dillon Dumesnil
3863bdb93b fix: update shift dates logic to ignore missed_deadlines
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
2021-07-15 14:20:18 -06:00
Kshitij Sobti
666a50d298 feat: allow optionally passing PII in course LTI tab (#26982) 2021-07-09 18:13:42 +05:00
Matt Tuchfarber
63cb6a97ff Revert "feat: Reimagine certificate_availability_date and certificates_display_behavior" 2021-07-07 16:53:05 -04:00
Matt Tuchfarber
2a7106acfb 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 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"
2021-07-06 16:45:23 -04:00
Thomas Tracy
986f52faab [feat] Add has_scheduled_content to outline API
The outline API that the learning MFE needs to know if a course has
upcomming content for a new alert.
2021-07-06 11:33:53 -04:00
Albert (AJ) St. Aubin
b23169560f fix: Corrects issue with refund logic and certificates.
[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.
2021-06-28 09:20:00 -04:00
Sofia Yoon
e645d11bba feat: AA-797 switch course home flag to opt out by replacing it with a course home use legacy frontend flag 2021-06-16 10:04:49 -04:00
Matjaz Gregoric
fdf600a527 fix: support Learning MFE hosted on subpath.
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.
2021-06-13 10:32:46 +02:00
Sofia Yoon
87e3ce69b6 refactor: AA-796 remove outline and dates tabs flags 2021-06-08 15:44:19 -04:00
Kyle McCormick
d42b0c401d refactor: normalize xmodule imports
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.)
2021-06-07 16:36:38 -04:00
Matthew Piatetsky
f89ae754e4 Revert "feat: add debugging logs to help figure out why experiment isn't activating in production" 2021-06-01 15:10:14 -04:00
Matthew Piatetsky
98eb516745 feat: add debugging logs to help figure out why experiment isn't activating in production 2021-06-01 09:10:40 -04:00
Adam Stankiewicz
31f66a4f2c feat: enterprise learner portal access modal (#27736)
* feat: enterprise learner portal access modal

* fix: quality

* fix: remove log.info
2021-05-27 15:31:27 -04:00
Diane Kaplan
c3a22eb6e5 feat: remove course_home_welcome upsell link (REV-2131) (#27603) 2021-05-26 15:13:09 -04:00
Diane Kaplan
5ac710995d feat: remove course_home_course_tools upsell link (REV-2131) 2021-05-26 12:02:18 -04:00
Dillon Dumesnil
1bc3430ba9 Merge pull request #27713 from edx/ddumesnil/update-shift-dates-logic-aa-767
fix: Update the shift dates logic for problems
2021-05-25 07:21:22 -07:00
Dillon Dumesnil
4230f1fb39 fix: Update the shift dates logic for problems
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.
2021-05-24 17:00:43 -04:00
Sameen Fatima
0be941b224 ENT-4095: Handle coupon expiration date scenario in LMS (#27704) 2021-05-24 14:50:34 +05:00
Dillon Dumesnil
8aeb460133 feat: Update the course end date block display logic
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.
2021-05-19 09:09:57 -04:00
irfanuddinahmad
6b48fb6500 Merge pull request #27654 from edx/iahmad/ENT-4522-3
ENT-4522: Added util method for course access verification
2021-05-18 12:56:03 +05:00
Simon Chen
ce6087f546 [Chore]:MST-677 Cleanup the waffle flag to roll out Proctoring Improvements (#27657) 2021-05-17 20:46:24 -04:00
Simon Chen
2d8057f07d [Chore]:MST-677 Roll out the onboarding status panel for Proctoring (#27655) 2021-05-17 15:05:37 -04:00
irfanuddinahmad
19f79a7165 Added util method for course access verification 2021-05-17 22:22:12 +05:00
Dillon Dumesnil
35d62ff365 Merge pull request #27602 from edx/ddumesnil/improve-course-goals-aa-768
feat: AA-768: Add history to Course Goals model and update events
2021-05-17 09:29:39 -07:00
Dillon Dumesnil
d46f6369ea feat: AA-768: Add history to Course Goals model and update events
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.
2021-05-17 11:55:27 -04:00
Dillon Dumesnil
6f773d1eca feat: AA-802: Update the BlockCompletionTransformer
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.
2021-05-14 11:22:07 -04:00
Usama Sadiq
4f4be6538a BOM-2477: pylint warnings lint-amnesty (#27585) 2021-05-11 17:22:40 +05:00
Matthew Piatetsky
526982c548 Merge pull request #27505 from edx/AA-759
[AA-759] feat: Add flag for AA-759 streak celebration discount experiment
2021-05-10 14:43:40 -04:00
Matthew Piatetsky
9c5992521a feat: Add flag for AA-759 streak celebration discount experiment
AA-759
2021-05-10 13:11:07 -04:00
Christie Rice
4867535d2d refactor: Use certificates api method instead of the model, and rename whitelist to allowlist. Also move method to certificates app to prevent circular import. (#27532)
MICROBA-1021
2021-05-10 13:02:43 -04:00
Usama Sadiq
372c4abfa6 refactor: pyupgrade second iteration (#27458) 2021-05-10 13:55:48 +05:00
Dillon Dumesnil
89c463ff29 refactor: Switch to using course_overview start and end everywhere
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.
2021-05-06 16:42:10 -04:00
Michael Terry
35f78a3241 feat!: remove all email_marketing djangoapp code
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
2021-05-03 16:39:01 -04:00