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
e095a139
Commit
e095a139
authored
Jan 11, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cheat sheet updated for header and explanation. Video removed.
parent
495814c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
cms/templates/widgets/problem-edit.html
+23
-0
common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
+0
-4
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
+1
-9
No files found.
cms/templates/widgets/problem-edit.html
View file @
e095a139
...
...
@@ -30,6 +30,17 @@
<
article
class
=
"simple-editor-cheatsheet"
>
<
div
class
=
"cheatsheet-wrapper"
>
<
div
class
=
"row"
>
<
h6
>
Header
<
/h6
>
<
div
class
=
"col sample"
>
<
img
src
=
"/static/img/header-example.png"
/>
<
/div
>
<
div
class
=
"col"
>
<
pre
><
code
>
H1
=====
<
/pre
>
<
/div
>
<
/div
>
<
div
class
=
"row"
>
<
h6
>
Multiple
Choice
<
/h6
>
<
div
class
=
"col sample"
>
<
img
src
=
"/static/img/choice-example.png"
/>
...
...
@@ -78,6 +89,18 @@
<
pre
><
code
>
[[
wrong
,
(
right
)]]
<
/code></
pre
>
<
/div
>
<
/div
>
<
div
class
=
"row"
>
<
h6
>
Explanation
<
/h6
>
<
div
class
=
"col sample"
>
<
img
src
=
"/static/img/explanation-example.png"
/>
<
/div
>
<
div
class
=
"col"
>
<
pre
><
code
>
[
explanation
]
A
short
explanation
of
the
answer
.
[
explanation
]
<
/code></
pre
>
<
/div
>
<
/div
>
<
/div
>
<
/article
>
</script>
common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
View file @
e095a139
...
...
@@ -257,8 +257,6 @@ describe 'MarkdownEditingDescriptor', ->
[(] distractor
[] no space
{{video abcd1s}}
Option with multiple correct ones
[[one option, (correct one), (should not be correct)]]
...
...
@@ -312,8 +310,6 @@ describe 'MarkdownEditingDescriptor', ->
</choicegroup>
</multiplechoiceresponse>
<video youtube="1.0:abcd1s" />
<p>Option with multiple correct ones</p>
<optionresponse>
...
...
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
View file @
e095a139
...
...
@@ -165,7 +165,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
else
return
template
# We may wish to add insertHeader
and insertVideo
. Here is Tom's code.
# We may wish to add insertHeader. Here is Tom's code.
# function makeHeader() {
# var selection = simpleEditor.getSelection();
# var revisedSelection = selection + '\n';
...
...
@@ -175,11 +175,6 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
# simpleEditor.replaceSelection(revisedSelection);
#}
#
#function makeVideo() {
#var selection = simpleEditor.getSelection();
#simpleEditor.replaceSelection('{{video ' + selection + '}}');
#}
#
@
markdownToXml
:
(
markdown
)
->
toXml
=
`
function
(
markdown
)
{
var
xml
=
markdown
;
...
...
@@ -222,9 +217,6 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
return
groupString
;
});
//
replace
videos
xml
=
xml
.
replace
(
/\{\{video\s(.*?)\}\}/g
,
'<video youtube="1.0:$1" />
\n\n
'
);
//
replace
string
and
numerical
xml
=
xml
.
replace
(
/^\=\s*(.*?$)/gm
,
function
(
match
,
p
)
{
var
string
;
...
...
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