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
808c9933
Commit
808c9933
authored
Jan 16, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1290 from MITx/feature/christina/misc
A couple of bug fixes.
parents
ebca3af7
d4f79c04
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
cms/static/js/base.js
+1
-1
cms/templates/asset_index.html
+4
-4
common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
+4
-4
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
+4
-4
No files found.
cms/static/js/base.js
View file @
808c9933
...
...
@@ -498,7 +498,7 @@ function displayFinishedUpload(xhr) {
}
var resp = JSON.parse(xhr.responseText);
$('
.
upload
-
modal
.
embeddable
-
xml
-
input
').val(
'
<
img
src
=
"' + xhr.getResponseHeader('asset_url') + '"
/>
'
);
$('
.
upload
-
modal
.
embeddable
-
xml
-
input
').val(
xhr.getResponseHeader('
asset_url
')
);
$('
.
upload
-
modal
.
embeddable
').show();
$('
.
upload
-
modal
.
file
-
name
').hide();
$('
.
upload
-
modal
.
progress
-
fill
').html(resp.msg);
...
...
cms/templates/asset_index.html
View file @
808c9933
...
...
@@ -28,7 +28,7 @@
{{
uploadDate
}}
<
/td
>
<
td
class
=
"embed-col"
>
<
input
type
=
"text"
class
=
"embeddable-xml-input"
value
=
'{{url}}'
>
<
input
type
=
"text"
class
=
"embeddable-xml-input"
value
=
'{{url}}'
disabled
>
<
/td
>
<
/tr
>
</script>
...
...
@@ -69,7 +69,7 @@
${asset['uploadDate']}
</td>
<td
class=
"embed-col"
>
<input
type=
"text"
class=
"embeddable-xml-input"
value=
'${asset['
url
']}'
>
<input
type=
"text"
class=
"embeddable-xml-input"
value=
"${asset['url']}"
disabled
>
</td>
</tr>
% endfor
...
...
@@ -99,8 +99,8 @@
<div
class=
"progress-fill"
></div>
</div>
<div
class=
"embeddable"
>
<label>
Embeddable XM
L:
</label>
<input
type=
"text"
class=
"embeddable-xml-input"
value=
'
<img src=""/>'
>
<label>
UR
L:
</label>
<input
type=
"text"
class=
"embeddable-xml-input"
value=
'
'
disabled
>
</div>
<form
class=
"file-chooser"
action=
"${upload_asset_callback_url}"
method=
"post"
enctype=
"multipart/form-data"
>
...
...
common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
View file @
808c9933
...
...
@@ -316,15 +316,15 @@ describe 'MarkdownEditingDescriptor', ->
</multiplechoiceresponse>
<p>Choice checks</p>
<
multiple
choiceresponse>
<ch
oicegroup type="MultipleChoiceChecks
">
<choiceresponse>
<ch
eckboxgroup direction="vertical
">
<choice correct="false">option1 [x]</choice>
<choice correct="true">correct</choice>
<choice correct="true">redundant</choice>
<choice correct="false">distractor</choice>
<choice correct="false">no space</choice>
</ch
oice
group>
</
multiple
choiceresponse>
</ch
eckbox
group>
</choiceresponse>
<p>Option with multiple correct ones</p>
...
...
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
View file @
808c9933
...
...
@@ -213,8 +213,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
//
group
check
answers
xml
=
xml
.
replace
(
/(^\s*\[.?\].*?$\n*)+/gm
,
function
(
match
,
p
)
{
var
groupString
=
'<
multiple
choiceresponse>
\n
'
;
groupString
+=
' <ch
oicegroup type="MultipleChoiceChecks
">
\n
'
;
var
groupString
=
'<choiceresponse>
\n
'
;
groupString
+=
' <ch
eckboxgroup direction="vertical
">
\n
'
;
var
options
=
match
.
split
(
'
\n
'
);
for
(
var
i
=
0
;
i
<
options
.
length
;
i
++
)
{
if
(
options
[
i
].
length
>
0
)
{
...
...
@@ -223,8 +223,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
groupString
+=
' <choice correct="'
+
correct
+
'">'
+
value
+
'</choice>
\n
'
;
}
}
groupString
+=
' </ch
oice
group>
\n
'
;
groupString
+=
'</
multiple
choiceresponse>
\n\n
'
;
groupString
+=
' </ch
eckbox
group>
\n
'
;
groupString
+=
'</choiceresponse>
\n\n
'
;
return
groupString
;
});
...
...
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