Commit Graph

39 Commits

Author SHA1 Message Date
Usama Sadiq
859df03049 refactor: ran pyupgrade on lms/djangoapps/courseware (#26737) 2021-03-12 12:15:58 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +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
stvn
8758c32a9e Enable backend config for specific-student masquerading 2020-08-05 19:17:29 -07:00
stvn
d4f1c271aa Add active group name to masquerade endpoint 2020-08-05 19:15:12 -07:00
stvn
3fce917fce Fix masquerade message
by removing the "escaped" username. I'm not sure why we this is done
this way (it's displayed the same way in the existing experience.
2020-08-05 19:14:56 -07:00
stvn
ab8bcccd01 Normalize masquerade response data
so that it's easier to work with on the frontend.
2020-08-05 19:14:56 -07:00
Calen Pennington
bb12560233 Make the ExperimentWaffleFlag respect course masquerading when checking if it's active for a specific enrollment 2020-07-27 13:59:53 -04:00
stvn
2f7372202b Update masquerade API to show only active partitions 2020-06-18 14:54:50 -07:00
stvn
994b2b002f Add explicit masquerade support to courseware API 2020-06-18 14:54:49 -07:00
stvn
17d1391f8f Add HTTP GET endpoint for masquerade
to inquire about active and available options.

This is to be used, at least initially, by the new Courseware
Experience, the Learning MFE.
2020-05-19 14:59:07 -07:00
stvn
69417396aa Add is_staff check to masquerade POST 2020-05-19 13:55:37 -07:00
stvn
5bf38f5416 Convert masquerade view to class-based 2020-05-19 13:55:37 -07:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -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
Ayub khan
af2e7705b1 INCR-434 python3 compatibility 2019-07-16 15:54:54 +05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Matthew Piatetsky
9ba3e0c5a5 ensure content start date banner only shows for currently open sections 2019-01-17 12:32:08 -05:00
Jeremy Bowman
d671c4b1d0 TE-2689 Remove useless pylint suppressions part 1 2018-08-13 17:01:21 -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
Jeremy Bowman
f8e5e38cc4 PLAT-1884 Replace deprecated xblock.fragment usage 2018-01-11 14:20:12 -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
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
Braden MacDonald
0defc55b84 Allow previewing cohorted content when masquerading 2015-07-22 00:54:15 -07:00
Sven Marnach
3d7246ecc8 Allow masquerading as a specific user different from the logged in user. 2015-07-13 18:55:45 -07:00
Andy Armstrong
561c57dbe9 Extend preview to support cohorted courseware
TNL-651
2015-01-15 10:33:44 -05:00
stv
00ae488960 Fix PEP8: E225 missing whitespace around operator 2014-11-10 19:30:18 -08:00
David Baumgold
f3f4af8087 settings.MITX_FEATURES => settings.FEATURES 2013-12-03 15:34:55 -05:00
ichuang
5f74ccd1a0 use ENABLE_MASQUERADE in masquerade.py 2013-04-13 22:52:17 -04:00
ichuang
1c2452e401 make is_masquerading_as_student work with Mock for tests 2013-04-13 22:47:34 -04:00
ichuang
857a6e0bd0 pylint masquerade fixes 2013-04-13 22:47:28 -04:00
ichuang
fdfc37e4e3 masquerade pep8 2013-04-13 22:47:21 -04:00
ichuang
fb0a23238a allow staff to masquerade as student - works
Conflicts:
	lms/djangoapps/courseware/views.py
	lms/templates/courseware/course_navigation.html
2013-04-13 22:46:39 -04:00
ichuang
c905cc7416 add masquerade.py 2013-04-13 22:46:30 -04:00