Commit Graph

1156 Commits

Author SHA1 Message Date
Alex Dusenbery
4ad2df083d Ensure that get_enterprise_learner_portal_enabled_message() returns None when there is no associated enterprise customer for the given request. Add unit tests for this function. 2020-09-21 12:47:00 -04: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
Alex Dusenbery
4bb1914ec6 ENT-3367 | Show at most 1 Enterprise Learner Portal dashboard link in the header user-menu. Also, guard against no branding config when getting learner portal data. 2020-09-18 10:23:32 -04: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
HammadAhmadWaqas
30edb7ef50 catch signal UNENROLL_DONE signal and call /api/v2/enterprise/coupons/create_refunded_voucher/ API. 2020-09-17 15:39:13 +05: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
d1f9e769d0 Simplify the toggle_use_case annotation
Since code-annotations==0.7.0, incremental_release, launch_date,
monitored_rollout, graceful_degradation, beta_testing are all considered
as "temporary" use cases.
2020-09-16 15:16:13 +02:00
Régis Behmo
ab0e21455a Get rid of the toggle_category annotation, now deprecated
Since code-annotations==0.7.0, this annotation is not used anymore.
2020-09-16 15:16:13 +02:00
Régis Behmo
0c3bc12582 Fix deprecated toggle annoation format 2020-09-16 15:16:13 +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
stvn
e7fbb3d933 Merge PR #24749 open-craft/shimulch/styling-update-to-existing-course-content-search-page
* Commits:
  Styling Update to Existing Course Content Search Page
2020-09-15 10:10:07 -07:00
Shimul Chowdhury
9aee2a5e89 Styling Update to Existing Course Content Search Page 2020-09-15 16:11:16 +06: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
Dillon Dumesnil
767af37d3d AA-318: Update PLS CTA to use the dates_banner_should_display
This will make it so audit and verified learners will not see the CTA
after due dates. Previously it would only check if the xblock is
self_paced and there are still attempts and it's past due
2020-09-03 10:50:44 -04:00
Carla Duarte
4e6bff8868 Merge pull request #24819 from edx/ciduarte/AA-125
AA-125: Add Course Goals to MFE API
2020-08-31 09:28:57 -04:00
Carla Duarte
6392722e0e AA-125: Add Course Goals to MFE API 2020-08-28 10:31:59 -04:00
Dillon Dumesnil
82e7a9ce13 AA-307: Turn showanswer override back on
This doesn't handle the default case where the showanswer has never
been touched, in which case it will continue to return Finished,
but that also happens when it's turned off so this just helps out
for all of the other cases.
2020-08-18 07:53:18 -07:00
Dillon Dumesnil
da9a248247 Merge pull request #24776 from edx/ddumesnil/turn-off-showanswer-override
Temporarily disable Show Answer Override for self-paced courses
2020-08-13 12:24:28 -07:00
Dillon Dumesnil
c702d12957 Temporarily disable Show Answer Override for self-paced courses 2020-08-13 11:56:25 -07:00
Brittney Exline
1af80ff205 [ENT-3315] Reduce calls to enterprise-learner endpoint by looking up data from db 2020-08-12 15:24:39 -06:00
Nick
10ac2780de Merge pull request #24733 from edx/ndalfonso/AA-287-cta-events
AA-287 cta events
2020-08-12 09:37:13 -04:00
Manjinder Singh
c76ed6ae45 Extracting plugin app from edx-platform (#24678)
* Moving plugins infrastructure to edx-django-utils
This PR extracts the code that enables plugins in edx-platform and puts it in edx-django-utils. This is done to allow other IDAS to add plugin functionality.
2020-08-12 07:48:53 -04:00
Nicholas D'Alfonso
0211a2b0ff AA-287 cta events 2020-08-10 18:00:13 -04:00
Michael Terry
c2033f9667 Small PLS courseware banner fixes
- Hide the submit-button CTA link to reset dates in the mobile
  app. They are working on their own solution.
- Don't show the dates_banner.html code in the courseware. It has
  new CTA banner support with updated wording.
2020-08-10 09:44:43 -04:00
Michael Terry
e0a0d4d6e3 Warn if an xblock defines is_past_due as a property
We support it still, but want to encourage folks to try to define it
as a method, so that in the future, we can rely on it being one.

Also updates lti-consumer to a version that has the value as a
method.
2020-08-07 10:29:10 -04:00
Michael Terry
023ae07753 Fix possible reference to is_past_due property 2020-08-06 16:54:45 -04:00
Calen Pennington
f9619d6cad Add a pluggable CallToAction service for XBlocks
This also has an initial use case for Personalized Learner Schedules
to add CTAs to capa and vertical blocks to allow users to shift their
course deadlines.
2020-08-06 14:38:26 -04:00
Nicholas D'Alfonso
754f231f68 AA-283 mobile reset dates endpoint
- add has_ended to endpoint
2020-08-05 11:53:59 -04:00
Dillon Dumesnil
c0c1279bdb Merge pull request #24684 from edx/ddumesnil/fix-enabled-show-answer
Fix for enabled_for to not assume the self_paced attr exists
2020-08-04 11:43:55 -07:00
Alex Dusenbery
c69fb5b274 ENT-2892 | Bump edx-enterprise to 3.4.36. This version removes some model field references, but does not create a migration, to the test to check that migrations are in sync has been skipped here. 2020-08-04 14:24:56 -04:00
Dillon Dumesnil
f5c893e34d Fix for enabled_for to not assume the self_paced attr exists
Also being defensive on category just in case
2020-08-04 11:20:59 -07:00
Aarif
b00804fa4c remove cyclomatic code complexity calculation (#24662) 2020-08-04 23:02:21 +05:00
Aarif
09ac7f9372 remove cyclomatic complexity calculation for python code 2020-08-04 22:10:05 +05:00
Dillon Dumesnil
73dcd9f2a3 Merge pull request #24627 from edx/ddumesnil/show-answer-pls
AA-261: Overridding Show Answer functionality for PLS courses
2020-08-04 08:40:06 -07:00
Dillon Dumesnil
75f6937003 AA-261: Overridding Show Answer functionality for PLS courses
We noticed that since users can choose to reset their due dates,
they would have the ability to let due dates pass and then for any
assessment that allows viewing the answer after the due date would be
visible. The user could thus view all answers and then reset their
due dates to receive a perfect score.

This PR works to fix that issue by changing all show answer values
to not take into account being past the due date when inside a PLS
course.
2020-08-04 07:44:59 -07:00
Michael Terry
da4dc6c848 AA-278: Add offer html to the course-home API
This is for the frontend-app-learning MFE to consume and show an
alert when offer_html is defined.

I've also tweaked that html a bit to work better in an environment
that doesn't have LMS's exact css.
2020-08-04 09:38:58 -04:00
Alex Dusenbery
f9a5b7790b Upgrade edx-enterprise to 3.4.33 2020-08-03 15:38:31 -04:00
Jeff LaJoie
a2d2646ee5 Merge pull request #24634 from edx/jlajoie/enterprise-header-caching-fix
Fixes session caching for enterprise portal links by only caching for auth'd learners
2020-07-30 10:33:40 -04:00
Jeff LaJoie
4282530faf Fixes session caching for enterprise portal links by only caching for auth'd learners 2020-07-30 09:18:35 -04:00
Adam Stankiewicz
00f4ea3fc3 fix keyerror with request.session (#24642)
* fix keyerror with request.session

* improve the conditional
2020-07-29 20:44:43 -04:00
Jeff Chaves
87f444fd44 ENT-3143: display message banner guiding user to their enterprise LP if enabled (#24625)
* display message banner guiding user to their enterprise LP if enabled

* adding new sass class name to use same styling as recovery email alert
2020-07-29 11:55:02 -04:00
morenol
5949c17dda [BD-10] Remove uses bootstrap method (#24535) 2020-07-28 08:57:42 -04:00
morenol
68d1c7f78c [BD-10] Remove _uses_pattern_library property from EdxFragmentViews (#24536) 2020-07-27 12:01:40 -04:00
Jeff Chaves
e1bd970b46 ENT-2894: Use new welcome template when redirected from enterprise proxy login view (#24587)
* using new welcome template when redirected from enterprise proxy login view

* enabling safe redirects to enterprise learner portal from login in devstack

* ading admin portal to login redirect whitelist

* running make upgrade to version bump edx-enterprise
2020-07-24 17:40:42 -04:00
Dillon Dumesnil
de8ef23d24 Merge pull request #24595 from edx/ddumesnil/aa-234
AA-234: Switch link in dates widget if Course Home MFE is active
2020-07-24 08:30:43 -07:00
Dillon Dumesnil
39b66dcdbb AA-234: Switch link in dates widget if Course Home MFE is active 2020-07-24 07:54:21 -07:00
Diane Kaplan
44aa0a847c [REV-1205] Add ecommerce event tracking to 4 course home links (#24526) 2020-07-24 07:14:24 -04:00