Commit Graph

129 Commits

Author SHA1 Message Date
Ben Patterson
176770efad Revert "Enable PyContracts during tests"
This reverts commit 4312c0e763.
2015-05-22 15:05:11 -04:00
Calen Pennington
a2cbd16680 Merge pull request #7789 from cpennington/wrap-csm
Wrap access to CSM (inside FieldDataCache) to use the new interface
2015-05-20 16:11:07 -04:00
Calen Pennington
2bfbd57ec1 Add a test case for an XBlock that has no student state fields, but sets a score 2015-05-20 15:33:29 -04:00
Calen Pennington
8d9d6ce0ec Clarify the interface used by xqueue_callback to load an XBlock 2015-05-20 15:07:28 -04:00
Calen Pennington
4312c0e763 Enable PyContracts during tests 2015-05-20 15:07:18 -04:00
Ned Batchelder
7c704f3959 Move xmodule_modifiers.py to openedx/core/lib/xblock_utils.py 2015-05-14 16:03:50 -04:00
Phil McGachey
73b854e4f0 [LTI Provider] Adding signals for scoring events 2015-05-11 07:45:50 -04:00
Adam
58b34e1cc4 Merge pull request #7974 from edx/merge-release-to-master
Merge release to master
2015-05-08 14:24:14 -04:00
Adam Palay
afec81b662 prevent overly nesting _field_data (TNL-2050) 2015-05-07 14:05:27 -04:00
Christine Lytwynec
ddb1ae667e Split lms unittests into multiple shards 2015-05-07 09:17:26 -04:00
Waheed Ahmed
d9b685d5df Fixed beta tester functionality for ora problems.
TNL-1736
2015-04-02 16:51:58 +05:00
Calen Pennington
a0bae0c794 Convert VerticalModule/VerticalDescriptor to a pure XBlock: VerticalBlock 2015-03-31 09:43:52 -04:00
Calen Pennington
b50876fc32 Make XBlockToXModuleShim use json-init-args to record the XModule constructor to shim to 2015-03-30 16:37:53 -04:00
Calen Pennington
1f17538d42 Clean up tests in preparation for switching Vertical from an XModule to an XBlock 2015-03-30 16:37:53 -04:00
Syed Hassan Raza
d17a0c6ad2 handle invalid-key exception for split courses 2015-03-20 16:18:27 +05:00
Ned Batchelder
6928035cd1 Make sure slashes in JSON content don't end script tags. PLAT-462
The string "</script>" in JSON data would end the script element we're
embedding the data in.  To make sure the data doesn't disrupt the
script, we escape the slash as \/ .
2015-03-18 21:55:36 -04:00
Calen Pennington
fd746b6f13 Clean up import order in test_module_render 2015-03-17 13:15:18 -04:00
Calen Pennington
17a6cfee70 Update query counts to new reality 2015-03-17 13:15:18 -04:00
Calen Pennington
26df09e404 Add test of iterating over a course tree multiple times in the same request 2015-03-17 13:15:18 -04:00
Calen Pennington
de23d6defe Clear cached children when binding an XModuleDescriptor/XBlock to a particular user 2015-03-17 10:55:06 -04:00
Calen Pennington
9379fd2711 Add tests of XBlocks/XModules with filtered children 2015-03-17 10:55:06 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
Xavier Antoviaque
2ba4957951 xblock-external-ui: Add XBlock API call to render XBlock views
xblock-external-ui: Include CSRF token in the API answer
xblock-external-ui: Include full path when building local_url
xblock-external-ui: Fix TestHandleXBlockCallback & bok_choy, add tests
xblock-external-ui: Only return `instance` in `_invoke_xblock_handler()`
xblock-external-ui: Group resources by hash tag to avoid duplicate loads
xblock-external-ui: PEP8
xblock-external-ui: Fail early if the XBlock view is called anonymously

    We used to serve anonymous requests, but most XBlocks assume that the
    user is logged in, which can generate a lot of errors when the user is
    accessed or when an XBlock ajax callback is queried. Fail early to only
    get one error per page load, and prevent displaying the XBlock
    altogether when the LMS doesn't find an active user session.

xblock-external-ui: Add request params in view render context
xblock-external-ui: HTTP error status when file is too large for handler
xblock-external-ui: Fix unicode encodings in XBlock rendering
xblock-external-ui: Feature flag for API call ENABLE_XBLOCK_VIEW_ENDPOINT
2015-02-16 12:39:38 +01:00
Adam
296167e531 Merge pull request #6950 from edx/release
Release
2015-02-10 16:06:24 -05:00
Calen Pennington
89d4749057 get the raw DescriptorSystem, not the CombinedSystem when instantiating xmodules (TNL-1226)
get the raw DescriptorSystem, not the CombinedSystem when instantiating xmodules (TNL-1226)

quality fixes

remove trailing comma
2015-02-10 09:47:44 -05:00
Calen Pennington
7b3d91f5d8 Use CourseKey.from_string rather than from_deprecated_string 2015-02-04 09:09:15 -05:00
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.

In a structure like:

    @override_settings(MODULESTORE=store_a)
    class BaseTestCase(ModuleStoreTestCase):
        def setUp(self):
            # use store

    @override_settings(MODULESTORE=store_b)
    class ChildTestCase(BaseTestCase):
        def setUp(self):
            # use store

In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.

To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.

[PLAT-419]
2015-02-04 09:09:14 -05:00
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
Braden MacDonald
025f046b04 Fix errors with libraries when old mongo is default (first) modulestore 2015-01-21 11:01:52 -08:00
Jason Bau
7f1b60b286 Implement user service to return currently-logged-in user
returns XBlockuser with 2 data layers
2015-01-16 11:40:06 -05:00
Matt Drayer
3c669e3838 New feature contribution: Entrance Exams 2015-01-15 20:35:24 -05:00
Braden MacDonald
10fe9c0180 pylint fixes 2015-01-12 11:00:51 -08:00
Braden MacDonald
9a116529ce Add module key and library source info to problem events 2015-01-12 10:39:13 -08:00
Brian Wilson
2faff29a21 Fix PureSystem so that runtime.publish() works for a pure XBlock.
Fix extracted from https://github.com/edx/edx-platform/pull/6035.
2014-12-19 09:00:32 -05:00
Calen Pennington
61ba910255 Add a test of pure xblock and xmodule event publishing 2014-12-19 08:55:42 -05:00
zubair-arbi
1d6d2f2a7f set position to default value if POST request don't have position argument
TNL-922
2014-12-15 11:59:52 +05:00
Calen Pennington
980f30c17f Move lms.lib.xblock into lms.djangoapps.lms_xblock in preparation add database backed configuration to it 2014-12-12 21:45:21 -05:00
Andy Armstrong
4d75c18098 Fix Mako templates to use latest request context
Fixed the edX middleware to lazily create request
context for Mako templates, so that it is based on
any changes made to the request object.

Verified that with this fix the "Instructor" tab is
correctly hidden when a staff member is viewing
the course as a student.
2014-12-09 23:38:31 -05:00
Jesse Zoldak
121b31309d Small fixes to modulestore test refactoring 2014-12-02 07:09:37 -05:00
Jesse Zoldak
bf3b87bc64 Clean up all modulestore testcases
Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
2014-12-02 07:09:36 -05:00
Sarina Canelake
7aab4151bb s/pylint: disable=W0201/pylint: disable=attribute-defined-outside-init/ 2014-12-01 11:22:12 -05:00
Don Mitchell
396a8aca07 Remove multi-threading test as unnecessary and flakey
also fix other users of check_mongo_calls to use None if they don't care about sends
PLAT-239
2014-11-06 13:22:48 -05:00
Calen Pennington
34d09085ab Remove proxying of resources_fs, and add a unittest that exposes the problem
[PLAT-191]
2014-10-29 13:48:57 -04:00
Calen Pennington
87558c2c9c Merge pull request #5212 from cpennington/split/import-export-performance
Improve performance of split-mongo import/export performance
2014-09-30 15:44:04 -04:00
Calen Pennington
1a682dacd1 Include caching definitions in split bulk operations 2014-09-29 22:35:41 -04:00
Don Mitchell
4ca5012f3c Use split to test views 2014-09-29 11:25:55 -04:00
Don Mitchell
4faed64859 Generalize bulk_operations logic
LMS-11366
2014-09-10 15:35:28 -04:00
Nimisha Asthagiri
041d72ccc6 Update mongo counts. 2014-09-04 18:14:13 -04:00
Calen Pennington
fb56588090 Tweak mongo count numbers 2014-09-02 10:29:23 -04:00
Andy Armstrong
4fcc59b318 Merge branch 'release' into andya/merge-hotfix-2014-08-29
Conflicts:
	cms/djangoapps/contentstore/tests/test_import.py
	common/lib/xmodule/xmodule/modulestore/__init__.py
	common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
	lms/djangoapps/courseware/tests/test_module_render.py
2014-08-29 16:50:40 -04:00