Commit Graph

44 Commits

Author SHA1 Message Date
cahrens
149c4e78c1 Update tests in reaction to ModuleStoreTestCase cleanup. 2015-02-09 10:00:32 -05:00
cahrens
818a950815 Change to work with split modulestore.
Cannot create an xblock in a course that doesn't exist.
2015-02-09 09:26:05 -05:00
cahrens
e9f2f626ca Change to work with split modulestore.
make_asset_key does not start with "/" for split locators.
2015-02-09 09:26:05 -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
Andy Armstrong
4fa33e25ed Studio support for cohorted courseware
TNL-652
2015-01-15 10:33:45 -05:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Don Mitchell
4ca5012f3c Use split to test views 2014-09-29 11:25:55 -04:00
Ben McMorran
12a5781725 Add ability to set staff lock from course outline 2014-08-16 15:58:42 -04:00
Don Mitchell
2726b437bc Trying to get split to work 2014-08-08 14:53:37 -04:00
Don Mitchell
47851c5041 Replace create_xmodule with create_xblock
Refactor all callers (often replacing with more appropriate fn)

Also, added for_branch_setting method to old mongo and removed some
branch verification tests

Conflicts:
	common/lib/xmodule/xmodule/modulestore/mongo/draft.py
	common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py
	common/lib/xmodule/xmodule/modulestore/xml_importer.py
2014-08-08 14:40:27 -04:00
cahrens
d447c07540 Support staff locking on the unit page
STUD-1873
2014-08-07 12:16:22 -04:00
Ben McMorran
436d773987 Displays release date of unit in sidebar 2014-08-07 12:16:20 -04:00
cahrens
66173ab9e6 Add "visible_to_staff_only" field to support staff locking in Studio.
STUD-1875
2014-07-14 14:46:40 -04:00
Nimisha Asthagiri
ea32529866 Fix all modulestore calls to pass in user ids. 2014-07-09 21:10:12 -04:00
Ben McMorran
397bdb4348 Adds is_xblock_visible_to_students 2014-06-27 14:52:14 -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
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
Calen Pennington
a6035698d5 Correctly compute course image location when using mongo modulestore
[LMS-2073]
[STUD-1197]
2014-01-22 07:17:40 -05:00
Calen Pennington
923c2ff46e Add failing tests for course image names
Tests LMS-2073 (non-ascii course image names) and STUD-1197 (spaces in
course image names)
2014-01-22 07:16:30 -05:00
cahrens
ec55d8c1a9 Create explicit Locations.
STUD-1030
2013-12-11 10:03:34 -05:00
David Baumgold
f3f4af8087 settings.MITX_FEATURES => settings.FEATURES 2013-12-03 15:34:55 -05:00
Anton Stupak
aecc20af6b Add Timed Transcripts Editor. 2013-10-22 21:45:03 +03:00
Peter Fogg
e4302e62d2 Allow course image uploads in the settings page.
Authors can upload an image (or choose an existing one) from the
settings page, using the in-context uploader from PDF
textbooks. Includes tests for backwards compatibility with XML courses
-- they used a magic filename (images/course_image.jpg) which is
mapped to a location in the Mongo contentstore.

Still needs some UX work, though the backend plumbing is there.
2013-08-21 09:42:00 -04:00
cahrens
13ef870b1b pylint/pep8 cleanup.
cleanup.
2013-08-14 09:59:44 -04:00
cahrens
e0aa46ab2d Make split mongo read-only API consistent with other modulestores. 2013-08-13 15:06:08 -04:00
David Baumgold
6a9074e185 Removed get_url_reverse function
It was causing unit tests to fail, and it's a needless bit of abstraction that
never should have existed in the first place.
2013-07-29 13:11:48 -04:00
cahrens
c715edf57a Strip off https:// 2013-06-06 10:55:41 -04:00
cahrens
39397c5c2f Bullet-proofing for MKTG_URLS. 2013-06-06 10:29:10 -04:00
cahrens
38e3ff13ed pep8 cleanup. 2013-06-03 15:32:42 -04:00
cahrens
93be67d49a Fix bug STUD-103. The url base for about page links needs to be www.edx.org for Drupal site, vs. LMS_BASE which is used for Studio. Note that the complete URL is still not correct, but a redirect exists to take it to the new location. 2013-06-03 15:21:02 -04:00
cahrens
138ad3988f Update test (and set PREVIEW_LMS_BASE to something different so we can actually test the method). 2013-05-23 17:06:02 -04:00
Arthur Barrett
55942b8a0b fix brokn tab test 2013-05-13 14:57:36 -04:00
Arthur Barrett
8f07072d3d added unit tests to add/remove course tab utility functions. 2013-05-13 14:44:56 -04:00
Calen Pennington
bf6b886ccd Fix pylint and pep8 errors 2013-04-16 11:45:21 -04:00
Calen Pennington
6644b78819 Fix gradebook when using grade cutoffs other than A/B/C 2013-04-16 11:38:58 -04:00
Chris Dodge
b4fe23f3a2 more cleanups in CMS project 2013-04-13 21:13:34 -04:00
cahrens
505a382421 Re-enable all the tests! 2013-03-22 14:00:20 -04:00
cahrens
016fe196ae Add Python unit tests, don't convert URLs every time. 2013-03-21 21:21:24 -04:00
cahrens
1ae9e9bde3 Tests for opening action links. 2013-03-21 13:56:11 -04:00
Calen Pennington
fd3ba7db2a Don't make cms.djangoapps a python module 2013-03-15 10:50:46 -04:00
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
Jay Zoldak
abf4ad36f4 Move modulestore unique naming in tests from the settings.py file into the ModuleStoreTestCase class. 2013-02-06 10:42:21 -05:00
cahrens
90ce6967aa Fix for Studio #96. 2012-12-20 14:58:02 -05:00