Commit Graph

38 Commits

Author SHA1 Message Date
Usama Sadiq
3e6b3e41f8 refactor: remove unused imports (#27084) 2021-03-24 17:55:04 +05:00
Awais Qureshi
51d0d68a1e BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:50:00 +05:00
Awais Qureshi
094573e901 BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:17:22 +05:00
Kyle McCormick
9b37e7d0fe refactor: centralize checks for canonical courseware experience & URL (#26815)
Centralize the logic for choosing between
MFE and Legacy-frontend courseware within
three new functions:
* courseware_mfe_is_active
* courseware_mfe_is_visible
* courseware_legacy_is_visible

This allows us to create another new function:
* get_courseware_url
which can be called anywhere in LMS/Studio
to get the canonical URL to courseware
content (whether it be MFE or Legacy).

In future commits we we begin using
get_courseware_url throughout the platform.

TNL-7796
2021-03-08 15:24:16 -05:00
Michael Terry
74887aa216 feat: turn on schedule creation by default
This commit removes several waffle toggles that have been enabled
on edx.org for years. It's time to remove the rollout gating for
these features and enable them by default.

This doesn't directly change any behavior. But it does create new
database objects by default now and allows for enabling other
schedule based features more easily.

Specifically, the following toggles were affected.

schedules.create_schedules_for_course
- Waffle flag removed as always-enabled
- We now always create a schedule when an enrollment is created

schedules.send_updates_for_course
- Waffle flag removed as always-enabled
- Course update emails are sent as long as the ScheduleConfig
  allows it.
- This is not a change in default behavior, because ScheduleConfig
  is off by default.

dynamic_pacing.studio_course_update
- Waffle switch removed as always-enabled
- Course teams can now always edit course updates directly in Studio

ScheduleConfig.create_schedules
ScheduleConfig.hold_back_ratio
- Model fields for rolling out the schedules feature
- Schedules are now always created
- This commit only removes references to these fields, they still
  exist in the database. A future commit will remove them entirely

This commit also adds a new has_highlights field to CourseOverview.
This is used to cache whether a course has highlights, used to
decide which course update email behavior they get. Previously every
enrollment had to dig into the modulestore to determine that.
2021-02-23 12:34:02 -05:00
Matthew Piatetsky
3b45a72b8e Create backend for three day streak celebration
This feature uses the first_day_of_streak, last_day_of_streak and last_streak_celebration fields to determine whether the user should see a celebration.
AA-304
2021-02-22 10:50:33 -05:00
Aarif
802ae6343b replaced unittest assertions pytest assertions (#26527) 2021-02-18 18:08:52 +05:00
Jawayria
fbd60f1814 REsolved quality error 2021-02-03 17:01:52 +05:00
Jawayria
8086ca75f2 Applied pylint-amnesty to student 2021-02-03 15:29:53 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
JJ
e5e3fcdc1c [REV-1262] Skip enrolling already enrolled users on changes to the user (#25490)
Skip auto-enrolling users if they are already enrolled in their auto-enroll enabled courses to prevent downgrading users from paid course modes to audit/free course modes when they activate their account.
2020-11-09 10:41:58 -05:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
aarif
d832c21a20 python 3 fixes 2019-09-27 17:17:15 +05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Feanil Patel
4eaf875741 BOM-621 Fix hashing in a bunch of places. 2019-09-19 15:53:39 -04:00
Cameron Cairns
6363090144 Addresses INCR-195 - runs modernise /student/tests (#20419) 2019-05-07 15:44:49 -04:00
Bessie Steinberg
1a94a69560 ENT-1512: Make Recovery Email Retireable 2019-02-15 14:21:32 -05:00
bmedx
1716b97cfc PLAT-2371 - speed up the LMS_MISC retirement step 2018-11-09 13:00:36 -05:00
Jillian Vogel
2667c14e19 Fix failing test
and use the self.assert* convention used by the other tests
2018-07-27 13:50:06 +09:30
Jillian Vogel
7a63af9216 Add a test 2018-07-27 11:25:32 +09:30
Sanford Student
264cec0cea EDUCATOR-2689: retire ManualEnrollmentAudit 2018-05-02 15:56:00 -04:00
Simon chen
803a396e11 Create deletion method for the PendingNameChange model to comply with GDPR 2018-05-01 14:21:41 -04:00
sandroroux
5b9d347317 Adds DeletableByUserValue to CourseEnrollmentAllowed model. 2018-04-20 13:40:10 -04:00
Alex Dusenbery
1974b9a449 EDUCATOR-2693 | Delete PendingEmailChanges for retired users. 2018-04-20 13:33:31 -04:00
Tyler Hallada
8fb26258e4 Add a regression test 2018-02-27 16:25:41 -05:00
sandroroux
40d3f4f2fc Unit tests for "_add_upsell_button_to_email_template". 2017-10-13 10:08:52 -04:00
Calen Pennington
8468357ac4 Separate the date and link logic out of VerifiedUpgradeDeadlineBlock, so that it can be called directly with prefetched data for check_and_get_upgrade_link_and_date 2017-10-13 10:01:34 -04:00
Calen Pennington
dd53edc6e0 Cache upgrade_deadline on CourseEnrollment objects 2017-10-06 15:23:42 -04:00
Gabe Mulley
3088c70f25 only override the upgrade deadline in self-paced courses 2017-09-22 12:48:38 -04:00
Gabe Mulley
6a36eb0183 Use ACE to 'send' Recurring Nudge emails 2017-08-31 16:58:08 -04:00
Calen Pennington
63244b514d Use a consistent CourseModeFactory from the course_modes module, rather than using one from student 2017-08-23 12:15:46 -04:00
Clinton Blackburn
986afbfa38 Powering courseware deadline with schedules 2017-08-05 22:06:17 -04:00
Clinton Blackburn
1e7f7df79b Added CourseEnrollment.upgrade_deadline
This new property knows how to rely on schedule deadliens and fallback to course mode deadlines, when necessary.
2017-08-05 22:06:17 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Alex Dusenbery
b33a9436d6 TNL-6832 | Include inactive enrollees in course and problem grade reports. 2017-05-11 13:10:38 -04:00
Clinton Blackburn
f0030334af Added enrollment hash to login cookie
This will allow the marketing site to determine if locally-stored enrollment data needs to be refreshed.

ECOM-4896
2016-11-18 13:56:48 -05:00