From f7859c432cd5257ed8fa2fc4b8162df010b5894a Mon Sep 17 00:00:00 2001 From: Sylvia Pearce Date: Thu, 6 Feb 2014 12:24:36 -0500 Subject: [PATCH] Continue updating Appendix E --- .../source/advanced_problems.rst | 59 +- .../course_authors/source/appendices/e.rst | 1148 ++++++++--------- 2 files changed, 612 insertions(+), 595 deletions(-) diff --git a/docs/en_us/course_authors/source/advanced_problems.rst b/docs/en_us/course_authors/source/advanced_problems.rst index 8c65b822b7..34a2ae4a34 100644 --- a/docs/en_us/course_authors/source/advanced_problems.rst +++ b/docs/en_us/course_authors/source/advanced_problems.rst @@ -219,7 +219,7 @@ Python script that you create and embed in the problem. These problems can be any type. Numerical input and text input problems are the most popular write-your-own-grader. -.. image:: Images/WriteYourOwnGraderExample.gif +.. image:: Images/CustomPythonExample.png :alt: Image of a write your own grader problem Create a Write-Your-Own-Grader Problem @@ -295,23 +295,54 @@ To create a image mapped input problem: Math Expression Input --------------------- -In math expression input problems, students enter text that represents -a mathematical expression, and Studio changes that text to a symbolic -expression that appears below the field where the student is typing. -Unlike numerical input problems, which only allow integers and a few -select constants, math expression problems can include more complicated -symbolic expressions. - -When you create a math expression input problem for your students in -Studio, you'll use `MathJax `_ to change your -plain text into "beautiful math." For more information about how to use -MathJax in Studio, see :ref:`MathJax in Studio`. - -.. warning:: Math expression input problems cannot currently include negative numbers raised to fractional powers, such as (-1)^(1/2). Math expression input problems can include complex numbers raised to fractional powers, or positive non-complex numbers raised to fractional powers. +In math expression input problems, students enter text that represents a mathematical expression into a field, and the LMS changes that text to a symbolic expression that appears below that field. .. image:: Images/MathExpressionInputExample.gif :alt: Image of math expression input problem +Unlike numerical input problems, which only allow integers and a few select constants, math expression problems can include unknown variables and more complicated symbolic expressions. The grader uses a numerical sampling to determine whether the student's response matches the instructor-provided math expression, to a specified numerical tolerance. The instructor must specify the allowed variables in the expression as well as the range of values for each variable. + +.. warning:: Math expression input problems cannot currently include negative numbers raised to fractional powers, such as (-1)^(1/2). Math expression input problems can include complex numbers raised to fractional powers, or positive non-complex numbers raised to fractional powers. + +When you create a math expression input problem in Studio, you'll use `MathJax `_ to change your plain text into "beautiful math." For more information about how to use MathJax in Studio, see :ref:`MathJax in Studio`. + +The LMS automatically converts the following Greek letter names into the corresponding Greek characters when a student types them in the answer field: + +.. list-table:: + :widths: 20 20 20 20 + :header-rows: 0 + + * - alpha + - beta + - gamma + - delta + * - epsilon + - varepsilon + - zeta + - eta + * - theta + - vartheta + - iota + - kappa + * - lambda + - mu + - nu + - xi + * - pi + - rho + - sigma + - tau + * - upsilon + - phi + - varphi + - chi + * - psi + - omega + - + - + +note:: ``epsilon`` is the lunate version, whereas ``varepsilon`` looks like a backward 3. + Create a Math Expression Input Problem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/en_us/course_authors/source/appendices/e.rst b/docs/en_us/course_authors/source/appendices/e.rst index 0bc411dc0e..4360bb8ace 100644 --- a/docs/en_us/course_authors/source/appendices/e.rst +++ b/docs/en_us/course_authors/source/appendices/e.rst @@ -5,96 +5,396 @@ .. _Appendix E: -========================== -APPENDIX E: Problem Types -========================== +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +APPENDIX E: Problem and Tool XML +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Option Response -=============== +This appendix provides information about the XML for most problem and tool types in Studio: -The Option Response input type allows the student to choose from a collection of -answer options, presented as a drop-down list. +:ref:`Checkbox` +:ref:`Chemical Equation Response` +:ref:`Custom Response` +:ref:`Formula Response` +:ref:`Image Response` +:ref:`Multiple Choice` +:ref:`Numerical Response` +:ref:`Option Response` +:ref:`Schematic Response` +:ref:`String Response` -Option Response is structurally similar to Multiple Choice. Some conceptual -differences between the two include the following. +.. _Checkbox: -* The Multiple Choice radio button format makes it easier for students to read very long response options. +Choice Response (Checkbox) +--------------------------- -* The Option Response drop-down input format makes it more likely for students to think of an answer and then search for it, rather than relying purely on recognition to answer the question. The Multiple Choice format is more explicit and visual. This makes it a more appropriate choice for presenting tricky or complicated answer options which are intended to get the student to pause and think. +**To designate an answer as correct, add correct="true"** +**Available in Simple Editor** Sample Problem: -.. image:: ../Images/image287.png - :width: 600 - :alt: Image of an option response problem +.. image:: ../Images/CheckboxExample.gif + :alt: Image of a checkbox problem -**Problem Code:** + +**Sample Problem XML** .. code-block:: xml + +

Learning about the benefits of preventative healthcare can be particularly difficult. Check all of the reasons below why this may be the case.

-

Option Response is most similar to __________.

- - - 1 - + + + A large amount of time passes between undertaking a preventative measure and seeing the result. + Non-immunized people will always fall sick. + If others are immunized, fewer people will fall sick regardless of a particular individual's choice to get immunized or not. + Trust in healthcare professionals and government officials is fragile. + -
-

Explanation

-

Like Option Response, Multiple Choice also allows students to select - from a variety of pre-written responses.

-
-
+
+

Explanation

+

People who are not immunized against a disease may still not fall sick from the disease. If someone is trying to learn whether or not preventative measures against the disease have any impact, he or she may see these people and conclude, since they have remained healthy despite not being immunized, that immunizations have no effect. Consequently, he or she would tend to believe that immunization (or other preventative measures) have fewer benefits than they actually do.

+
+ +
- - **Template** .. code-block:: xml + +

Question text

- - options="('A','B')" - correct="A"/> - + - -
-
-
+ + Answer option 1 (incorrect) + Answer option 2 (correct) + + + +
+

Explanation

+

Explanation text

+
+
+ +
+.. _Chemical Equation Response: + +Chemical Equation Response +-------------------------- + +**TEMPLATE? DO WE HAVE MORE INFORMATION ABOUT HOW TO CREATE THESE?** +**DO THESE WORK?** + +The chemical equation problem type allows the student to enter chemical equations. The grader evaluates student responses by using a Python script that you create and embed in the problem. + +**Sample Problem** + +.. image:: ../Images/ChemicalEquationExample.png + :alt: Image of a chemical equation response problem + +**Sample Problem XML**: + +.. code-block:: xml + + + +

Some problems may ask for a particular chemical equation. Practice by writing out the following reaction in the box below.

+ + \( \text{H}_2\text{SO}_4 \longrightarrow \text { H}^+ + \text{ HSO}_4^-\) + + + + + + if chemcalc.chemical_equations_equal(submission[0], 'H2SO4 -> H^+ + HSO4^-'): + correct = ['correct'] + else: + correct = ['incorrect'] + + + +

Some tips:

+
    +
  • Use real element symbols.
  • +
  • Create subscripts by using plain text.
  • +
  • Create superscripts by using a caret (^).
  • +
  • Create the reaction arrow (\(\longrightarrow\)) by using "->".
  • +
+ + + + +
+

Solution

+

To create this equation, enter the following:

+

H2SO4 -> H^+ + HSO4^-

+
+
+
+ + +.. _Custom Response: + +Custom Response ("Write-Your-Own-Grader") +------------------------------------------ + +In write-your-own-grader problems (also called “custom Python-evaluated input” problems), the grader evaluates a student’s response using a Python script that you create and embed in the problem. Students can enter more than one line of text. + +**Sample Problem** + +.. image:: ../Images/CustomPythonExample.png + :alt: Image of a custom response problem + + +**Sample Problem XML**: + +.. code-block:: xml + + +

This question has two parts.

+ + + +

Part 1: Enter two integers that sum to 10.

+ +
+ +
+ +

Part 2: Enter two integers that sum to 20.

+ +
+ +
+ + +
+

Explanation

+

For part 1, any two numbers of the form n and 10-n, where n is any integer, will work. One possible answer would be the pair 0 and 10.

+

For part 2, any pair x and 20-x will work, where x is any real number with a finite decimal representation. Both inputs have to be entered either in standard decimal notation or in scientific exponential notation. One possible answer would be the pair 0.5 and 19.5. Another way to write this would be 5e-1 and 1.95e1.

+
+
+
+ +**Templates** + +The following template includes suggested correct answers (to include these, add a ``correct_answer`` attribute to the ```` tag). + +.. code-block:: xml + + + + + + +

Enter two real numbers that sum to 20:

+ +
+ +
+ + +
+
+
+
+ +The following template does not include suggested correct answers. + +.. code-block:: xml + + + + + + +

Enter two real numbers that sum to 20:

+ +
+ +
+ + +
+
+
+
+ +.. _Formula Response: + +Formula Response (Math Expression Input Problems) +------------------------------------------------- + +**Sample Problem** + +.. image:: ../Images/MathExpressionInput_XML.png + :width: 600 + :alt: Image of a math expression input problem + +**Sample Problem XML** + +.. code-block:: xml + + +

Some problems may ask for a mathematical expression. Practice creating mathematical expressions by answering the questions below.

+

Notes:

+
    +
  • Use standard arithmetic operation symbols.
  • +
  • Indicate multiplication explicitly by using an asterisk (*).
  • +
  • Use a caret (^) to raise to a power.
  • +
  • Use an underscore (_) to indicate a subscript.
  • +
  • Use parentheses to specify the order of operations.
  • +
+ +

Write an expression for the product of R_1, R_2, and the inverse of R_3.

+ + + + + + + +

Let x be a variable, and let n be an arbitrary constant. What is the derivative of xn?

+ + + + + + + +
+

Explanation

+ +
+
+
+ **XML Attribute Information** - + - - - E = - + + 1 + -

Let x be a variable, and let n be an arbitrary constant. What is the derivative of xn?

- - - - - + +
+

Explanation

+

Like Option Response, Multiple Choice also allows students to select + from a variety of pre-written responses.

+
+
+ - - - - - + + + +**Template** + +.. code-block:: xml + + + + + options="('A','B')" + correct="A"/> +
-

Explanation

-

Use standard arithmetic operation symbols and indicate multiplication explicitly.

-

Use the symbol ^ to raise to a power.

-

Use parentheses to specify order of operations.

-XML Attribute Information - - - -

This question consists of two parts.

-

First, enter two integers which sum to 10.

- -
- -
- -

Now enter two (finite) decimals which sum to 20.

- -
- -
- - -
-

Explanation

-

For the first part, any two numbers of the form n - and 10-n, where n is any integer, will work. - One possible answer would be the pair 0 and 10. -

-

For the second part, any pair x and 20-x will work, where x is any real number with a finite decimal representation. Both inputs have to be entered either in standard decimal notation or in scientific exponential notation. One possible answer would be the pair 0.5 and 19.5. Another way to write this would be 5e-1 and 1.95e1. -

-
-
- - -**Templates** - -*With displayed suggested correct answers* - -.. code-block:: xml - - - - - - -

Enter two real numbers which sum to 20:

- -
- -
- - -
-
-
-
- - -**Templates** - -*With NO suggested correct answers* - - -.. code-block:: xml - - - - - - -

Enter two real numbers which sum to 20:

- -
- -
- - -
-
-
-
- - -.. raw:: latex - - \newpage % - -.. _Chemical Equation Response: - -Chemical Equation Response -========================== - -The Chemical Equation Response input type is a special type of Custom Response -that allows the student to enter chemical equations as answers. - -Sample Problem: - -.. image:: ../Images/image296.png - :width: 600 - :alt: Image of a chemical equation response problem - -**Problem Code**: - -.. code-block:: xml - - -

Example Problem

- -

Some problems may ask for a particular chemical equation. Practice by writing out the following reaction in the box below.

-
\( \text{H}_2\text{SO}_4 \longrightarrow \text{ H}^+ + \text{ HSO}_4^-\)
-
- - - - - if chemcalc.chemical_equations_equal(submission[0], 'H2SO4 -> H^+ + HSO4^-'): - correct = ['correct'] - else: - correct = ['incorrect'] - - - -

Some tips:

  • Only real element symbols are permitted.
  • Subscripts are entered with plain text.
  • Superscripts are indicated with a caret (^).
  • The reaction arrow (\(\longrightarrow\)) is indicated with "->".
- So, you can enter "H2SO4 -> H^+ + HSO4^-".

- -
- -.. raw:: latex - - \newpage % +.. _Schematic Response: Schematic Response -================== +------------------ The Schematic Response input type provides an interactive grid on which the student can construct a schematic answer, such as a circuit. @@ -1135,3 +953,171 @@ Sample Problem: + +.. _String Response: + + + +String Response +--------------- + +The String Response input type provides an input box in which the student can +enter a line of text, which is then checked against a specified expected answer. + +A String Response input does not provide any answer suggestions, so it can be a +good way to get the students to engage with the material more deeply in a +sequence and look up, figure out, or remember the correct answer themselves. + +Note that a student's answer in a String Response is marked as correct if it +matches every character of the expected answer. This can be a problem with +international spelling, dates, or anything where the format of the answer is not +clear. + +Sample Problem: + +.. image:: ../Images/image291.png + :width: 600 + :alt: Image of a string response problem + +**Problem Code:** + +.. code-block:: xml + + +

Example Problem

+

What is the name of this unit? (What response type is this?)

+ + + + +
+

Explanation

+

The name of this unit is "String Response," written without the punctuation.

+

Arbitrary capitalization is accepted.

+
+
+
+ +**Template** + +.. code-block:: xml + + + + + + +
+
+
+
+ + +This response type allows to add more than one answer. Use `additional_answer` tag to add more answers. + +You can add `regexp` to value of `type` attribute, for example: `type="ci regexp"` or `type="regexp"` or `type="regexp cs"`. +In this case, any answer and hint will be treated as regular expressions. +Regular expression has to match whole answer, for answer to be correct. +Student answers "foobar", "o foo" or " ==foo==", will be correct if teacher has set answer=".*foo.*" with type="regexp". + +**Template** + +.. code-block:: xml + + + + \d5 + a3 + + + + + + + +1 + + + -1 + + + Any number+5 + + + + + + +**XML Attribute Information** + + + + .. raw:: html + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionNotes
type(optional) “[ci] [regex]”. Add “ci” if the student response should be graded case-insensitively. The default is to take case into consideration when grading. Add “regexp” for correct answer to be treated as regular expression. 
answerThe string that is used to compare with student answer. If "regexp" is not presented in value of type attribute, student should enter value equal to exact value of this attribute in order to get credit. If "regexp" is presented in value of type attribute, value of answer is treated as regular expression and exact match of this expression and student answer will be done. If search is successful, student will get credit. 
+ + + + + + + + + + + + + + + + + + + + + + + +
ChildrenDescriptionNotes
textlineused to accept student input. See description below. 
additional_answertodo 
+ + + + + .. image:: ../Images/stringresponse2.png + + - Can be unlimited number of this tags. Any tag adds one more additional answer for matching. + +.. raw:: latex + + + + + + + + + + + +