Commit Graph

147 Commits

Author SHA1 Message Date
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
usamasadiq
dc36d0bfe8 Ran pyupgrade on lms/djangoapps
Ran pyupgrade on lms/djangoapps/mailing
Ran pyupgrade on lms/djangoapps/mobile_api
Ran pyupgrade on lms/djangoapps/monitoring
2021-02-19 17:47:37 +05:00
Aarif
87fbbc7f3b replaced unittest assertions pytest assertions (#26547) 2021-02-19 12:36:28 +05:00
Awais Qureshi
07599e930c BOM-2284
Apply pylint-amnesty.
2021-02-02 11:37:56 +05:00
jawad khan
cb6f348959 LEARNER-8194
LEARNER-8194
Added self paced in mobile api enrolment api
2021-01-28 13:49:05 +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
jawad khan
04640bde1e Get last visited block id as user staus with version v1 (#25498)
Get last visited block id as user staus with version v1
VAN-85
2020-11-06 21:57:03 +05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Michael Terry
a4bd5a7ec9 AA-197: Provide cert upgrade info to learning MFE
Specifically, pass the MFE the audit access expiration date and
let it know when the upgrade deadline has passed, by not passing
any verified mode information along.
2020-10-27 09:05:12 -04:00
uzairr
fb9ba90efe PROD-1236: Do not expose user id with certificate URL. 2020-07-17 22:59:34 +05:00
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04:00
Calen Pennington
fc21a337aa Use a fixed time for course duration limits, so that schedule extensions don't extend FBE duration limits 2020-05-26 16:29:28 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Abdul Hannan
fa6633ba4e DO NOT MERGE - NEED FAKE - Rename start in schedule 5/5 (#22392)
* Remove start field in Schedules

Co-authored-by: hunytalk <ahannan@edx.org>
Co-authored-by: Cory Lee <cory@edx.org>
2020-03-12 15:40:19 -04:00
julianajlk
f46458fbfe Add dynamic_upgrade_deadline date to mobile API (#22953)
REV-1092
2020-01-28 15:24:50 -05:00
hunytalk
73aae081c3 Remove null, blank from start field in Schedules 2020-01-22 18:10:33 +05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Samuel Walladge
c0b908e02d send user_logged_in signal from my_user_info
A user's last logged in value previously wasn't updated when the user
logs in through the oauth2 flow from the ios mobile app. Here we must
send the user_logged_in signal manually. It's implemented in the
my_user_info mobile rest api endpoint because adding it to where the
oauth2 flow happens is to complex, and the mobile app hits this endpoint
after a successful login anyway.
2019-12-27 09:37:22 +10:30
hunytalk
227ae8a51a Add reference to new field in schedule model 2019-12-04 19:05:55 +05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
arbisoft
51d6059ecb BOM-177
Fixing python querystring comparision in tests.
2019-08-27 17:27:58 +05:00
usama sadiq
79d02a1b67 Python3 Update
Added absolute_import
Changed unicode() with six.text_type()
2019-07-11 19:27:15 +05:00
Amit
15dc31ba6d INCR-456: Make compatible with Python 3.x (#21018) 2019-07-10 10:14:43 -04:00
Ned Batchelder
b3a731550c Fix problems that drf-yasg uncovered.
These were originally fixed individually, but had to be reverted, and
are now combined in one commit.  The originals were:

7b9040f6b0 This enum was backwards
8774ff1f9b Use ref_name to disambiguate serializers that drf-yasg would otherwise assume are the same.
8a44397139 Is this field missing because it is None?
4a1154a7ca Give a safer buffer for clearing the rate limiting
64c47856dd DRF 3.7.4 changed how you delegate to another view, so don't
7359ca4fb2 Is this right? It fixes two tests
fdd66e5390 Adjust the expected error message for DRF 3.7.7
9257f68fd8 The default TIME_ZONE should be UTC
2019-06-21 18:04:15 -04:00
Ned Batchelder
39c7a2db7c Revert "Use drf-yasg for Open API documentation" 2019-06-11 16:05:00 -04:00
Ned Batchelder
8774ff1f9b Use ref_name to disambiguate serializers that drf-yasg would otherwise assume are the same. 2019-06-10 15:27:39 -04:00
Matthew Piatetsky
5ef9cf3d49 remove experiment code 2019-04-17 09:30:47 -04:00
Nimisha Asthagiri
aaa7b20654 Merge pull request #20126 from edx/depr/mobile-video-outline-api
DEPR-4: Remove Mobile Video Outlines API
2019-04-12 08:37:17 -04:00
Nimisha Asthagiri
3d8b8a05ad DEPR-4: Remove Mobile Video Outlines API 2019-04-02 17:28:26 -04:00
Matthew Piatetsky
dac0eec385 handle incorrectly set schedules 2019-03-11 16:46:29 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Bill Filler
7f18ab0374 Check config model before returning expiration date 2018-12-06 15:22:11 -05:00
Calen Pennington
31047260cc Switch ContentTypeGatingConfig.enabled_as_of and CourseDurationLimitConfig.enabled_as_of to datetimes 2018-11-30 10:02:53 -05:00
Bill Filler
7b684106ba Don't allow audit-only courses to expire 2018-11-26 14:28:50 -05:00
Calen Pennington
b295472363 Use generator expressions to make Mobile API constraints clearer 2018-11-21 12:18:10 -05:00
Calen Pennington
0cb48dfe1c Add StackedConfigurationModels for managing content_type_gating and course_duration_limits 2018-11-21 12:18:10 -05:00
Alex Dusenbery
12c502b35f Change gradebook GET endpoint to allow filtering by multiple attributes. 2018-11-13 16:18:52 -05:00
Bill Filler
026d574576 mobile-api changes to support gated-content
Change behavior of existing v0.5 mobile api /api/mobile/v0.5/users/{username}/course_enrollments/ to exclude expired courses due to audit duration limits from the result set.
Add v1 version of mobile api /api/mobile/v1/users/{username}/course_enrollments/ that returns all enrollments and includes a field audiit_access_expires that contains expiration date (or null).

REV-495
2018-11-01 10:13:52 -04:00
Matthew Piatetsky
f738e74e7e prevent activation time error 2018-09-19 17:06:15 -04:00
Ned Batchelder
93d4af35bd No need for superstitious kwargs 2018-09-17 17:01:11 -04:00
Jeremy Bowman
68902a2f3f TE-2689 Remove useless pylint suppressions part 3 2018-08-16 09:57:01 -04:00
Matthew Piatetsky
e756d002cf update mobile exclusion 2018-08-14 14:07:56 -04:00
Matthew Piatetsky
cfa4dc6945 add course level mobile app exclusion for vop and cgv3 experiments 2018-08-07 17:19:55 -04:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
Waheed Ahmed
c2ad6f4002 Revert "Fix PDF cert gereration/regeneration and URLs." 2018-07-26 18:20:27 +05:00
Nimisha Asthagiri
77bf86fb73 Fix unclearly related test failure 2018-07-03 07:37:57 -04:00