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
cc5a5e29
Commit
cc5a5e29
authored
Jan 16, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix multiple choice checkbox.
#117
parent
ebca3af7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
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.
common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee
View file @
cc5a5e29
...
@@ -316,15 +316,15 @@ describe 'MarkdownEditingDescriptor', ->
...
@@ -316,15 +316,15 @@ describe 'MarkdownEditingDescriptor', ->
</multiplechoiceresponse>
</multiplechoiceresponse>
<p>Choice checks</p>
<p>Choice checks</p>
<
multiple
choiceresponse>
<choiceresponse>
<ch
oicegroup type="MultipleChoiceChecks
">
<ch
eckboxgroup direction="vertical
">
<choice correct="false">option1 [x]</choice>
<choice correct="false">option1 [x]</choice>
<choice correct="true">correct</choice>
<choice correct="true">correct</choice>
<choice correct="true">redundant</choice>
<choice correct="true">redundant</choice>
<choice correct="false">distractor</choice>
<choice correct="false">distractor</choice>
<choice correct="false">no space</choice>
<choice correct="false">no space</choice>
</ch
oice
group>
</ch
eckbox
group>
</
multiple
choiceresponse>
</choiceresponse>
<p>Option with multiple correct ones</p>
<p>Option with multiple correct ones</p>
...
...
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
View file @
cc5a5e29
...
@@ -213,8 +213,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
...
@@ -213,8 +213,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
//
group
check
answers
//
group
check
answers
xml
=
xml
.
replace
(
/(^\s*\[.?\].*?$\n*)+/gm
,
function
(
match
,
p
)
{
xml
=
xml
.
replace
(
/(^\s*\[.?\].*?$\n*)+/gm
,
function
(
match
,
p
)
{
var
groupString
=
'<
multiple
choiceresponse>
\n
'
;
var
groupString
=
'<choiceresponse>
\n
'
;
groupString
+=
' <ch
oicegroup type="MultipleChoiceChecks
">
\n
'
;
groupString
+=
' <ch
eckboxgroup direction="vertical
">
\n
'
;
var
options
=
match
.
split
(
'
\n
'
);
var
options
=
match
.
split
(
'
\n
'
);
for
(
var
i
=
0
;
i
<
options
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
options
.
length
;
i
++
)
{
if
(
options
[
i
].
length
>
0
)
{
if
(
options
[
i
].
length
>
0
)
{
...
@@ -223,8 +223,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
...
@@ -223,8 +223,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
groupString
+=
' <choice correct="'
+
correct
+
'">'
+
value
+
'</choice>
\n
'
;
groupString
+=
' <choice correct="'
+
correct
+
'">'
+
value
+
'</choice>
\n
'
;
}
}
}
}
groupString
+=
' </ch
oice
group>
\n
'
;
groupString
+=
' </ch
eckbox
group>
\n
'
;
groupString
+=
'</
multiple
choiceresponse>
\n\n
'
;
groupString
+=
'</choiceresponse>
\n\n
'
;
return
groupString
;
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