Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
95c86248
Commit
95c86248
authored
Dec 06, 2013
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1869 from edx/christina/export-error
On export error, handle quotes within string.
parents
03c8c0e1
bbeded71
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
2 deletions
+62
-2
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
+6
-1
cms/djangoapps/contentstore/features/course-export.feature
+11
-0
cms/djangoapps/contentstore/features/course-export.py
+44
-0
cms/templates/export.html
+1
-1
No files found.
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
View file @
95c86248
...
...
@@ -161,9 +161,14 @@ def verify_all_setting_entries(expected_entries):
@world.absorb
def
save_component
_and_reopen
(
step
):
def
save_component
(
step
):
world
.
css_click
(
"a.save-button"
)
world
.
wait_for_ajax_complete
()
@world.absorb
def
save_component_and_reopen
(
step
):
save_component
(
step
)
# We have a known issue that modifications are still shown within the edit window after cancel (though)
# they are not persisted. Refresh the browser to make sure the changes WERE persisted after Save.
reload_the_page
(
step
)
...
...
cms/djangoapps/contentstore/features/course-export.feature
0 → 100644
View file @
95c86248
@shard_1
Feature
:
Course export
I want to export my course to a tar.gz file to share with others or check into source control
Scenario
:
User is directed to unit with bad XML when export fails
Given
I am in Studio editing a new unit
When
I add a
"Blank Advanced Problem"
"Advanced Problem"
component
And
I edit and enter bad XML
And
I export the course
Then
I get an error dialog
And
I can click to go to the unit with the error
cms/djangoapps/contentstore/features/course-export.py
0 → 100644
View file @
95c86248
# disable missing docstring
#pylint: disable=C0111
from
lettuce
import
world
,
step
from
common
import
type_in_codemirror
from
nose.tools
import
assert_true
,
assert_equal
@step
(
'I export the course$'
)
def
i_export_the_course
(
step
):
world
.
click_tools
()
link_css
=
'li.nav-course-tools-export a'
world
.
css_click
(
link_css
)
world
.
css_click
(
'a.action-export'
)
@step
(
'I edit and enter bad XML$'
)
def
i_enter_bad_xml
(
step
):
world
.
edit_component
()
type_in_codemirror
(
0
,
"""<problem><h1>Smallest Canvas</h1>
<p>You want to make the smallest canvas you can.</p>
<multiplechoiceresponse>
<choicegroup type="MultipleChoice">
<choice correct="false"><verbatim><canvas id="myCanvas" width = 10 height = 100> </canvas></verbatim></choice>
<choice correct="true"><code><canvas id="myCanvas" width = 10 height = 10> </canvas></code></choice>
</choicegroup>
</multiplechoiceresponse>
</problem>"""
)
world
.
save_component
(
step
)
@step
(
'I get an error dialog$'
)
def
get_an_error_dialog
(
step
):
assert_true
(
world
.
is_css_present
(
"div.prompt.error"
))
@step
(
'I can click to go to the unit with the error$'
)
def
i_click_on_error_dialog
(
step
):
world
.
click_link_by_text
(
'Correct failed component'
)
assert_true
(
world
.
css_html
(
"span.inline-error"
)
.
startswith
(
"Problem i4x://MITx/999/problem"
))
assert_equal
(
1
,
world
.
browser
.
url
.
count
(
"unit/MITx.999.Robot_Super_Course/branch/draft/block/vertical"
))
cms/templates/export.html
View file @
95c86248
...
...
@@ -15,7 +15,7 @@
var
hasUnit
=
$
{
json
.
dumps
(
bool
(
unit
))},
editUnitUrl
=
"${edit_unit_url or ""}"
,
courseHomeUrl
=
"${course_home_url or ""}"
,
errMsg
=
"${raw_err_msg or ""}"
;
errMsg
=
$
{
json
.
dumps
(
raw_err_msg
or
""
)}
;
require
([
"domReady!"
,
"gettext"
,
"js/views/feedback_prompt"
],
function
(
doc
,
gettext
,
PromptView
)
{
var
dialog
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment