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
c289575b
Commit
c289575b
authored
Jan 10, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/cas/speed-editor' of github.com:MITx/mitx into feature/cas/speed-editor
parents
fa2a2430
708736c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
+35
-2
cms/templates/widgets/problem-edit.html
+2
-2
common/lib/xmodule/xmodule/js/fixtures/problem-with-markdown.html
+7
-0
common/lib/xmodule/xmodule/js/fixtures/problem-without-markdown.html
+6
-0
common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
+20
-0
No files found.
cms/templates/widgets/problem-edit.html
View file @
c289575b
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
class=
"problem-editor-icon string"
></span></a></li>
class=
"problem-editor-icon string"
></span></a></li>
<li><a
href=
"#"
class=
"number-button"
data-tooltip=
"Numerical Response"
><span
<li><a
href=
"#"
class=
"number-button"
data-tooltip=
"Numerical Response"
><span
class=
"problem-editor-icon number"
></span></a></li>
class=
"problem-editor-icon number"
></span></a></li>
<li><a
href=
"#"
class=
"dropdown-button"
data-tooltip=
"
Dropdown
"
><span
<li><a
href=
"#"
class=
"dropdown-button"
data-tooltip=
"
Option Response
"
><span
class=
"problem-editor-icon dropdown"
></span></a></li>
class=
"problem-editor-icon dropdown"
></span></a></li>
</ul>
</ul>
<ul
class=
"editor-tabs"
>
<ul
class=
"editor-tabs"
>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
h6
>
Multiple
Check
<
/h6
>
<
h6
>
Check
Multiple
<
/h6
>
<
div
class
=
"col sample"
>
<
div
class
=
"col sample"
>
<
img
src
=
"/static/img/multi-example.png"
/>
<
img
src
=
"/static/img/multi-example.png"
/>
<
/div
>
<
/div
>
...
...
common/lib/xmodule/xmodule/js/fixtures/problem-with-markdown.html
0 → 100644
View file @
c289575b
<section
class=
"problem-editor editor"
>
<div
class=
"row"
>
<textarea
class=
"markdown-box"
>
markdown
</textarea>
<textarea
class=
"xml-box"
rows=
"8"
cols=
"40"
>
xml
</textarea>
</div>
</section>
\ No newline at end of file
common/lib/xmodule/xmodule/js/fixtures/problem-without-markdown.html
0 → 100644
View file @
c289575b
<section
class=
"problem-editor editor"
>
<div
class=
"row"
>
<textarea
class=
"xml-box"
rows=
"8"
cols=
"40"
>
xml only
</textarea>
</div>
</section>
\ No newline at end of file
common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
View file @
c289575b
describe
'MarkdownEditingDescriptor'
,
->
describe
'MarkdownEditingDescriptor'
,
->
describe
'save stores the correct data'
,
->
it
'saves markdown from markdown editor'
,
->
loadFixtures
'problem-with-markdown.html'
@
descriptor
=
new
MarkdownEditingDescriptor
(
$
(
'.problem-editor'
))
saveResult
=
@
descriptor
.
save
()
expect
(
saveResult
.
metadata
.
markdown
).
toEqual
(
'markdown'
)
expect
(
saveResult
.
data
).
toEqual
(
'<problem>
\n
<p>markdown</p>
\n
</problem>'
)
it
'clears markdown when xml editor is selected'
,
->
loadFixtures
'problem-with-markdown.html'
@
descriptor
=
new
MarkdownEditingDescriptor
(
$
(
'.problem-editor'
))
@
descriptor
.
createXMLEditor
(
'replace with markdown'
)
saveResult
=
@
descriptor
.
save
()
expect
(
saveResult
.
metadata
.
markdown
).
toEqual
(
null
)
expect
(
saveResult
.
data
).
toEqual
(
'replace with markdown'
)
it
'saves xml from the xml editor'
,
->
loadFixtures
'problem-without-markdown.html'
@
descriptor
=
new
MarkdownEditingDescriptor
(
$
(
'.problem-editor'
))
saveResult
=
@
descriptor
.
save
()
expect
(
saveResult
.
metadata
.
markdown
).
toEqual
(
null
)
expect
(
saveResult
.
data
).
toEqual
(
'xml only'
)
describe
'insertMultipleChoice'
,
->
describe
'insertMultipleChoice'
,
->
it
'inserts the template if selection is empty'
,
->
it
'inserts the template if selection is empty'
,
->
...
...
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