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
533f4876
Commit
533f4876
authored
Jan 03, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename, add css file.
parent
8dd02c7e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
cms/templates/widgets/problem-edit.html
+1
-4
common/lib/xmodule/xmodule/capa_module.py
+2
-1
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
+6
-5
No files found.
cms/templates/widgets/problem-edit.html
View file @
533f4876
<
%
include
file=
"metadata-edit.html"
/>
<section
class=
"problem-editor editor"
>
<div
class=
"row"
>
<
%
markdown =
'foo'
%
>
%if markdown != '' or data == '':
<div
class=
"editor-bar"
>
<ul
class=
"format-buttons"
>
...
...
@@ -24,7 +21,7 @@
<li><a
href=
"#"
class=
"cheatsheet-toggle"
data-tooltip=
"Toggle Cheatsheet"
>
?
</a></li>
</ul>
</div>
<textarea
class=
"
edit
-box"
>
${markdown}
</textarea>
<textarea
class=
"
markdown
-box"
>
${markdown}
</textarea>
%endif
<textarea
class=
"xml-box"
rows=
"8"
cols=
"40"
>
${data | h}
</textarea>
</div>
...
...
common/lib/xmodule/xmodule/capa_module.py
View file @
533f4876
...
...
@@ -651,8 +651,9 @@ class CapaDescriptor(RawDescriptor):
has_score
=
True
template_dir_name
=
'problem'
mako_template
=
"widgets/problem-edit.html"
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/problem/
markdown
.coffee'
)]}
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/problem/
edit
.coffee'
)]}
js_module_name
=
"MarkdownEditingDescriptor"
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/problem/edit.scss'
)]}
# Capa modules have some additional metadata:
# TODO (vshnayder): do problems have any other metadata? Do they
...
...
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
View file @
533f4876
...
...
@@ -6,11 +6,12 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
lineWrapping
:
true
})
@
markdown_editor
=
CodeMirror
.
fromTextArea
(
$
(
".edit-box"
,
@
element
)[
0
],
{
lineWrapping
:
true
mode
:
null
onChange
:
@
onMarkdownEditorUpdate
})
if
$
(
".markdown-box"
,
@
element
).
length
!=
0
@
markdown_editor
=
CodeMirror
.
fromTextArea
(
$
(
".markdown-box"
,
@
element
)[
0
],
{
lineWrapping
:
true
mode
:
null
onChange
:
@
onMarkdownEditorUpdate
})
onMarkdownEditorUpdate
:
->
console
.
log
(
'update'
)
...
...
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