Commit Graph

185 Commits

Author SHA1 Message Date
Michael Terry
afd19f0513 feat!: drop legacy courseware tab access for learners
The only way to access the legacy courseware is now through the
Studio preview feature (and at some point, when the MFE supports a
preview mode, we can then remove even that).

This drops the courseware.use_legacy_frontend waffle.
2022-04-19 12:27:10 -04:00
Michael Terry
ce5f1bb343 feat!: drop legacy course home view and related code
This was the "outline tab" view of the course. Preceded by the
course info view, succeeded by the MFE outline tab.

In addition to the course home view itself, this drops related
features:
- Legacy version of Course Goals (MFE has a newer implementation)
- Course home in-course search (MFE has no search)

The old course info view and course about views survive for now.

This also drops a few now-unused feature toggles:
- course_experience.latest_update
- course_experience.show_upgrade_msg_on_course_home
- course_experience.upgrade_deadline_message
- course_home.course_home_use_legacy_frontend

With this change, just the progress and courseware tabs are still
supported in legacy form, if you opt-in with waffle flags. The
outline and dates tabs are offered only by the MFE.

AA-798

(This is identical to previous commit be5c1a6, just reintroduced
now that the e2e tests have been fixed)
2022-04-14 15:18:31 -04:00
Michael Terry
a515c2e992 Revert "Drop legacy outline tab in favor of the MFE's version" 2022-04-14 14:16:29 -04:00
Michael Terry
be5c1a64d5 feat!: drop legacy course home view and related code
This was the "outline tab" view of the course. Preceded by the
course info view, succeeded by the MFE outline tab.

In addition to the course home view itself, this drops related
features:
- Legacy version of Course Goals (MFE has a newer implementation)
- Course home in-course search (MFE has no search)

The old course info view and course about views survive for now.

This also drops a few now-unused feature toggles:
- course_experience.latest_update
- course_experience.show_upgrade_msg_on_course_home
- course_experience.upgrade_deadline_message
- course_home.course_home_use_legacy_frontend

With this change, just the progress and courseware tabs are still
supported in legacy form, if you opt-in with waffle flags. The
outline and dates tabs are offered only by the MFE.

AA-798
2022-04-14 09:12:01 -04:00
Michael Terry
cb1bb7fa64 test: switch default test store to the split store
It's long past time that the default test modulestore was Split,
instead of Old Mongo. This commit switches the default store and
fixes some tests that now fail:
- Tests that didn't expect MFE to be enabled (because we don't
  enable MFE for Old Mongo) - opt out of MFE for those
- Tests that hardcoded old key string formats
- Lots of other random little differences

In many places, I didn't spend much time trying to figure out how to
properly fix the test, and instead just set the modulestore to Old
Mongo.

For those tests that I didn't spend time investigating, I've set
the modulestore to TEST_DATA_MONGO_AMNESTY_MODULESTORE - search for
that string to find further work.
2022-02-04 14:32:50 -05:00
Awais Qureshi
c66498db36 test: Fixed test failures due to randomization. (#29816)
* test: Fixed test failures due to randomization.
2022-01-25 22:13:57 +05:00
Jawayria
c227712f03 chore: Applied lint-amnesty on openedx/features 2021-12-02 15:02:24 +05:00
jawad khan
9c1fc4cbba feat: LEARNER-8493 Remove upgrade banner from mobile upgrade banner (#29160)
* feat: remove upgrade banner from mobile upgrade banner

After investigating the best way to keep a user logged in, and solve rendering issues, we decided to show the unit page in a full webview within the app. However, in order to comply with app store guidelines, we need to remove the upgrade banner from this page.

LEARNER-8493
2021-11-02 04:47:48 +05:00
M. Zulqarnain
7aadf55387 feat: New codemods on OpenedX 4 (#28779) 2021-11-01 18:05:02 +05:00
M. Zulqarnain
39b91154fb feat: New codemods on OpenedX 1 (#28776) 2021-10-27 13:07:36 +05:00
Awais Qureshi
82ef28b43f chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-29 18:24:39 +05:00
stvn
f646971c74 refactor: Move OrgInstructorFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
31bc741410 refactor: Move OrgStaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
ffcfc05a61 refactor: Move BetaTesterFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
22fb1ec124 refactor: Move InstructorFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
2fa36fb0cf refactor: Move StaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
5dd8302d8b refactor: Move GlobalStaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
Awais Qureshi
6b6e87e797 refactor: upgrading factory-boy. 2021-04-14 15:17:32 +05:00
Robert Raposa
8ef8b35a54 docs: update toggle docs
A variety of updates were made to improve the toggle documentation:
* Added comments to help ensure that the waffle(), waffle_switches(),
  waffle_flags() anti-pattern won't be contagious (copied).
* Some minor toggle_description updates.
* Removed empty toggle_target_removal_date annotations for
  non-temporary toggles.
* Removed empty optional toggle_warnings annotations.
* Removed empty optional toggle_tickets annotations.
* Removed deprecated toggle_category, toggle_status,
  and toggle_expiration_date annotations.
* Fixed some indents, use cases, and implementations.

ARCHBOM-1721
2021-04-01 21:58:29 -04:00
Usama Sadiq
aa618c460c refactor: remove unused-imports (#27083) 2021-03-19 22:42:14 +05:00
Awais Qureshi
e92bdc5dce BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-11 15:00:33 +05:00
Awais Qureshi
967897d517 BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-11 14:28:17 +05:00
Awais Qureshi
805e10a5ac BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-10 18:35:45 +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
Aarif
93a4f96e30 replaced unittest assertions pytest assertions (#26575) 2021-02-22 16:19:37 +05:00
Awais Qureshi
07b182b3be BOM-2335
Apply pylint-amnesty.
2021-02-04 16:37:41 +05:00
Michael Terry
1482755bbd Show discount deadline in a timezone-aware way
Also, fix it and the access expiration deadline to not hardcode
the date presentation in an American way.
2021-01-08 13:56:18 -05:00
Michael Terry
eef72b5ab7 TNL-7185: Send data, not rendered HTML to the learning MFE
Specifically, send data versions of course_expired_message and
offer_html.

The rendered HTML is still being sent for now, until the learning
MFE is updated to consume the data objects.
2020-12-14 13:41:03 -05:00
Michael Terry
e8d9a254bd AA-459: Respect user's timezone in access-expiration message
Before, it would just always use UTC.
2020-11-24 12:02:19 -05:00
sarina
7a575843ca Squashing some naive datetime warnings 2020-11-17 18:15:58 -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
Manjinder Singh
c74b623948 Fixing code-annotations (#25539)
* Fixing code-annotations
2020-11-06 12:52:08 -05:00
Dillon Dumesnil
6b16fcd9b3 AA-393: Update Next Section Logic
Inside content_highlights.py, we had code to calculate due dates
for when there isn't graded content, but we could only reach that
code path if the user had an assignment with a due date at the
target date. Now we will check for all learners who could be in
range of having an update and let the code in content_highlights.py
decide if a highlight should be sent
2020-10-30 15:02:03 -04: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
Régis Behmo
a4ba4ae45e Clarify many feature toggle annotations across all applications 2020-09-16 15:20:43 +02:00
Régis Behmo
7d93715880 Rename toggle_expiration_date to toggle_target_removal_date
This is part of the changes brought by code-annotations==0.7.0
2020-09-16 15:19:16 +02:00
Régis Behmo
98a13d6a7e Remove deprecated toggle_status annotation
This annotation is deprecated since code-annotations==0.7.0
2020-09-16 15:19:15 +02:00
Régis Behmo
7dc460d50a Wrap toggle annotation lines with multiline comments
This takes advantage of the new multiline annotation format with
single-line comment prefix, from code-annotations.
2020-09-16 15:16:12 +02:00
Régis Behmo
d34aa1c643 Document lms/djangoapps/courseware feature toggles 2020-09-16 15:15:46 +02:00
Diane Kaplan
0b2a9c7010 [REV-1205] Add ecommerce event tracking to FBE (feature based enrollment) upsell links (#24528) 2020-07-23 11:40:22 -04: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
Michael Terry
3f2b2da22b Don't assume due dates on sections
The content highlights code assumed due dates existed on all
sections. But we recently broke that assumption. So now we
recalculate the spread of sections across the expected duration
ourselves rather than rely on due dates.
2020-05-14 09:26:49 -04:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +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
Troy Sankey
d428f7530d Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""
This reverts commit e6f58b6d4c.

This is our third (3rd!) attempt to deploy stage 2 of this column rename.
2020-03-04 14:53:47 -05:00
Troy Sankey
e6f58b6d4c Revert "Rename values in SiteConfiguration (2/3) attempt #2" 2020-02-27 13:24:55 -05:00
Troy Sankey
c422dec083 Revert "Revert "Rename values in SiteConfiguration (2/3)""
This reverts commit b85aa4b3fb.
2020-02-26 12:54:24 -05:00
Troy Sankey
b85aa4b3fb Revert "Rename values in SiteConfiguration (2/3)" 2020-02-26 11:23:56 -05:00
Julia Eskew
3541643dd5 Rename values in SiteConfiguration (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-02-25 13:54:02 -05:00