Commit Graph

3494 Commits

Author SHA1 Message Date
David Ormsbee
8c7dc22dfe Merge pull request #23068 from open-craft/olx-rest-api
REST API to export modulestore XBlocks as OLX
2020-02-25 15:11:08 -05:00
Diana Huang
d5ae5c3a8e Remove wrapper code from logout flow. 2020-02-25 13:06:42 -05:00
Diana Huang
1212ab756a Merge pull request #23186 from edx/diana/replace-access-token-factory
Replace DOP library factories with the DOT equivalent.
2020-02-25 12:35:05 -05:00
Jeff LaJoie
d93ef18907 Merge pull request #22990 from edx/jlajoie/AA-6
AA-6: Adds in Dates tab for Course Overview
2020-02-25 11:13:05 -05:00
Jeff LaJoie
fa3b1cd835 AA-6: Adds in dates tab and dates dashboard view to courseware 2020-02-25 10:48:45 -05:00
pkulkark
b31ca38fbd Adds weeks argument to send_course_update management command. 2020-02-25 20:53:41 +05:30
Diana Huang
0b9f7298c6 Replace DOP library factories with the DOT equivalent.
https://openedx.atlassian.net/browse/BOM-1312
2020-02-24 16:33:56 -05:00
Mike O'Connell
c242ed6aca Add existence check on secondary email
Moves the existence check for secondary (recovery) email to validate
method. If the email already exists, silently remove it from the set of
data to be updated. This parallels the existing behavior for updating
the primary email.

ENT-1913
2020-02-24 13:03:09 -05:00
Diana Huang
0462e8fc5d Use DOT for creating new sites instead of DOP. 2020-02-21 15:13:04 -05:00
Braden MacDonald
23d649d7e3 REST API to export modulestore XBlocks as OLX.
This was originally a separate plugin called openedx-olx-rest-api.

It provides a Studio API that any user with course authoring permission can use to get the OLX of an individual XBlock or a unit. Without this, the only way to get an XBlock's OLX was to download the tarball of the entire course.

Examples of usage (be logged in to Studio on devstack):

Simple HTML XBlock:
http://localhost:18010/api/olx-export/v1/xblock/block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4/

Exporting a unit:
http://localhost:18010/api/olx-export/v1/xblock/block-v1:edX+DemoX+Demo_Course+type@vertical+block@134df56c516a4a0dbb24dd5facef746e/

Example output for an HTML block:

    { 
       "root_block_id":"block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4",
       "blocks":{ 
          "block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4":{ 
             "olx":"<html display_name=\"Blank HTML Page\"><![CDATA[\n<p><strong>Welcome to the edX Demo Course Introduction.</strong></p>\n]]></html>\n"
          }
       }
    }

The code is designed primarily for use when importing content into Blockstore. So it will:
* Export HTML blocks as a combined OLX/HTML file, with the HTML in a CDATA section
* Convert vertical blocks to unit blocks (unit is like a vertical but has no UI elements)
* Detect static files (such as images) used by the XBlock and list the absolute URL of each static file in the "static_files": {...} JSON element for each XBlock that has at least one static file usage. This can handle static files that are in mongo ("contentstore" / "Files & Uploads") as well as files generated on-the-fly during OLX serialization via the export_fs API (mostly this is video transcripts).
2020-02-21 11:29:21 -08:00
Troy Sankey
3f85ba3fe6 Merge pull request #23144 from edx/pwnage101/rename_site_configuration_siteconfiguration_values_1.1
Rename values in SiteConfiguration/History (1/3) (retry)
2020-02-21 11:42:15 -05:00
Robert Raposa
372d2e927c BOM-1264: add third-party-auth scope and usage (#23135)
* WIP: add third-party-auth scope and usage

BOM-1264


* Fix tests now that we do permissions in a more standard way.

Rather than manually setting the permission class we previously
explicitly raised a PermissionDenied exception.  The way DRF
permissoning logic works, if we use the WWW-Authenticate header in the
highest priority auth class, it will return a 401 instead of a 403.


* Added test to make sure having permissions gives access to user mapping api

* Test new filters logic.

Ensure that the filters we add to the application access model make it
into the JWT correctly.

* quality fix

* quality fix

* disable pylint warning

* quality fix

* fix indent prob

Co-authored-by: Feanil Patel <feanil@edx.org>
Co-authored-by: Manjinder Singh <49171515+jinder1s@users.noreply.github.com>
2020-02-21 11:25:28 -05:00
Calen Pennington
b47eb0f24c Extract common configuration/documentation into the base StackedConfigModelAdmin class 2020-02-21 10:50:22 -05:00
Calen Pennington
98328ea426 On publish, add evenly spaced dates to self-paced courses 2020-02-21 10:50:22 -05:00
Dave St.Germain
00f5beb66f Merge pull request #22992 from edx/dcs/perf-vertical
Improve Vertical Performance
2020-02-20 12:30:22 -05:00
Dave St.Germain
a5b0f71108 Several optimizations for improving vertical rendering performance. 2020-02-20 11:41:21 -05:00
Mike OConnell
5ec786831b Merge pull request #23114 from edx/ENT-2607-2
Don't update account recovery until after activation
2020-02-20 09:03:59 -05:00
Mike O'Connell
bc99a31738 Merge branch 'master' into ENT-2607-2 2020-02-19 14:01:28 -05:00
Mike O'Connell
2c5264cb94 Unit test for account recovery
Add a unit test to create and activate a recovery email address

ENT-2607
2020-02-19 14:00:07 -05:00
Diana Huang
2f019c4d23 Rename profile image hash seed to better describe what it is. 2020-02-19 13:11:45 -05:00
Troy Sankey
18deacde54 Revert "Revert "This stage does the following: (#22692)""
This reverts commit 84de6bc6de
which reverts commit cebeab4348
which implements the first stage of the `values` column rename in
SiteConfiguration.  However, I included a small change:

This time, we set a default value on the new `site_values` column so
that the ORM will happily deserialize the JSONField without throwing a
JSONDecodeError.
2020-02-19 12:01:57 -05:00
Jansen Kantor
0e0b488fb5 EDUCATOR-4876: Correctly handle 'None' as a valid max_team_size (#23038)
add default max team sizes, change ui to not show max for managed teams
2020-02-18 16:44:20 -05:00
Ned Batchelder
626b35cd16 Merge pull request #22637 from thraxil/bookmarks-update-exblocks-cache-task-name
update bookmarks update_xblocks_cache celery task name
2020-02-18 15:15:10 -05:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Dillon Dumesnil
401a37dde5 Merge pull request #23079 from edx/ddumesnil/relevant-dates-AA-4
AA-4: Show relevant dates in course dates sidebar
2020-02-18 12:47:31 -05:00
Manjinder Singh
2274cd09b4 Added options to pytest calls (#23083)
- added more default options to pytest calls in setup.cfg and pytest.ini files.
- pytest-json-report's plugin name in pluggy has changed, so added option for multiple names
2020-02-18 08:58:44 -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
Aarif
41c886a42d Added migration for JSONField 2020-02-17 16:15:53 +05:00
Robert Raposa
0a64e11db7 update auth docs
1. clarify asymmetric jwt decision.
2. move relevant auth docs to edx-drf-extensions and
edx-rest-api-client.
2020-02-14 13:26:35 -05:00
Robert Raposa
d8c3cfe278 Merge pull request #23106 from edx/robrap/update-auth-docs
remove hard line breaks
2020-02-14 11:48:11 -05:00
Dave St.Germain
9da8ff0f0b Allow anonymous access to courseware API, and return error message if user is unenrolled. 2020-02-14 11:03:15 -05:00
Mike O'Connell
e5e96c9dde Don't update account recovery until after activation
Rather than to create or update the account recovery record when the
Account Settings page is updated, defer updating until the new
recovery email is confirmed

ENT-2607
2020-02-14 09:59:36 -05:00
Nathan Sprenkle
c66176da13 Add error reporting to UI for CSV team management (#23035)
* Add error banner for upload memberships errors

* Edit error message language

* Fix linter warnings
2020-02-14 09:58:58 -05:00
Kyle McCormick
bac070e8af fixup! fixup! Handle next and course_id in /login_ajax
nvm, just skip_unless_lms
2020-02-13 12:24:51 -05:00
Kyle McCormick
0875ede96f fixup! Handle next and course_id in /login_ajax
fix test_login_success_with_redirect in studio
2020-02-13 12:24:51 -05:00
Kyle McCormick
234eedd8c6 Handle next and course_id in /login_ajax
Currently, the /login_ajax endpoint does not regard
any `next` or `course_id` parameters. This commit changes
that, sharing the logic that /login (which the current
templated login page uses) employs to cacluate
a redirect-after-login URL based on `next` and `course_id`.

The new functionality is behind ENABLE_LOGIN_MICROFRONTEND.
2020-02-13 12:24:51 -05:00
Robert Raposa
1718cc91ba remove hard line breaks 2020-02-13 10:16:33 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Christie Rice
1167ce74c8 MICROBA-149 Create external user id tables (#23064)
* MICROBA-149 Create user id tables

* Move to openedx

* Rename app in doc

* Update PII tag

* Update doc
2020-02-11 08:17:28 -05:00
Ayub-khan
d3a02bc3e5 BOM-1121
-Updated middleware setting to use use middleware insted of
middleware_classes
-github install of django-method-override fork to support
new style middleware in django1.11
2020-02-11 14:35:26 +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
Feanil Patel
4422fb36cf Merge pull request #23037 from edx/feanil/bom-939
BOM-939 Update pickle procotol version.
2020-02-10 11:36:20 -05:00
David Ormsbee
76a7d40065 Merge pull request #23047 from edx/ormsbee/update_config_models
Python upgrades (django-config-models v2)+
2020-02-10 09:13:10 -05:00
Hasnain Naveed
535869ff15 Merge pull request #22790 from edx/hasnain-naveed/ENT-2511
ENT-2511 | Disabled the admin panel's login page.
2020-02-10 18:23:53 +05:00
Zia Fazal
26891841e4 Merge pull request #22987 from edx/ziafazal/ENT-2269
ENT-2269: Added ability to logout from IDP when logout flow is triggered from learner portal
2020-02-10 12:53:41 +05:00
David Ormsbee
b134228954 Python upgrades (django-config-models v2)+
Some tests that used to mock the cache internals of ConfigurationModels
had to be modified to use CacheIsolationTestCase instead (the things
they were mocking no longer exist).
2020-02-09 20:37:45 -05:00
Dillon Dumesnil
7444980fbd Merge pull request #22911 from edx/ddumesnil/relevant-dates-AA-4
Show relevant dates in course dates sidebar
2020-02-07 10:27:43 -05:00
zia.fazal@arbisoft.com
d7ed021b8d Added ability to logout from IDP
Logout link should be displayed only for learner portal

Added changed to display only for learner portal
Added unit tests

check third_party_auth is enabled

Changes to extend SSO logout link feature to Oauth providers

Fixed quality violations

Removed unncessary assert

Reviewer feedback changes
2020-02-07 19:38:36 +05:00
Muhammad Soban Javed
6dfcddd6d8 Merge pull request #23030 from edx/BOM-1251
Fixing deprecated django-filter features
2020-02-07 18:45:30 +05:00