Commit Graph

106 Commits

Author SHA1 Message Date
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
Andy Armstrong
7b26e85478 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:10 -04:00
Calen Pennington
8dc7f34295 Improve debuggability when call-count numbers don't match up 2014-08-29 14:09:35 -04:00
Don Mitchell
e624ff3b04 Make path_to_location use bulk_write_operation for performance. 2014-08-27 16:29:47 -04:00
Calen Pennington
3672c9a292 Make find_matching_* work during split bulk operations 2014-08-27 16:29:47 -04:00
Calen Pennington
e7ce41061e Improve debuggability when call-count numbers don't match up 2014-08-27 16:29:47 -04:00
Calen Pennington
50082387eb Add a request-token to identify which xblock html was rendered as part of the current request
[STUD-2903]
2014-08-15 11:04:52 -04:00
Carson Gee
87fa6cc753 Check if user is anonymous before calling PSYCHOMETRICS
LTI grade callbacks for example, come in with an anonymous user.  This causes a
stack trace in the psychometrics app that leads to the LTI service
getting a 404.  This adds a check before that callback gets registered.
2014-08-01 12:34:12 -04:00
Don Mitchell
d4776a151b Test both split and old mongo 2014-07-30 17:44:45 -04:00
Don Mitchell
0f0d75fce8 Convert toc test to use mongo not xml ms
Included adding a general create_toy_course and create_sample_course method for tests
2014-07-30 17:44:44 -04:00
Calen Pennington
4ded4be700 Fix calls to get_module to not pass course ids as positions 2014-07-15 09:22:04 -04:00
polesye
584da69bee Fix unit test. 2014-06-24 14:26:02 +03:00
polesye
2629b48de8 Fix unit test. 2014-06-23 17:56:28 +03:00
cahrens
73e7ced6f9 Introduce constants for studio_view, student_view, and author_view. 2014-06-20 11:41:23 -04:00
Ned Batchelder
ec5aee2949 Remove duplicates in a class list so tests aren't duplicated 2014-06-06 13:17:36 -04:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04:00
Calen Pennington
94c8d86a42 Fix failing tests from merge with master 2014-05-12 11:34:39 -04:00
Calen Pennington
c72b0bb293 Resolve merge conflicts relative to master 2014-05-09 15:31:20 -04:00
Calen Pennington
155ffe37ca Merge remote-tracking branch 'edx/master' into opaque-keys-merge-master
Conflicts:
	cms/djangoapps/contentstore/views/item.py
	cms/djangoapps/contentstore/views/tests/test_container.py
	cms/djangoapps/contentstore/views/tests/test_tabs.py
	common/lib/xmodule/xmodule/modulestore/mongo/draft.py
	lms/djangoapps/certificates/management/commands/gen_cert_report.py
	lms/djangoapps/certificates/queue.py
	lms/djangoapps/certificates/views.py
	lms/djangoapps/courseware/module_render.py
	lms/djangoapps/courseware/tests/test_module_render.py
	lms/djangoapps/instructor/views/api.py
	lms/djangoapps/instructor/views/instructor_dashboard.py
	lms/djangoapps/instructor/views/legacy.py
	lms/djangoapps/shoppingcart/tests/test_models.py
	lms/djangoapps/verify_student/views.py
2014-05-09 15:29:32 -04:00
Don Mitchell
7be81341d7 Revert StudentModule.module_state_key to field rather than computed property 2014-05-09 10:41:12 -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
cahrens
7e05f3cdab pep8/pylint cleanup 2014-05-02 15:36:22 -04:00
cahrens
1e92a6c884 Do not show "View in Studio" links for child verticals of verticals.
STUD-1558
2014-05-02 13:36:44 -04:00
Jason Bau
f8c062b6ce lti 2.0 result service rest endpoint 2014-04-29 12:01:12 -07:00