Commit Graph

1390 Commits

Author SHA1 Message Date
Don Mitchell
438bbffb93 Add field iterator which includes namespaced fields
And fix get_explicitly_set to use it and to get the json not native
field values.
2013-08-16 10:42:53 -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
Peter Fogg
346fb7b4fa Merge pull request #698 from edx/peter-fogg/grading-cutoffs-fix
Fix grade range names not being editable.
2013-08-15 20:06:54 -07:00
jkarni
a260115b01 Merge pull request #685 from edx/jkarni/fix/cms_pylint
Contentstore views pylint fixes
2013-08-15 16:05:09 -07:00
Peter Fogg
a93d7229ac Fix grade range names not being editable. 2013-08-15 16:30:14 -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
cahrens
9f229a4605 Make get_errored_courses part of the modulestore API (with default implementation).
Also clarifies the contraction of location.course_id by throwing an exception for lcoations that are not of category course.

Add test for course_id method.
2013-08-15 12:50:37 -04:00
Julian Arni
80619da429 Review fixes 2013-08-15 10:24:38 -04:00
chrisndodge
0db4c98782 Merge pull request #658 from edx/bugfix/ichuang/delete_course_group_not_exist
catch error in delete_course management script when group does not exist
2013-08-15 04:57:43 -07:00
Julian Arni
3ed4198204 Contentstore views pylint fixes 2013-08-14 19:10:00 -04: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
Peter Fogg
9ea2be5377 Merge pull request #643 from edx/peter-fogg/course-creation-validation
Change course create form to asynchronous validation.
2013-08-13 08:11:40 -07:00
ichuang
03bcd19b8d catch error in delete_course management script when group does not exist 2013-08-13 08:46:21 -04:00
Julian Arni
7fc6057700 Merge branch 'master' into jkarni/fix/descriptorsystemruntime
Conflicts:
	cms/djangoapps/contentstore/views/preview.py
2013-08-12 15:04:49 -04:00
Julian Arni
91b23c406a Merge branch 'master' into jkarni/fix/descriptorsystemruntime 2013-08-12 15:00:26 -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
Lyla Fischer
e817fb4ca1 Merge pull request #637 from edx/vaxxxa/videoalpha_to_video
Migration videoalpha module to one main video module
2013-08-12 10:56:12 -07:00
Peter Fogg
8fa4b4dbd1 Change course create form to synchronous validation. 2013-08-12 12:41:41 -04: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
Anton Stupak
d846462ce9 Migrate acceptance tests: old Video -> new Video. 2013-08-12 14:32:07 +03:00
Vasyl Nakvasiuk
b33b5c7bd4 Python: videoalpha -> video. 2013-08-12 14:31:48 +03:00
ichuang
12ad9c8558 make CMS user view not show ErrorDescriptor courses 2013-08-11 15:27:12 +00:00
Chris Dodge
c6f277427c add a few debug messages to get localhost debug information. Also partition out the MongoDjangoToolbar configuration into a separate env config. This is because doing imports on large courses grinds localdev to a halt due to all the stack trace generation. 2013-08-09 20:46:14 -04: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
Giulio Gratta
464141c72a changing http:// to // on intro video urls to prevent browsers from blocking video embeds 2013-08-09 14:13:41 -07:00
JonahStanley
0595459c01 Revert back to old way of logging someone else in 2013-08-09 15:27:46 -04:00
JonahStanley
8feaa0ffa4 Added in a wait upon logging in 2013-08-09 13:57:22 -04:00
chrisndodge
09a83dcd1e Merge pull request #589 from edx/fix/cdodge/better-export-error-messaging
give some debug message regarding why export has failed
2013-08-09 07:21:20 -07: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
Chris Dodge
32d92d97e6 get_item -> get_instance 2013-08-08 21:01:38 -04:00
Chris Dodge
4054544126 handle exceptions inside the outer exception handling 2013-08-08 21:01:38 -04:00
Chris Dodge
69c34a65b1 switch the notification to be a prompt and allow for the user to go to the edit unit page which contains the module in error. Otherwise, present the raw exception message and allow user to go to the course outline page. 2013-08-08 21:01:38 -04:00
Chris Dodge
fcaf3e6329 give some debug message regarding why export might fail 2013-08-08 21:01:38 -04:00
JonahStanley
3e68bdaaf1 Changed world.browser.find_by_css to world.css_find 2013-08-08 13:24:29 -04:00
JonahStanley
bb9d0df0d7 Changed problem-editor scenario to pass in both firefox and chrome 2013-08-08 13:24:29 -04:00
JonahStanley
287d219a8e Fixed wording on comments as tests are no longer skipped 2013-08-08 13:24:29 -04:00
JonahStanley
76764b8be2 Fixed weight test so it won't behave differently on firefox 2013-08-08 13:24:28 -04:00
JonahStanley
bcdc4bcbd4 Better avoiding of stale element exception 2013-08-08 13:24:28 -04:00
JonahStanley
f2a31adf6f Now using world.is_firefox() 2013-08-08 13:24:28 -04:00
JonahStanley
5a579921f2 Fixed stylistic things and no longer skipped tests in firefox 2013-08-08 13:24:28 -04:00
JonahStanley
514af944cd Fixed video tests for firefox 2013-08-08 13:24:28 -04:00
JonahStanley
fb41e8f20c Fixed subsection test for firefox 2013-08-08 13:24:28 -04:00