Commit Graph

40 Commits

Author SHA1 Message Date
Calen Pennington
d654798856 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit updates common/lib/xmodule.

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-08 20:28:53 -04:00
Diana Huang
40deaa509e Clean up strings in the ErrorModule 2014-02-03 11:56:10 -05:00
Calen Pennington
8424f610d5 Merge pull request #2171 from cpennington/pylint-cleanup
Fix pylint violations from #2129
2014-01-29 06:38:17 -08:00
Giulio Gratta
0429ba7da3 Fixed all instances of "occured" typo 2014-01-24 16:13:26 -08:00
Calen Pennington
79e1dae0e7 Fix pylint violations from #2129 2014-01-15 11:05:56 -05:00
Calen Pennington
46109bb3e8 Use XBlock xml serialization and deserialization
XModules continue to use their own interface for xml, but provide an
adaptor that makes the the XBlock interface available.

[LMS-179]
2014-01-14 13:28:47 -05:00
Calen Pennington
6b474724ac Make XModuleDescriptor and XModule act as a single class
By transparently proxying between the XModuleDescriptor and the XModule,
and between their runtimes, we can make them act as a single class, so
that we can swap in an actual XBlock instead.
2013-10-08 15:29:17 -04:00
Ned Batchelder
d7e441088b Adjust parameters to construct_xblock_from_class to match XBlock repo. 2013-09-30 21:09:43 -04:00
Calen Pennington
58a5cdd81f Replace references to .system 2013-09-12 09:29:17 -04:00
Calen Pennington
8201b1412e Use XBlock 0.3 2013-09-06 09:45:59 -04:00
Peter Fogg
2466a5f557 Allow Studio to display error modules. 2013-08-22 15:48:49 -04:00
Don Mitchell
df7b917b40 Implement next generation modulestore
A new modulestore backed by mongo that changes the data format to
facilitate easy versioning, sharing content between courses, and fast
lookup of course structure and Scope.settings data.

Conflicts:
	cms/djangoapps/contentstore/tests/test_contentstore.py
2013-07-19 13:10:14 -04:00
Don Mitchell
3722685e1a No longer persist XModule templates
Instead, we use XModule field default values when creating an empty
XModule. Driven by this use case, we also allow for XModules to be
created in memory without being persisted to the database at all. This
necessitates a change to the Modulestore api, replacing clone_item with
create_draft and save_xmodule.
2013-07-16 14:33:58 -04:00
Calen Pennington
82606a062c Make XModuleDescriptor use __init__ from XBlock
Fixes JIRA LMS-203
2013-06-17 13:38:57 -04:00
Ned Batchelder
d4db4c6dea Fix encoding errors when hashing XML
We occasionally get UnicodeEncodeErrors from these two places,
because the XML is a Unicode string, and is implicitly encoded to ascii.
2013-06-07 07:10:32 -04:00
Diana Huang
d895c64f4a Use full descriptor when showing errors, not just the model data. 2013-06-04 10:43:06 -04:00
Diana Huang
910324fb49 Fix XML Error Module so that it no longer shows the data to non-staff. 2013-05-29 16:31:11 -04:00
Chris Dodge
8ece663284 more drive by violation fixes 2013-04-12 15:45:27 -04:00
Calen Pennington
92e99d7a8b Move field definitions for XModules into mixin classes, so that descriptors and modules always have the same set of fields 2013-03-13 11:35:50 -04:00
Calen Pennington
4f555f6480 Merge remote-tracking branch 'origin/master' into feature/cale/xmodule-storage-model
Conflicts:
	cms/djangoapps/contentstore/course_info_model.py
	cms/djangoapps/contentstore/module_info_model.py
	cms/djangoapps/contentstore/tests/factories.py
	cms/djangoapps/contentstore/tests/test_course_settings.py
	cms/djangoapps/contentstore/views.py
	cms/djangoapps/models/settings/course_details.py
	cms/djangoapps/models/settings/course_grading.py
	cms/templates/edit_subsection.html
	common/djangoapps/mitxmako/shortcuts.py
	common/djangoapps/static_replace.py
	common/djangoapps/util/converters.py
	common/djangoapps/xmodule_modifiers.py
	common/lib/xmodule/setup.py
	common/lib/xmodule/xmodule/abtest_module.py
	common/lib/xmodule/xmodule/capa_module.py
	common/lib/xmodule/xmodule/course_module.py
	common/lib/xmodule/xmodule/discussion_module.py
	common/lib/xmodule/xmodule/error_module.py
	common/lib/xmodule/xmodule/html_module.py
	common/lib/xmodule/xmodule/js/src/video/display.coffee
	common/lib/xmodule/xmodule/mako_module.py
	common/lib/xmodule/xmodule/modulestore/mongo.py
	common/lib/xmodule/xmodule/modulestore/store_utilities.py
	common/lib/xmodule/xmodule/modulestore/xml.py
	common/lib/xmodule/xmodule/modulestore/xml_importer.py
	common/lib/xmodule/xmodule/raw_module.py
	common/lib/xmodule/xmodule/self_assessment_module.py
	common/lib/xmodule/xmodule/seq_module.py
	common/lib/xmodule/xmodule/template_module.py
	common/lib/xmodule/xmodule/tests/__init__.py
	common/lib/xmodule/xmodule/tests/test_export.py
	common/lib/xmodule/xmodule/tests/test_import.py
	common/lib/xmodule/xmodule/video_module.py
	common/lib/xmodule/xmodule/x_module.py
	common/lib/xmodule/xmodule/xml_module.py
	lms/djangoapps/courseware/access.py
	lms/djangoapps/courseware/courses.py
	lms/djangoapps/courseware/grades.py
	lms/djangoapps/courseware/models.py
	lms/djangoapps/courseware/module_render.py
	lms/djangoapps/courseware/tests/tests.py
	lms/djangoapps/courseware/views.py
	lms/djangoapps/django_comment_client/utils.py
	lms/templates/staff_problem_info.html
	lms/templates/video.html
	rakefile
2013-02-07 15:12:30 -05:00
Calen Pennington
789ac3fc87 Use the XBlock library as the base for XModule, so that we can incrementally rely on more and more of the XBlock api 2013-01-04 16:19:58 -05:00
Calen Pennington
6427dd6742 WIP: Get the cms running. Component previews work 2013-01-02 09:07:02 -05:00
Calen Pennington
d61c91c139 Fix errors around error descriptors and custom tag modules 2012-12-28 14:53:30 -05:00
Calen Pennington
01411ae66e WIP: Trying to get tests working 2012-12-28 14:48:47 -05:00
Calen Pennington
8ba4163557 WIP. Data loads, but not all of it 2012-12-28 14:39:13 -05:00
Brian Wilson
4ebd70dcc4 add support for utf8 in sequences, verticals and custom modules. 2012-12-04 03:54:36 -05:00
Calen Pennington
5e0f0be1be Fix up ErrorDescriptor._construct, and use in in ErrorDescriptor.from_json 2012-09-25 10:10:44 -04:00
Calen Pennington
bf4ae6b7e6 Load modules from the mongo modulestore as errordescriptors if creating a regular descriptor fails, but leave the location the same 2012-09-25 10:10:44 -04:00
Calen Pennington
3107bb9c45 Make separate json and xml editing interfaces 2012-09-25 10:10:44 -04:00
Calen Pennington
e9358f0e4e Make ErrorDescriptor continue to use the interface for __init__ that XModuleDescriptor uses, while providing a helper function for constructing from a different set of arguments 2012-09-25 10:10:44 -04:00
Calen Pennington
b69edcd869 Pass org and course through ErrorDescriptor.from_xml to ErrorDescriptor.__init__ 2012-09-25 10:10:44 -04:00
Calen Pennington
d8736914d4 Display an error descriptor for a preview when a descriptor can be loaded but a module can't 2012-09-25 10:10:44 -04:00
Victor Shnayder
365495521e Catch errors in module load
* if error is in xmodule_constructor(), catch and return an ErrorModule
* if error is somewhere else in get_module(), return None
2012-08-22 12:58:46 -04:00
Victor Shnayder
b782e2ff5d Make start dates work for all modules
* error modules now hidden via access control
* get_module() returns None if user doesn't have access
2012-08-14 23:30:37 -04:00
Victor Shnayder
3455f8f64d Hide errors from non-staff users 2012-08-12 18:03:12 -04:00
Victor Shnayder
5523c2883e Generate error module url_names using sha1
* means we get the same url_name on each import of the same data.
2012-08-07 11:06:47 -04:00
Victor Shnayder
79e0bc25f8 Make url_names on error descriptors unique 2012-08-07 11:06:47 -04:00
Victor Shnayder
fc0f938eae Responding to comments on pull #326
* cleaned up error module:
  - only one template
  - save error message in xml and reload
* better display of problem definition and metadata to staff
* save error messages as string, not exception objects.
2012-08-02 09:56:01 -04:00
Victor Shnayder
0b67d1c401 Turn error_handlers into error_trackers
* simplify logic--tracker just tracks errors.  Trackers should not raise,
      and are not be responsible for logging.
* adapted code to use trackers.
* Started cleanup of error handling code:
  - if need to add info and re-raise, just do that.  No logging.
  - if working around a problem, log and track as needed.
2012-08-01 11:48:18 -04:00
Victor Shnayder
c0cdff7071 Rename MalformedDescriptor to ErrorDescriptor
* change references and tests
* add staff/non-staff display
* added is_staff to ModuleSystem
2012-08-01 11:42:39 -04:00