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
2bb44a00
Commit
2bb44a00
authored
Oct 22, 2014
by
Adam
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5641 from edx/adam/update-latex-data
update latex problem data (TNL-264)
parents
0d36dd72
becd4c1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
47 deletions
+48
-47
common/lib/xmodule/xmodule/templates/problem/latex_problem.yaml
+48
-47
No files found.
common/lib/xmodule/xmodule/templates/problem/latex_problem.yaml
View file @
2bb44a00
...
@@ -7,89 +7,89 @@ metadata:
...
@@ -7,89 +7,89 @@ metadata:
% key new feature is the \edXabox{} macro, which specifies an "Answer
% key new feature is the \edXabox{} macro, which specifies an "Answer
% Box" that queries students for a response, and specifies what the
% Box" that queries students for a response, and specifies what the
% epxected (correct) answer is.
% epxected (correct) answer is.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Example "option" problem}
\subsection{Example "option" problem}
Where is the earth?
Where is the earth?
\edXabox{options='up','down' expect='down'}
\edXabox{options='up','down' expect='down'}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Example "symbolic" problem}
\subsection{Example "symbolic" problem}
What is Einstein's equation for the energy equivalent of a mass $m$?
What is Einstein's equation for the energy equivalent of a mass $m$?
\edXabox{type='symbolic' size='90' expect='m*c^2' }
\edXabox{type='symbolic' size='90' expect='m*c^2' }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Example "numerical" problem}
\subsection{Example "numerical" problem}
Estimate the energy savings (in J/y) if all the people
Estimate the energy savings (in J/y) if all the people
($3\times 10^8$) in the U.~S. switched from U.~S. code to low flow
($3\times 10^8$) in the U.~S. switched from U.~S. code to low flow
shower heads.
shower heads.
\edXinline{Energy saved = }\edXabox{expect="0.52" type="numerical" tolerance='0.02' inline='1' } %
\edXinline{Energy saved = }\edXabox{expect="0.52" type="numerical" tolerance='0.02' inline='1' } %
\edXinline{~EJ/year}
\edXinline{~EJ/year}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Example "multiple choice" problem}
\subsection{Example "multiple choice" problem}
What color is a banana?
What color is a banana?
\edXabox{ type="multichoice" expect="Yellow" options="Red","Green","Yellow","Blue" }
\edXabox{ type="multichoice" expect="Yellow" options="Red","Green","Yellow","Blue" }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Example "string response" problem}
\subsection{Example "string response" problem}
In what U.S. state is Detroit located?
In what U.S. state is Detroit located?
\edXabox{ type="string" expect="Michigan" options="ci" }
\edXabox{ type="string" expect="Michigan" options="ci" }
An explanation of the answer can be provided by using the edXsolution
An explanation of the answer can be provided by using the edXsolution
macro. Click on "Show Answer" to see the solution.
macro. Click on "Show Answer" to see the solution.
\begin{edXsolution}
\begin{edXsolution}
Detroit is near Canada, but it is actually in the United States.
Detroit is near Canada, but it is actually in the United States.
\end{edXsolution}
\end{edXsolution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Example "custom response" problem}
\subsection{Example "custom response" problem}
This problem demonstrates the use of a custom python script used for
This problem demonstrates the use of a custom python script used for
checking the answer.
checking the answer.
\begin{edXscript}
\begin{edXscript}
def sumtest(expect,ans):
def sumtest(expect,ans):
(a1,a2) = map(float,eval(ans))
(a1,a2) = map(float,eval(ans))
return (a1+a2)==10
return (a1+a2)==10
\end{edXscript}
\end{edXscript}
Enter a python list of two numbers which sum to 10, eg [9,1]:
Enter a python list of two numbers which sum to 10, eg [9,1]:
\edXabox{expect="[1,9]" type="custom" cfn="sumtest"}
\edXabox{expect="[1,9]" type="custom" cfn="sumtest"}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Example image}
\subsection{Example image}
Include image by using the edXxml macro:
Include image by using the edXxml macro:
\edXxml{<img src="http
://autoid.mit.edu
/images/mit_dome.jpg"/>}
\edXxml{<img src="http
s://courses.edx.org/static
/images/mit_dome.jpg"/>}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Example show/hide explanation}
\subsection{Example show/hide explanation}
Extra explanations can be tucked away behind a "showhide" toggle flag:
Extra explanations can be tucked away behind a "showhide" toggle flag:
\edXshowhide{sh1}{More explanation}{This is a hidden explanation. It
\edXshowhide{sh1}{More explanation}{This is a hidden explanation. It
can contain equations: $\alpha = \frac{2}{\sqrt{1+\gamma}}$ }
can contain equations: $\alpha = \frac{2}{\sqrt{1+\gamma}}$ }
This is some text after the showhide example.
This is some text after the showhide example.
markdown
:
!!null
markdown
:
!!null
data
:
|
data
:
|
<?xml version="1.0"?>
<?xml version="1.0"?>
<problem>
<problem
showanswer="closed" rerandomize="never" weight="10" display_name="lec1_Q2"
>
<text>
<text>
<p>
<p>
<h4>Example "option" problem</h4>
<h4>Example "option" problem</h4>
...
@@ -98,7 +98,7 @@ data: |
...
@@ -98,7 +98,7 @@ data: |
Where is the earth? </p>
Where is the earth? </p>
<p>
<p>
<optionresponse>
<optionresponse>
<optioninput options="('up','down')" correct="down"
label="Where is the earth?"
/>
<optioninput options="('up','down')" correct="down"/>
</optionresponse>
</optionresponse>
</p>
</p>
<p>
<p>
...
@@ -108,7 +108,7 @@ data: |
...
@@ -108,7 +108,7 @@ data: |
What is Einstein's equation for the energy equivalent of a mass [mathjaxinline]m[/mathjaxinline]? </p>
What is Einstein's equation for the energy equivalent of a mass [mathjaxinline]m[/mathjaxinline]? </p>
<p>
<p>
<symbolicresponse expect="m*c^2">
<symbolicresponse expect="m*c^2">
<textline size="90" correct_answer="m*c^2" math="1"
label="Enter Einstein's equation"
/>
<textline size="90" correct_answer="m*c^2" math="1"/>
</symbolicresponse>
</symbolicresponse>
</p>
</p>
<p>
<p>
...
@@ -119,8 +119,9 @@ data: |
...
@@ -119,8 +119,9 @@ data: |
<p>
<p>
<p style="display:inline">Energy saved = </p>
<p style="display:inline">Energy saved = </p>
<numericalresponse inline="1" answer="0.52">
<numericalresponse inline="1" answer="0.52">
<responseparam description="Numerical Tolerance" type="tolerance" default="0.02" name="tol"/>
<textline inline="1">
<formulaequationinput label="Enter the equation"/>
<responseparam type="tolerance" default="0.02"/>
</textline>
</numericalresponse>
</numericalresponse>
<p style="display:inline"> EJ/year</p>
<p style="display:inline"> EJ/year</p>
</p>
</p>
...
@@ -130,22 +131,22 @@ data: |
...
@@ -130,22 +131,22 @@ data: |
<p>
<p>
What color is a banana? </p>
What color is a banana? </p>
<p>
<p>
<choiceresponse>
<
multiple
choiceresponse>
<ch
eckboxgroup label="What color is a banana?
">
<ch
oicegroup direction="vertical
">
<choice correct="false" name="1">
<choice correct="false" name="1">
<text>Red</text>
<text>
Red</text>
</choice>
</choice>
<choice correct="false" name="2">
<choice correct="false" name="2">
<text>Green</text>
<text>
Green</text>
</choice>
</choice>
<choice correct="true" name="3">
<choice correct="true" name="3">
<text>Yellow</text>
<text>
Yellow</text>
</choice>
</choice>
<choice correct="false" name="4">
<choice correct="false" name="4">
<text>Blue</text>
<text>
Blue</text>
</choice>
</choice>
</ch
eckbox
group>
</ch
oice
group>
</choiceresponse>
</
multiple
choiceresponse>
</p>
</p>
<p>
<p>
<h4>Example "string response" problem</h4>
<h4>Example "string response" problem</h4>
...
@@ -154,11 +155,11 @@ data: |
...
@@ -154,11 +155,11 @@ data: |
In what U.S. state is Detroit located? </p>
In what U.S. state is Detroit located? </p>
<p>
<p>
<stringresponse answer="Michigan">
<stringresponse answer="Michigan">
<textline
label="What state contains Michigan?"
/>
<textline/>
</stringresponse>
</stringresponse>
</p>
</p>
<p>
<p>
An explanation of the answer can be provided by using the edXsolution macro
:
</p>
An explanation of the answer can be provided by using the edXsolution macro
. Click on "Show Answer" to see the solution.
</p>
<p>
<p>
<solution>
<solution>
<font color="blue">Answer: </font>
<font color="blue">Answer: </font>
...
@@ -179,7 +180,7 @@ data: |
...
@@ -179,7 +180,7 @@ data: |
Enter a python list of two numbers which sum to 10, eg [9,1]: </p>
Enter a python list of two numbers which sum to 10, eg [9,1]: </p>
<p>
<p>
<customresponse cfn="sumtest" expect="[1,9]">
<customresponse cfn="sumtest" expect="[1,9]">
<textline correct_answer="[1,9]"
label="Enter the python list"
/>
<textline correct_answer="[1,9]"/>
</customresponse>
</customresponse>
</p>
</p>
<p>
<p>
...
@@ -188,7 +189,7 @@ data: |
...
@@ -188,7 +189,7 @@ data: |
<p>
<p>
Include image by using the edXxml macro: </p>
Include image by using the edXxml macro: </p>
<p>
<p>
<img src="/static/images/mit_dome.jpg"/>
<img src="
https://courses.edx.org
/static/images/mit_dome.jpg"/>
</p>
</p>
<p>
<p>
<h4>Example show/hide explanation</h4>
<h4>Example show/hide explanation</h4>
...
...
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