Commit Graph

21 Commits

Author SHA1 Message Date
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
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
e9b3d8e8ec INCR-333 python3 compatibility 2019-07-09 14:19:16 +05:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
tlindaliu
0c837adfce Refactor auth.has_access to auth.user_has_role
Change name of method to clear up confusion with the access.has_access method.
2015-07-19 20:42:29 -04:00
Brandon DeRosier
bdc64a7c70 Moved has_course_access from CMS to student.auth (common) 2014-12-02 19:36:38 -05:00
Don Mitchell
935d5dee34 LMS-11331, LMS-11345 Make auth check branch agnostic; fix deserialize keys 2014-09-11 10:53:05 -04:00
Julia Hansbrough
3f3e9724d0 Add fallback for org based roles 2014-06-09 15:10:49 -04:00
Calen Pennington
0d88379eeb Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds all of cms.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-07 12:56:43 -04:00
cahrens
c2199279e7 Changes to preview to support xblocks using Locators intead of Locatins.
STUD-967
2014-02-05 12:16:20 -05:00
Oleg Marshev
13c19c98e2 Add role parameter to LTI. BLD-583. 2014-01-30 14:37:33 +02:00
Don Mitchell
3ebac80778 Replace authz fns with roles.py ones
STUD-1006
2014-01-14 17:04:44 -05:00
cahrens
ec55d8c1a9 Create explicit Locations.
STUD-1030
2013-12-11 10:03:34 -05:00
Don Mitchell
010905eb99 RESTful api for getting course listing and opening course in studio.
Pattern for how to do refactoring from locations to locators and from
old style urls to restful ones.
2013-10-16 16:54:31 -04:00
Julian Arni
3ed4198204 Contentstore views pylint fixes 2013-08-14 19:10:00 -04:00
Don Mitchell
a2524c517f Force locations to be Location objects earlier 2013-07-01 12:33:08 -04:00
Steve Strassmann
8bb6ad3689 relative imports 2013-05-13 11:31:56 -04:00
Steve Strassmann
979e3be174 fix pep8: imports and blank lines 2013-05-13 09:58:30 -04:00
Steve Strassmann
9350a2c067 refactoring views 2013-05-10 13:56:30 -04:00
Steve Strassmann
0bea50ede1 start refactoring views.py 2013-05-09 16:24:21 -04:00