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
6eb5ce8d
Commit
6eb5ce8d
authored
Sep 26, 2012
by
Lyla Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added several problem types
parent
4d1d35e3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
55 deletions
+50
-55
common/lib/xmodule/xmodule/capa_module.py
+1
-2
common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml
+7
-7
common/lib/xmodule/xmodule/templates/problem/customgrader.yaml
+5
-7
common/lib/xmodule/xmodule/templates/problem/forumularesponse.yaml
+3
-5
common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml
+2
-2
common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml
+2
-2
common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml
+2
-2
common/lib/xmodule/xmodule/templates/problem/string_response.yaml
+28
-28
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
6eb5ce8d
...
@@ -638,14 +638,13 @@ class CapaDescriptor(RawDescriptor):
...
@@ -638,14 +638,13 @@ class CapaDescriptor(RawDescriptor):
stores_state
=
True
stores_state
=
True
has_score
=
True
has_score
=
True
template_dir_name
=
'problem'
# Capa modules have some additional metadata:
# Capa modules have some additional metadata:
# TODO (vshnayder): do problems have any other metadata? Do they
# TODO (vshnayder): do problems have any other metadata? Do they
# actually use type and points?
# actually use type and points?
metadata_attributes
=
RawDescriptor
.
metadata_attributes
+
(
'type'
,
'points'
)
metadata_attributes
=
RawDescriptor
.
metadata_attributes
+
(
'type'
,
'points'
)
template_dir_name
=
'problem'
# VS[compat]
# VS[compat]
# TODO (cpennington): Delete this method once all fall 2012 course are being
# TODO (cpennington): Delete this method once all fall 2012 course are being
# edited in the cms
# edited in the cms
...
...
common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml
View file @
6eb5ce8d
...
@@ -70,15 +70,15 @@ data: |
...
@@ -70,15 +70,15 @@ data: |
# of the diagram and analysis results for the i-th schematic tag
# of the diagram and analysis results for the i-th schematic tag
def get_tran(json,signal):
def get_tran(json,signal):
for element in json:
for element in json:
if element[0] == 'transient':
if element[0] == 'transient':
return element[1].get(signal,[])
return element[1].get(signal,[])
return []
return []
def get_value(at,output):
def get_value(at,output):
for (t,v) in output:
for (t,v) in output:
if at == t: return v
if at == t: return v
return None
return None
output = get_tran(submission[0],'Z')
output = get_tran(submission[0],'Z')
okay = True
okay = True
...
...
common/lib/xmodule/xmodule/templates/problem/customgrader.yaml
View file @
6eb5ce8d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
metadata
:
metadata
:
display_name
:
Custom Grader
display_name
:
Custom Grader
data
:
|
data
:
|
<problem>
<problem>
<text>
<text>
<h2>Example: Custom Response Problem</h2>
<h2>Example: Custom Response Problem</h2>
...
@@ -12,11 +12,9 @@ data: |
...
@@ -12,11 +12,9 @@ data: |
python script embedded within the problem.
python script embedded within the problem.
</p>
</p>
<script type="loncapa/python">
<script type="loncapa/python">def test_add(expect,ans):
(a1,a2) = map(float,ans)
def test_add(expect,ans)
:
return (a1+a2)==10
(a1,a2) = map(float,ans)
return (a1+a2)==10
</script>
</script>
...
@@ -29,5 +27,5 @@ data: |
...
@@ -29,5 +27,5 @@ data: |
</text>
</text>
</text>
</text>
</problem>
</problem>
children
:
[]
children
:
[]
common/lib/xmodule/xmodule/templates/problem/forumularesponse.yaml
View file @
6eb5ce8d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
metadata
:
metadata
:
display_name
:
Formula Repsonse
display_name
:
Formula Repsonse
data
:
|
data
:
|
<problem>
<problem>
<text>
<text>
<h2>Example: Formula Response Problem</h2>
<h2>Example: Formula Response Problem</h2>
...
@@ -21,9 +21,7 @@ data: |
...
@@ -21,9 +21,7 @@ data: |
on the problem author to specify the allowed variables in the expression, and the
on the problem author to specify the allowed variables in the expression, and the
numerical ranges over which the variables must be sampled to test for correctness.</p>
numerical ranges over which the variables must be sampled to test for correctness.</p>
<script type="loncapa/python">
<script type="loncapa/python">I = "m*c^2"</script>
I = "m*c^2"
</script>
<text>
<text>
<br/>
<br/>
...
@@ -36,5 +34,5 @@ data: |
...
@@ -36,5 +34,5 @@ data: |
</formularesponse>
</formularesponse>
</text>
</text>
</problem>
</problem>
children
:
[]
children
:
[]
common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml
View file @
6eb5ce8d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
metadata
:
metadata
:
display_name
:
Image Response
display_name
:
Image Response
data
:
|
data
:
|
<problem>
<problem>
<text>
<text>
<h2>Example: Image Response Problem</h2>
<h2>Example: Image Response Problem</h2>
...
@@ -21,6 +21,6 @@ data: |
...
@@ -21,6 +21,6 @@ data: |
</imageresponse>
</imageresponse>
</text>
</text>
</text>
</text>
</problem>
</problem>
children
:
[]
children
:
[]
common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml
View file @
6eb5ce8d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
metadata
:
metadata
:
display_name
:
Multiple Choice
display_name
:
Multiple Choice
data
:
|
data
:
|
<problem>
<problem>
<text>
<text>
<h2>Example: Multiple Choice Response Problem</h2>
<h2>Example: Multiple Choice Response Problem</h2>
...
@@ -23,5 +23,5 @@ data: |
...
@@ -23,5 +23,5 @@ data: |
</choicegroup>
</choicegroup>
</multiplechoiceresponse>
</multiplechoiceresponse>
</text>
</text>
</problem>
</problem>
children
:
[]
children
:
[]
common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml
View file @
6eb5ce8d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
metadata
:
metadata
:
display_name
:
Numerical Response
display_name
:
Numerical Response
data
:
|
data
:
|
<problem>
<problem>
<text>
<text>
<h2>Example: Numerical Response Problem</h2>
<h2>Example: Numerical Response Problem</h2>
...
@@ -24,5 +24,5 @@ data: |
...
@@ -24,5 +24,5 @@ data: |
</numericalresponse>
</numericalresponse>
</p>
</p>
</text>
</text>
</problem>
</problem>
children
:
[]
children
:
[]
common/lib/xmodule/xmodule/templates/problem/string_response.yaml
View file @
6eb5ce8d
...
@@ -4,37 +4,37 @@ metadata:
...
@@ -4,37 +4,37 @@ metadata:
data
:
|
data
:
|
<problem >
<problem >
<text>
<text>
<h2>Example
:
String Response Problem</h2>
<h2>Example: String Response Problem</h2>
<p>
<p>
A string response problem accepts a line of text input from the
A string response problem accepts a line of text input from the
student, and evaluates the input for correctness based on an expected
student, and evaluates the input for correctness based on an expected
answer within each input box.
answer within each input box.
The answer is correct if it is the expected answer.
The answer is correct if it is the expected answer.
</p>
</p>
</text>
</text>
<span style="display:inline">
<span style="display:inline">
<p style="display:inline">Which US state has Lansing as its capital?    </p>
<p style="display:inline">Which US state has Lansing as its capital?    </p>
<stringresponse answer="Michigan" type="ci">
<stringresponse answer="Michigan" type="ci">
<textline size="20" inline="1"/>
<textline size="20" inline="1"/>
<hintgroup>
<hintgroup>
<stringhint answer="wisconsin" type="cs" name="wisc">
<stringhint answer="wisconsin" type="cs" name="wisc">
</stringhint>
</stringhint>
<stringhint answer="minnesota" type="cs" name="minn">
<stringhint answer="minnesota" type="cs" name="minn">
</stringhint>
</stringhint>
<hintpart on="wisc">
<hintpart on="wisc">
<text>The state capital of Wisconsin is Madison.</text>
<text>The state capital of Wisconsin is Madison.</text>
</hintpart>
</hintpart>
<hintpart on="minn">
<hintpart on="minn">
<text>The state capital of Minnesota is St. Paul.</text>
<text>The state capital of Minnesota is St. Paul.</text>
</hintpart>
</hintpart>
<hintpart on="default">
<hintpart on="default">
<text>The state you are looking for is also known as the 'Great Lakes State'</text>
<text>The state you are looking for is also known as the 'Great Lakes State'</text>
</hintpart>
</hintpart>
</hintgroup>
</hintgroup>
</stringresponse>
</stringresponse>
</span>
</span>
</problem>
</problem>
...
...
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