Commit Graph

4909 Commits

Author SHA1 Message Date
emzubair
169b82261a [BD-18] Optimize paver settings call 2020-08-21 21:23:29 +05: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
Nick
f82a98cdbe Merge pull request #24792 from edx/ndalfonso/AA-282-course-emails-date-sync
AA-282 course emails date sync
2020-08-18 09:31:44 -04:00
Nicholas D'Alfonso
e9e85d05c1 AA-282 course emails date sync
- send course emails to users based on whichever date is later,
  sedule start date or course start date.  This addresses the
  scenario when a user enrolls in a self paced course before it
  has actually started.
2020-08-17 16:01:21 -04:00
Robert Raposa
a8c3413a32 fix waffle instance module name
Fixes the computation of the WaffleFlag and
WaffleSwitch instance module name. This in
turn fixes the code_owner as well.

ARCHBOM-1420
2020-08-15 15:49:11 -04:00
Robert Raposa
60827a6f73 add code_owner for flags and switches
Enhances the toggle state endpoint with
code_owner, module, and class for WaffleFlag
and WaffleSwitch.

ARCHBOM-1420
2020-08-14 16:47:49 -04:00
Diana Huang
6a84710cf7 Add django settings toggles to toggles endpoint. 2020-08-14 13:19:28 -04:00
Robert Raposa
20e5a3247b add course overrides and computed_status
Adds the following additions to the toggle state endpoint:

- course override data from CourseWaffleFlag.
- computed_status for waffle flags (accounting for
course overrides when applicable), and waffle switches.

Note: the waffle switch computed_status will make more
sense when we include WaffleSwitch instances that don't
have any data in the database.

ARCHBOM-1429
ARCHBOM-1366
2020-08-14 10:16:19 -04:00
stvn
70dbd1ab75 Merge PR #24772 add/kill-switch
* Commits:
  Implement kill-switch for the Learning MFE
2020-08-13 14:47:03 -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
David Joy
c6ae82db57 Implement kill-switch for the Learning MFE
by overriding can_load_courseware if the MFE is disabled for the user

If the user would be allowed to see the courseware MFE
(can_load_courseware), we check whether the MFE is disabled for them,
based on global settings, course settings (mongo courses), or their
particular bucketing in our ExperimentWaffleFlag.

If we determine they shouldn’t be allowed to see it, we return a new
CoursewareMicrofrontendDisabledAccessError access response, which the
MFE will use to know it should redirect to the old LMS experience.

Fixes: TNL-7362
Co-authored-by: stvn <stvn@mit.edu>
2020-08-13 12:05:49 -07:00
Dillon Dumesnil
c702d12957 Temporarily disable Show Answer Override for self-paced courses 2020-08-13 11:56:25 -07:00
Robert Raposa
b481be873f Merge pull request #24774 from edx/robrap/ARCHBOM-1427-add-waffle-flag-state
ARCHBOM-1427: add waffle flags and switches to toggle state
2020-08-13 12:50:28 -04:00
Robert Raposa
c7fb891600 add flags and switches to toggle state
Adds basic waffle flag and waffle switch data
to the toggle state endpoint.

ARCHBOM-1427
2020-08-13 12:02:51 -04:00
Brittney Exline
1091702c9d Merge pull request #24763 from edx/bexline/ent3315
[ENT-3315] Reduce calls to enterprise-learner endpoint by looking up data from db
2020-08-13 09:38:39 -06: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
Robert Raposa
eb0f62ee16 add tests for toggle state view
ARCHBOM-1427
2020-08-12 17:18:16 -04:00
Diana Huang
e31f688787 Merge pull request #24767 from edx/diana/toggle-endpoint
ARCHBOM-1410 - Add barebones toggles endpoint for development.
2020-08-12 13:51:03 -04:00
Aura Milena Alba
0192de00b2 [BD-10] [DEPR-92] Remove scss files that use pattern library 2020-08-12 13:12:36 -04:00
Diana Huang
0827a3749d Add barebones toggles endpoint for development. 2020-08-12 12:47:38 -04:00
Manjinder Singh
dbe40dae1a exposing constants to be backwards compatible (#24765)
* exposing constants to be backwards compatible
2020-08-12 12:43:07 -04: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
Kyle McCormick
662388c7db Allow omission of course_key in call to CourseWaffleFlag.is_enabled
This effectively evaluates the flag outside of the context of a course.
This was previously available through `.is_enabled_without_course_context`,
which has been removed in favor of simply `is_enabled()`.

This was done to make the CourseWaffleFlag interface more uniform with
that of WaffleFlag and ExperimentWaffleFlag and eliminate unecessary
branching when handling CourseWaffleFlags.
2020-08-10 11:57:02 -04:00
Kyle McCormick
b05948153a Add course-unawareness option to ExperimentWaffleFlag
For the Courseware MFE rollout experiment, we want users'
default buckets to be consistent across course runs.

ExperimentWaffleFlag advised that this could be done
by calling `.is_enabled(...)` without a course_key argument;
however, doing so breaks when uing the main_flag.BUCKET_NUM
scheme to apply bucket rules for a specific set of users
or courses.

This commit explicitly adds course-unaware-bucketing via
a new kwarg to ExperimentWaffleFlag.__init__ method.

Furthermore, it fixes ExperimentWaffleFlag.is_enabled(course_key=None)
to work as advertised, by means of calling
.is_enabled_without_course_context on its subordinate flags.

TNL-7405
2020-08-10 11:57:02 -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
DawoudSheraz
1947f2105b drop precentage column from VemPipelineIntegration model 2020-08-07 13:09:48 +05:00
DawoudSheraz
dae599b517 skip db test 2020-08-07 10:27:50 +05:00
DawoudSheraz
12f2e6eb2b remove percentage field from VEM pipeline config model 2020-08-07 10:25:52 +05: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
Dillon Dumesnil
2d7c6b2730 Merge pull request #24693 from edx/ddumesnil/persist-masquerade-staff-aa-275
AA-275: Persist Masquerade User staff status
2020-08-06 06:53:53 -07: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
c66bc865b6 AA-275: Persist Masquerade User staff status
We need both the original user's staff status as well as
the staff status of the user being masqueraded as.
2020-08-05 08:03:55 -07: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
David Ormsbee
d1f23422ca Merge pull request #24417 from open-craft/ahmed/bb-2675-support-annonymous-outline-access
[BD-29] [TNL-7263] Support Anonymous Courseware Access
2020-07-30 16:22:02 -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
Ahmad Bilal Khalid
53fe1dd7bc Adds Enrollment Processor which is responsible for respecting course's outline access.
Moved data.py out into the parent's dirctory i.e learning_sequences directory to avoid circular import issue which is occuring when we try to import data.py from models.py.

A new CourseContext model is created, which is responsible for housing course specific fields e.g course_visibility.
2020-07-30 12:44:19 +05: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