diff --git a/docs/en_us/course_authors/source/Images/ChemicalEquationExample.png b/docs/en_us/course_authors/source/Images/ChemicalEquationExample.png new file mode 100644 index 0000000000..bd0310d8ac Binary files /dev/null and b/docs/en_us/course_authors/source/Images/ChemicalEquationExample.png differ diff --git a/docs/en_us/course_authors/source/Images/CustomPythonExample.png b/docs/en_us/course_authors/source/Images/CustomPythonExample.png new file mode 100644 index 0000000000..4eb70c6032 Binary files /dev/null and b/docs/en_us/course_authors/source/Images/CustomPythonExample.png differ diff --git a/docs/en_us/course_authors/source/Images/image294.png b/docs/en_us/course_authors/source/Images/image294.png index 02c50a245e..c57d36f781 100644 Binary files a/docs/en_us/course_authors/source/Images/image294.png and b/docs/en_us/course_authors/source/Images/image294.png differ diff --git a/docs/en_us/course_authors/source/additional_tools.rst b/docs/en_us/course_authors/source/additional_tools.rst index 1be90aba7e..d9018fc172 100644 --- a/docs/en_us/course_authors/source/additional_tools.rst +++ b/docs/en_us/course_authors/source/additional_tools.rst @@ -9,11 +9,12 @@ Additional Tools Additional Tools Overview ************************* -Individual course teams frequently create tools and problem types that don't have templates in Studio. We want to make these tools available to all our course teams. We provide you with all the files and code that you need to create these problems in Studio. +Individual course teams frequently create tools and problem types that don't have templates in Studio. We want to make these tools available to all our course teams. -Below, you'll find the information you need to create the following tools. +Below, we provide you with all the files and code that you need to create the following tools and problem types. * :ref:`Gene Explorer` +* :ref:`Chemical Equation` * :ref:`Interactive Periodic Table` * :ref:`Molecule Editor` * :ref:`Multiple Choice and Numerical Input` @@ -41,18 +42,6 @@ Specifically, the Gene Explorer does the following: For more information about the Gene Explorer, see `The Gene Explorer `_. -.. _Create the Gene Explorer: - -========================== -Create the Gene Explorer -========================== - -#. In the unit where you want to create the problem, click **Problem** under **Add New Component**, and then click the **Advanced** tab. -#. Click **Blank Advanced Problem**. -#. In the component that appears, click **Edit**. -#. In the component editor, paste the code from below. -#. Click **Save**. - ===================== Gene Explorer Code ===================== @@ -82,6 +71,76 @@ In this code: * **genex_problem_number** specifies the number of the problem. This number is based on the five gene editor problems in the MITx 7.00x course--for example, if you want this problem to look like the second gene editor problem in the 7.00x course, you would set the **genex_problem_number** value to 2. The number must be 1, 2, 3, 4, or 5. +.. _Chemical Equation: + +************************** +Chemical Equation Problem +************************** + +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. + +.. image:: /Images/ChemicalEquationExample.png + :alt: Image of a chemical equation response problem + +==================================== +Create the Chemical Equation Problem +==================================== + +To create the above chemical equation problem: + +#. In the unit where you want to create the problem, click **Problem** under **Add New Component**, and then click the **Advanced** tab. +#. Click **Blank Advanced Problem**. +#. In the component that appears, click **Edit**. +#. In the component editor, paste the code from below. +#. Click **Save**. + + + + + +==================================== +Chemical Equation Problem Code +==================================== + +.. 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^-

+
+
+
+ + .. _Interactive Periodic Table: ************************** @@ -116,7 +175,7 @@ To create the periodic table, you need an HTML component. #. In the component editor, switch to the **HTML** tab. #. Open the PeriodicTable.txt file in any text editor. #. Copy all of the text in the PeriodicTable.txt file, and paste it into the HTML component editor. (Note that the PeriodicTableHTML.txt file contains over 6000 lines of code. Paste all of this code into the component editor.) -#. Make any changes that you want, and then click **Save**. +#. Click **Save**. .. _Molecule Editor: @@ -151,15 +210,18 @@ To create the molecule editor that appears in the image above, you need an HTML #. Upload all of the files listed above to the **Files & Uploads** page in your course. #. Create the HTML component. + #. In the unit where you want to create the problem, click **HTML** under **Add New Component**, and then click **HTML**. #. In the component that appears, click **Edit**. #. In the component editor, paste the HTML component code from below. #. Make any changes that you want, and then click **Save**. -#. Create the Problem component. + +3. Create the Problem component. + #. Under the HTML component, click **Problem** under **Add New Component**, and then click **Blank Advanced Problem**. #. In the component that appears, click **Edit**. #. In the component editor, paste the Problem component code from below. - #. Make any changes that you want, and then click **Save**. + #. Click **Save**. .. _EMC Problem Code: @@ -172,7 +234,7 @@ To create the molecule editor, you need an HTML component and a Problem componen HTML Component Code ------------------- -:: +.. code-block:: xml

Molecule Editor

The molecule editor makes creating and visualizing molecules easy. A chemistry professor may have you build and submit a molecule as part of an exercise.

@@ -215,12 +277,12 @@ HTML Component Code
 
-Problem Component ------------------ -**Problem 1** -:: + +Problem Component Code +---------------------- +.. code-block:: xml

The dopamine molecule, as shown, cannot make ionic bonds. Edit the dopamine molecule so it can make ionic bonds.

@@ -313,7 +375,7 @@ To create a multiple choice and numerical input problem: Multiple Choice and Numerical Input Problem Code =================================================== -:: +.. code-block:: xml The numerical value of pi, rounded to two decimal points, is 3.24. @@ -356,7 +418,7 @@ To create the protein builder: Protein Builder Code ===================== -:: +.. code-block:: xml

The protein builder allows you string together the building blocks of proteins, amino acids, and see how that string will form into a structure. You are presented with a goal protein shape, and your task is to try to re-create it. In the example below, the shape that you are asked to form is a simple line.

diff --git a/docs/en_us/course_authors/source/appendices/e.rst b/docs/en_us/course_authors/source/appendices/e.rst index 0b3f84f20a..e2fc6ea993 100644 --- a/docs/en_us/course_authors/source/appendices/e.rst +++ b/docs/en_us/course_authors/source/appendices/e.rst @@ -8,27 +8,62 @@ APPENDIX E: Problem and Tool XML This appendix provides information about the XML for most problem and tool types in Studio: -* :ref:`Checkbox` -* :ref:`Chemical Equation Response` +* :ref:`General` +* :ref:`Choice Response` +* :ref:`Chemical Equation Input` * :ref:`Custom Response` * :ref:`Formula Response` * :ref:`Image Response` -* :ref:`Multiple Choice` +* :ref:`Multiple Choice Response` * :ref:`Numerical Response` * :ref:`Option Response` * :ref:`Schematic Response` * :ref:`String Response` -.. _Checkbox: -Choice Response (Checkbox) ---------------------------- +.. _General: -Sample Problem: +General +------- + +Most problems have the following tags. + +.. list-table:: + :widths: 20 80 + + * - `` `` + - These must be the first and last tags for any content created in the Advanced + Editor in a Problem component. + * - ```` + - The ```` tag indicates the beginning of a line or block of text. + * - ```` + - The ```` tag indicates the end of a line or block of text. + * - ``
`` (optional) + - If you want to include more information in the problem, such as a detailed explanation of the problem's answer, you'll enter the text between the two ``
`` tags, which are inside the ```` tags. (These tags do not have to be on the same line.) + +.. _Choice Response: + +Choice Response (Checkbox Problems) +----------------------------------- + +Although you can create checkbox problems by using the Simple Editor in Studio, you may want to see or change the problem's underlying XML. + +**Sample Problem** .. image:: ../Images/CheckboxExample.gif :alt: Image of a checkbox problem +**Tags** + +.. list-table:: + :widths: 20 80 + + * - ```` + - Specifies that the problem lists answer options for students to choose from. + * - ```` + - A child of ````. Specifies that the problem is a checkbox problem. + * - ```` + - A child of ````. Designates an answer option. Each choice must include the ``correct`` attribute, set to ``true`` (for a correct answer) or ``false`` (for an incorrect answer). For checkbox problems, more than one option can be a correct answer. **Sample Problem XML** @@ -36,20 +71,31 @@ Sample Problem: -

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

+

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

- - 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. - + + 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

-

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.

+

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.

@@ -73,28 +119,40 @@ Sample Problem:
-

Explanation

-

Explanation text

+

Solution or Explanation Heading

+

Solution or explanation text

+.. _Chemical Equation Input: +Chemical Equation Input (Chemical Equation Problems) +---------------------------------------------------- -.. _Chemical Equation Response: - -Chemical Equation Response --------------------------- - -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. +In chemical equation problems, students enter text that represents a chemical equation into a text box. The LMS converts that text into a chemical equation below the text box. **Sample Problem** .. image:: ../Images/ChemicalEquationExample.png :alt: Image of a chemical equation response problem +**Required Tags** + +.. list-table:: + :widths: 20 80 + + * - ```` + - Indicates that this problem has a custom response. The ```` tags must surround the ```` tags. + * - ```` + - A child of ````. Indicates that the answer to this problem is a chemical equation. + * - ```` + - A child of ````. Contains the Python script that grades the problem. + +Chemical equation problems use MathJax to create formulas. For more information about using MathJax in Studio, see :ref:`MathJax in Studio`. + **Sample Problem XML**: .. code-block:: xml @@ -135,19 +193,60 @@ The chemical equation problem type allows the student to enter chemical equation
+**Problem Template**: + +.. code-block:: xml + + + +

Problem text

+ + + + + + if chemcalc.chemical_equations_equal(submission[0], 'TEXT REPRESENTING CHEMICAL EQUATION'): + correct = ['correct'] + else: + correct = ['incorrect'] + + + + + + + +
+

Solution or Explanation Header

+

Solution or explanation text

+
+
+
+ .. _Custom Response: -Custom Response ("Write-Your-Own-Grader") ------------------------------------------- +Custom Response ("Custom Python-Evaluated Input") Problems +----------------------------------------------------------- -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. +In custom Python-evaluated input (also called “write-your-own-grader”) problems, the grader evaluates a student’s response using a Python script that you create and embed in the problem. **Sample Problem** .. image:: ../Images/CustomPythonExample.png :alt: Image of a custom response problem +.. list-table:: + :widths: 20 80 + + * - `` -

Enter two real numbers that sum to 20:

+

Problem text


@@ -216,11 +315,13 @@ The following template includes suggested correct answers (to include these, add
+

Solution or Explanation Heading

+

Solution or explanation text

-The following template does not include suggested correct answers. +The following template does not return answers when the student clicks **Show Answer**. If your problem doesn't include answers for the student to see, make sure to set **Show Answer** to **Never** in the problem component. .. code-block:: xml @@ -242,6 +343,8 @@ The following template does not include suggested correct answers.
+

Solution or Explanation Heading

+

Solution or explanation text

@@ -254,9 +357,21 @@ Formula Response (Math Expression Input Problems) **Sample Problem** .. image:: ../Images/MathExpressionInputExample.gif - :width: 600 :alt: Image of a math expression input problem +.. list-table:: + :widths: 20 80 + :header-rows: 1 + + * - ```` + - + * - ```` + - + * - `` + + +
+

Explanation or Solution Header

+

Explanation or solution text

+
+
+ + + **XML Attribute Information**