Calen Pennington
cfae1cdf62
Pep8 autofixes
2013-02-06 11:13:50 -05:00
Chris Dodge
22695d80c7
Merge branch 'master' into feature/cdodge/cms-master-merge4
...
Conflicts:
common/djangoapps/student/models.py
common/lib/capa/capa/responsetypes.py
common/lib/xmodule/setup.py
common/lib/xmodule/xmodule/course_module.py
common/lib/xmodule/xmodule/xml_module.py
jenkins/test.sh
lms/djangoapps/courseware/access.py
lms/djangoapps/courseware/tests/tests.py
lms/djangoapps/django_comment_client/models.py
requirements.txt
2013-01-17 09:15:37 -05:00
Brian Wilson
3b28e328c4
disable export of testcenter_exam from course module (and add test).
2013-01-15 17:54:10 -05:00
Chris Dodge
dc8f23d6ae
the parent directory might not already exist, so we have to call makedir with recursive=true to auto-create any parent folders
2013-01-10 14:41:19 -05:00
Chris Dodge
e70db062b2
Merge branch 'feature/cale/cms-master' into feature/cale/cms-master-merge
...
Conflicts:
requirements.txt
2013-01-03 10:46:24 -05:00
Chris Dodge
c0f12e69f7
fixes on the export. There's some attributes not being handled correctly
2012-12-27 16:15:52 -05:00
Chris Dodge
10b417c85e
initial checkin of export
2012-12-13 11:53:52 -05:00
Chris Dodge
95c6719447
initial commit. Add 'import_path' field to the GridFS so that when we export, we know where it originated from
2012-12-12 10:57:06 -05:00
Calen Pennington
c917725ff0
Merge remote-tracking branch 'origin/master' into feature/cale/cms-master
...
Conflicts:
common/lib/xmodule/xmodule/seq_module.py
common/lib/xmodule/xmodule/template_module.py
common/lib/xmodule/xmodule/x_module.py
lms/djangoapps/courseware/tests/tests.py
lms/djangoapps/courseware/views.py
lms/static/sass/course.scss
requirements.txt
2012-12-07 11:17:41 -05:00
Brian Wilson
dfb9913100
clean up lms tests, and fix export/import
2012-12-04 11:52:35 -05:00
Brian Wilson
4ebd70dcc4
add support for utf8 in sequences, verticals and custom modules.
2012-12-04 03:54:36 -05:00
Brian Wilson
6a24ecebe7
decode utf-8 when reading html, and encode when writing.
2012-11-28 17:54:18 -05:00
Chris Dodge
87ff18dc56
Merge branch 'feature/cale/cms-master' of github.com:MITx/mitx into feature/cdodge/import-course-info
2012-11-07 09:35:21 -05:00
Victor Shnayder
55a0cada7b
Fix a bug with pointer-tag detection on load
...
if a tag has text but no children, wasn't properly detected as an inline definition.
2012-11-02 16:59:41 -04:00
Chris Dodge
b788b9d659
add to existing test cases to exercise the 'course extras as modules' work in the CMS import. Also add to the existing 'full' test data collection to include policy, tabs, etc.
2012-11-01 15:08:26 -04:00
Victor Shnayder
0bbba8b16f
Add more tests and replace ':' with '_' in html_id
...
* in-progress to fixing support for ':' in url_names
2012-09-13 09:44:51 -04:00
Calen Pennington
54e8819fb1
Merge pull request #615 from MITx/feature/ichuang/instructor-dashboard-upgrade
...
Upgrade to instructor dashboard
2012-09-05 08:03:55 -07:00
Victor Shnayder
f926925ca6
Add a hide_progress_tab course policy flag
...
- for internal cs50 until we have grade integration set up (only really needed for external version)
2012-09-03 14:12:43 -04:00
Victor Shnayder
79109a6244
Apply attr_map translation to metadata loaded from policy file as well as from xml.
2012-09-03 13:51:20 -04:00
ichuang
4341ea7689
fix bug in modulestore reload: etree parser must be specified explicitly
2012-09-02 22:40:50 -04:00
Victor Shnayder
f81f94ec67
Allow location url_names to contain ':', mapping to / on file load
...
* New format: {tag}://{org}/{course}/{category}/{name}[@{revision}]
* Updated tests, code
* Added test chapter with : in url_name in toy course
* added test html page with : in url_name
* added a note to docs
2012-08-27 11:37:22 -04:00
Victor Shnayder
d3f1f0f8b6
comment out debug messages
2012-08-21 16:09:48 -04:00
Victor Shnayder
00d9ecd600
New policy organization:
...
* course roots live in roots/{url_name}.xml
- one is linked from course.xml
* policies live in policies/url_name.json
- loaded based on course url_name
* Updated to pass policy through into xml parsing, so it takes effect
before descriptor constructors are called.
* Update toy test course to new structure, fix up tests
2012-08-16 11:41:19 -04:00
Victor Shnayder
a2057f9ea4
fix docstring
2012-08-15 11:47:01 -04:00
ichuang
da64c8f0a1
add xqa interface to staff_problem_info, make staff_debug a modal
...
window, add xqa modal window, add xqa_key to course metadata
2012-08-11 20:12:37 -04:00
ichuang
241d445f30
changes to xml_module to allow problem metadata to be added via <meta>
2012-08-10 19:00:50 -04:00
Victor Shnayder
298954fc01
Clean up customtag handling
...
* load the template at descriptor init
* make it export inline, not as a pointer
* update import/export test to do export to initial directory
2012-08-09 13:32:57 -04:00
Victor Shnayder
932a9be747
Make tests pass again
...
* test enrolls in course before testing pages
* support github edit links with new file structure
* Some pep8 cleanups
2012-08-07 11:06:47 -04:00
Victor Shnayder
55edb1ef32
always export metadata in alphabetical order
2012-08-07 11:06:47 -04:00
Victor Shnayder
e6e290f525
Make initial import-export tests pass.
...
TODO:
* need unique slugs for errors so they don't overwrite each other on export.
- try to preserve origin slug. If not possible, generate random one.
* figure out what metadata to strip. e.g.
({'data': '<problem><p><h1>Finger Exercise 1...'},
{'data': '<problem points="1" type="lecture"><p><h1>Finger Exercise 1...'},
False)
- where did points and type come from? Do we want them there?
* separate broken and non-broken test courses
2012-08-07 11:06:47 -04:00
Victor Shnayder
b091dcabe0
metadata and file format cleanups
...
* course.xml is special--has org and course attributes in addition to url_name
* strip data_dir from metadata on export
* more asserts
* work on roundtrip import-export test
2012-08-07 11:06:47 -04:00
Victor Shnayder
b285f50d92
Make unknown metadata persist accross import-export
...
* +improve test.
2012-08-07 11:06:46 -04:00
Victor Shnayder
d09e2261f3
New file structure--everything in own file
...
* needed for CMS performance (can now save just an item, not whole tree)
* remove split_to_file methods
* simplified AttrMap logic
* write each descriptor to a separate file
* detect format on import and adjust appropriately.
* update tests
2012-08-07 11:06:46 -04:00
ichuang
a46a37d1c0
log.debug -> log.exception; revert log change in xml_module
2012-08-06 13:58:42 -04:00
ichuang
3c23235885
fix for some broken github edit links - avoids symlinks
2012-08-05 11:39:56 -04:00
ichuang
7fe75030cc
fix staff edit link in module content display (goes to github)
2012-08-04 17:52:14 -04:00
ichuang
d50af5765e
make university profile pages also use get_courses_by_university
2012-08-04 11:03:54 -04:00
Victor Shnayder
b46172da9b
Rename module.name and descriptor.name to url_name
...
* update templates and code references
* also a display_name property that defaults to cleaned url_name
2012-08-03 11:36:54 -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
009bd23066
save LazyLoadingDict in case we do want it later
2012-08-01 11:48:18 -04:00
Victor Shnayder
0ae434cc09
Move path_to_location out of mongo.py
...
* also bugfix for load_definition in html_module
* a bit of refactoring of Location checking code in mongo.py
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
53608922ba
Make the malformed descriptor import properly
...
* Also get rid of lazy loading of metadata and definition
2012-08-01 11:40:11 -04:00
Calen Pennington
66d5c8effd
Add more detail to error messages during loading from xml
2012-07-30 13:50:50 -04:00
Calen Pennington
6997fc579e
Continue on errors when syncing with github
2012-07-30 13:50:00 -04:00
Victor Shnayder
1251686359
xml format cleanups
...
* rename slug->url_name
* rename name->display_name
* docstring cleanups
* comments :)
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
94ac61ffe2
Make decision about export file splitting overrideable
...
* create split_to_file() function
* chapters, html, problems always split
* course never split
* others based on size of subtree for now
2012-07-27 16:08:22 -04:00
Victor Shnayder
e0513f5f24
Fix course tag name on export of definition
2012-07-27 16:08:22 -04:00
Victor Shnayder
5f84e61925
Add hook for error handling during xml import
...
* add error_handler member to DescriptorSystem
* call it where import errors happen
* also includes some refactoring in xml.py
* some more line length and docstring cleanups
2012-07-27 16:08:22 -04:00