From 9458e539885450950052ca7a7d3fc740e2ae99eb Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 17 Jul 2012 10:42:47 -0400 Subject: [PATCH] Adding stripped down 6002x course for testing, along with CMS test for edit pages for same --- cms/djangoapps/contentstore/tests/tests.py | 3 + common/lib/xmodule/xmodule/vertical_module.py | 2 +- common/test/data/full/about/description.html | 3 + common/test/data/full/about/faq.html | 14 + common/test/data/full/about/more_info.html | 9 + common/test/data/full/about/requirements.html | 2 + common/test/data/full/about/syllabus.html | 17 + common/test/data/full/about/textbook.html | 1 + common/test/data/full/about/video.html | 1 + common/test/data/full/chapter/Overview.xml | 9 + common/test/data/full/chapter/Week_1.xml | 10 + common/test/data/full/circuits/120V60Hz.gif | Bin 0 -> 11037 bytes common/test/data/full/circuits/Lab1_1.png | Bin 0 -> 6553 bytes common/test/data/full/circuits/duality.gif | Bin 0 -> 2569 bytes .../test/data/full/circuits/heaters-bad.gif | Bin 0 -> 2187 bytes .../data/full/circuits/heaters-parallel.gif | Bin 0 -> 2230 bytes common/test/data/full/course.xml | 1 + .../data/full/course/6.002_Spring_2012.xml | 12 + common/test/data/full/course_settings.json | 35 + common/test/data/full/custom_tags/book | 1 + common/test/data/full/custom_tags/discuss | 1 + common/test/data/full/custom_tags/image | 1 + common/test/data/full/custom_tags/slides | 1 + common/test/data/full/custom_tags/videodev | 3 + .../test/data/full/html/Final_Exam_2010.html | 17 + .../data/full/html/FirstOrderSystemHint.xml | 8 + common/test/data/full/html/Lab2A.html | 105 + common/test/data/full/html/Midterm.html | 35 + .../data/full/html/Midterm_Exam_1080.html | 34 + .../data/full/html/Midterm_Exam_1123.html | 34 + .../data/full/html/Week_13_Tutorials.html | 19 + .../test/data/full/html/Week_1_Tutorials.html | 47 + .../data/full/html/linearity_clarify.html | 39 + .../test/data/full/html/linearity_clarify.xml | 39 + .../data/full/html/schematic_tutorial.html | 75 + .../html/sound_labs/mosfet_amplifier.html | 124 + .../data/full/html/sound_labs/rc_filters.html | 111 + .../data/full/html/sound_labs/series_rlc.html | 111 + common/test/data/full/html/test.html | 1 + common/test/data/full/html/units_hint.html | 4 + .../test/data/full/info/guest_handouts.html | 119 + common/test/data/full/info/guest_updates.html | 8 + common/test/data/full/info/handouts.html | 169 + common/test/data/full/info/updates.html | 194 + common/test/data/full/js/cktsim.js | 1959 ++++++++ common/test/data/full/js/schematic.js | 4184 +++++++++++++++++ .../data/full/problem/Circuit_Sandbox.xml | 6 + common/test/data/full/problem/H1P1_Energy.xml | 32 + .../test/data/full/problem/H1P2_Duality.xml | 127 + .../full/problem/H1P3_Poor_Workmanship.xml | 84 + .../full/problem/Lab_0_Using_the_Tools.xml | 115 + .../data/full/problem/Resistor_Divider.xml | 59 + .../test/data/full/problem/S1E3_AC_power.xml | 40 + .../full/problem/Sample_Algebraic_Problem.xml | 13 + .../full/problem/Sample_Numeric_Problem.xml | 8 + .../Administrivia_and_Circuit_Elements.xml | 18 + .../full/sequential/System_Usage_Sequence.xml | 7 + .../data/full/static/js/sound_labs/circuit.js | 1247 +++++ .../static/js/sound_labs/mosfet_amplifier.js | 658 +++ .../data/full/static/js/sound_labs/plotter.js | 1038 ++++ .../full/static/js/sound_labs/rc_filters.js | 938 ++++ .../full/static/js/sound_labs/series_rlc.js | 1150 +++++ .../data/full/static/js/sound_labs/sound.js | 407 ++ .../test/data/full/subs/3NIegrCmA5k.srt.sjson | 5 + .../test/data/full/subs/4cLA-IME32w.srt.sjson | 5 + .../test/data/full/subs/8kARlsUt9lM.srt.sjson | 5 + .../test/data/full/subs/8rK9vnpystQ.srt.sjson | 5 + .../test/data/full/subs/BGU1poJDgOY.srt.sjson | 275 ++ .../test/data/full/subs/CcgAYu0n0bg.srt.sjson | 5 + .../test/data/full/subs/EG-fRTJln_E.srt.sjson | 5 + .../test/data/full/subs/G_2F9wivspM.srt.sjson | 212 + .../test/data/full/subs/XbDRmF6J0K0.srt.sjson | 266 ++ .../test/data/full/subs/eLAyO33baQ8.srt.sjson | 335 ++ .../test/data/full/subs/p2Q6BrNhdh8.srt.sjson | 155 + .../test/data/full/subs/pFOrD8k9_p4.srt.sjson | 101 + common/test/data/full/to_delete | 339 ++ .../test/data/full/vertical/vertical_58.xml | 12 + .../test/data/full/vertical/vertical_89.xml | 15 + .../test/data/full/vertical/vertical_94.xml | 12 + .../test/data/full/vertical/vertical_98.xml | 12 + 80 files changed, 15272 insertions(+), 1 deletion(-) create mode 100644 common/test/data/full/about/description.html create mode 100644 common/test/data/full/about/faq.html create mode 100644 common/test/data/full/about/more_info.html create mode 100644 common/test/data/full/about/requirements.html create mode 100644 common/test/data/full/about/syllabus.html create mode 100644 common/test/data/full/about/textbook.html create mode 100644 common/test/data/full/about/video.html create mode 100644 common/test/data/full/chapter/Overview.xml create mode 100644 common/test/data/full/chapter/Week_1.xml create mode 100644 common/test/data/full/circuits/120V60Hz.gif create mode 100644 common/test/data/full/circuits/Lab1_1.png create mode 100644 common/test/data/full/circuits/duality.gif create mode 100644 common/test/data/full/circuits/heaters-bad.gif create mode 100644 common/test/data/full/circuits/heaters-parallel.gif create mode 100644 common/test/data/full/course.xml create mode 100644 common/test/data/full/course/6.002_Spring_2012.xml create mode 100644 common/test/data/full/course_settings.json create mode 100644 common/test/data/full/custom_tags/book create mode 100644 common/test/data/full/custom_tags/discuss create mode 100644 common/test/data/full/custom_tags/image create mode 100644 common/test/data/full/custom_tags/slides create mode 100644 common/test/data/full/custom_tags/videodev create mode 100644 common/test/data/full/html/Final_Exam_2010.html create mode 100644 common/test/data/full/html/FirstOrderSystemHint.xml create mode 100644 common/test/data/full/html/Lab2A.html create mode 100644 common/test/data/full/html/Midterm.html create mode 100644 common/test/data/full/html/Midterm_Exam_1080.html create mode 100644 common/test/data/full/html/Midterm_Exam_1123.html create mode 100644 common/test/data/full/html/Week_13_Tutorials.html create mode 100644 common/test/data/full/html/Week_1_Tutorials.html create mode 100644 common/test/data/full/html/linearity_clarify.html create mode 100644 common/test/data/full/html/linearity_clarify.xml create mode 100644 common/test/data/full/html/schematic_tutorial.html create mode 100644 common/test/data/full/html/sound_labs/mosfet_amplifier.html create mode 100644 common/test/data/full/html/sound_labs/rc_filters.html create mode 100644 common/test/data/full/html/sound_labs/series_rlc.html create mode 100644 common/test/data/full/html/test.html create mode 100644 common/test/data/full/html/units_hint.html create mode 100644 common/test/data/full/info/guest_handouts.html create mode 100644 common/test/data/full/info/guest_updates.html create mode 100644 common/test/data/full/info/handouts.html create mode 100644 common/test/data/full/info/updates.html create mode 100755 common/test/data/full/js/cktsim.js create mode 100644 common/test/data/full/js/schematic.js create mode 100644 common/test/data/full/problem/Circuit_Sandbox.xml create mode 100644 common/test/data/full/problem/H1P1_Energy.xml create mode 100644 common/test/data/full/problem/H1P2_Duality.xml create mode 100644 common/test/data/full/problem/H1P3_Poor_Workmanship.xml create mode 100644 common/test/data/full/problem/Lab_0_Using_the_Tools.xml create mode 100644 common/test/data/full/problem/Resistor_Divider.xml create mode 100644 common/test/data/full/problem/S1E3_AC_power.xml create mode 100644 common/test/data/full/problem/Sample_Algebraic_Problem.xml create mode 100644 common/test/data/full/problem/Sample_Numeric_Problem.xml create mode 100644 common/test/data/full/sequential/Administrivia_and_Circuit_Elements.xml create mode 100644 common/test/data/full/sequential/System_Usage_Sequence.xml create mode 100644 common/test/data/full/static/js/sound_labs/circuit.js create mode 100644 common/test/data/full/static/js/sound_labs/mosfet_amplifier.js create mode 100644 common/test/data/full/static/js/sound_labs/plotter.js create mode 100644 common/test/data/full/static/js/sound_labs/rc_filters.js create mode 100644 common/test/data/full/static/js/sound_labs/series_rlc.js create mode 100644 common/test/data/full/static/js/sound_labs/sound.js create mode 100644 common/test/data/full/subs/3NIegrCmA5k.srt.sjson create mode 100644 common/test/data/full/subs/4cLA-IME32w.srt.sjson create mode 100644 common/test/data/full/subs/8kARlsUt9lM.srt.sjson create mode 100644 common/test/data/full/subs/8rK9vnpystQ.srt.sjson create mode 100644 common/test/data/full/subs/BGU1poJDgOY.srt.sjson create mode 100644 common/test/data/full/subs/CcgAYu0n0bg.srt.sjson create mode 100644 common/test/data/full/subs/EG-fRTJln_E.srt.sjson create mode 100644 common/test/data/full/subs/G_2F9wivspM.srt.sjson create mode 100644 common/test/data/full/subs/XbDRmF6J0K0.srt.sjson create mode 100644 common/test/data/full/subs/eLAyO33baQ8.srt.sjson create mode 100644 common/test/data/full/subs/p2Q6BrNhdh8.srt.sjson create mode 100644 common/test/data/full/subs/pFOrD8k9_p4.srt.sjson create mode 100644 common/test/data/full/to_delete create mode 100644 common/test/data/full/vertical/vertical_58.xml create mode 100644 common/test/data/full/vertical/vertical_89.xml create mode 100644 common/test/data/full/vertical/vertical_94.xml create mode 100644 common/test/data/full/vertical/vertical_98.xml diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 6b346046fc..ce956fa5ad 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -205,3 +205,6 @@ class EditTestCase(ContentStoreTestCase): def test_edit_item_toy(self): self.check_edit_item('toy') + + def test_edit_item_full(self): + self.check_edit_item('full') diff --git a/common/lib/xmodule/xmodule/vertical_module.py b/common/lib/xmodule/xmodule/vertical_module.py index c9ecc5ea18..884fd0a056 100644 --- a/common/lib/xmodule/xmodule/vertical_module.py +++ b/common/lib/xmodule/xmodule/vertical_module.py @@ -26,7 +26,7 @@ class VerticalModule(XModule): # TODO: Cache progress or children array? children = self.get_children() progresses = [child.get_progress() for child in children] - progress = reduce(Progress.add_counts, progresses) + progress = reduce(Progress.add_counts, progresses, None) return progress def get_icon_class(self): diff --git a/common/test/data/full/about/description.html b/common/test/data/full/about/description.html new file mode 100644 index 0000000000..305dc51750 --- /dev/null +++ b/common/test/data/full/about/description.html @@ -0,0 +1,3 @@ +6.002x (Circuits and Electronics) is designed to serve as a first course in an undergraduate electrical engineering (EE), or electrical engineering and computer science (EECS) curriculum. At MIT, 6.002 is in the core of department subjects required for all undergraduates in EECS. + +The course introduces engineering in the context of the lumped circuit abstraction. Topics covered include: resistive elements and networks; independent and dependent sources; switches and MOS transistors; digital abstraction; amplifiers; energy storage elements; dynamics of first- and second-order networks; design in the time and frequency domains; and analog and digital circuits and applications. Design and lab exercises are also significant components of the course. You should expect to spend approximately 10 hours per week on the course. \ No newline at end of file diff --git a/common/test/data/full/about/faq.html b/common/test/data/full/about/faq.html new file mode 100644 index 0000000000..a5e54c9f15 --- /dev/null +++ b/common/test/data/full/about/faq.html @@ -0,0 +1,14 @@ + diff --git a/common/test/data/full/about/more_info.html b/common/test/data/full/about/more_info.html new file mode 100644 index 0000000000..0f5836381e --- /dev/null +++ b/common/test/data/full/about/more_info.html @@ -0,0 +1,9 @@ +
+

Who should take this?

+

If you're one of the many who have a unquenched interest in the worlds history, you'll love this course.

+
+ +
+

Who shouldn't take this?

+

No one. Anyone and everyone is welcome to take this course.

+
\ No newline at end of file diff --git a/common/test/data/full/about/requirements.html b/common/test/data/full/about/requirements.html new file mode 100644 index 0000000000..5890d9c036 --- /dev/null +++ b/common/test/data/full/about/requirements.html @@ -0,0 +1,2 @@ +

In order to succeed in this course, you must have taken an AP level physics course in electricity and magnetism. You must know basic calculus and linear algebra and have some background in differential equations. Since more advanced mathematics will not show up until the second half of the course, the first half of the course will include an optional remedial differential equations component for those who need it.

+

The course web site was developed and tested primarily with Google Chrome. We support current versions of Mozilla Firefox as well. The video player is designed to work with Flash. While we provide a partial non-Flash fallback for the video, as well as partial support for Internet Explorer, other browsers, and tablets, portions of the functionality will be unavailable.

\ No newline at end of file diff --git a/common/test/data/full/about/syllabus.html b/common/test/data/full/about/syllabus.html new file mode 100644 index 0000000000..af41f420f5 --- /dev/null +++ b/common/test/data/full/about/syllabus.html @@ -0,0 +1,17 @@ + diff --git a/common/test/data/full/about/textbook.html b/common/test/data/full/about/textbook.html new file mode 100644 index 0000000000..f07e7bac75 --- /dev/null +++ b/common/test/data/full/about/textbook.html @@ -0,0 +1 @@ +

The course uses the textbook Foundations of Analog and Digital Electronic Circuits, by Anant Agarwal and Jeffrey H. Lang. Morgan Kaufmann Publishers, Elsevier, July 2005. While recommended, the book is not required: relevant sections will be provided electronically as part of the online course for personal use in connection with this course only. The copyright for the book is owned by Elsevier. The book can be purchased on Amazon.

\ No newline at end of file diff --git a/common/test/data/full/about/video.html b/common/test/data/full/about/video.html new file mode 100644 index 0000000000..2959101024 --- /dev/null +++ b/common/test/data/full/about/video.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/common/test/data/full/chapter/Overview.xml b/common/test/data/full/chapter/Overview.xml new file mode 100644 index 0000000000..8a0d3ef7ec --- /dev/null +++ b/common/test/data/full/chapter/Overview.xml @@ -0,0 +1,9 @@ + +