Commit Graph

1201 Commits

Author SHA1 Message Date
Feanil Patel
39d3a7ca17 Fix pep8 issues caused by the fixer. 2019-12-30 11:42:04 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Robert Raposa
2202545aec remove studio signin and signup pages
This completes the work started in https://github.com/edx/edx-platform/pull/19453
to use the LMS login and registration for Studio, rather than Studio
providing its own implementation.

LMS login/registration are being used for the following reasons:
1. LMS logistration properly handles all SSO integrations.
2. A single logistration is simpler to maintain and understand.
3. Allows Studio to work more like all other IDAs that use LMS
logistration.

The original switch to use LMS logistration for Studio also added the
toggle `DISABLE_STUDIO_SSO_OVER_LMS` to provide the community some
additional time for switching. This commit removes this toggle, which
at this point means all deployments will use the LMS logistration.

This change requires sharing cookies across LMS and Studio. Should that
prove to be a problem for certain Open edX instances, there are
discussions of possible alternative solutions.
See https://github.com/edx/edx-platform/pull/19845#issuecomment-559154256

Detailed changes:
* Fix some Studio links that still went to old Studio signin and signup.
* Remove DISABLE_STUDIO_SSO_OVER_LMS feature toggle.
* Remove old studio signin and signup pages and templates.
* Fix url name "login", which had different meanings for Studio and LMS.
* Use the following settings: LOGIN_URL, FRONTEND_LOGIN_URL,
FRONTEND_LOGOUT_URL, and FRONTEND_REGISTER_URL.
* Redirect /signin and /signup to the LMS logistration.
* Add custom metric `uses_pattern_library`.
* Add custom metric `student_activate_account`.
* Add Django Settings to allow /signin, /signup, and /login_post to be
disabled once ready.

This work also relates to ARCH-218 and DEPR-6.

ARCH-1253
2019-12-04 02:36:36 -05:00
Jeremy Bowman
3db3403fc4 Fix mock transcript responses BOM-918 (#22020) 2019-10-11 16:22:52 -04:00
Feanil Patel
067d95f797 Fix transcript tests to be consistent. 2019-10-08 15:26:52 -04:00
Feanil Patel
92e06d52a6 Delete items by their asset_key instead of _id.
The _id comes back as a dict and it's in the wrong order compared to the
dict stored in mongo.  This results in lookups for deletion failing when
we use the '_id' as the lookup key.

Luckily the delete function also takes the asset_key as a valid key to
delete by so we just use that instead.
2019-10-08 15:26:52 -04:00
Feanil Patel
9610aab0f8 Fix more cms contentstore tests. 2019-10-08 15:26:52 -04:00
Aarif
4db48ae9b0 Merge pull request #21862 from edx/BOM-762
BOM-762
2019-10-08 13:40:12 +05:00
Manjinder Singh
84ccc9b41c Merge pull request #21829 from edx/msingh/type_error
BOM-749: Fixing: a bytes-like object is required, not 'str'
2019-10-02 12:45:36 -04:00
jinder1s
067ae46483 explicitly declaring value a byte 2019-09-30 09:31:50 -04:00
Nimisha Asthagiri
8cfc33c0f1 Python 3: multi-line regex replacement of assertIn and assertNotIn 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
4914c42364 Python 3: resp.content regex searches 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
9bbc21ea8c Python 3: multi-lined assertIn, assertNotIn -> assertContains, assertNotContains 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
beb95eb69c Python 3: assertIn -> assertContains consistency 2019-09-30 08:51:01 -04:00
Nimisha Asthagiri
d4832a65aa Python 3: assertNotIn -> assertNotContains consistency 2019-09-30 08:50:38 -04:00
Nimisha Asthagiri
ccefde8d3c Python-3: assertNotIn(..response.content) -> assertNotContains 2019-09-30 08:50:38 -04:00
aarif
ac38a76c48 python 3 fixes 2019-09-30 17:35:02 +05:00
Ned Batchelder
b3845b2b96 Merge pull request #21581 from edx/nedbat/fix-courseware-warning
Finally import courseware properly everywhere to get rid of a warning
2019-09-26 14:25:27 -04:00
Jeremy Bowman
4babc5ee1c Fix CorruptGridFile in Python 3 tests BOM-375 (#21794) 2019-09-26 13:43:26 -04:00
uzairr
a35b452877 NullTranslations object doesn't have ugettext attribute
Some of the tests are failing because NullTranslations object is
behaving differently with py2 and py3.With py2, it has 'ugettext'
attribute but with py3 it doesn't have.To make it compliant with
both versions modifications in the tests have been added so that
build will not fail.

PROD-663
2019-09-26 21:37:38 +05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
aarif
f39e6c5914 minor fixes 2019-09-26 16:18:31 +05:00
aarif
7eef705bbe python 3 fixes
minor fixes
2019-09-26 15:42:07 +05:00
aarif
00f42fbd9a python 3 fixes
python 3 fixes

python 3 fixes

python 3 fixes

minor changes
2019-09-25 18:47:37 +05:00
uzairr
930bf84188 DjangoTranslation object doesn't have ugettext attribute
Some of the tests are failing because DjangoTranslation object is
behaving differently with py2 and py3.With py2, it has 'ugettext'
attribute but with py3 it doesn't have.To make it compliant with
both versions modifications in the tests have been added so that
build will not fail.

PROD-664
2019-09-25 13:31:39 +05:00
Nicholas D'Alfonso
039b7aed29 DISCO-1342 hide fields
hide course card image, course about page image, and course
display name when publisher flag is turned on
2019-09-19 11:56:00 -04:00
Feanil Patel
dab38a5ef3 Merge pull request #21701 from edx/python3-swarm
Python3 swarm
2019-09-19 10:23:04 -04:00
Michael Terry
1f024c406b Add Studio note about mktg site delay
Add a note when marketing site is enabled that there is a delay
from changes in Studio appearing on the marketing site.

DISCO-1356
2019-09-18 16:31:36 -04:00
Feanil Patel
cb64fed1af BOM-489 Studio tests with byte/str mismatch. 2019-09-18 14:21:16 -04:00
Michael Terry
578a910260 Show Upgrade Deadline in Studio
This shows the verified upgrade deadline for the course, as a
read-only field.

DISCO-1345
2019-09-17 14:58:19 -04:00
Awais Qureshi
e4b737cf97 BOM-426
Fixing python3
2019-09-11 17:29:46 +05:00
Feanil Patel
a5b279c702 Merge pull request #21598 from amitvadhel/BOM-447
BOM-447 | Updates for TypeError in Python 3
2019-09-09 10:58:41 -04:00
amitvadhel
77ac61212b Updates for TypeError in Python 3 2019-09-08 13:02:55 +03:00
Michael Terry
b229e9749b Merge pull request #21516 from edx/mikix/enable-publisher
Use new ENABLE_PUBLISHER feature flag
2019-09-04 13:28:59 -04:00
Michael Terry
8bbc717637 Use new ENABLE_PUBLISHER feature flag
ENABLE_MKTG_SITE has been serving double duty to both indicate that
an Open edX installation is using a Drupal marketing site AND
is using the Publisher workflow tool for managing course metadata.

But now that publisher-frontend is available and the Publisher
feature is no longer tied to the marketing site, we want to tease
apart those two concerns. Hence ENABLE_PUBLISHER.

Only really used so far in Studio, to control which fields are
shown (if using Publisher, some fields are only editable in
Publisher).
2019-09-04 12:18:03 -04:00
Brian Mesick
75e38fc4fd DEPR-18 Remove deprecated Notes LMS djangoapp (#21008) 2019-09-03 16:49:58 -04:00
arbisoft
bcf1e781e2 BOM-349
Fixing python3
2019-08-29 23:26:41 +05:00
Dave St.Germain
7a28bc8759 Response content is bytes 2019-08-19 16:39:09 -04:00
David Ormsbee
9a1385585f Convert response bytes to str before JSON parsing. (#21375)
Convert response bytes to str before JSON parsing.
2019-08-19 11:01:55 -04:00
Waheed Ahmed
23bc5af0fc Fix course:org link creation upon rerun.
Upon rerun creation from publisher course:organization link
was not creating, due to which org logo was not appearing on
course certificates.

Fixed by creating course:org link upon rerun.

PROD-125
2019-08-05 13:48:50 +05:00
David Ormsbee
b3614f3a00 Merge pull request #20954 from open-craft/symbolist/html-block
HtmlModule to HtmlBlock [SE-1089]
2019-08-01 11:36:23 -04:00
Feanil Patel
1f7b12a38d Remove references to push notifications.
Push notifications was only ever setup to connect to Parse.com a service
that has been discontinued.  Since we haven't replaced the functionality
for a few years now, remove this dead code.

In cms/templates/js/course_info_update.underscore we're allowing content
to not be escaped because this is by design according to the tests.
Long term there should be a better fix for this but for now this is
intended behavior.
2019-07-24 11:45:46 -04:00
Usman Khalid
8dfc8e5fda Convert AboutModule, CourseInfoModule, HtmlModule and StaticTabModule to XBlocks. 2019-07-24 20:19:44 +05:00
aarif
5f5b2ddc12 parent c89ecb384f
author aarif <mraarif@outlook.com> 1562661182 +0500
committer root <root@lms.devstack.edx> 1563270070 +0000

ran python-modernize and isort on files mentioned in INCR-327

changes made to comply with pylint

changes made to comply with pylint and pass failing test

changes made to comply with pylint
2019-07-16 09:46:20 +00:00
Ayub
2aa5d89831 Merge pull request #20980 from edx/INCR-329
INCR-329 python3 compatibility
2019-07-12 12:05:31 +05:00
Ayub
1f982901f8 Merge pull request #20978 from edx/INCR-328
INCR-328 python3 compatibility
2019-07-12 12:04:04 +05:00
Ayub khan
ad2423fcc3 python3 compatibility 2019-07-09 15:22:19 +05:00
Ayub khan
171b66114c INCR-329 python3 compatibility 2019-07-09 13:17:51 +05:00
Ayub khan
4ed93be5ff INCR-328 python3 compatibility 2019-07-09 13:09:08 +05:00