diff --git a/cms/djangoapps/contentstore/tests/test_crud.py b/cms/djangoapps/contentstore/tests/test_crud.py index 512667fa02ac..ed4974fb39e2 100644 --- a/cms/djangoapps/contentstore/tests/test_crud.py +++ b/cms/djangoapps/contentstore/tests/test_crud.py @@ -25,7 +25,6 @@ def test_get_templates(self): self.assertIsNotNone(found.get('problem')) self.assertEqual(len(found.get('course')), 0) self.assertEqual(len(found.get('about')), 1) - self.assertGreaterEqual(len(found.get('html')), 2) self.assertGreaterEqual(len(found.get('problem')), 10) dropdown = None for template in found['problem']: @@ -42,10 +41,10 @@ def test_get_templates(self): def test_get_some_templates(self): self.assertEqual(len(SequenceDescriptor.templates()), 0) - self.assertGreater(len(HtmlDescriptor.templates()), 0) + self.assertGreater(len(CapaDescriptor.templates()), 0) self.assertIsNone(SequenceDescriptor.get_template('doesntexist.yaml')) - self.assertIsNone(HtmlDescriptor.get_template('doesntexist.yaml')) - self.assertIsNotNone(HtmlDescriptor.get_template('announcement.yaml')) + self.assertIsNone(CapaDescriptor.get_template('doesntexist.yaml')) + self.assertIsNotNone(CapaDescriptor.get_template('blank_common.yaml')) def test_factories(self): test_course = CourseFactory.create( diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index 03024fb587ab..16b6e603b9f5 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -223,13 +223,13 @@ def test_split_test(self): root_usage_key = self._create_vertical() resp = self.create_xblock(category='split_test', parent_usage_key=root_usage_key) split_test_usage_key = self.response_usage_key(resp) - resp = self.create_xblock(parent_usage_key=split_test_usage_key, category='html', boilerplate='announcement.yaml') + resp = self.create_xblock(parent_usage_key=split_test_usage_key, category='problem', boilerplate='blank_common.yaml') self.assertEqual(resp.status_code, 200) - resp = self.create_xblock(parent_usage_key=split_test_usage_key, category='html', boilerplate='zooming_image.yaml') + resp = self.create_xblock(parent_usage_key=split_test_usage_key, category='problem', boilerplate='checkboxes_response.yaml') self.assertEqual(resp.status_code, 200) html, __ = self._get_container_preview(split_test_usage_key) - self.assertIn('Announcement', html) - self.assertIn('Zooming', html) + self.assertIn('Blank Common Problem', html) + self.assertIn('Checkboxes', html) def test_split_test_edited(self): """ diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py index 62fce42e3f83..1e62375ad001 100644 --- a/common/lib/xmodule/xmodule/html_module.py +++ b/common/lib/xmodule/xmodule/html_module.py @@ -119,7 +119,6 @@ class HtmlDescriptor(HtmlBlock, XmlDescriptor, EditingDescriptor): # pylint: di mako_template = "widgets/html-edit.html" module_class = HtmlModule filename_extension = "xml" - template_dir_name = "html" show_in_read_only_mode = True js = {'coffee': [resource_string(__name__, 'js/src/html/edit.coffee')]} diff --git a/common/lib/xmodule/xmodule/templates/html/announcement.yaml b/common/lib/xmodule/xmodule/templates/html/announcement.yaml deleted file mode 100644 index a0f4b07e4eed..000000000000 --- a/common/lib/xmodule/xmodule/templates/html/announcement.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -metadata: - display_name: Announcement -data: | -
To use this template, replace the example text with your own text.
-When you add the component, be sure to select Settings - to specify a Display Name and other values that apply.
-Short note that introduces the topic
- -Announcement 1 text
-Announcement 2 text
-Your explanatory text here.
- - - diff --git a/common/lib/xmodule/xmodule/templates/html/iframe.yaml b/common/lib/xmodule/xmodule/templates/html/iframe.yaml deleted file mode 100644 index 65d8caac8815..000000000000 --- a/common/lib/xmodule/xmodule/templates/html/iframe.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -metadata: - display_name: IFrame Tool -data: | -Use the IFrame tool to embed an exercise or tool from any web site into your course content. For example, the tool below allows learners to experiment with how the shape of a triangle affects a line that is derived from the triangle.
-Exercises in an IFrame are not graded. To embed graded exercises, use a Custom JavaScript Problem.
-The following code is the HTML format required to use the IFrame tool. For the IFrame in this template, you must replace the values in italics.
-- <iframe title="The required title of the tool" - src="The URL of the tool, starting with https://"> - Message displayed when the browser does not support IFrames. - </iframe> --
The Iframe below includes the width, height, marginwidth, marginheight, frameborder, and scrolling attributes. These attributes are optional. You can remove these attributes or replace their values.
-Modify this template as needed.
-To modify the IFrame, you must edit the HTML source code. When editing this template, click HTML in the toolbar.
-Then modify the example below for your own use. -
Note: The URL must start with https instead of http, to ensure that the tool appears in all browsers that support IFrames.
Your browser does not support IFrames.-
A learner sees this text if the browser does not support IFrames.
-The sample IFrame follows. Modify its attributes as described above.
- diff --git a/common/lib/xmodule/xmodule/templates/html/image_modal.yaml b/common/lib/xmodule/xmodule/templates/html/image_modal.yaml deleted file mode 100644 index 5efc6cba4814..000000000000 --- a/common/lib/xmodule/xmodule/templates/html/image_modal.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -metadata: - display_name: Full Screen Image Tool -data: | -Use the Full Screen Image tool to allow learners to open and zoom in on a larger version of an image in your course.
-With the Full Screen Image tool, learners can see the image's details as well as its context within the unit.
-To enable users to view the larger image, you wrap the smaller image in a link to the larger version of the image.
-The following HTML code shows the format required to use the Full Screen Image tool. For the example in this template, you must replace the values in italics.
-- <a href="Path to full screen image" class="modal-content"> - <img alt="Text for screen readers" - src="Path to image to include in unit page"/> - </a> --
You can modify the example below for your own use.
-Note: Test viewing the image in full screen mode in the LMS; you cannot view it in full screen from within Studio.
- -
diff --git a/common/lib/xmodule/xmodule/templates/html/latex_html.yaml b/common/lib/xmodule/xmodule/templates/html/latex_html.yaml
deleted file mode 100644
index f82c60ed8d5f..000000000000
--- a/common/lib/xmodule/xmodule/templates/html/latex_html.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-metadata:
- display_name: E-text Written in LaTeX
- source_code: |
- \subsection{Example of E-text in LaTeX}
-
- You can write complex equations in LaTeX.
-
- \begin{equation}
- x = \frac{-b\pm\sqrt{b^2-4*a*c}}{2a}
- \end{equation}
-
-data: |
-
- You can write complex equations in LaTeX.
-When you add the component, be sure to select Settings - to specify a Display Name and other values that apply.
-When editing this component, select Launch Latex Source Compiler to edit equations.
-Then, in the equation editor, select Save and Compile to edX XML to see the equation in the component.
- diff --git a/common/lib/xmodule/xmodule/templates/html/raw.yaml b/common/lib/xmodule/xmodule/templates/html/raw.yaml deleted file mode 100644 index 8d4c78ca8900..000000000000 --- a/common/lib/xmodule/xmodule/templates/html/raw.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -metadata: - display_name: Raw HTML - editor: raw -data: | -This template is similar to the Text template. The only difference is - that this template opens in the Raw HTML editor rather than in the Visual - editor.
- -The Raw HTML editor saves your HTML exactly as you enter it. - You can switch to the Visual editor by clicking the Settings tab and - changing the Editor setting to Visual. Note, however, that some of your - HTML may be modified when you save the component if you switch to the - Visual editor.
diff --git a/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml b/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml deleted file mode 100644 index 16bc5a693264..000000000000 --- a/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml +++ /dev/null @@ -1,57 +0,0 @@ ---- -metadata: - display_name: Zooming Image Tool -data: | -Use the Zooming Image Tool to enable learners to see details of large, complex images.
-With the Zooming Image Tool, the learner can move the mouse pointer over a part of the image to enlarge it and see more detail.
-To use the Zooming Image Tool, you must first add the jquery.loupeAndLightbox.js JavaScript file to your course.
-You must also add both the regular and magnified image files to your course.
-The following HTML code shows the format required to use the Zooming Image tool. For the example in this template, you must replace the values in italics.
-
- <div class="zooming-image-place" style="position: relative;">
- <a class="loupe" href="path to the magnified version of the image">
- <img alt="Text for screen readers"
- src="path to the image you want to display in the unit" />
- </a>
- <div class="script_placeholder"
- data-src="path to the jquery.loupeAndLightbox.js JavaScript file in your course"/>
- </div>
- <script type="text/javascript">// >![CDATA[
- JavascriptLoader.executeModuleScripts($('.zooming-image-place').eq(0), function() {
- $('.loupe').loupeAndLightbox({
- width: 350,
- height: 350,
- lightbox: false
- });
- });
- // ]]></script>
- <div id="ap_listener_added"></div>
-
-
- You can modify the example below for your own use.
-The example below shows a subset of the biochemical reactions that cells carry out.
-You can view the chemical structures of the molecules by clicking on them. The magnified view also lists the enzymes involved in each step.
-Press spacebar to open the magnifier.
-
-
-
-