Commit Graph

31 Commits

Author SHA1 Message Date
Usama Sadiq
82406e970a reafctor: ran pyupgrade on lms/djangoapps/courseware (#26739) 2021-03-12 14:43:44 +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
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +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
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04: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
Agrendalath
aa0e06a15e Add OAuth2 and JWT support to XBlock handlers
This adds OAuth2 and JWT API to call XBlock handlers. It is an alternative approach to #15940 - it reuses some DRF logic to handle this, but does not convert `handle_xblock_callback` to DRF view, which caused issues described in edx/XBlock#383.
2019-01-17 00:17:38 +01:00
cahrens
6f71706b17 Remove SlashSeparatedCourseKey from tests. 2017-08-07 14:49:30 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
muhammad-ammar
6a5ce5d544 Upgrade factory_boy
TNL-3179
2015-09-18 18:02:38 +05:00
Sarina Canelake
0c7b60b82b Remove 'pylint: disable=W0232' because we ignore this warning in pylintrc 2014-12-01 11:22:12 -05:00
Sarina Canelake
e0f1d3f3f3 s/pylint: disable=C0111/pylint: disable=missing-docstring/ 2014-12-01 11:22:09 -05:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04:00
Sarina Canelake
110719deae StaffFactories accept course_keys, not courses. Make that clear in the interface. 2014-05-24 18:49:06 -04:00
Calen Pennington
9811926d97 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit updates lms/djangoapps/courseware.

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-06 10:08:32 -04:00
Don Mitchell
858e354a6d Moved roles.py to common student 2014-01-14 17:04:43 -05:00
Calen Pennington
a6a004314a Use block type, rather than class names for StudentPreference field storage in LMS 2014-01-09 15:59:16 -05:00
David Baumgold
d15391fdfa Update factory_boy to 2.2.1 2013-12-05 15:50:49 -05:00
Adam Palay
24aa0decb4 fix OrgInstructorRole definition and add tests 2013-11-22 13:00:45 -05:00
Calen Pennington
820e771171 Add failing test for [LMS-1528]
Also cleans up test_view_authentication to use user factories for
various user classes
2013-11-22 13:00:45 -05:00
Calen Pennington
061a46beef Formalize various access roles as objects
This centralizes the logic for group membership, and means that we
don't need to make queries to find out whether the legacy groups names exist.
2013-11-13 13:42:37 -05:00
Sarina Canelake
198452cd1c Adds Staff and Instructor factories 2013-11-04 11:38:43 -05:00
Calen Pennington
8201b1412e Use XBlock 0.3 2013-09-06 09:45:59 -04:00
Felix Sun
c00721bbe6 Fixed the preferences scope of xblock.
Added self to authors.

Conflicts:
	AUTHORS
	CHANGELOG.rst
2013-06-20 10:17:25 -04:00
Don Mitchell
168cb306d3 Move tz_aware into connection config rather than settings.
Make django use_tz
2013-06-10 17:16:35 -04:00
Jay Zoldak
be76f73107 Consolidate and upgrade factories 2013-04-18 15:11:10 -04:00
Calen Pennington
6644b78819 Fix gradebook when using grade cutoffs other than A/B/C 2013-04-16 11:38:58 -04:00
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
Jay Zoldak
91b8a95ed7 Add unit tests for lms courseware access 2013-01-30 15:03:43 -05:00