Commit Graph

1201 Commits

Author SHA1 Message Date
Julian Arni
509a861459 Clear contentstore
Signed-off-by: Julian Arni <julian@edx.org>
2013-08-25 22:40:11 -04:00
Julian Arni
a28b02ae2c Pep8 and pylint fixes 2013-08-25 22:40:11 -04:00
Julian Arni
eaa4b3ef99 Pep8 and pylint fixes 2013-08-25 22:40:10 -04:00
Julian Arni
d991595ecb Split import-export into new file 2013-08-25 22:40:10 -04:00
Julian Arni
993b92bc47 Add import tests 2013-08-25 22:40:10 -04:00
Will Daly
42ac76ce0c Merge branch 'master' into lapentab/fix_network_tests
Conflicts:
	lms/djangoapps/courseware/tests/tests.py
2013-08-23 11:48:38 -04:00
Will Daly
c680dfdd40 Merge pull request #768 from edx/will/use-mixed-modulestore-in-tests
Will/use mixed modulestore in tests
2013-08-23 08:38:09 -07:00
Chris Dodge
7edfd185b7 teardown the content database after tests 2013-08-22 17:35:38 -04:00
chrisndodge
0191ae9417 Merge pull request #652 from edx/feature/ichuang/import-with-no-static
Enable mongodb to be used as back-end for git-based authoring workflow
2013-08-22 11:05:02 -07:00
chrisndodge
1e9621cf4f Merge pull request #763 from edx/fix/cdodge/strip-transient-draft-serialization-attributes
fix some gaps which would allow the temporary xml attributes 'parent_seq...
2013-08-22 11:00:55 -07:00
Chris Dodge
bd412182c7 verticals shouldn't have 'data' 2013-08-22 12:01:17 -04:00
chrisndodge
2699ba65ba Merge pull request #756 from edx/fix/cdodge/incorrect-html-serialization
Fix/cdodge/incorrect html serialization
2013-08-22 08:58:56 -07:00
lapentab
d894a065df Stylistic changes 2013-08-22 09:28:37 -04:00
lapentab
1759191370 Remove network calls in tests 2013-08-22 08:43:28 -04:00
Chris Dodge
0c1c3f11af loop in static import testing into common/* tests 2013-08-21 20:48:56 -04:00
Chris Dodge
fb3a5bf9db remove unused class 2013-08-21 20:10:36 -04:00
Chris Dodge
ef98c54f5b fix some pylint violations 2013-08-21 20:06:10 -04:00
Chris Dodge
2ba0d40d7b fix pep8 violations 2013-08-21 20:02:58 -04:00
Will Daly
109d3c3d10 Refactored to remove test#XXX methods from ModuleStoreTestCase 2013-08-21 19:00:32 -04:00
Chris Dodge
21f4b05813 fix some gaps which would allow the temporary xml attributes 'parent_sequential_url' and 'index_in_children_list' to get persisted in the database, whereas they are meant to be only scoped during export/import 2013-08-21 14:46:38 -04:00
Peter Fogg
e177270d0d Merge pull request #700 from edx/peter-fogg/course-image-upload
WIP: Peter fogg/course image upload
2013-08-21 11:17:12 -07:00
ichuang
42af561a17 pep8 and pylint for tests of nostatic import 2013-08-21 11:23:00 -04: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
ichuang
8a84e6790b clean up test_import_nostatic.py 2013-08-20 23:44:33 -04:00
ichuang
95952bd693 add tests of static_asset_path and importing with no static;
fix (again) static_replace to work with static_asset_path
2013-08-20 23:30:26 -04:00
Chris Dodge
d523167bdd add another piece of test data. just an img tag. 2013-08-20 23:16:39 -04:00
Chris Dodge
5a7bcd7bb3 always serialize out HTML content to a separate .html file 2013-08-20 22:43:53 -04:00
Chris Dodge
5989bf6bdc update the PDF textbook url paths as well as update wiki_slug when importing 2013-08-20 21:50:28 -04:00
chrisndodge
594a73d437 Merge pull request #722 from edx/feature/cdodge/add-a-mixed-modulestore
Feature/cdodge/add a mixed modulestore
2013-08-17 07:32:51 -07:00
Chris Dodge
bd71a2ceb3 add unit test for video_caption asset path 2013-08-16 15:24:43 -04:00
Don Mitchell
4c28684014 pass xblock fields as top-level keywords on factories 2013-08-16 14:01:16 -04:00
Don Mitchell
929597ce84 Move load_from_json to the test file only
It's a reasonable demo of in memory xblock creation, but doesn't fit
the xblock pattern. Moving temporarily to keep the dag persistence test.
2013-08-16 10:42:53 -04:00
Don Mitchell
e4a69373d0 xblock fields persist w/o breaking by scope
Letting xblocks handle scope rather than separating fields into
different attrs. Although, split still shunts content fields to a
different collection than setting and children fields.

The big difference is that content fields will always be a dict and not
sometimes just a string and there's no special casing of 'data' attr.

The other mind change is no more 'metadata' dict.
2013-08-16 10:42:52 -04:00
Christina Roberts
03b6050348 Merge pull request #667 from edx/christina/read-only-api
Make split mongo read-only API consistent with other modulestores.
2013-08-15 13:05:58 -07:00
David Ormsbee
3ce87583ab Shift enroll/unenroll logic to CourseEnrollment model, add is_active and mode.
Features coming down the pipe will want to be able to:
* Refer to enrollments before they are actually activated (approval step).
* See what courses a user used to be enrolled in for when they re-enroll in
  the same course, or a different run of that course.
* Have different "modes" of enrolling in a course, representing things like
  honor certificate enrollment, auditing (no certs), etc.

This change adds an is_active flag and mode (with default being "honor").
The commit is only as large as it is because many parts of the codebase were
manipulating enrollments by adding and removing CourseEnrollment objects
directly. It was necessary to create classmethods on CourseEnrollment to
encapsulate this functionality and then port everything over to using them.

The migration to add columns has been tested on a prod replica, and seems to be
fine for running on a live system with single digit millions of rows of
enrollments.
2013-08-14 13:23:06 -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
6a3f0c141d Merge pull request #564 from edx/db/xblock-student-view
XBlock integration for Studio: student view
2013-08-12 11:55:40 -07:00
Peter Fogg
e20acee4c4 Working on Videoalpha test fix.
Fixed all common and LMS tests.

The tests were failing because XMLDescriptor adds in some attributes
to _model_data, such as `xml_attributes`, that aren't necessary. The
solution is to handle all XML parsing in VideoDescriptor. There's
still one test failing in CMS, which has to do with metadata being
saved. I'm still working out how to update it in such a way that it
doesn't fail, but still tests something meaningful.
2013-08-12 14:32:15 +03:00
Vasyl Nakvasiuk
b33b5c7bd4 Python: videoalpha -> video. 2013-08-12 14:31:48 +03:00
Chris Dodge
b1b8f19c88 add another test. Seems like we never had an explicit test on an import into a new course-id. This fixes that 2013-08-09 20:46:13 -04:00
Chris Dodge
e2358af6a9 add ability to rewrite links on the old /courses/<org>/<course>/<run>/jump_to/i4x://<org>/<course> .. intracourseware linking to the new portable /jump_to_id/<id> format 2013-08-09 20:46:13 -04:00
Chris Dodge
25d6de243e add portable link rewriting on clone. Added tests. 2013-08-09 20:46:12 -04:00
Chris Dodge
36fda35040 do portable link rewriting on import and add test to confirm it 2013-08-09 20:46:12 -04:00
Chris Dodge
481eac7fc8 address PR feedback 2013-08-08 21:25:42 -04:00
Chris Dodge
7b4388ba8c add more testing. Assert that metadata is properly cloned and that draft content is cloned as well 2013-08-08 21:25:42 -04:00
Chris Dodge
0e09ee61d7 update some unit tests on clone_course 2013-08-08 21:25:42 -04:00
David Baumgold
3fa990ea60 Made some tests more general, less fragile 2013-08-08 09:46:15 -04:00
chrisndodge
ece4ec3f57 Merge pull request #533 from edx/fix/cdodge/use-static-shorthand-for-asset-urls
To increase portability of courses, have the Asset Index page display the classic /static/... URL shorthand.
2013-08-08 06:32:35 -07:00
Christina Roberts
4c95078eb0 Merge pull request #578 from edx/christina/autoenroll
Auto-enroll course staff to fix "View Live".
2013-08-06 12:33:56 -07:00