Commit Graph

1201 Commits

Author SHA1 Message Date
Braden MacDonald
93e5a56d79 Show a select box when editing a library content block 2015-03-04 13:32:15 -08:00
Waqas Khalid
4b9dc74cad Add tests for rename import error 2015-03-02 16:09:34 +05:00
Waqas Khalid
a730f81132 Missing discussion blackout throwing exception
When the list is empty in discussion blackout
on studio side it causes the exception on lms
side when we try to access the discussion. We
were expecting the values and try to parse it
in two values start and end date whereas parsing
empty values to two values causing the exception.
Now values will be parse when value exists. Empty
value will be ignored.

TNL-1390
2015-02-16 19:43:03 +05:00
cahrens
0d2969909f Enable course reruns by default.
TNL-1380
2015-02-11 17:16:52 -05:00
cahrens
d88b0c488e store.has_course fails on old mongo with unicode chars.
xml_importer now calls store.has_course even if create_course_if_not_present is False.
2015-02-09 10:00:33 -05:00
cahrens
149c4e78c1 Update tests in reaction to ModuleStoreTestCase cleanup. 2015-02-09 10:00:32 -05:00
cahrens
a89304b991 Cleanup to make tests agnostic to the modulestore being used. 2015-02-09 10:00:32 -05:00
cahrens
040f96223c Update for split modulestore as default. 2015-02-09 10:00:14 -05:00
cahrens
f5d3d6050d Test of draft content depends on old mongo. 2015-02-09 10:00:12 -05:00
cahrens
b5e798062b Specify old mongo modulestore.
Tests verify operation counts for old mongo. Should be extended to split in the future.
2015-02-09 09:26:06 -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
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
Jim Abramson
116dba39a8 Merge pull request #6711 from edx/jsa/fix-rerun-exception
avoid database error when recording task exception
2015-01-29 12:51:02 -05:00
jsa
ace2bffae6 avoid database error when recording task exception 2015-01-29 11:25:45 -05:00
muzaffaryousaf
3a09af07e5 Fixing the broken tests.
TNL-1185
2015-01-29 18:37:22 +05:00
Régis Behmo
c3c35f076c Fix csrf error on studio login
Context: We have witnessed multiple, seemingly random "CSRF verification
failed" errors while signing in (with valid ID) to the Studio.

Explanation: The login form does not initially include a CSRF field.
The CSRF header of the request is appended to the studio login request
headers by intercepting the form validation. This intercept is performed
by the login.js script. Unfortunately, the login.js script is loaded
pretty late (at the end of the template). So if the login form is
validated sufficiently fast, the login.js script has no time to load and
append the X-CSRFToken header to the request.

Proposed solution: the CSRF token is already passed to the template via
the login view, so we just add a hidden field to the login form to
include the csrf token.
2015-01-29 09:10:59 +01:00
Braden MacDonald
025f046b04 Fix errors with libraries when old mongo is default (first) modulestore 2015-01-21 11:01:52 -08:00
Matt Drayer
3c669e3838 New feature contribution: Entrance Exams 2015-01-15 20:35:24 -05:00
Zia Fazal
ca3d84a5d4 New pre-requisite course feature via milestones app 2015-01-15 15:17:38 -05:00
Christina Roberts
2897a8efb3 Merge pull request #6299 from edx/cohorted-courseware
Cohorted courseware
2015-01-15 11:50:13 -05:00
Andy Armstrong
4fa33e25ed Studio support for cohorted courseware
TNL-652
2015-01-15 10:33:45 -05:00
John Eskew
df5ba26ac6 Handle the correct exception to cause a 404 error upon asset not found
instead of a 500 error. Add 404 test.
2015-01-15 09:44:05 -05:00
polesye
c7153be040 TNL-213: Let Students Add Personal Notes to Course Content.
Co-Authored-By: Jean-Michel Claus <jmc@edx.org>
Co-Authored-By: Brian Talbot <btalbot@edx.org>
Co-Authored-By: Tim Babych <tim@edx.org>
Co-Authored-By: Oleg Marshev <oleg@edx.org>
Co-Authored-By: Chris Rodriguez <crodriguez@edx.org>
2015-01-14 23:34:11 +02: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
Matjaz Gregoric
ccc392893e Update tests.
Most of the updates are related to the My Courses -> Studio Home change.
2015-01-12 13:41:45 +03:00
Jonathan Piacenti
eabd6c8d27 Quality check and test fixes. 2015-01-12 13:41:03 +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
Adam Palay
7837607ca9 only recusively delete modules if all their parents are marked for deletion (PLAT-333)
update '_delete_item' method for draft only modules and update delete_orphans management command

fix test_courseware which fails due to invalid future date
2015-01-05 14:54:17 -05:00
Fred Smith
251407d7d2 Merge pull request #6314 from edx/release
Release
2014-12-19 13:23:22 -05:00
John Eskew
94ea35d3be Export modulestore-stored asset metadata as XML to exported course.
Import asset metadata XML into modulestore.
Optimize importing many items of asset metadata by avoiding multiple
round-trips to MongoDB.
2014-12-16 15:42:38 -05:00
David Baumgold
6b82489728 Merge pull request #5685 from edx/uncomment-thumbnail-tests
Uncomment thumbnail tests
2014-12-16 09:08:05 -05:00
Nimisha Asthagiri
0687a62a8f Add back end for Studio video upload feature
This feature allows upload of video assets to S3. This requires that the
VIDEO_UPLOAD_PIPELINE setting be properly configured and that each
course be configured with a token issued by the media team for their
processing purposes (e.g. linking the video with a YouTube channel).

Co-authored-by: Greg Price <gprice@edx.org>
2014-12-15 13:09:59 -05:00
David Baumgold
3bcf18dd59 Merge pull request #6153 from edx/db/update-pep8
Update pep8 to 1.5.7
2014-12-12 15:00:13 -05:00
David Baumgold
36e77c7463 Fixing pep8 issues 2014-12-11 13:04:49 -05:00
Jesse Zoldak
77bbd30396 Do not create a modulestore unnecessarily in tests 2014-12-10 11:18:12 -05:00
Adam Palay
27c710b85d don't export draft children of orphaned drafted (TNL-923) 2014-12-08 14:14:38 -05:00