Commit Graph

109 Commits

Author SHA1 Message Date
Ben Holt
ec3c31eb05 feat: added another 'Date' expose-headers for outline api clients (#27221)
Exposed the Date header on the outline api so clients can accurately compute times relative to the dates returned by the API; this was previously done with the course API (#26979)

Browser time is notoriously unreliable for this, especially for a Learner-facing countdown call-to-action based on the access expiration date. (REV-2126)

Using the Date header for this allows the client to make use of information that is already sent, does not require additional calls nor modifying the API, and could be generalized to more or all our APIs without modifying them.
2021-04-02 10:37:19 -04:00
Matthew Piatetsky
cbb84fef74 fix: ensure that course staff can see course outline content when masquerading as a learner
AA-727
2021-04-01 10:55:22 -04:00
Carla Duarte
4570d4e3d8 fix: surface assignment type short_label in Progress Tab MFE API 2021-03-25 17:52:15 -04:00
Carla Duarte
e8bfee28c5 AA-722: surface num_droppable assignments in MFE Progress Tab API 2021-03-24 13:55:56 -04:00
Sofiane Bébert
5d7cd3d278 docs: annotate auto_certificate_generation (#26770) 2021-03-19 16:01:55 -04:00
Carla Duarte
dbe31e3c48 AA-212: add masquerade test for progress tab 2021-03-15 16:35:30 -04:00
Carla Duarte
403358e09f AA-213: create progress tab mfe waffle flag 2021-03-12 10:08:34 -05:00
Carla Duarte
99f73312b8 Progress Tab 2021-03-11 15:43:58 -05:00
Carla Duarte
23700b3064 AA-684: sequence link to legacy or MFE 2021-02-25 13:48:50 -05:00
Kyle McCormick
558d2eb52c refactor: centralize learning MFE URL-building logic (#26689)
In preparation for switching LMS/Studio over
from serving legacy courseware URLs in certain
places (for example, resume_course_url) to serving
learning micro-frontend URLs.

TNL-7796
2021-02-24 08:50:15 -05:00
Jawayria
a383845b01 BOM-2352: Removed unused imports from lms/djangoapps/{course_blocks, course_goals, course_home_api, courseware} 2021-02-22 21:44:42 +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
usamasadiq
3d1f3cea64 Ran pyupgrade on lms/djangoapps/course_blocks
Ran pyupgrade on lms/djangoapps/course_goals
Ran pyugprade on lms/djangoapps/course_home_api
2021-02-19 16:29:52 +05:00
Aarif
d2a147bb47 replaced unittest assertions pytest assertions (#26542) 2021-02-18 19:14:41 +05:00
Michael Terry
139a0f6ee1 Merge pull request #26290 from edx/mikix/effort-estimation
AA-614: Add initial effort estimation block transformer
2021-02-18 08:52:55 -05:00
Michael Terry
1b9119859e AA-614: Add initial effort estimation block transformer 2021-02-18 08:31:19 -05:00
Carla Duarte
dcb6bbc262 AA-664: add JwtAuthentication to course home api 2021-02-16 12:21:16 -05:00
Carla Duarte
00a025f073 AA-590: pass translated tab titles to MFE 2021-02-08 17:00:33 -05:00
Carla Duarte
8d2d78dc61 AA-650: block deprecated keys from course home MFE 2021-02-08 13:00:36 -05:00
jawad khan
957f3ab8a5 LEARNER-8191 - Added first_component_block_id in dates api (#26319)
* LEARNER-8191
Added first_componnet_block_id in dates api
2021-02-03 13:53:21 +05:00
M. Zulqarnain
a5f6f682ee added pylint amnesty for bulk_enroll and course apps (#26246) 2021-02-01 13:58:59 +05:00
Carla Duarte
d97b058c5d AA-568: fix start course bug 2021-01-27 15:29:21 -05:00
Awais Qureshi
b6930adb21 Fixed deprecated warning. 2021-01-13 20:35:14 +05:00
Awais Qureshi
c978e5b204 Upgrade drf version. 2021-01-13 20:35:14 +05:00
Carla Duarte
99163bdf2c AA-131: Allow anonymous users through course home MFE 2020-12-16 12:58:33 -05:00
Michael Terry
cf2e778b56 TNL-7185: clean up unused html blobs from the API
Now that the MFE consumes our data structure for a couple of the
alerts, we no longer need to send raw html at all for them.
2020-12-14 14:26:10 -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
ae561256cb AA-383: add verified mode info to course_home outline API
Adds can_show_course_sock and verified_mode values to the outline
API serialization. And adds a utility method to generate the
verified_mode dictionary, shared with the courseware API.
2020-12-04 14:26:38 -05:00
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01:00
Simon Chen
00ad36839d MST-542 Roll out Accounts MFE IDV workflow (#25613)
* MST-542 remove the IDV redirect to Account MFE waffle flag to permanently redirect learners to new IDV workflow. This completes the rollout process on edx-platform
2020-12-01 09:08:12 -05:00
Michael Terry
40fbef4af2 AA-289: rewrite how course updates behave when dismissed
Previously, dismissing one course update would disable all future
updates. But that feels a bit limiting.

Instead, these are the new rules:
- If the newest update has not been dismissed yet, it gets displayed.
- If the newest update has been dismissed, we display nothing.
- Editing the newest update will cause it to be displayed again.
- New updates get displayed, even if previous updates were dismissed.

This commit includes a light refactoring and addition of some utility
methods to help manage the above.

It also notes that the learning MFE does not use the "latest_update"
waffle option, which controls the labeling of the update message.
2020-11-12 09:39:15 -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
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Régis Behmo
2307dff4c9 Deprecate WaffleFlag.override method
This allows us to get rid of waffle_utils' custom WaffleFlag method.
2020-11-03 19:25:37 +01:00
Régis Behmo
16ce16e85e Deprecate ExperimentWaffleFlag.override method
This is part of a removal of the many override methods of toggle
flag/namespace classes. This allows us to remove imports of test modules
from production code.
2020-11-03 19:25:37 +01:00
Carla Duarte
8133ae5c44 AA-357: Add DatesBannerSerializerMixin to MFE Outline Tab API 2020-10-15 10:05:09 -04:00
Dillon Dumesnil
a96079f2d1 AA-196: Course Celebration for passing Verified Learners 2020-10-01 16:53:25 -04:00
Michael Terry
6f69fd7dc2 Merge pull request #25105 from edx/mikix/public-outline
AA-253: don't send outline if not enrolled
2020-09-28 11:46:22 -04:00
Michael Terry
100018081d AA-253: don't send outline if not enrolled
This is for the learning MFE outline endpoint.

Also clean up some related permissions issues.
2020-09-28 10:45:07 -04:00
Tim McCormack
f29e418264 Revert "Revert "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)" (#25025)" (#25055)
This reverts commit 986a448d9e.
2020-09-28 13:53:57 +00:00
Ahtisham Shahid
986a448d9e Revert "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)" (#25025)
This reverts commit ba9ee4e151.

Fixed Style lint issue
2020-09-21 13:48:00 +05:00
Tim McCormack
ba9ee4e151 ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)
This uses the new names introduced in edx-django-utils
3.8.0 (edx/edx-django-utils#59), which we're already using, as
well as updating a few other locations where we incorrectly refer
to New Relic custom metrics instead of custom attributes.

Includes a couple of unrelated lint fixes in a file I modified.
2020-09-18 13:33:50 +00:00
Carla Duarte
ba89c01e6e AA-368: Surface resume_block in Outline Tab API 2020-09-16 11:03:15 -04:00
Régis Behmo
307457a255 Simplify hack to obtain waffle module names
Instead of going up the stacktrace to find the module names of waffle
flags and switches, we manually pass the module __name__ whenever the
flag is created. This is similar to `logging.getLogger(__name__)`
standard behaviour.

As the waffle classes are used outside of edx-platform, we make the new
module_name argument an optional keyword argument. This will change once
we pull waffle_utils outside of edx-platform.

Note that the module name is normally only required to view the list of
existing waffle flags and switches. The module name should not be
necessary to verify if a flag is enabled. Thus, maybe it would make
sense to create a `add` class methor similar to:

    class WaffleFlag:
        @classmethod
        def add(cls, namespace, flag, module):
            instance = cls(namespace, flag)
            cls._class_instances.add((instance, module))
2020-09-14 09:30:24 +02:00
Carla Duarte
559f7261c7 Merge pull request #24887 from edx/ciduarte/swagger-bug
Fix for Swagger error
2020-09-01 14:02:43 -04:00
Carla Duarte
11d52f154f Fix for Swagger error 2020-09-01 11:38:46 -04:00
Michael Terry
c653ac2c8a AA-126: Expose more course-outline info to learning MFE
- Use the same get_course_outline_block_tree call that the current
  outline uses
- Show number of problems in subsection display names
- Don't send links if the user is not enrolled or course isn't public
- Send subsection icons to MFE
- Send subsection descriptions to MFE
- Send completion info to MFE
2020-08-31 15:38:41 -04:00
Carla Duarte
6392722e0e AA-125: Add Course Goals to MFE API 2020-08-28 10:31:59 -04:00
daphneli-chen
9a8f1aa96e Merge pull request #24702 from edx/dlichen/AA-274
Dlichen/AA-274
2020-08-14 12:51:31 -07:00
Daphne Li-Chen
f557e395de AA-274: sending credit requirement information and added tests 2020-08-14 14:39:44 -04:00