From d63813b4aa2009a048974da6596a404eeef7bb18 Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 1 Aug 2013 17:27:34 -0400 Subject: [PATCH] Fix missing source_code in LaTeX HTML. STUD-565 --- .../contentstore/features/html-editor.feature | 5 +++++ .../contentstore/features/html-editor.py | 11 +++++++++++ .../xmodule/xmodule/templates/html/latex_html.yaml | 14 +++++++------- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/cms/djangoapps/contentstore/features/html-editor.feature b/cms/djangoapps/contentstore/features/html-editor.feature index 6cd455d681..4cd5e1c1b9 100644 --- a/cms/djangoapps/contentstore/features/html-editor.feature +++ b/cms/djangoapps/contentstore/features/html-editor.feature @@ -11,3 +11,8 @@ Feature: HTML Editor And I edit and select Settings Then I can modify the display name And my display name change is persisted on save + + Scenario: Edit High Level source is available for LaTeX html + Given I have created an E-text Written in LaTeX + When I edit and select Settings + Then Edit High Level Source is visible diff --git a/cms/djangoapps/contentstore/features/html-editor.py b/cms/djangoapps/contentstore/features/html-editor.py index c3e0afa480..d89f052dcc 100644 --- a/cms/djangoapps/contentstore/features/html-editor.py +++ b/cms/djangoapps/contentstore/features/html-editor.py @@ -15,3 +15,14 @@ def i_created_blank_html_page(step): @step('I see only the HTML display name setting$') def i_see_only_the_html_display_name(step): world.verify_all_setting_entries([['Display Name', "Text", False]]) + + +@step('I have created an E-text Written in LaTeX$') +def i_created_blank_html_page(step): + world.create_component_instance( + step, + '.large-html-icon', + 'html', + '.xmodule_HtmlModule', + 'latex_html.yaml' + ) diff --git a/common/lib/xmodule/xmodule/templates/html/latex_html.yaml b/common/lib/xmodule/xmodule/templates/html/latex_html.yaml index 2db7e98c65..9163b3e8b9 100644 --- a/common/lib/xmodule/xmodule/templates/html/latex_html.yaml +++ b/common/lib/xmodule/xmodule/templates/html/latex_html.yaml @@ -1,16 +1,16 @@ --- metadata: display_name: E-text Written in LaTeX -source_code: | - \subsection{Example of E-text in LaTeX} + source_code: | + \subsection{Example of E-text in LaTeX} - It is very convenient to write complex equations in LaTeX. + It is very convenient to write complex equations in LaTeX. - \begin{equation} - x = \frac{-b\pm\sqrt{b^2-4*a*c}}{2a} - \end{equation} + \begin{equation} + x = \frac{-b\pm\sqrt{b^2-4*a*c}}{2a} + \end{equation} - Seize the moment. + Seize the moment. data: |