Commit Graph

49 Commits

Author SHA1 Message Date
M. Zulqarnain
fa271dafe9 BOM-2369 (C): pyupgrade on contentstore/tests (#26759)
* pyupgrade on contentstore/tests
2021-03-04 14:37:39 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +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
Kyle McCormick
538dbf696b Import CMS code using fully qualified module names
or, using proper the proper Python 3 relative imports
(e.g., 'from .views import x') which are standard and
unambiguous.
2020-10-19 09:34:31 -04:00
Sid Verma
78045115ab Add filtering and search support to library APIs 2020-09-18 10:25:59 -04: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
aarif
5f5b2ddc12 parent c89ecb384f
author aarif <mraarif@outlook.com> 1562661182 +0500
committer root <root@lms.devstack.edx> 1563270070 +0000

ran python-modernize and isort on files mentioned in INCR-327

changes made to comply with pylint

changes made to comply with pylint and pass failing test

changes made to comply with pylint
2019-07-16 09:46:20 +00:00
Michael Youngstrom
16b5606404 Remove shards from cms 2019-02-12 11:26:39 -05:00
Matthew Piatetsky
7df30938c4 fix unicode strings in cms/ 2019-02-04 13:01:51 -05:00
Nimisha Asthagiri
4a9063d83b course_structures: remove usages 2018-07-02 12:36:34 -04:00
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
jagonzalr
d112c0b81b show button new library in studio depending on flags and user staff status
add flag DISABLE_LIBRARY_CREATION

add comma

use CourseCreatorRole to determine if user can create a library

add disable library creation feature flag

Conflicts:
	cms/djangoapps/contentstore/views/course.py

ENABLE_CONTENT_LIBRARIES flag

check for course creator role for library creation

Conflicts:
	cms/djangoapps/contentstore/views/course.py

add unit tests

make check of creation of library a true/false for forntend, add security in api call, clean tests

update tests

fix docstring of tests

fixed quality violation

fixed broken unit test and quality violations

Feedback changes and unit test to assert libraries are visible to non staff users too

fixed quality violation and feedback changes
2017-01-30 12:51:35 +05:00
Qubad786
aca82be335 Move fix to importer module and fix branch_setting in MixedModuleStore. 2016-08-15 18:50:50 +05:00
Ned Batchelder
8571ceabeb Fix many wrong-assert-type errors 2016-08-03 12:44:41 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Kevin Kim
94100f5944 Convert ORA due dates to user preferred time zone 2016-07-21 13:57:20 +00:00
Calen Pennington
18e1610043 Remove the create_user argument to setUp.
Instead, use a class attribute to define test behavior. This allows for
easier addition of new mixins over time.
2016-05-04 11:35:55 -04:00
Dmitry Viskov
bab4428297 Invalid StudioPermissionsService object in API to show/save xblock settings in CMS.
Randomized Content Block editor did not check Studio user's permissions
2016-04-21 19:52:25 +03:00
asadiqbal
7ae40dced8 asadiqbal08/WL-388: ModuleI18nService for Descriptor System
mattdrayer: Default to XBlock class if no unmixed class
2016-04-06 11:53:14 -04:00
Ned Batchelder
43ac38aa87 Add autospec to all mocks 2015-12-09 09:44:22 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
Braden MacDonald
24af22ca88 Remove restrictions on library creation in Studio 2015-06-25 12:57:56 -07:00
Ned Batchelder
cc5c1001d1 Fix simplifiable-range pylint warnings. 2015-06-02 09:47:13 -04:00
Martyn James
b9f1c5db60 Index course information alongside courseware
Conflicts:
	cms/djangoapps/contentstore/tests/test_courseware_index.py
2015-04-30 16:05:57 -04:00
E. Kolpakov
d34c6a0783 Filtering using search index + tests 2015-04-14 12:32:50 +03:00
Davorin Sego
e37a98d1be Indexing moved to celery task. Reorganised indexing to always allow for full course reindex. Indexing code no longer needs to be in common, because it is triggered by signal instead of being called.g 2015-04-10 14:30:19 -04:00
Braden MacDonald
781634558e Improve the test to show a failure case 2015-04-03 01:59:02 +00:00
Jonathan Piacenti
fa95d323c6 Tested version handling, modified modulestore when it didn't work. 2015-04-02 21:41:27 +00:00
Jonathan Piacenti
a6c00635b2 Fix issues with overrides on duplicated RCBs. 2015-04-02 18:23:28 +00:00
Clinton Blackburn
9a8ecc65a7 Removed invalid kwarg 2015-03-27 10:37:04 -04:00
Braden MacDonald
93e5a56d79 Show a select box when editing a library content block 2015-03-04 13:32:15 -08:00
muzaffaryousaf
e5a440ef7a Refactoring the mocked user service.
TNL-836
2015-02-04 12:32:38 +05:00
Muzaffar yousaf
ae102de3be Merge pull request #6777 from edx/muzaffar/student-info-tnl836
Get user anonymous id via xblock user service.
2015-01-30 19:35:26 +05:00
Jonathan Piacenti
f1fff439a6 Add clearer error message for library content blocks on incompatible modulestores. 2015-01-29 20:36:19 +00:00
muzaffaryousaf
3a09af07e5 Fixing the broken tests.
TNL-1185
2015-01-29 18:37:22 +05:00
E. Kolpakov
195d5b57bc pylint fixes 2015-01-12 09:58:51 -08:00
E. Kolpakov
1a387d8217 Test for paging in items.py 2015-01-12 13:42:55 +03:00
E. Kolpakov
d0919c93ce Added docstrings 2015-01-12 13:42:55 +03:00
E. Kolpakov
e59071ed67 Test for ValueError when updating_children for non-existing library 2015-01-12 13:42:55 +03:00
Braden MacDonald
3857a1c1ee Support for overriding Scope.settings values when library content is used in a course 2015-01-12 13:41:02 +03:00
E. Kolpakov
21b02544c0 Added tests for editor_saved library content xblock method
Retriggering Jenkins
2015-01-12 13:41:01 +03:00
Braden MacDonald
7303966c13 Check permissions when updating LibraryContent blocks 2015-01-12 13:40:59 +03:00
Braden MacDonald
ea03f6ed76 Unit tests for content library permissions 2015-01-12 13:37:58 +03:00
Braden MacDonald
c41f607a34 Remove unused method, apply fixes needed after latest rebase 2015-01-12 13:37:58 +03:00
Braden MacDonald
6f3b46c9df Move code that uses the modulestore to an XBlock service 2015-01-12 13:37:57 +03:00
Braden MacDonald
e1f6ca93ec Unit and integration tests of content libraries 2015-01-12 13:37:56 +03:00