Commit Graph

77 Commits

Author SHA1 Message Date
Feanil Patel
4f725aa152 test: Add a test for setup_masquerade.
Test to verify the side-effects of calling this function since we now
rely on one of them in the SafeSessionMiddleware.
2021-04-02 14:19:10 -04:00
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
b70042435a Deprecate waffle_utils.testutils.override* functions
These functions should from now on be imported from
edx_toggles.toggles.testutils.
2020-11-03 19:25:37 +01: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
Carla Duarte
ca7434ce3b AA-405: UI fixes for courseware 2020-10-23 09:20:46 -04:00
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04: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
Nimisha Asthagiri
9bbc21ea8c Python 3: multi-lined assertIn, assertNotIn -> assertContains, assertNotContains 2019-09-30 08:51:02 -04:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Awais Qureshi
98ec44b56c BOM-404
Fixing python3
2019-09-11 12:52:56 +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
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
Gavin Sidebottom
e449a9ae35 Fixed bug involving users that could not be found using 'view this course as' functionality 2018-06-06 17:44:48 +05: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
113e8dde61 PLAT-1885 Stop using deprecated BlockUsageLocator properties 2018-01-12 16:40:21 -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
John Eskew
7dfb6cc681 Change all UTC timezones to import from pytz instead of Django. 2017-10-05 11:12:52 -04:00
Diana Huang
1cfefe2457 Modify the header to show the learner profile.
Remove the profile from the user dropdown.

LEARNER-2318
2017-09-25 17:06:08 -04:00
Awais Jibran
125552f204 Switching course view to specific student retains the profile language setting
https://openedx.atlassian.net/browse/EDUCATOR-891
2017-07-19 16:48:18 +05:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
John Eskew
3b57542ab0 Revert "Merge pull request #15170 from edx/jeskew/PLAT_1316_partitions_inheritance"
This reverts commit f97f052591, reversing
changes made to 800bcd8e20.
2017-05-30 12:42:54 -04:00
John Eskew
76389d8678 Run all files touched in inheritance/partition work through isort. 2017-05-25 13:24:08 -04:00
John Eskew
66f3aa5ccf Move fields.py, inheritance.py, and partitions to openedx/core. 2017-05-25 13:24:08 -04:00
Jeff LaJoie
413bce3d72 TNL-6739: adds in masquerading as enrollment track user 2017-04-06 09:35:08 -04:00
Andy Armstrong
ec241774ba Add the staff preview bar to the new course home page
LEARNER-75
2017-03-28 21:19:36 -04:00
Eric Fischer
50371ee59a Allow masquerade on progress page 2017-03-06 16:53:26 -05:00
cahrens
a6776f6973 Always check group access when masquerading.
TNL-6050
2017-01-19 14:47:10 -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
Albert St. Aubin
dbb66f8c09 Updated the problem meta to show a score of 0 and refactored/simplified the JS that build the problem meta string
TNL-5549
2016-10-21 06:40:20 -04:00
Ahsan Ulhaq
2ef42cbc51 User Menu Added Role information missing from menu items 2016-10-07 15:28:55 +05:00
Eric Fischer
46ed93807c Review feedback and actual fix
TIL about defining variables in Mako templates.
2016-09-30 16:27:17 -04:00
Eric Fischer
b3e4e81e97 TNL-4895 User dropdown reflects real user
Exposes real_user to the user_dropdown template, allowing for the requested
feature change of keeping the profile links pointed at the real user's profile.
2016-09-30 16:27:17 -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
Ned Batchelder
8571ceabeb Fix many wrong-assert-type errors 2016-08-03 12:44:41 -04:00
Sanford Student
03256937e6 fixing failing tests on master from enabling milestones_app feature flag 2016-07-28 14:18:45 -04:00
attiyaishaque
acc6d4f282 Fixed error on Course Home, when viewed as specific student. 2016-03-30 17:09:25 +05:00
Toby Lawrence
ad9498ecf4 Switch to SharedModuleStoreTestCase in the 'courseware' app where possible. 2016-02-08 14:11:04 -05:00
Nimisha Asthagiri
f3cb692472 Safe Session Cookies Middleware 2016-01-26 17:23:03 -05:00
Ayub-Khan
96e64464b5 -fix TNL-3556 Instructor tool "View as Specific Student" doesn't work on the course updates page.
-Added test for TNL-3556.
2016-01-05 17:50:23 +05:00
Sven Marnach
55ace6baa8 Make new masquerading code compatible to existing session data.
The new masquerading code introduced in PR #8775 adds a new attribute to
CourseMasquerade objects stored in the user's session.  When users who have
active masquerading configuration access instances with the new code, and
AttributeError occurs when trying to access the attribute user_name.

This fix ensures that CourseMasquerade objects receive all required attributes
when they are unpickled from the session.
2015-08-11 10:47:25 +02:00
Sven Marnach
3d7246ecc8 Allow masquerading as a specific user different from the logged in user. 2015-07-13 18:55:45 -07:00
Christine Lytwynec
ddb1ae667e Split lms unittests into multiple shards 2015-05-07 09:17:26 -04:00