Create Marvin JS
Questions That Display an Initial Drawing
For some Marvin JS questions,
you might want your students to start with an initial drawing — a
template — and change it to answer the question. Sometimes the
template constitutes part of your prompt, and sometimes the template helps to focus
your
students by requiring them only to complete the parts of the drawing that relate to
the
concept being taught.
Note For questions in which the
relative position of each atom is important — resonance structures, reaction
mechanisms, hybridization states, chiral centers, and reaction centers — you
must display an initial template drawing for your students to modify.
Label some or all of the atoms with mapping numbers whenever the specific
identity of each atom is important for grading, for example, for molecules
having symmetry or for reaction mechanisms for which a non-equivalent choice
exists between starting or ending locations.
Click
Questions > Create.
The Question Editor opens.
In Name, type a name for the question.
In Mode, select Fill-in-the-Blank.
Create your template.
Click Marvin under Page Tools.
For Marvin Type, select the drawing mode to
use.
Important Always draw your
chemical structure using the same mode you want to use in your question. See Marvin JS Drawing Modes.
In the text box, select and copy the entire Marvin JS XML.
In Question, add the following code, replacing
template with the XML you copied from the Marvin JS Key Generation tool:
<eqn>
$mytemplate='template';
This code assigns the Marvin JS template to the variable $mytemplate. You can use a
different variable name if needed.
Note
Always enclose the Marvin JS XML in single quotes ('), not double quotes (").
Do not paste Marvin JS XML directly in Answer. Instead, assign it to a
variable and reference the variable as described in this topic.
Question,
Answer, and Solution
each have a 65,536 character limit. Any characters beyond that limit are
not saved. Depending on the size and complexity of your Marvin JS XML, your question might exceed this limit without warning.
Create your answer key.
Important Always use the same mode to create the template and the
answer key. Always start with the template when creating the answer key. If
needed, copy the template XML from your question and paste it in the drawing
area.
In the Marvin JS Key Generation tool, change the template exactly the way you want your students to do
when they answer the question. Do not move the template's atoms.
Click Get Key.
In the text box, select and copy the entire Marvin JS XML.
In Question, add the following code, replacing
answer_key with the XML key you copied from the Marvin JS Key Generation tool:
$mykey='answer_key';
''
</eqn>
This code assigns the Marvin JS answer key to the variable $mykey. You can use a
different variable name if needed.
In Question, type your question.
Use the answer placeholder string
<_> to specify where the answer box should be
displayed.
In Answer, type the following items on a single line:
mode is one of the following values and
corresponds with the mode you used to create the
drawing:
complete
condensed
lewis
mechanism
mechanism_adv
reaction
reaction_adv
resonance
skeleton
skeleton_adv
spacefill
3D
Note
If an answer extends beyond the right side of the
Answer box, it is wrapped to the next line, but it is
still considered a single line so long as you do not press
ENTER.
You can specify alternative answer keys
separated by the characters {tab}. For example:
The solution helps your students understand the steps they need to take to
determine the correct answer to the question. Your assignment settings
specify when to show the solution.
Click Test/Preview to test the appearance and behavior
of the question. See Test Questions.
Click Redisplay to show certain kinds of errors in the
Display section of the Question Editor. Make any needed changes to your
question.
Optional: Click Show Additional Information and change the
question's sharing permission or add descriptive information.
By default, other instructors can use your question only if you provide
them with the question ID, and only you can edit the question or find it
in search results. To change the permission, see Share Questions With Other Instructors.
If you make your question publicly available, you might want to provide
descriptive information to help others search for it. See Add Search Metadata to Questions.
When your question displays and functions correctly, click
Save.
WebAssign assigns it a unique question ID (QID), which is displayed in
parentheses after the question name.
You can use your question in an assignment and see it in your
My Questions list only after it is saved.
Example Lewis Structure Marvin JS
Question
The following table summarizes an actual
question.
Tip WebAssign
has created tutorial questions to help your students learn to use Marvin JS
for specific tasks. Use any of the following tags in your question to add a link to
the relevant tutorial: