Commit 3bc8a41f by Sylvia Pearce

Add polls and randomization to problem information

parent 556f6bb0
...@@ -398,7 +398,7 @@ You can run polls in your course so that your students can share opinions on dif ...@@ -398,7 +398,7 @@ You can run polls in your course so that your students can share opinions on dif
.. image:: /Images/PollExample.png .. image:: /Images/PollExample.png
Note that creating a poll requires you to export your course, edit it in a text editor, and then re-import your course. We recommend that you create a backup copy of your course before you create the poll. .. note:: Creating a poll requires you to export your course, edit it in a text editor, and then re-import your course. We recommend that you create a backup copy of your course before you create the poll. We also do not recommend that you try to edit other areas of your course while you're working in the text editor unless you have the necessary background and training.
========================== ==========================
Terminology Terminology
...@@ -412,49 +412,70 @@ In the **Course Outline** view, your content is arranged in sections, subsection ...@@ -412,49 +412,70 @@ In the **Course Outline** view, your content is arranged in sections, subsection
Create a Poll Create a Poll
========================== ==========================
#. In the unit where you want to create the poll, create components that contain all the content that you want *except* for the poll. #. In the unit where you want to create the poll, create components that contain all the content that you want *except* for the poll. Make a note of the 32-digit unit ID that appears in the **Unit Identifier** field under **Unit Location**.
#. Export your course. For information about how to do this, see :ref:`Exporting and Importing a Course`. Save your course in a memorable location so that you can find it easily. #. Export your course. For information about how to do this, see :ref:`Exporting and Importing a Course`. Save the .tar.gz file that contains your course in a memorable location so that you can find it easily.
#. Locate the .tar.gz file that contains your course, and then unpack the file. #. Locate the .tar.gz file that contains your course, and then unpack the .tar.gz file so that you can see its contents in a list of folders and files.
- To do this on a Windows computer, you'll need to download a third-party program. For more information, see `How to Unpack a tar File in Windows <http://www.haskell.org/haskellwiki/How_to_unpack_a_tar_file_in_Windows>`_, `How to Extract a Gz File <http://www.wikihow.com/Extract-a-Gz-File>`_, `The gzip Home Page <http://www.gzip.org/>`_, or the `Windows <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/#windows>`_ section of the `How to Open .tar.gz Files` <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/>`_ page. - To do this on a Windows computer, you'll need to download a third-party program. For more information, see `How to Unpack a tar File in Windows <http://www.haskell.org/haskellwiki/How_to_unpack_a_tar_file_in_Windows>`_, `How to Extract a Gz File <http://www.wikihow.com/Extract-a-Gz-File>`_, `The gzip Home Page <http://www.gzip.org/>`_, or the `Windows <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/#windows>`_ section of the `How to Open .tar.gz Files <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/>`_ page.
- For information about how to do this on a Mac, see the `Mac OS X <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/#mac-os-x>`_ section of the `How to Open .tar.gz Files` <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/>`_ page. - For information about how to do this on a Mac, see the `Mac OS X <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/#mac-os-x>`_ section of the `How to Open .tar.gz Files <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/>`_ page.
#. In the list of folders and files, open the **Vertical** folder.
Create a Unit all the Components you want other than the polls (see "Regular Section" for an example of a pre-poll section). .. note:: If your unit is not published, open the **Drafts** folder, and then open the **Vertical** folder in the **Drafts** folder.
Export the tarball of your course ("Tools")
Find the problem you wish to edit in the "verticals" folder. Open it with a text editor (an editor such as Sublime 2 is geared towards programming).
Add poll questions in between the <vertical> and </vertical> tags. A template is below.
.. code-block:: xml #. In the **Vertical** folder, locate the .xml file that has the same name as the unit ID that you noted in step 1, and then open the file in a text editor such as Sublime 2. For example, if the unit ID is e461de7fe2b84ebeabe1a97683360d31, you'll open the e461de7fe2b84ebeabe1a97683360d31.xml file.
<poll_question display_name="Poll Question">
<p>This is where you put the prompt</p>
<answer id="yes">Yes</answer>
<answer id="no">No</answer>
</poll_question>
As a result, your code should look something like the below: The file contains a list of all the components in the unit, together with the URL names of the components. For example, the following file contains an HTML component followed by a Discussion component.
.. code-block:: xml .. code-block:: xml
<vertical display_name="Test Unit">
<html url_name="b59c54e2f6fc4cf69ba3a43c49097d0b"/> <vertical display_name="Test Unit">
<html url_name="b59c54e2f6fc4cf69ba3a43c49097d0b"/>
<discussion url_name="8320c3d511484f3b96bdedfd4a44ac8b"/>
</vertical>
#. Add the following poll code in the location where you want the poll. Change the text of the prompt to the text that you want.
.. code-block:: xml
<poll_question display_name="Poll Question"> <poll_question display_name="Poll Question">
<p>This is where you put the prompt</p> <p>Text of the prompt</p>
<answer id="yes">Yes</answer> <answer id="yes">Yes</answer>
<answer id="no">No</answer> <answer id="no">No</answer>
</poll_question> </poll_question>
<discussion url_name="8320c3d511484f3b96bdedfd4a44ac8b"/>
</vertical>
Re-tarball your course (how to do this in Terminal here) In the example above, if you wanted your poll to appear between the HTML component and the Discussion component in the unit, your code would resemble the following.
Import the tarball
Notes .. code-block:: xml
<vertical display_name="Test Unit">
<html url_name="b59c54e2f6fc4cf69ba3a43c49097d0b"/>
<poll_question display_name="Poll Question">
<p>Text of the prompt</p>
<answer id="yes">Yes</answer>
<answer id="no">No</answer>
</poll_question>
<discussion url_name="8320c3d511484f3b96bdedfd4a44ac8b"/>
</vertical>
#. After you add the poll code, save and close the .xml file.
Although the polls will render correctly in Studio, you will not be able to edit them in Studio. You will need to follow the export/import process outlined above to make any edits to your polls. #. Re-package your course as a .tar.gz file.
You will be editing the raw XML code of your course to add this feature. We do not recommend attempting to edit other areas of your course in this method unless you have the necessary background and training.
A CSV for student responses to the problem is not currently available for polls, though the aggregate data is easily obtained directly in the problem. * For information about how to do this on a Mac, see `How to Create a Tar GZip File from the Command Line <http://osxdaily.com/2012/04/05/create-tar-gzip/>`_.
* For information about how to do this on a Windows computer, see `How to Make a .tar.gz on Windows <http://stackoverflow.com/questions/12774707/how-to-make-a-tar-gz-on-windows>`_.
#. In Studio, re-import your course.
.. note::
* Although polls render correctly in Studio, you cannot edit them in Studio. You will need to follow the export/import process outlined above to make any edits to your polls.
* A .csv file that contains student responses to the problem is not currently available for polls. However, you can obtain the aggregate data directly in the problem.
.. _Protein Builder: .. _Protein Builder:
......
...@@ -30,59 +30,6 @@ Types** tab, and then click the name of the problem. (Note that ...@@ -30,59 +30,6 @@ Types** tab, and then click the name of the problem. (Note that
**Checkbox** doesn't appear in the list of common problem types. To **Checkbox** doesn't appear in the list of common problem types. To
create a checkbox problem, you'll click **Blank Common Problem**.) create a checkbox problem, you'll click **Blank Common Problem**.)
To add labels to these problems, enclose the text that you want to use as a label in two sets of angle brackets (<<>>)
Just in case you want to see the XML, we've provided it
.. _Checkbox: .. _Checkbox:
******************* *******************
...@@ -652,49 +599,49 @@ text that students enter. ...@@ -652,49 +599,49 @@ text that students enter.
.. code-block:: xml .. code-block:: xml
<problem> <problem>
<p><b>Example Problem</b></p> <p><b>Example Problem</b></p>
<p>What base is the decimal numeral system in? <p>What base is the decimal numeral system in?
<numericalresponse answer="10"> <numericalresponse answer="10">
<formulaequationinput label="What base is the decimal numeral system in?"/> <formulaequationinput label="What base is the decimal numeral system in?"/>
</numericalresponse> </numericalresponse>
</p> </p>
<p>What is the value of the standard gravity constant <i>g</i>, measured in m/s<sup>2</sup>? Give your answer to at least two decimal places. <p>What is the value of the standard gravity constant <i>g</i>, measured in m/s<sup>2</sup>? Give your answer to at least two decimal places.
<numericalresponse answer="9.80665"> <numericalresponse answer="9.80665">
<responseparam type="tolerance" default="0.01" /> <responseparam type="tolerance" default="0.01" />
<formulaequationinput label="Give your answer to at least two decimal places"/> <formulaequationinput label="Give your answer to at least two decimal places"/>
</numericalresponse> </numericalresponse>
</p> </p>
<!-- Use python script spacing. The following should not be indented! --> <!-- Use python script spacing. The following should not be indented! -->
<script type="loncapa/python"> <script type="loncapa/python">
computed_response = math.sqrt(math.fsum([math.pow(math.pi,2), math.pow(math.e,2)])) computed_response = math.sqrt(math.fsum([math.pow(math.pi,2), math.pow(math.e,2)]))
</script> </script>
<p>What is the distance in the plane between the points (pi, 0) and (0, e)? You can type math. <p>What is the distance in the plane between the points (pi, 0) and (0, e)? You can type math.
<numericalresponse answer="$computed_response"> <numericalresponse answer="$computed_response">
<responseparam type="tolerance" default="0.0001" /> <responseparam type="tolerance" default="0.0001" />
<formulaequationinput label="What is the distance in the plane between the points (pi, 0) and (0, e)?"/> <formulaequationinput label="What is the distance in the plane between the points (pi, 0) and (0, e)?"/>
</numericalresponse> </numericalresponse>
</p> </p>
<solution> <solution>
<div class="detailed-solution"> <div class="detailed-solution">
<p>Explanation</p> <p>Explanation</p>
<p>The decimal numerical system is base ten.</p> <p>The decimal numerical system is base ten.</p>
<p>The standard gravity constant is defined to be precisely 9.80665 m/s<sup>2</sup>. <p>The standard gravity constant is defined to be precisely 9.80665 m/s<sup>2</sup>.
This is 9.80 to two decimal places. Entering 9.8 also works.</p> This is 9.80 to two decimal places. Entering 9.8 also works.</p>
<p>By the distance formula, the distance between two points in the plane is <p>By the distance formula, the distance between two points in the plane is
the square root of the sum of the squares of the differences of each coordinate. the square root of the sum of the squares of the differences of each coordinate.
Even though an exact numerical value is checked in this case, the Even though an exact numerical value is checked in this case, the
easiest way to enter this answer is to type easiest way to enter this answer is to type
<code>sqrt(pi^2+e^2)</code> into the editor. <code>sqrt(pi^2+e^2)</code> into the editor.
Other answers like <code>sqrt((pi-0)^2+(0-e)^2)</code> also work. Other answers like <code>sqrt((pi-0)^2+(0-e)^2)</code> also work.
</p> </p>
</div> </div>
</solution> </solution>
</problem> </problem>
**Templates** **Templates**
......
...@@ -22,6 +22,7 @@ For more information, see the following topics. ...@@ -22,6 +22,7 @@ For more information, see the following topics.
* :ref:`Components and the User Interface` * :ref:`Components and the User Interface`
* :ref:`Problem Settings` * :ref:`Problem Settings`
* :ref:`Multiple Problems in One Component` * :ref:`Multiple Problems in One Component`
* :ref:`Problem Randomization`
* :ref:`Modifying a Released Problem` * :ref:`Modifying a Released Problem`
...@@ -415,7 +416,88 @@ attempts to answer each problem individually. If a student clicks ...@@ -415,7 +416,88 @@ attempts to answer each problem individually. If a student clicks
If a student clicks **Show Answer**, the answers for all the problems in If a student clicks **Show Answer**, the answers for all the problems in
the component appear. the component appear.
.. _Modifying a Released Problem: .. _Problem Randomization:
*********************
Problem Randomization
*********************
You may want to present different students with different problems, or different versions of the same problem. To do this, you'll create a Problem component for each problem or version in Studio, and then edit your course outside of Studio to randomize the problem that students see.
Note that *problem randomization* is different from the **Randomization** setting in Studio. The **Randomization** setting randomizes variables within a single problem. Problem randomization offers different problems or problem versions to different students.
.. note:: Implementing the randomization setting requires you to export your course, edit it in a text editor, and then re-import your course. We recommend that you create a backup copy of your course before you do this. We also do not recommend that you try to edit other areas of your course while you're working in the text editor unless you have the necessary background and training.
==========================
Terminology
==========================
In the **Course Outline** view, your content is arranged in sections, subsections, units, and components. When you edit your course in a text editor, sections are **chapters**, subsections are **sequentials**, units are **verticals**, and components are **videos**, **HTMLs**, **problems**, or **discussions**.
.. _Create Randomized Problems:
==========================
Create Randomized Problems
==========================
#. In the unit where you want to create a randomized problem, create a separate Problem component for each version or problem that you want to randomize. For example, if you want to offer four versions or problems, you'll create four separate Problem components. Make a note of the 32-digit unit ID that appears in the **Unit Identifier** field under **Unit Location**.
#. Export your course. For information about how to do this, see :ref:`Exporting and Importing a Course`. Save the .tar.gz file that contains your course in a memorable location so that you can find it easily.
#. Locate the .tar.gz file that contains your course, and then unpack the .tar.gz file so that you can see its contents in a list of folders and files.
- To do this on a Windows computer, you'll need to download a third-party program. For more information, see `How to Unpack a tar File in Windows <http://www.haskell.org/haskellwiki/How_to_unpack_a_tar_file_in_Windows>`_, `How to Extract a Gz File <http://www.wikihow.com/Extract-a-Gz-File>`_, `The gzip Home Page <http://www.gzip.org/>`_, or the `Windows <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/#windows>`_ section of the `How to Open .tar.gz Files <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/>`_ page.
- For information about how to do this on a Mac, see the `Mac OS X <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/#mac-os-x>`_ section of the `How to Open .tar.gz Files <http://www.ofzenandcomputing.com/how-to-open-tar-gz-files/>`_ page.
#. In the list of folders and files, open the **Vertical** folder.
.. note:: If your unit is not published, open the **Drafts** folder, and then open the **Vertical** folder in the **Drafts** folder.
#. In the **Vertical** folder, locate the .xml file that has the same name as the unit ID that you noted in step 1, and then open the file in a text editor such as Sublime 2. For example, if the unit ID is e461de7fe2b84ebeabe1a97683360d31, you'll open the e461de7fe2b84ebeabe1a97683360d31.xml file.
The file contains a list of all the components in the unit, together with the URL names of the components. For example, the following file contains four Problem components.
.. code-block:: xml
<vertical display_name="Test Unit">
<problem url_name="d9d0ceb3ffc74eacb29501183e26ad6e"/>
<problem url_name="ea66d875f4bf4a9898d8e6d2cc9f3d6f"/>
<problem url_name="2616cd6324704f85bc315ec46521485d"/>
<problem url_name="88987707294d4ff0ba3b86921438d0c0"/>
</vertical>
#. Add ``<randomize> </randomize>`` tags around the components for the problems that you want to randomize.
.. code-block:: xml
<vertical display_name="Test Unit">
<randomize>
<problem url_name="d9d0ceb3ffc74eacb29501183e26ad6e"/>
<problem url_name="ea66d875f4bf4a9898d8e6d2cc9f3d6f"/>
<problem url_name="2616cd6324704f85bc315ec46521485d"/>
<problem url_name="88987707294d4ff0ba3b86921438d0c0"/>
</randomize>
</vertical>
#. After you add the ``<randomize> </randomize>`` tags, save and close the .xml file.
#. Re-package your course as a .tar.gz file.
* For information about how to do this on a Mac, see `How to Create a Tar GZip File from the Command Line <http://osxdaily.com/2012/04/05/create-tar-gzip/>`_.
* For information about how to do this on a Windows computer, see `How to Make a .tar.gz on Windows <http://stackoverflow.com/questions/12774707/how-to-make-a-tar-gz-on-windows>`_.
#. In Studio, re-import your course.
.. note::
* Once you've implemented randomization, you can only see one of the versions or problems in Studio. You can edit that single problem directly in Studio, but to edit any of the other problems, you'll have to export your course, edit the problems in a text editor, and then re-import the course. This is true for instructors as well as course teams.
* A .csv file for student responses contains the responses to each of the problems in the problem bank.
.. _Modifying a Released Problem:
************************************ ************************************
Modifying a Released Problem Modifying a Released Problem
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment