Commit Graph

97 Commits

Author SHA1 Message Date
Usama Sadiq
82406e970a reafctor: ran pyupgrade on lms/djangoapps/courseware (#26739) 2021-03-12 14:43:44 +05:00
Aarif
0112339b20 replaced unittest assertions pytest assertions (#26543) 2021-02-19 11:58:27 +05:00
Jawayria
03e6a874d0 Applied pylint-amnesty to courseware 2021-02-03 21:56:24 +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
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
13a70fcaa6 Deprecate COURSE_OUTLINE_PAGE_FLAG and UNIFIED_COURSE_TAB_FLAG
These flags are deprecated in favor or the DISABLE_* equivalent.
This allows us to get rid of the DefaultTrueWaffleNamespace class.
2020-10-27 10:20:41 +01:00
Dillon Dumesnil
87474eadf6 AA-322: Adding priority to Dates Tab order
This also starts taking priority into account for all tabs, and
not just dynamic tabs via the CourseTabPluginManager (see comments
in the code for more detail)
2020-09-10 15:03:32 -04:00
Dillon Dumesnil
be346499da AA-219: Dates Tab behavior improvements
This switches the Dates Tab to be an enrolled tab allowing only
enrolled learners to view. Additionally, it will now redirect
logged out learners to the login page if they hit the Dates Tab directly.
2020-07-10 07:08:07 -07:00
Jeff LaJoie
ee0f4567a8 AA-163: Fixes duplicate dates tab issue 2020-05-12 08:38:14 -04:00
Dave St.Germain
1aa8c9c53d Add a new courseware API Django app to support the courseware micro-frontend. 2020-01-28 14:59:07 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Diana Huang
df32ffd37b Remove notes app and remaining js. 2019-10-02 15:00:37 -04:00
Nimisha Asthagiri
4914c42364 Python 3: resp.content regex searches 2019-09-30 08:51:02 -04:00
Ned Batchelder
58828da55b Fix patches to use proper courseware imports 2019-09-26 10:53:55 -04:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Ayub khan
67224f401a BOM-90
Made all tests py3 compatible.
2019-08-22 13:04:05 +05:00
alangsto
4a1346b068 INCR-265 Run python-modernize on lms/djangoapps/courseware/management and lms/djangoapps/courseware/tests (#20716)
* updated files according to INCR-265

* fixed docstring and line-length problems from quality test

* Revert "fixed docstring and line-length problems from quality test"

This reverts commit d050f55a4ecfaa38f46b80ec4bb85ff399a79a8c.

* fixed errors reported in quality report

* had error, fixed it

* reversed change

* fixed over/under indentation, and added line to import.py that Ned had suggested

* tried disabling pylint for this line

* testing new email

* testing email in different window

* re-added symlink and docstring
2019-05-31 14:07:18 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Michael Youngstrom
8aed0ff719 Clean up after any get_mock_request or set_current_request calls 2018-08-22 17:23:39 -04:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
Brian Mesick
832f6a7157 Merge pull request #18320 from edx/bmedx/remove_111_test_marks
Remove unused pytest markers for Django 1.11 upgrade
2018-06-06 11:15:26 -04:00
bmedx
c125ff6a57 Remove unused pytest markers for Django 1.11 upgrade 2018-06-06 09:58:38 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Matthew Piatetsky
92c94008a2 Fix tests that expected unified_course_tab to be off 2018-02-22 08:45:25 -05:00
Jeremy Bowman
ff4732bcf6 PLAT-1899 Fix some issues running under Django 1.10+ 2018-01-24 16:04:28 -05:00
Jeremy Bowman
669aa13ad6 PLAT-1873 to_deprecated_string() cleanup part 2 2018-01-08 17:26:55 -05:00
bmedx
b5d6fca44e Update is_authenticated patches to work with Django 1.10+ 2017-12-22 13:22:49 -05:00
bmedx
bc72c28a03 Remove unnecessary patches to User::is_authenticated 2017-12-22 11:33:35 -05:00
Jeremy Bowman
103c723c6d PLAT-1801 Preserve new user login behavior under Django 1.10+ 2017-12-05 10:20:25 -05:00
bmedx
5fbbf4979a Tag LMS Unit 1 tests that fail in Django 1.11 2017-11-22 15:46:45 -05:00
Clinton Blackburn
3a005c492f Disabled anonymous access for tabs that require enrollment 2017-11-14 08:00:16 -05:00
Clinton Blackburn
f1f5a7ddb3 Disabled edx-notes for anonymous users 2017-11-08 15:41:02 -05:00
Diana Huang
482b63baaf Handle tab hiding at a different level. 2017-07-26 16:05:48 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Robert Raposa
eaab2cf444 Add course overrides of waffle flags. 2017-06-01 15:12:50 -04:00
Andy Armstrong
9ce46a3fb5 Improve course experience tests 2017-05-05 13:55:59 -04:00
Andy Armstrong
2167584e5e Unify the home and course tabs
LEARNER-609
2017-05-01 17:22:28 -04:00
Andy Armstrong
248558f1d4 Render Discussion tab using web fragments 2017-02-28 23:39:39 -05:00
J. Cliff Dyer
9366c43a83 Fix issues with RequestFactory used as Request.
* Centralize creation of quick request objects.
* Isolate caches to individual tests to prevent test ordering
  dependencies.

TNL-5811
2016-11-07 10:51:04 -05:00
Dmitry Viskov
bb09fdb7be Ability to hide Pages from students 2016-10-14 22:43:26 +03:00
Andy Armstrong
89f93df46e Refactor out a new discussions Django app 2016-08-17 16:20:45 -04:00
Sanford Student
fc943ff539 moving milestones check to access.py and upgrading milestones version 2016-08-04 14:47:15 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Nimisha Asthagiri
c6954902e3 Create courseware/views folder 2016-05-03 09:02:45 -04:00
John Eskew
8354e6d79c Fix quality issue. 2016-04-27 09:27:36 -04:00
John Eskew
88927c74d9 Fix static tabs test. 2016-04-21 14:39:29 -04:00
John Eskew
91c94977d5 Unify usage of a single test mixed modulestore called:
TEST_DATA_MIXED_MODULESTORE
Remove these test mixed modulestores:
TEST_DATA_MIXED_TOY_MODULESTORE
TEST_DATA_MIXED_CLOSED_MODULESTORE
TEST_DATA_MIXED_GRADED_MODULESTORE
2016-04-12 11:53:51 -04:00
John Eskew
20533de145 Skip test with static tabs - seems broken. 2016-04-12 11:53:50 -04:00