77 Commits

Author SHA1 Message Date
Kyrylo Kireiev
53174178f3 feat: [FC-0047] Extend mobile API with course progress and primary courses on dashboard view (#34848)
* feat: [AXM-24] Update structure for course enrollments API (#2515)
---------
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)
---------
Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>

* feat: [AXM-297] Add progress to assignments in BlocksInfoInCourseView API (#2546)
---------
Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>
2024-07-10 20:07:41 +05:00
Agrendalath
dd97c74fde refactor: deprecate course_id from ModuleSystem
This attribute is already deprecated for XBlocks in favour of directly
retrieving it like `block.scope_ids.usage_id.context_key`.

This commit also removes some redundant logging code which was omitted in the
Datadog removal in #19420.
2022-09-21 18:53:45 +02: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
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
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
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
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
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
Calen Pennington
98328ea426 On publish, add evenly spaced dates to self-paced courses 2020-02-21 10:50:22 -05:00
Dillon Dumesnil
fe91d63a0b Show relevant dates in course dates sidebar
This includes (at least) upcoming assignments, FBE access
expiration, and course end date.

AA-4
2020-02-18 08:42:15 -05:00
Dillon Dumesnil
b4fed7c2a4 Merge pull request #23063 from edx/ddumesnil/revert-AA-4
Revert commits for AA-4
2020-02-10 13:11:19 -05:00
Dillon Dumesnil
00fe1495b4 Revert commits for AA-4 2020-02-10 12:10:59 -05:00
Zainab Amir
644d4d44bc Add condition to fix incorrectly set schedules (#23028)
Choose max of course start or enrollment created date when
schedule start date is in the past

PROD-1198
2020-02-10 11:51:52 +05:00
Dillon Dumesnil
23486a560d Show relevant dates in course dates sidebar
This includes (at least) upcoming assignments, FBE access
expiration, and course end date.

AA-4
2020-02-06 16:01:46 -05:00
Troy Sankey
b0285c142b Fix typo in comment 2020-01-29 16:25:23 -05:00
hunytalk
499fd0e450 Remove reads from old column 2020-01-30 01:25:21 +05:00
David Ormsbee
2cb2265ffe Add request caching to reduce ORM queries
This adds request caching to the following places:
* course expiration wrapper (displayed in Units)
* offer banner generation (displayed in Units)
* get_enrollment
* user_by_anonymous_id
* youtube_disabled_for_course

On a sample course with edx-val enabled, this reduced the queries
for a large sequence from 450 to 155.
2019-12-30 16:19:25 -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
Calen Pennington
d92dcb28bb Expose user course duration in the user metadata 2019-10-25 10:02:55 -04:00
julianajlk
98f907f23c Revert "add first purchase discount to courseware (#22058)"
This reverts commit 059b619794.
2019-10-21 13:57:18 -04:00
julianajlk
059b619794 add first purchase discount to courseware (#22058)
REV-980.
* moved get_first_purchase_offer_banner_fragment to Discounts utils.py
* added banner wrapper method
* updated banner with time limit
2019-10-21 13:56:38 -04:00
Wei Lee
1d5a72ac33 INCR-236 (#20502)
* INCR-236

* Run python-modernize on openedx/features/course_duration_limits and
  verify that the change makes sense and tests does not break

* Remove redundant import and update docstring style
2019-05-23 11:53:58 -04:00
Matthew Piatetsky
85f0720c50 fix broken FBE banner dates in firefox 2019-05-16 09:33:24 -04:00
Calen Pennington
10963c122a Don't refetch CourseOverview with a course object already in-hand 2019-03-19 10:30:33 -04:00
Matthew Piatetsky
dac0eec385 handle incorrectly set schedules 2019-03-11 16:46:29 -04:00
Matthew Piatetsky
444799fb0e fix unicode strings in openedx/ part 2 2019-02-15 10:15:51 -05:00
Calen Pennington
419657d7a5 Prefetch course modes used in has_access calls in course api 2019-02-06 10:11:15 -05:00
Matthew Piatetsky
b37bc75bb4 Revert "Revert "change banner date localization to use dateutilfactory""
This reverts commit 08cb56664b.
2019-02-04 12:42:27 -05:00
Calen Pennington
805f32a357 Revert "Allow courses api to return data incrementally" 2019-01-25 12:56:57 -05:00
Calen Pennington
0d273e9506 Prefetch course modes used in has_access calls in course api 2019-01-25 10:30:09 -05:00
Matthew Piatetsky
08cb56664b Revert "change banner date localization to use dateutilfactory" 2019-01-20 18:27:03 -05:00
Matthew Piatetsky
58012317a1 Merge pull request #19590 from edx/REVMI-27
change banner date localization to use dateutilfactory
2019-01-17 12:49:56 -05:00
Ned Batchelder
48ac13e73e Merge pull request #19591 from cclauss/print_function
Use print() function in both Python 2 and Python 3
2019-01-16 17:59:11 -05:00
Ned Batchelder
1e5c753807 Fix quality violations 2019-01-16 08:44:56 -05:00
Matthew Piatetsky
f870f7c635 change banner date localization to use dateutilfactory 2019-01-15 03:30:53 -05:00
Calen Pennington
67c23d503d Make the max Course Duration Limit 18 weeks 2019-01-11 13:01:08 -05:00
Matt Tuchfarber
ac29017d88 Move banner REVMI-54
Moves banner into the content instead of at the top. Adds a course
expiration fragment to the course home page, the content, the progress
page, and the discussion page.
2019-01-09 10:17:16 -05:00
Calen Pennington
8b014e1fef Add a test of the FBE Upgrade banner
REV-656
2019-01-07 13:11:35 -05:00
Gabe Mulley
be3dd7e491 REV-655: Fix upgrade deadline bug 2019-01-04 10:57:45 -05:00
Calen Pennington
61c705d10d Use the full set of required variables iff FBE upgrade messaging is turned on 2019-01-02 13:26:38 -05:00
Matthew Piatetsky
4aa576d725 Merge pull request #19511 from edx/REVMI-72
Ignore enrollment date for FBE when masquerading
2019-01-02 09:53:13 -05:00