Commit Graph

25 Commits

Author SHA1 Message Date
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
Victor Shnayder
d815d50aee Remove obsolete eager flag for xml modulestore
* has to be eager
2012-08-30 19:26:50 -04:00
Victor Shnayder
f44d794e63 Add course_id to StudentModule
* Update all uses.
2012-08-21 15:01:54 -04:00
Victor Shnayder
f2197227c1 add out-of-date message to check_course 2012-08-20 09:26:16 -04:00
Victor Shnayder
c6c95c63ac Keep each course's descriptors separate
* apply policy per-course, even if multiple courses share course and org fields
* keep descriptors separate in xml store, so that if two such courses
  change the same module in different ways, it works.  Such edits will need to
  merged on CMS import...
* add get_instance(course_id, location) method to replace get_item(location).
  Update all the call sites
* tests, including a 2nd toy course with same course and org.
2012-08-20 09:26:16 -04:00
ichuang
6e3eff304e {} -> {0} etc in .format statements 2012-08-16 16:22:26 -04:00
Victor Shnayder
a4d67bab33 Add support metadata in policy.json
* if there is a policy.json in the course dir, read it
* file format is a dict with keys {category}/{url_name}, and values metadata dictionaries
* apply the policy, overwriting keys that are in the xml
* then do metadata inheritance, inheriting any overwritten keys.

* also a management cmd to generate a policy.json from a course dir.
2012-08-15 14:36:06 -04:00
Bridger Maxwell
baa2b14405 Changed interface of StudentModuleCache. Other changes from code review. 2012-08-06 16:36:53 -04:00
Bridger Maxwell
2348f71cc6 Merge remote-tracking branch 'origin/master' into MITx/feature/bridger/fast_course_grading
Conflicts:
	lms/djangoapps/courseware/grades.py
	lms/djangoapps/courseware/views.py
2012-08-06 11:48:42 -04:00
Bridger Maxwell
854508b006 Removed the unnecessary creation of StudentModules when calling module_render's get_module. 2012-08-03 14:30:45 -04:00
Victor Shnayder
0b2069c619 make clean_xml script work with stringified errors 2012-08-03 11:53:35 -04:00
Victor Shnayder
b63f05b651 update clean_xml script to use error trackers properly 2012-08-01 19:25:47 -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
0edc40de34 Address minor comments in #313 2012-08-01 11:40:12 -04:00
Victor Shnayder
ed35cefa29 Fix html file handling.
* html files are now stored as follows:

If the html file is valid xml, store as html/stuff.xml

If it's not, store as html/stuff.xml, which contains
<html meta1="..."  filename="stuff.html">,
and html/stuff.html, which actually contains the contents.
Warn if the contents are not parseable with lxml's html parser,
but don't error.

* for parseable html, strip out the html tag when storing, so that it isn't
  rendered into the middle of a page

* lots of backcompat to deal with paths.  Can go away soon.

* fix output ordering in clean_xml
2012-08-01 11:40:12 -04:00
Victor Shnayder
59defd33b6 Formatting and little bugfixes
* add course and org to full/course.xml
* fix error path in clean_xml script
* commit rakefile change needed by c5334f150c
2012-07-27 16:09:25 -04:00
Victor Shnayder
da29d88d04 Add import-export round-trip check.
* add fix for the file export code--remove tag tail and text,
  not just the children.
2012-07-27 16:08:24 -04:00
Victor Shnayder
beda4f95b2 Initial version of import/check/export script.
* uses xml modulestore, and new error_handler hook
2012-07-27 16:08:23 -04:00
Calen Pennington
6612beab46 Acknowledge the fact that right now keystore is really just a module store. If we need a keystore that returns other objects, we can reexctract the base class into it's own module again 2012-07-02 11:15:37 -04:00
Calen Pennington
c7f95695c5 Fix check_course command 2012-06-29 12:45:46 -04:00
Calen Pennington
2fde7f4c6d Minor fixes from pull request 131 2012-06-28 08:39:12 -04:00
Victor Shnayder
0f52b31ac1 Make the LMS check_course command work again. 2012-06-21 15:23:47 -04:00
Victor Shnayder
da204cf5d8 Started update of check_course script. It runs again now.
TODO:
  - support picking a different course name
  - make it use current module rendering path, get that working.
2012-06-21 11:48:19 -04:00
Calen Pennington
91b306b35a Moving capa and xmodule out of djangoapps/courseware, and removing django references from them 2012-06-06 14:15:32 -04:00
Calen Pennington
5ba03130aa Moving LMS code into subdirectory 2012-06-06 14:09:01 -04:00