Make the simple course pass roundtrip test:

- add 'type' and 'points' to capa_module metadata
- replace old 'title' tag with display_name
This commit is contained in:
Victor Shnayder
2012-08-06 11:14:11 -04:00
committed by Calen Pennington
parent 79e0bc25f8
commit ecf432ad78
3 changed files with 8 additions and 1 deletions

View File

@@ -563,6 +563,11 @@ class CapaDescriptor(RawDescriptor):
module_class = CapaModule
# Capa modules have some additional metadata:
# TODO (vshnayder): do problems have any other metadata? Do they
# actually use type and points?
metadata_attributes = RawDescriptor.metadata_attributes + ('type', 'points')
# VS[compat]
# TODO (cpennington): Delete this method once all fall 2012 course are being
# edited in the cms

View File

@@ -93,6 +93,8 @@ class RoundTripTestCase(unittest.TestCase):
def test_toy_roundtrip(self):
self.check_export_roundtrip(DATA_DIR, "toy")
def test_simple_roundtrip(self):
self.check_export_roundtrip(DATA_DIR, "simple")
def test_full_roundtrip(self):
self.check_export_roundtrip(DATA_DIR, "full")

View File

@@ -15,7 +15,7 @@
<chapter name="Chapter 2">
<section name="Problem Set 1">
<sequential>
<problem type="lecture" showanswer="attempted" rerandomize="true" title="A simple coding problem" name="Simple coding problem" filename="ps01-simple"/>
<problem type="lecture" showanswer="attempted" rerandomize="true" display_name="A simple coding problem" name="Simple coding problem" filename="ps01-simple"/>
</sequential>
</section>
<video name="Lost Video" youtube="1.0:TBvX7HzxexQ"/>