@@ -14,6 +14,7 @@ Individual course teams frequently create tools and problem types that don't hav
Below, you'll find the information you need to create the following tools.
* :ref:`Multiple Choice and Numerical Input`
* :ref:`Protein Builder`
.. _Multiple Choice and Numerical Input:
...
...
@@ -61,3 +62,70 @@ Multiple Choice and Numerical Input Problem Code
</choicetextresponse>
</problem>
.. _Protein Builder:
************************
Protein Builder
************************
The protein builder asks students to create specified protein shapes by stringing together amino acids. In the example below, the goal protein shape is a simple line.
.. image:: /Images/ProteinBuilder.gif
:alt: Image of the protein builder
.. _Create the Protein Builder:
==========================
Create the Protein Builder
==========================
To create the protein builder:
#. Upload all of the files listed above to the *Files & Uploads* page in your course.
#. 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**.
.. _Protein Builder Code:
=====================
Protein Builder Code
=====================
::
<problem>
<p>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.</p>
<script type="loncapa/python">
def two_d_grader(expect,ans):
import json
ans=json.loads(ans)
if "ERROR" in ans["protex_answer"]:
raise ValueError("Protex did not understand your answer... try folding the protein")