WebAssign Creating Questions Guide October 2010 WebAssign Creating Questions Guide is published by Advanced Instructional Systems, Inc. © 2010 by Advanced Instructional Systems, Inc. All rights reserved. Printed in the United States of America. 10.13.2010 WebAssign™ is a service mark of Advanced Instructional Systems, Inc. calcPad®, chemPad®, pencilPad®, and Personal Study Plan® are registered trademarks of Advanced Instructional Systems, Inc. (dba WebAssign). WebAssign™, physPad™, and numberLine™ are trademarks of WebAssign. Adobe®, Acrobat®, Acrobat Reader®, Flash®, and Shockwave® are registered trademarks of Adobe Systems Incorporated in the United States, other countries, or both. Apple®, Mac®, and Safari® are registered trademarks of Apple Inc., in the United States, other countries, or both. Internet Explorer®, Microsoft®, PowerPoint®, and Windows® are registered trademarks of Microsoft Corporation in the United States, other countries, or both. Java™ is a trademark of Sun Microsystems, Inc. in the United States, other countries, or both. Linux® is the registered trademark of Linus Torvalds in the United States, other countries, or both. Mozilla® and Firefox® are registered trademarks of the Mozilla Foundation in the United States, other countries, or both. Other product and company names mentioned herein may be the trademarks of their respective owners. Under the copyright laws, neither this documentation nor the software may be copied, in whole or in part, without the written consent of Advanced Instructional Systems, except in the normal use of the software. Questions in the database that are identified with a specific textbook have been used with the permission of the publisher who owns the copyright. Order the WebAssign service from: WebAssign Centennial Campus 1730 Varsity Drive Suite 200 Raleigh, NC 27606 Web: http://webassign.net Tel: (800) 955-8275 or (919) 829-8181 Fax: (919) 829-1516 Email: [email protected] Contents i Contents Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv 1 Creating Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Searching for Questions ...........................................2 Creating Questions by Duplication ....................................5 Creating Questions with the Question Editor Testing Questions .............................5 ................................................9 Formatting Text in Your Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Adding Special Characters to Your Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Adding Standard Text Prompts to Your Questions . . . . . . . . . . . . . . . . . . . . . . . . . 12 Adding Images, Media, or Documents to Your Questions . . . . . . . . . . . . . . . . . . . . 12 Copying Images, Media, or Documents from Your Computer Setting Display Text for Your Images, Media, or Documents Displaying Images in Your Questions .............. Providing Linked Documents in Your Questions ....... Playing Media Files in Your Questions .............. Sharing Questions With Other Instructors Managing Permission Groups to WebAssign ........ .......... .......... .......... . . . . . . . . . . . . . . . . . . . . . . . . 14 15 17 18 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2 Creating General-Purpose Questions Creating Multiple-Choice Questions . . . . . . . . . . . . . . . . . . . . . . . . 29 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Displaying Choices in a Fixed Order .................... Displaying Choices as a Drop-down Menu ................ Displaying Choices Horizontally or in Tables .............. Adding Item-Specific Feedback to Multiple-Choice Questions .. Creating Yes/No Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Adding Search Metadata to Your Questions Creating True/False Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 32 33 34 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Creating Multiple-Select Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Displaying Multiple-Select Choices in a Fixed Order . . . . . . . . . . . . . . . . . . . . . 41 Displaying Multiple-Select Choices Horizontally or in Tables . . . . . . . . . . . . . . . 42 Creating Matching Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Matching Formatted Notation or Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Displaying Matching Items in a Fixed Order . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Creating Ranking Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Creating Fill-in-the-Blank Questions Creating Numerical Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Requiring Units in Numerical Questions ......... Checking Significant Figures in Numerical Questions Checking Decimal Places in Numerical Questions ... Changing Tolerance for Numerical Questions ..... Requiring Computed Responses in Numerical Questions Creating Image Map Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 55 56 57 58 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Creating Short-answer or Essay Questions Creating PencilPad (Drawing) Questions Creating File Upload Questions .... .... .... .... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 10/2010 ii WebAssign Creating Questions Guide 3 Creating Multi-Part, Tutorial, and Answer-Dependent Questions Creating Multi-Part Questions That Have One Question Mode Creating Multi-Mode Questions . . . . . . . . . . . . . . . . . 73 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Creating Polling Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Adding Expandable Sections to Multi-Part Questions Creating Tutorial Questions . . . 72 . . . . . . . . . . . . . . . . . . . . . . . 83 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Creating Scored Tutorial Questions Creating Popup Tutorial Questions Creating Answer-Dependent Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Performing Complex Operations in Answer Keys 4 Creating Math Questions Displaying Notation with WaTeX . . . . . . . . . . . . . . . . . . . . . . . . . 103 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Creating WaTeX Arrays and Matrices ...... WaTeX Example: Aligning a System of Equations WaTeX Example: Matrices .............. WaTeX Example: Arithmetic Long Division ... WaTeX Example: Polynomial Long Division .. WaTeX Example: Synthetic Division ....... Displaying Notation with LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 . 116 . 116 . 117 . 118 . 119 . . . . . . . . . . . . . . . . . . . . . . . . 128 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Choosing Evaluation Modes for Your Math Questions ............... Creating mathPad Questions Using Symbolic Mode ................. Creating Answer Keys for Questions Using Symbolic Mode ........... Changing the Default Values and Tolerance for Symbolic Evaluation ..... Creating mathPad Questions Using Algebraic Mode with Mathematica .... Creating Answer Keys for Questions Using Algebraic Mode with Mathematica . . . . . . . . . . . . . . . . . 132 . 134 . 136 . 140 . 144 . 148 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Creating a NumberLine Question ... Coding NumberLine Questions ..... Coding a Question in Default Mode .. Coding a Question in Points Mode ... Answer Key Objects ............ Grading ..................... Creating Graphing Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Displaying Math Notation with HTML Substitution Creating Number Line Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Displaying Notation with <symimage> Creating mathPad Questions ... . ... ... ... ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 . 153 . 154 . 156 . 158 . 159 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Specifying Equations in Graphing Question Answer Keys . . . . . . . . . . . . . . . . . 164 Configuring the Graphing Tool Grid Display and Snap Behavior . . . . . . . . . . . . 165 5 Creating Chemistry Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Displaying Chemistry Notation in Your Questions Creating chemPad Questions Creating Creating Creating Creating Creating Creating Creating 10/2010 . . . . . . . . . . . . . . . . . . . . . . . . 168 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 chemPad Questions for Formulas ................ List and Rank-Order chemPad Questions .......... chemPad Questions for Reactions ............... chemPad Questions for Kinetic or Equilibrium Expressions chemPad Questions for Electrochemical Cell Notation .. chemPad Questions for Electron Configuration ...... chemPad Answer Keys ....................... .... .... .... .. .... .... .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 . 174 . 179 . 183 . 186 . 188 . 191 Contents iii Creating MarvinSketch Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Understanding MarvinSketch Drawing Modes ................. Creating MarvinSketch Questions That Do Not Display an Initial Drawing Creating MarvinSketch Questions That Display an Initial Drawing ... Displaying Chemical Structures in Your Questions with MarvinSketch Using the MarvinSketch Key Generation Tool ................. Creating MarvinSketch Questions That Use Canonical or Combinatorial SMILES Strings ....................... A List of Symbols Letter Forms ... . ... ... ... . . . . . . . . . . . . . . . . . . . . 193 195 199 206 209 . . . . . . . 215 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Greek Letter Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Punctuation and Spacing Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Number Forms and Mathematical Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 Symbols for Chemistry and Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Arrows and Miscellaneous Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 B List of Prompts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Prompts for Accounting Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 Prompts for Chemistry and Physics Questions Prompts for Mathematics Questions Prompts for Statistics Questions Miscellaneous Prompts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 C Creating Questions Quick Reference WebAssign Question Modes WebAssign Tags . . . . . . . . . . . . . . . . . . . . . . . . . . 232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 . . . . . . . . . . . . . . . . . . . . . . . . 236 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Supported Perl Functions and Operators Perl Variables Used by WebAssign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 10/2010 Document Conventions This document uses the following typographical conventions: Convention Description Boldface Identifies items in the user interface such as buttons or menus. Angle brackets are used to indicate menu sublevels. Examples Click OK. Type a Description. Click Assignments > Create. Uppercase Identifies the names of keys on the keyboard. Standard Microsoft key names are used; users of other operating systems or keyboards might see different labels. Example Press ENTER. Monospace Identifies tags, functions, variables, and code that must be typed literally. Lines of code that are wrapped because of length are indented. Examples Begin your formula with the <eqn> tag. Type the following code: <eqn> $helpertext='Have you tested your values using the Pythagorean Theorem?'; '' </eqn> Monospace with boldface Identifies text that must be typed literally. Example Type 0 if you do not want your students to incur a penalty for using the automatic extension. 10/2010 Document Conventions v Convention Description Italics Identifies placeholders for values that you must supply. Sometimes used for textual emphasis. Examples <eqn $PULLDOWN=1; $Select_Option="text"; ''> where text is the default text that you want to be displayed in the menu. Note: Tip: Important: Best Practice: Provides supplementary information. Provides optional hints or shortcuts. Provides cautionary information to help prevent problems. Describes recommended actions to perform a task better. 10/2010 1 Creating Questions In addition to its extensive library of textbook questions, WebAssign supports creating your own questions for use in assignments. You can share questions with other instructors, you can create questions based on existing questions from the WebAssign library, and you can create questions from scratch. Your questions can be as simple as multiple-choice or fill-in-the-blank, or as complex as having students diagram molecules or graph mathematical equations. You can insert videos, sound files, or mathematical notation in your questions. If you are planning to create questions, add the WebAssign Templates as a resource text to your class. These templates provide “best practice” examples of a wide variety of question types and techniques. This section contains the following topics: • Searching for Questions • Creating Questions by Duplication • Creating Questions with the Question Editor • Testing Questions • Formatting Text in Your Questions • Adding Special Characters to Your Questions • Adding Standard Text Prompts to Your Questions • Adding Images, Media, or Documents to Your Questions • Sharing Questions With Other Instructors • Adding Search Metadata to Your Questions 10/2010 Creating Questions 2 Searching for Questions Before creating your own questions, it is often useful to look for existing questions that are like the question you want. You might even find a question that you can use without modification. To search for an existing question: Tip: If you know the question ID or part of the question name, click Search in the toolbar. Select Question, type the question name or ID, and then click Go. 1. Click Questions > Search. 2. On the Question Search page, specify the criteria you want to use when performing your search. Searches are not case-sensitive. Only questions that contain all of your specified criteria are returned in the search results. Important: You are allowed to use textbook questions in your assignments only from textbooks you have adopted for your class. Questions from other textbooks are not displayed in the search results. 10/2010 3 WebAssign Creating Questions Guide You cannot use operators like AND, OR, or commas to combine multiple search terms for a criterion. Instead, use the % character as a wildcard to match zero or more characters. For example, if you specified velocity%acceleration in the Keywords box, you would find questions containing any of the following values in the keywords list: relationship between velocity and acceleration velocityAcceleration velocity,acceleration Velocity, Time, Acceleration However, you would not see questions for which acceleration precedes velocity in the list of keywords, such as: acceleration, time, velocity The criteria you can use for your search on are described in the following tables. 10/2010 Criterion Description Textbook Select one of the textbooks that you have selected for your classes to limit your search to questions in that textbook. Chapter Specify a textbook chapter, if known. Name Specify the entire question name or a word that occurs in the question name. Usable Only Select Usable Only to include only questions that are marked as usable. Used Questions Only Select Used Questions Only to include only questions that have been used in an assignment. Keywords Specify a single keyword to find questions including that keyword. Be aware that textbook questions do not include keywords. Author Specify all or part of the question author’s name or WebAssign username. Permission/ Groups Select the permission that is set for the question. To understand permissions, see Sharing Questions With Other Instructors on page 23. Mode Select the type of question that you are searching for — for example, Multiple-Choice or Numerical. Note that Multi-Mode questions containing the selected type are also returned. Last Saved Select a date and time range when the question was most recently saved. A common use of this criterion is to search for questions that are new or have been recently modified. Creating Questions 4 Click Show Additional Criteria to specify the following criteria: Criterion Description Question Specify a word or phrase in the Question field for the question. You can use this to search not only for text that is displayed to students, but also for code, for example if you are trying to find questions using a particular function or variable. Answer Specify a word or phrase in the Answer field for the question. You can use this to search not only for text that is displayed to students, but also for code, for example if you are trying to find questions using a particular function or variable. Solution Specify a word or phrase in the Solution field for the question. Comment Specify a word or phrase in the Comment field for the question. Discipline Select one or more disciplines that are specified for the question. Be aware that most textbook questions do not contain discipline information. 3. Under Results Options, select how many results to be displayed per page, how the results should be sorted, and whether to display the entire question or summary information. 4. Click Search. Some searches might take several minutes, depending on your search parameters. If only one question matches your parameters, it is opened in the Question Editor. If more than one question is found, the results are displayed as specified by the Results Options settings. Tip: If you perform the same search repeatedly, set the search criteria in the Questions Search page and then click Save. This saves the specified criteria to your user profile. To perform the same search again, click My Search and the saved criteria are filled in on the Questions Search page. 10/2010 5 WebAssign Creating Questions Guide 5. In the Question Search Results, you can: • Click View to see the question in the Question Previewer. • Click Edit to open the question in the Question Editor. Depending on the permission for the question, you might not be able to save any changes to the question. • Click Duplicate to open a new copy of the question in the Question Editor. The copy is a new question that is just like the original, except you are the owner and can change it to suit your needs. • Click Delete to remove a criterion and run the search again. • Click Edit Criteria to open the Questions Search page with the existing criteria. • Click New Search to open the Questions Search page with no specified criteria. • Change the Results Options and then click Update Results to change the number of search results per page, the results sort order, and whether to display the entire question or summary information. Creating Questions by Duplication If you find a question that is similar to the one you want to create, you can create a copy of the question. The copy is a new question that is just like the original, except you are the owner and can change it to suit your needs. Note: Observe copyright restrictions for textbook questions and questions authored by others. Questions that are duplicated from copyrighted questions should be treated as copyrighted material. To create a question by duplication: 1. In the Question Editor, My Questions, Question Search Results, or Recently Modified views, click Duplicate for the question you want to copy. The new question opens in the Question Editor. 2. In the Question Editor, make your changes to the question and test it. 3. When the question works as you want it to, click Save. The question is created and assigned a new unique question ID. Creating Questions with the Question Editor To create or edit questions in WebAssign, you use the Question Editor. To create a question: Note: Although you use different procedures and options when creating different kinds of questions, the following steps describe the general procedure for creating questions in WebAssign. Refer to other sections for information about specific question types. 10/2010 Creating Questions 6 1. Click Questions > Create. The Question Editor opens. Tip: You can open the Question Editor from a number of other contexts by clicking Edit or Duplicate for a question. 2. In Name, type a name for the question. Use the Name field to specify a descriptive name for the question. The name can be up to 50 characters long, and helps you to identify the question without having to view it. 10/2010 7 WebAssign Creating Questions Guide 3. In Mode, select one of the question modes to define the basic behaviors for your question. Mode Description Multiple-Choice Lists mutually exclusive choices with only one correct response. Multiple-Select Lists non-exclusive choices, allowing your students to select all the choices that apply. Numerical Provides a box for your students to type a numerical response that is scored for numerical accuracy and, optionally, for correctly specifying units, significant figures, or decimal places. Fill-in-the-Blank Provides a box for your students to type a short response that is scored by comparison with one or more answers. Matching Lists a series of items for your students to match to items in a second list. Essay Provides a box for your students to type a response of any length. Essay questions must be manually scored. Symbolic Scores mathematical expressions by comparing your students’ responses to the key with variable substitution. Algebraic Scores mathematical expressions by comparing your students’ responses to the key algebraically. NumberLine Provides a number line on which your students place points or graph their response. Image Map Displays an image that your students click to identify something in the image. Graphing Provides a coordinate plane on which your students graph their response. PencilPad Provides a virtual pad of paper on which your students draw their response. PencilPad questions must be manually scored. File-Upload Allows your students to upload a file for their response. Fileupload questions must be manually scored. Java Displays a Java applet or other web-based simulation or tool that provides the question and scores your students’ responses. Poll Using any of the other modes, poll questions gather information but score all responses as correct. See Creating Polling Questions on page 81. 4. To create a multi-part question that uses more than one question mode, click Multi-Mode Options. See Creating Multi-Mode Questions on page 76. 5. In Question, type the question you are asking your students to answer. Depending on the type of question you are creating, you will usually add an answer placeholder string <_> to specify where your students will specify their responses. You can use HTML tags and CSS style attribute values in your question to format its appearance, or you can use WebAssign tags to add formatting or 10/2010 Creating Questions 8 boilerplate text. You can also include images, videos, sound files, or links to documents. Tip: To resize the Question, Answer, or Solution boxes, click the horizontal or vertical resize buttons. This does not affect the display size of the question in an assignment. Resizing these fields affects only the question you are editing, but the field sizes are saved with the question. 6. In Answer, specify the answer key for your question. Often, you will specify distractors or options configuring your question’s behavior. Important: The information you specify in Answer varies significantly based on the selected question Mode. For multiple-choice, multiple-select, and matching questions, you can use HTML tags and CSS style attribute values to format answer choices, or include images, videos, sound files, or links to documents. 7. Optionally, type a Solution. The solution helps your students understand the steps they need to take to determine the correct answer to the question. You can configure display of solutions in your assignment settings. You can use HTML tags and CSS style attribute values in your solution to format its appearance, or you can use WebAssign tags to add formatting or boilerplate text. You can also include images, videos, sound files, or links to documents. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. The Author and Locked information cannot be changed. Author displays your name and email address. Locked indicates whether or not the question has been included in a scheduled assignment. This does not prevent you from editing the question, but you should not edit locked questions except to correct errors. 11. When your question displays and functions correctly, click Save. WebAssign assigns a unique question ID (QID), which is displayed in parentheses after the question name. 10/2010 9 WebAssign Creating Questions Guide You can use your question in an assignment and see it in your My Questions list only after it is saved. Tips: • To discard the changes in the Question Editor and load the last saved version of the question, click Revert. • To view the history of saved changes for the question, including the date, time, and user, click the Last Saved date. Testing Questions When creating or editing a question, always test your question to ensure that its appearance and behavior are correct before you use it in an assignment. To test a question: 1. In the Question Editor, click Test/Preview. The Question Previewer window opens. 2. Check the appearance of the question. a. Verify that the question is formatted correctly in the middle of the Question Previewer. Ensure that all the text is displayed, as well as any media you included in the question. b. Select the Key, Solution, Help/Hints, Mark, and Answer Format Tips check boxes to display those items for the question. You can click 10/2010 Creating Questions 10 All or None to select all or none of these check boxes. Ensure that the key, help/hints, and solution are displayed correctly. c. Verify that the correct method for submitting a response for the question is displayed. This might be a tool like the WebAssign graphing tool, a text box, or items to select. 3. Check the behavior of the question. a. If the question uses any randomization — for example, multiple-choice questions or questions using randomly-selected values — click Show New Randomization. Verify that the displayed values or answer order changes in the way you expect. Try a few different randomizations. b. Select Mark, and then provide a correct response to the question. Click Submit for Testing and verify that the question is marked as correct. Notes: • For file-upload questions, you cannot actually upload a file in the Question Previewer. To test that functionality, add the question to an assignment and use the Student View to submit a file on the assignment. • For manually-graded question types — file-upload, essay, and PencilPad — all submissions are automatically marked as correct. c. If more than one response might be correct, provide each alternative correct answer. Click Submit for Testing each time and verify that the responses are marked as correct. d. Provide a likely incorrect response to the question and click Submit for Testing. Verify that the response is marked as incorrect. Test a variety of probable incorrect responses. 4. If needed, make changes to the question code and then go to step 1. Tip: If the Question Previewer window is open, you can view your latest changes by clicking Reload from Editor. 5. When you satisfied that the question is correct, close the Question Previewer window and save the question in the Question Editor. Formatting Text in Your Questions When typing your Question, Solution, and for some modes also your Answer, you can use HTML tags and CSS style attribute values to add formatting to your questions. Note: Not all HTML tags and CSS attributes are displayed in the same way on all browsers. In addition, some tags or attributes might not display as expected because of other formatting rules in the WebAssign application. Always test your formatting. 10/2010 11 WebAssign Creating Questions Guide If you are not familiar with using HTML, the following information might be useful: • HTML is a markup language with tags enclosed in angle brackets <>. • Most HTML tags have a start tag that identifies the formatting to be applied and a matching end tag that begins with a forward slash, for example, <b>your_content_here</b> • When the < and & characters are followed by a letter, you must use a character entity reference to prevent these characters from being interpreted as HTML markup. To type <, type < To type &, type & • Most spaces and line breaks are considered unimportant for HTML formatting and are ignored. Important: Line breaks in Answer are very important for WebAssign and determine the start of each answer or answer choice, depending on the question mode. See the following table for examples of some of the most commonly used formatting. Formatting Example Code Display Bold <b>bold text</b> bold text Italics <i>italic text</i> italic text Underline <u>underlined text</u> underlined text Subscript text<sub>subscript </sub> textsubscript Superscript text<sup>superscript</sup> textsuperscript Line break line<br>new line line new line New paragraph paragraph<p>new paragraph paragraph Indented text text <div class='indent'>indented</div> text text <div class='center'>centered</div> text Right-aligned text text <div class='right'>right‐aligned</div> text Bulleted list <ul> <li>first list item</li> <li>next list item</li> <li>last list item</li> </ul> • first list item • next list item • last list item Centered text 10/2010 new paragraph indented centered right-aligned Creating Questions 12 Formatting Example Code Display Numbered list <ol> <li>first list item</li> <li>next list item</li> <li>last list item</li> </ol> 1. first list item 2. next list item 3. last list item Simple table no borders <table> <tr><td>top left</td><td>top right</td></tr> <tr><td>bottom left</td><td>bottom right</td></tr> </table> Simple table with borders <table border="1"> <tr><td>top left</td><td>top right</td></tr> <tr><td>bottom left</td><td>bottom right</td></tr> </table> Adding Special Characters to Your Questions You can use the special WebAssign symbol <s> tag to add a number of special characters to your questions. See Also: • List of Symbols on page 220 Adding Standard Text Prompts to Your Questions You can use the special WebAssign prompt <p> tag to add a number of commonly used text prompts to your questions. See Also: • List of Prompts on page 231 Adding Images, Media, or Documents to Your Questions You can add images, media such as audio or video files, or documents to your questions. 10/2010 13 WebAssign Creating Questions Guide For example, you might want to: • display an image as part of your question prompt • include a brief video that your students watch before answering the question • supply a template document like a spreadsheet or code example that your students complete and then upload as their response • provide a worked solution to the problem as a PDF document Important: Before adding images, media, or documents to your questions: • Obtain the image, media, or document as a file on your computer in a standard file format for the content — for example, JPG, GIF, or PNG for images. • If your content must be opened with proprietary software, ensure that your students will have access to this software. • Make sure that you have permission to use any materials that you share with your students. Do not share copyrighted materials like music files or content from a textbook you have not adopted for your class. To add images, media, or document files to your questions, perform the following steps as described in this section: 1. Copy the images, media, or documents from your computer to WebAssign. 2. Set the display text that you want to use for your images, media, or documents. 3. Add code to perform one of the following: • Display an image in your question. • Provide a linked document in your question. • Play a media file in your question. This section contains the following topics: • Copying Images, Media, or Documents from Your Computer to WebAssign • Setting Display Text for Your Images, Media, or Documents • Displaying Images in Your Questions • Providing Linked Documents in Your Questions • Playing Media Files in Your Questions See Also: • Organizing your Course Materials Using Folders in the WebAssign Instructor Guide 10/2010 Creating Questions 14 Copying Images, Media, or Documents from Your Computer to WebAssign You can copy image, media, or document files from your computer to your WebAssign account for use in questions and assignments or as class resources. To copy an image, media, or document file from your computer to WebAssign: 1. Open your question in the Question Editor. Tip: You can perform this procedure from the Assignment Editor or My Folders pages in essentially the same way. 2. Click My Files under Page Tools. 3. In the My Files window, navigate to the folder where you want to put your file. Tip: The current folder is listed above the Modify Selected Items menu. You can: • Open any folder by clicking it. • Create a new folder by clicking New Folder. • Sort the list by clicking a column heading. 4. Click Import File. 5. In the Import File window, click Browse or Choose File, depending on the browser you are using. 6. Navigate to the file you want to use on your computer and click Open or Choose, depending on the browser you are using. 7. Click go. 10/2010 15 WebAssign Creating Questions Guide Your file is copied from your computer to WebAssign, and then it is listed in the My Files window. Note: Copying a large file might take some time, especially with a slower Internet connection. After copying your file to WebAssign, you can use it in your questions, in your assignment description or instructions, or as a class resource. See Also: • Using Resource Materials in the WebAssign Instructor Guide Setting Display Text for Your Images, Media, or Documents You can configure the link, hover, or alternative text that is displayed with your image, media, or document files in questions and assignments. • Link text is the text of the link to the file, and is not applicable for images. • Hover text is shown when you move the mouse pointer over an image or link. • Alternative text is spoken by screen reader software for the visually impaired to describe images. This text is shown when an image cannot be displayed. You can optionally specify the location of a text file providing a longer description of the image. Note: This text is not used for displaying class resources. See Using Resource Materials in the WebAssign Instructor Guide. Prerequisite: • Before beginning this procedure, see Copying Images, Media, or Documents from Your Computer to WebAssign on page 14. To specify link, hover, or alternative text for an image, media, or document file: 1. If needed, open your question in the Question Editor, click My Files under Page Tools, and navigate to the folder containing your file. Tip: You can perform this procedure from the Assignment Editor or My Folders pages in essentially the same way. 2. In the My Files window, click the file that you uploaded. The File View window is displayed. 10/2010 Creating Questions 16 The bottom section of the File View window displays a preview of the file contents (for file types that are recognized by your Web browser) or the file link. 3. Beside Attributes, select Image or Link. • For images, select Image. • For other media and documents, select Link. 4. Change any of the following attribute values to set the display text for your file: Text to Set Attribute Link text link text Hover text title Alternative text alt tag Optionally, set longdesc to the location of a text file providing a longer description of the image. 5. Click Save. Your changes are saved. To see your changes, close and then reopen the FileView window. 10/2010 17 WebAssign Creating Questions Guide Displaying Images in Your Questions You can display image files in your questions as part of the question prompt, as choices for multiple-choice and multiple-select questions, or as part of the worked solution. Best Practice: Use one of the following image formats to ensure compatibility with all Web browsers: PNG, GIF, or JPG. Keep the image dimensions smaller than 800 by 600 pixels to ensure that the image is displayed in the question without scrolling. Tip: To display a chemical structure drawing, consider using MarvinSketch. See Displaying Chemical Structures in Your Questions with MarvinSketch on page 206. Prerequisite: • Before beginning this procedure, see Copying Images, Media, or Documents from Your Computer to WebAssign on page 14. To display an image in a question: 1. If needed, open your question in the Question Editor, click My Files under Page Tools, and navigate to the folder containing your file. 2. In the My Files window, select the check box for each image file that you want to display. 3. For Paste location of file (selected below) as, select Image. 10/2010 Creating Questions 18 4. Optionally, override the hover text and alternative text that you set for your image file by selecting enter new attributes for Attributes. Text to Set Attribute Hover text title Alternative text alt tag Optionally, set longdesc to the location of a text file providing a longer description of the image. 5. For Destination Field, select Question, Answer, or Solution, depending on where you want the image to be displayed. Note: You can display images in Answer only for multiple-choice, multiple-select, or matching questions. 6. Click go. The following code is added to the end of Question, Answer, or Solution for each image to be displayed. <userimage(ID)> where ID is the ID number of your image file. If you chose to override the alternative text or hover text for your image, the code will specify these attribute values in this way: <userimage(ID, alt => "alternate_text", title => "title_text", longdesc => "link_to_long_description")> 7. If needed, move the <userimage> tag to the location where your image should be displayed. 8. Optionally, specify other attributes that are valid for the <img> tag in HTML — for example, align, height, width, or style — in the same way that the alt, title, and longdesc attributes are specified. For example, the following code displays the image with a 2-pixel solid gray border: <userimage(103854, style => "border: 2px solid gray;")> Providing Linked Documents in Your Questions You can include links to documents in your questions as part of the question prompt, as choices for multiple-choice and multiple-select questions, or as part of the worked solution. Prerequisite: • Before beginning this procedure, see Copying Images, Media, or Documents from Your Computer to WebAssign on page 14. To provide a linked document in a question: 1. If needed, open your question in the Question Editor, click My Files under Page Tools, and navigate to the folder containing your file. 10/2010 19 WebAssign Creating Questions Guide 2. In the My Files window, select the check box for each document file for which you want to include a link. 3. For Paste location of file (selected below) as, select Link. 4. Optionally, override the link text and hover text that you set for your image file by selecting enter new attributes for Attributes. Text to Set Attribute Link text link text Hover text title 5. For Destination Field, select Question, Answer, or Solution, depending on where you want the link to be. Note: You can include linked documents in Answer only for multiplechoice, multiple-select, or matching questions. 6. Click go. The following code is added to the end of Question, Answer, or Solution for each linked document. <userfile(ID)> where ID is the ID number of your document file. If you chose to override the link text or hover text for your document, the code will specify these attribute values in this way: <userfile(ID, link => "link_text", title => "title_text")> 7. If needed, move the <userfile> tag to the location where your document link should be included. 8. Optionally, specify other attributes that are valid for the <a> tag in HTML — for example, style or target — in the same way that the title attribute is specified. 10/2010 Creating Questions 20 For example, the following code displays the link in italics and opens the document in a new browser window or tab: <userfile(103854, style => "font‐style: italic;", target => "_blank")> Playing Media Files in Your Questions You can include media files such as video tutorials or audio clips in your questions as part of the question prompt, as choices for multiple-choice and multiple-select questions, or as part of the worked solution. Prerequisite: • Before beginning this procedure, see Copying Images, Media, or Documents from Your Computer to WebAssign on page 14. Note: Many formats exist for distributing media on the Internet. This topic documents procedures for including two of the most common video formats — Adobe Flash, which is a WebAssign system requirement, and Apple QuickTime, which is also supported in most Web browsers. For information about other media formats, contact WebAssign customer support. Best Practices: • Keep media files as brief as possible, ideally 3 minutes or less, in order to keep your students’ attention. Consider editing longer materials into multiple shorter segments. • Keep video dimensions no larger than is needed to clearly show the subject matter. Larger video dimensions will download more slowly and might require your students to scroll the browser window to watch the video. • When using video or audio clips in your assignments, change your assignment settings to show only one question at a time. To include an Adobe Flash or Apple QuickTime video in a question: 1. If needed, open your question in the Question Editor, click My Files under Page Tools, and navigate to the folder containing your file. 2. In the My Files window, click the media file that you want to play. The File View window is displayed. 3. Click Show File Info. The file’s MIME type, path, ID, modification date, and size are displayed. 10/2010 21 WebAssign Creating Questions Guide 4. Add the following code to Question, Answer, or Solution, depending on where you want the media to be played. Note: You can include media in Answer only for multiple-choice, multiple-select, or matching questions. Media Type Code Flash Video <object classid="clsid:D27CDB6E‐AE6D‐11cf‐96B8‐444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="width" height="height"> <param name="movie" value="location/name" /> <object type="application/x‐shockwave‐flash" width="width" height="height" data="location/name"> </object> </object> QuickTime Video <object classid="clsid:02BF25D5‐8C17‐4B23‐BC80‐D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="width" height="height"> <param name="src" value="location/name" /> <object type="video/quicktime" width="width" height="height" data="location/name"> </object> </object> 10/2010 Creating Questions 22 where: • height and width are the height and width of your video, in pixels. • location and name are the Location and Name from the File View window. Important: • In order to display videos correctly on all Web browsers that are supported for WebAssign, each of these values is specified twice. Be sure these values are correct in both places or your content might not display correctly on some Web browsers. • Do not move your video to another folder. If you change the location of the video, it will not be displayed in your question. This is not a problem when using the <userfile> or <userimage> tags. 5. When testing your question, be sure to view it both in Internet Explorer and in either Firefox or Safari. Example Question with Flash Video The following table summarizes an actual question. QID 1545601 Name Template2 1.MEDIA.01. Mode Multiple‐Choice Question Watch the following video and then answer the question.<br> <div style="margin: 10px; width: 680px; border: 1px solid gray;"> <object classid="clsid:D27CDB6E‐AE6D‐11cf‐96B8‐444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="680" height="555"> <param name="movie" value="/userimages/mplopez@webassign/Media/adding_media_to_questions.swf" /> <object type="application/x‐shockwave‐flash" width="680" height="555" data="/userimages/mplopez@webassign/Media/adding_media_to_questions.swf"> </object> </object> </div> What tag do you use to add video to a question? <br> <_> 10/2010 23 WebAssign Creating Questions Guide Answer object userfile userimage Display to Students See Also: • Setting Randomization and Display Options for Assignments in the WebAssign Instructor Guide • System Requirements for WebAssign in the WebAssign Instructor Guide Sharing Questions With Other Instructors You can change sharing permissions for your questions to control whether or not other instructors can use your questions in their assignments, or to collaborate with specific instructors when creating questions. Important: Changes to questions can affect scoring for both current and past scheduled assignments. To avoid creating a situation in which assignments might have to be rescored, do not allow other instructors to use your questions until after you are done making changes. 10/2010 Creating Questions 24 You can choose among several permission values, each of which should be used for specific goals. • By default, new questions are set to Protected. This lets other instructors use your question in their assignments only if you provide the question ID, and ensures that other instructors cannot find your question by searching. Only you can edit the question or find it in search results. • If you do not want to share your question with any other instructors, choose Private. This ensures that only you can find, use, or edit the question. • If you want to let all instructors use your question in their assignments, choose either Copyright (if your question contains copyrighted materials) or Public (if all content in your question is in the public domain). Other instructors can find the question by searching and can use the question in their assignments. Only you can edit the question. • If you want to collaborate with other instructors at your school when creating a question, choose a group permission. With group permission, you can select or create a group of instructors who can edit the question and find it in search results. Instructors who are not in the group cannot find your question by searching, and can use the question in their assignments only if you or another instructor in the group provides the question ID. When you use Protected or Group permissions and you want other instructors to be able to use your question in their assignments, you must provide them with the question ID (the number shown in parentheses after the question name). With the question ID, other instructors can add your question to their assignments in the Question Browser. Notes: • If you are not the original author of a question and you change the permission to anything other than Group, only the original author of the question will be able to edit the question. • Other instructors can duplicate any question that you allow them to use or to edit. To set the question permission: 1. If needed, click Show Additional Information in the Question Editor. 2. For Permission, select the permission you want to use. 3. Click Save to apply your changes. 10/2010 25 WebAssign Creating Questions Guide Managing Permission Groups You can create groups of instructors at your institution in order to collaborate when creating assignments or questions. You can add instructors to, or remove yourself from, any group of which you are a member. Only group creators can rename groups, remove other group members, or delete groups. Tip: From the Assignment Editor, Assignment Templates Manager, or Question Editor, you can open the Groups window by clicking Manage My Groups or My Groups. After creating or renaming a group, close and reopen the assignment, template, or question to see your changes. To create a permission group: 1. Click Tasks > My Groups. 2. In the Groups window, click Create New Group. 3. Type a name for the group in Group Name. 4. Under Members, select each of the instructors that you want to add to the group. You are automatically added as a member of any new group that you create. 5. Click Save. The new group is listed in the Groups window. To add instructors to a permission group: 1. Click Tasks > My Groups. 2. In the Groups window, click the name of a group. 10/2010 Creating Questions 26 3. Click Add new member. 4. Under Members, select each of the instructors that you want to add to the group. 5. Click Save. To remove yourself from a permission group: Note: If you remove yourself from a group, you will not be able to edit assignments or questions that were shared with you using that group. 1. Click Tasks > My Groups. 2. In the Groups window, click the name of a group. 3. Click remove beside your name. To remove another instructor from a permission group (group creator only): 1. Click Tasks > My Groups. 2. In the Groups window, click the name of a group. 3. Click remove beside the instructor’s name. To rename a permission group (group creator only): 1. Click Tasks > My Groups. 2. In the Groups window, click the name of a group. 3. Edit the name in Group Name and click Update. To delete a permission group (group creator only): Note: When a group is deleted, only the original author can edit assignments or questions that were shared using that group. 1. Click Tasks > My Groups. 2. In the Groups window, click the name of a group. 3. Remove every instructor from the group, including yourself. Adding Search Metadata to Your Questions If you make your questions publicly available, you might want to add search metadata to your questions that indicate the covered subject matter or discipline. You might also want to indicate whether the question is still being edited or provide a comment about the question. To add search metadata to a question: 1. If needed, click Show Additional Information in the Question Editor. 10/2010 27 WebAssign Creating Questions Guide 2. Under Additional Information, specify any of the following information: Field Description Keywords A comma-delimited list of keywords describing the question. Classification For math, physics, and chemistry questions, one or more topics in the discipline that relate to the question. Adding a classification includes your question in the collections listed in the Question Browser for any instructors who can find the question in search results (see Sharing Questions With Other Instructors on page 23). Usable/Draft Whether the question is ready to be included in assignments (Usable) or is still being edited (Draft). This does not prevent the question from being included in an assignment. Comment Any information about the question. Discipline One or more disciplines to which the question applies. 3. Click Save to apply your changes. 10/2010 Creating Questions 28 10/2010 2 Creating General-Purpose Questions In WebAssign, you can create a wide variety of questions for use in your classes. This section provides step-by-step instructions with examples for creating many kinds of general-purpose questions. These questions reflect the kinds of questions most commonly used in the classroom, but do not include some advanced or discipline-specific question types. This section contains the following topics: • Creating Multiple-Choice Questions • Creating True/False Questions • Creating Yes/No Questions • Creating Multiple-Select Questions • Creating Matching Questions • Creating Ranking Questions • Creating Fill-in-the-Blank Questions • Creating Numerical Questions • Creating Image Map Questions • Creating Short-answer or Essay Questions • Creating PencilPad (Drawing) Questions • Creating File Upload Questions 10/2010 Creating General-Purpose Questions 30 Creating Multiple-Choice Questions Multiple-choice questions present mutually exclusive choices with only one correct response. By default, the choices are displayed in random order when the question is used. To create a multiple-choice question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Multiple-Choice. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer choices should be displayed. Best Practice: Although technically you can omit the answer placeholder string <_> for multiple-choice questions if you want the answer choices to be listed at the end of your question, this string is required for most other question types and it is a good practice always to include it. 5. In Answer, type the correct answer on the first line and press ENTER. Then, type one or more incorrect answers, pressing ENTER after each one. Notes: • Incorrect answers are sometimes referred to as distractors. • 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. • To show feedback for each choice — sometimes called a rejoinder — see Adding Item-Specific Feedback to Multiple-Choice Questions on page 34. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10/2010 31 WebAssign Creating Questions Guide 10. 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 Multiple-Choice Question The following table summarizes an actual question. QID 1077495 Name Template2 2.MC.01. Mode Multiple‐Choice Question What is the primary function of leaves?<br> <_> Answer to trap light energy for photosynthesis to provide protection for the plant to provide water for the plant to enable the plant to grow taller Display to Students This section contains the following topics: • Displaying Choices in a Fixed Order • Displaying Choices as a Drop-down Menu • Displaying Choices Horizontally or in Tables • Adding Item-Specific Feedback to Multiple-Choice Questions Displaying Choices in a Fixed Order By default, the answer choices for multiple-choice questions are listed in random order. You can force the choices to be displayed in a specific order by setting the $ORDERED variable to the number of the correct choice and entering the answer choices in the sequence in which they should be displayed. To list answer choices in a specific sequence: 1. Start the first line of Answer with the following code: <eqn $ORDERED=n; ''> where n is the number of the correct choice. The choices are numbered beginning with 1 for the choice on the first line of Answer. 2. Type the choices in Answer in the sequence in which they should be displayed. 10/2010 Creating General-Purpose Questions 32 Example Ordered Multiple-Choice Question The following table summarizes an actual question. QID 1158608 Name Template2 2.MC.02. Mode Multiple‐Choice Question In what year was President Kennedy elected? <_> Answer <eqn $ORDERED=2; ''>1959 1960 1961 1962 Display to Students Displaying Choices as a Drop-down Menu Sometimes, you might want to list the choices for a multiple-choice question as a drop-down menu. This can be especially useful for sentence-completion questions or in tables, where you want the student to select an answer in a specific context. You can do this by setting the $PULLDOWN variable in your answer. You can also use the $Select_Option variable to specify the default text that is displayed in the menu before your students select a response. To display answer choices as a drop-down menu: 1. Include the answer placeholder string <_> in Question at the location where you want the answer choices to be displayed. 2. Start the first line of Answer with the following code: <eqn $PULLDOWN=1; $Select_Option="text"; ''> where text is the default text that you want to be displayed in the menu. Tip: Specifying $Select_Option="text" is optional. If you do not specify default text for the menu, ‐‐‐Select‐‐‐ is displayed. Example Drop-down Multiple-Choice Question The following table summarizes an actual question. QID 1158615 Name Template2 2.MC.03. Mode Multiple‐Choice Question <_> is the rate of change of velocity with respect to time. 10/2010 33 WebAssign Creating Questions Guide Answer <eqn $PULLDOWN=1; $Select_Option='‐‐‐'; ''>Acceleration Velocity Motion Displacement Display to Students Displaying Choices Horizontally or in Tables By default, the choices for a multiple-choice question are displayed as a vertical list. Sometimes, you might want to arrange the choices horizontally or in a table. You can use the $SET_EACH_POSITION variable together with answer placeholder strings <_> to specify the location of each answer choice in your question. To specify the positions of answer choices: 1. Include an answer placeholder string <_> in Question for each choice. Put the answer placeholder strings <_> where the choices should be displayed. 2. Start the first line of Answer with the following code: <eqn $SET_EACH_POSITION=1; ''> Example Horizontal Multiple-Choice Question The following table summarizes an actual question. QID 1158695 Name Template2 2.MC.04. Mode Multiple‐Choice Question What is the sum of the first five natural numbers? <br> <_> <_> <_> Answer <eqn $SET_EACH_POSITION=1; ''>15 120 18 Display to Students Example Tabular Multiple-Choice Question The following table summarizes an actual question. 10/2010 QID 1247290 Name Template2 2.MC.05. Mode Multiple‐Choice Creating General-Purpose Questions 34 Question Identify the wood duck. <p class="right">(Public domain images from http://photogallery.nrcs.usda.gov)</p> <div class="indent"> <table> <tr valign="top"><td><_></td><td><_></td></tr> <tr valign="top"><td><_></td><td><_></td></tr> </table> </div> Answer <eqn $SET_EACH_POSITION=1; ''><userimage(103859, align => 'top')> <userimage(103853, align => 'top')> <userimage(103855, align => 'top')> <userimage(103857, align => 'top')> Display to Students Adding Item-Specific Feedback to MultipleChoice Questions You can help your students learn by providing feedback — sometimes called rejoinders — after your students submit responses for multiple-choice questions. For each distractor, your feedback should help your students understand why that response was not correct without giving away the answer. You can also provide feedback for the correct answer to reinforce or supplement the concept. Note: Item-specific feedback is displayed to your students only after they submit a response to the question, and only if you enable displaying Hints, Tutorials & eBook Links for the assignment. To add item-specific feedback to a multiple-choice question: 1. (Optional) Include the <HINT> tag in Question to specify where the feedback should be displayed. If you omit <HINT>, the feedback is displayed below the question. 10/2010 35 WebAssign Creating Questions Guide 2. Specify the feedback for each choice by prepending each line in Answer with the following code: <EQN $hints{choice_number}='feedback'; ''>choice where • choice_number is the number of the choice, starting with 0 for the first choice. • feedback is the text you want to display after students submit that choice as their response. • choice is the text of the answer or distractor. Best Practice: Although you could specify the feedback for each choice in Question, defining it in Answer as described helps to ensure that your feedback matches the answer choices you are providing. 3. In the last answer line, add the following statement inside the <EQN> tag after you define the last value for $hints: $HINT=$hints{$thisanswer}; This sets the value of $HINT to the correct feedback text based on the response that your student submits. 4. If you want to display feedback after your student submits the correct answer, add the following statement inside any <EQN> tag in Answer: $HINT_ON_CORRECT=1; Otherwise, your feedback will be displayed only after your student submits incorrect responses. Example Multiple-Choice Question with Item-Specific Feedback The following table summarizes an actual question. 10/2010 QID 1236642 Name Template2 2.MC.06. Mode Multiple‐Choice Question What is the best unit for measuring the length of a pencil? <div class="indent"> <_> <HINT> </div> Creating General-Purpose Questions 36 Answer <EQN $hints{0}='Centimeters are a good unit of length for measuring a pencil.';''>cm <EQN $hints{1}='Kilograms are used to measure mass.';''>kg <EQN $hints{2}='Milliliters are used to measure volume.';''>ml <EQN $hints{3}='Amperes are used to measure electric current.';''>A <EQN $hints{4}='Candelas are used to measure the intensity of light.'; $HINT_ON_CORRECT=1; $HINT=$hints{$thisanswer};''>cd Display to Students Creating True/False Questions True/false questions are multiple-choice questions with only two choices: True and False. Best Practices: • Use the $ORDERED variable and list the answer choices with True first, followed by False. • Only allow one submission when including these questions on an assignment. To create a True/false question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Multiple-Choice. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer choices should be displayed. 5. In Answer, type one of the the following: • If the correct response is True, type: <eqn $ORDERED=1; ''>True False • If the correct response is False, type: <eqn $ORDERED=2; ''>True False To show feedback for each choice — sometimes called a rejoinder — see Adding Item-Specific Feedback to Multiple-Choice Questions on page 34. 10/2010 37 WebAssign Creating Questions Guide 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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 True/False Question The following table summarizes an actual question. QID 1077683 Name Template2 2.TF.01. Mode Multiple‐Choice Question If an object moves at constant velocity, then there must be at least one force acting on the object. <br> <_> Answer <eqn $ORDERED=2; ''>True False Display to Students Creating Yes/No Questions Yes/no questions are multiple-choice questions with only two choices: Yes and No. 10/2010 Creating General-Purpose Questions 38 Two best practices should be observed for yes/no questions: • Use the $ORDERED variable and list the answer choices with Yes first, followed by No. • Only allow one submission when including these questions on an assignment. To create a Yes/no question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Multiple-Choice. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer choices should be displayed. 5. In Answer, type one of the the following: • If the correct response is Yes, type: <eqn $ORDERED=1; ''>Yes No • If the correct response is No, type: <eqn $ORDERED=2; ''>Yes No To show feedback for each choice — sometimes called a rejoinder — see Adding Item-Specific Feedback to Multiple-Choice Questions on page 34. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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. 10/2010 39 WebAssign Creating Questions Guide Example Yes/No Question The following table summarizes an actual question. QID 1158782 Name Template2 2.YN.01. Mode Multiple‐Choice Question Is our Sun a red giant star?<br> <_> Answer <eqn $ORDERED=2; ''>Yes No Display to Students Creating Multiple-Select Questions Multiple-select questions present several non-exclusive choices, allowing your students to select all the choices that apply. By default, the choices are displayed in random order when the question is used. To create a multiple-select question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Multiple-Select. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer choices should be displayed. Tip: Use the code <p:selectall> to insert the text “Select all that apply.” 5. In Answer, use the following procedure to specify the correct and incorrect answers: a. Type one or more correct answers, pressing ENTER after each one. b. Type <INCORRECT> before the first incorrect answer. 10/2010 Creating General-Purpose Questions 40 c. Type one or more incorrect answers, pressing ENTER after each one. Notes: • Incorrect answers are sometimes referred to as distractors. • 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. • If you want to write a question with no correct answer displayed, add a correct answer with text like None of these. If you do not specify any correct answers, students who do not attempt the question receive credit for it. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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 Multiple-Select Question The following table summarizes an actual question. QID 1073354 Name Template2 2.MS.01. Mode Multiple‐Select Question Which of the following people were United States Presidents? (<p:selectall>) <br> <_> 10/2010 41 WebAssign Creating Questions Guide Answer George Washington Abraham Lincoln George Bush <INCORRECT>Joseph Stalin Winston Churchill Display to Students Displaying Multiple-Select Choices in a Fixed Order By default, the answer choices for multiple-select questions are listed in random order. You can force the choices to be displayed in a specific order by setting the $ORDERED variable to indicate the numbers of the correct choices and entering the answer choices in the sequence in which they should be displayed. You do not use the <INCORRECT> tag when displaying multiple-select choices using this method. To list answer choices in a specific sequence: 1. Start the first line of Answer with the following code: <eqn $ORDERED=[n,o,p]; ''> where n, o, and p are the numbers of the correct choices. The choices are numbered beginning with 1 for the choice on the first line of Answer. You can specify any number of choices. For example, <eqn $ORDERED=[1,4]; ''> indicates that choices 1 and 4 are correct. Tip: You can specify the range of correct choices from n through p as [n..p]. For example, <eqn $ORDERED=[1..3]; ''> indicates that choices 1, 2, and 3 are correct. Note: If you use the $ORDERED and $SET_EACH_POSITION variables together, you must specify $ORDERED first, and then $SET_EACH_POSITION. 2. Type the choices in Answer in the sequence in which they should be displayed. 10/2010 Creating General-Purpose Questions 42 Example Ordered Multiple-Select Question The following table summarizes an actual question. QID 1158784 Name Template2 2.MS.02. Mode Multiple‐Select Question Which of the following are rational numbers? (<p:selectall>)<br> <_> Answer <eqn $ORDERED=[1,2,3,4]; ''>‐321 0 2/3 321 None of these Display to Students Displaying Multiple-Select Choices Horizontally or in Tables By default, the choices for a multiple-select question are displayed as a vertical list. Sometimes, you might want to arrange the choices horizontally or in a table. You can use the $SET_EACH_POSITION variable together with answer placeholder strings <_> to specify the location of each answer choice in your question. To specify the positions of answer choices: 1. Include an answer placeholder string <_> in Question for each choice. Put the answer placeholder strings <_> where the choices should be displayed. 2. Start the first line of Answer with the following code: <eqn $SET_EACH_POSITION=1; ''> Note: If you use the $ORDERED and $SET_EACH_POSITION variables together, you must specify $ORDERED first, and then $SET_EACH_POSITION. Example Tabular Multiple-Select Question The following table summarizes an actual question. QID 1158786 Name Template2 2.MS.03. 10/2010 43 WebAssign Creating Questions Guide Mode Multiple‐Select Question Select the metric units: <table> <tr><td><_></td><td><_></td><td><_></td><td><_></td></tr> <tr><td><_></td><td><_></td><td><_></td><td><_></td></tr> </table> Answer <eqn $SET_EACH_POSITION=1; ''>meter second gram liter <INCORRECT>mile yard acre pound Display to Students Creating Matching Questions On paper, a matching question has two columns of items, and students draw lines or otherwise identify the item in the second column that matches each item in the first column. In WebAssign, only the first column of items is displayed; each item in the first column has a drop-down list of the items in the second column. Paper WebAssign Note: Although you can add extra unmatched items to one of the columns, there must be a one-to-one correspondence between items in the two columns. You cannot create a matching question in which choices are reused. To do this, create a series of multiple-select or multiple-choice questions. By default, the choices in each column are displayed in random order when the question is used. To create a matching question: 1. Click Questions > Create. The Question Editor opens. 10/2010 Creating General-Purpose Questions 44 2. In Name, type a name for the question. 3. In Mode, select Matching. 4. In Question, type your question. 5. In Answer, type each first-column item on a separate line followed by the characters {tab} and its matching second-column item. Press ENTER after each line. Notes: • The characters {tab} can be entered by typing on your keyboard or by clicking Add tab. You can abbreviate this notation as {}. You cannot enter these characters by pressing the Tab key on your keyboard. • 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. • Because second-column items are displayed in a drop-down list, they are displayed without any text formatting. If you need to include text formatting, such as chemical or math notation, see Matching Formatted Notation or Images on page 45. 6. If you want to specify additional distractors — second-column items that do not match any first-column item — type them in Answer on separate lines following the correct answers. Press ENTER after each line. 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 11. 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. 10/2010 45 WebAssign Creating Questions Guide Example Matching Question The following table summarizes an actual question. QID 1077498 Name Template2 2.MATCH.01. Mode Matching Question Match the city with the country. Answer Paris {tab} France London {tab} Great Britain Madrid {tab} Spain Moscow {tab} Russia Athens {tab} Greece Turkey Italy Belgium Display to Students Matching Formatted Notation or Images You can include images and formatted text, such as subscripts, in first-column items in matching questions. However, you cannot include formatted text or images in the drop-down list of second column items. In order to match second-column items that contain images or formatting, you must use labels for the second-column items. You can use the $LABEL variable to set alphabetic or numeric numbering of your second-column items. These labels are displayed beside the second-column items in the question, and the labels are listed in the drop-down menu. To set labels for second-column items: 1. Start the first line of Answer with one of the following: 10/2010 Label type Code Lowercase alphabetic (a,b,c...) <eqn $LABEL="a"; ''> Uppercase alphabetic (A,B,C...) <eqn $LABEL="A"; ''> Numeric (1,2,3...) <eqn $LABEL="1"; ''> Creating General-Purpose Questions 46 Example Matching Question With Formatted Notation The following table summarizes an actual question. QID 1158804 Name Template2 2.MATCH.02. Mode Matching Question Match the chemical with the formula. Answer <eqn $LABEL="a"; ''>water {tab} H<sub>2</sub>O benzene {tab} C<sub>6</sub>H<sub>6</sub> sodium chloride {tab} NaCl ethanol {tab} CH<sub>3</sub>CH<sub>2</sub>OH carbon dioxide {tab} CO<sub>2</sub> CO MgCl<sub>2</sub> H<sub>2</sub>O<sub>2</sub> Display to Students Displaying Matching Items in a Fixed Order By default, the choices in each column of a matching question are displayed in random order when the question is used. You can use either the $ORDERLEFT or $ORDERRIGHT variable to force items in either the left or right column to be listed in the order in which you specify them in Answer. To list matching items in a specific sequence: 1. Start the first line of Answer with one of the following: List to be displayed in order Code Left (prompt) list <eqn $ORDERLEFT=1; ''> Right (drop-down) list <eqn $ORDERRIGHT=1; ''> Note: Although you can use both $ORDERLEFT and $ORDERRIGHT variables together, doing so is not recommended. If both lists are displayed in a fixed order, students will quickly catch on that the nth item in the left list always matches the nth item in the right list. 10/2010 47 WebAssign Creating Questions Guide 2. Type the items in Answer in the sequence in which they should be displayed for the specified list. Example Ordered Matching Question The following table summarizes an actual question. QID 1159108 Name Template2 2.MATCH.03. Mode Matching Question Match the inventor and the invention. Answer <eqn $ORDERLEFT=1; ''>Babbage {tab} analytical engine Bell {tab} telephone Edison {tab} phonograph Franklin {tab} lightning rod Newton {tab} reflecting telescope Volta {tab} battery Whitney {tab} cotton gin magnifying glass printing press Display to Students Creating Ranking Questions Ranking questions require your students to put a list of items in the correct sequence based on some characteristic of the items. If you can think about the sequence in which you want your students to rank items as its own list — from low to high, or some other progression based on the ranking characteristic — you can see your ranking question as a special case of a matching question, with the ranking characteristic defining the left list and the items to be ranked as the right list. To create a ranking question: 1. Decide how you want to identify the endpoints for ranking, and if you need to label any other points in the series. For example, you might want to use “dimmest” and “brightest” as endpoints, or you might want your students to rank items from 1 to 10. The list describing your ranking characteristic does not need to specify text for every item being ranked. 2. Click Questions > Create. The Question Editor opens. 10/2010 Creating General-Purpose Questions 48 3. In Name, type a name for the question. 4. In Mode, select Matching. 5. In Question, type your question. 6. In Answer, type the following code: <eqn $ORDERLEFT=1; ''> 7. On the same line, type the first item in your ranking characteristic list, followed by the characters {tab} and the item having the corresponding rank. Then, press ENTER. For example, if you were ranking types of electromagnetic radiation by energy levels and the lowest energy item was microwave: <eqn $ORDERLEFT=1; ''><i>lowest</i> {tab} microwave Notes: • The characters {tab} can be entered by typing on your keyboard or by clicking Add tab. You can abbreviate this notation as {}. You cannot enter these characters by pressing the Tab key on your keyboard. • 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. • Because second-column items are displayed in a drop-down list, they are displayed without any text formatting. If you need to include text formatting, such as chemical or math notation, see Matching Formatted Notation or Images on page 45. 8. Type successive items in your ranking characteristic list on separate lines, each followed by the characters {tab} and the item having the corresponding rank. Press ENTER after each line. Important: If your ranking characteristic list does not specify text for every item being ranked — for example, in the middle of a ranking from slowest to fastest — type for the ranking characteristic list item. This will ensure that the list item is displayed correctly. 9. After typing the final ranking characteristic followed by {tab} and the final item to be ranked, do not press ENTER. Unlike other matching questions, ranking questions must have the same number of items in both lists. 10. Optionally, type a Solution. 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. 11. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 12. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10/2010 49 WebAssign Creating Questions Guide 13. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 14. 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 Ranking Question The following table summarizes an actual question. QID 1078579 Name Template2 2.RANK.01. Mode Matching Question Rank the following types of electromagnetic radiation from lowest energy to highest energy. Answer <eqn $ORDERLEFT=1; ''><i>lowest</i> {tab} microwave {tab} infrared {tab} ultraviolet {tab} visible <i>highest</i> {tab} x‐ray Display to Students Example Ranking Question with Equality Sometimes, you need to allow your students to specify multiple items as being equal to each other in rank. You can use distractors to facilitate this behavior. The following table summarizes an actual question. 10/2010 QID 1247378 Name Template2 2.RANK.02. Mode Matching Creating General-Purpose Questions 50 Question The figure shows a series of sound waves leaving a moving source. <div class="indent"><userimage(103873)></div> Rank the locations by frequency heard by a stationary listener at each letter location. Answer <eqn $ORDERLEFT=1; ''><i>lowest</i> {tab} B {tab} A and D {tab} C <i>highest</i> {tab} E A D A and B A and C A and E B and C B and D B and E C and D C and E D and E Display to Students Creating Fill-in-the-Blank Questions Fill-in-the-blank questions provide an answer box for students to type a short textual response, and are used when the correct answer can be stated in a word or short phrase for which only a small number of acceptable variations exist. Note: For questions that should be evaluated numerically or mathematically, create one of the numerical or math question types, not fill-in-the-blank. See Creating Numerical Questions on page 52 or Creating Math Questions on page 107. By default, spaces and character case are not considered when scoring fill-inthe-blank questions; thus, Isaac Newton, isaac newton, and iSaaCnewtOn would all be considered equivalent answers. You can force WebAssign to consider character case, spaces, or both. By default, answer format tips tell your students if your question is casesensitive. You can hide answer format tips for your assignments. 10/2010 51 WebAssign Creating Questions Guide To create a fill-in-the-blank question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer box should be displayed. 5. Optionally, set the $CASE, $SPACE, or $size variables at the beginning of Answer to check the character case or spaces in responses or to set the size of the answer box. To do this: Begin Answer with this: Make the question case-sensitive <eqn $CASE=1; ''> Make the question space-sensitive <eqn $SPACE=1; ''> Make the answer box n characters wide <eqn $size=n; ''> You can combine these declarations using a single <eqn> tag by separating each declaration with a semicolon. For example: <eqn $CASE=1; $SPACE=1; $size=20; ''> The default size of the answer box is 10. Changing the size of the answer box does not restrict the length of your students’ responses. 6. In Answer, type one or more correct answers to the question on a single line, separated by the characters {tab}. Notes: • The characters {tab} can be entered by typing on your keyboard or by clicking Add tab. You can abbreviate this notation as {}. You cannot enter these characters by pressing the Tab key on your keyboard. • 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. 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 10/2010 Creating General-Purpose Questions 52 search results. To change the permission, see Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 11. 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 Fill-in-the-Blank Question The following table summarizes an actual question. QID 1069783 Name Template2 2.FITB.01. Mode Fill‐in‐the‐Blank Question Who wrote the <i>Principia Mathematica</i>? <br> <_> Answer <eqn $CASE=1; $size=20; ''>Newton {tab} Isaac Newton {tab} Sir Isaac Newton Display to Students Creating Numerical Questions A numerical question is a fill-in-the-blank question that is graded for numerical accuracy. Numerical questions have the following default behaviors: • The form and precision of the response are not considered, and responses within ±2% of the answer you specify are considered to be correct. For example, if the answer is 3, then 3, 3.0, and 3.01 are all accepted as correct responses. • Students can use basic mathematical operators — addition, subtraction, multiplication, division, and exponentiation — in their response, so they can be awarded credit for correctly stating the problem as a mathematical expression without actually performing the computation. You can configure numerical questions to: • require students to enter units • require students to use a specific number of significant digits • require students to use a specific number of decimal places • accept answers within a different tolerance value than the default • require students to respond with a computed answer 10/2010 53 WebAssign Creating Questions Guide By default, answer format tips tell your students whether units, significant figures, or decimal places are checked. You can hide answer format tips for your assignments. To create a numerical question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Numerical. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer box should be displayed. 5. Optionally, add the following code at the beginning of Answer to change the width of the answer box to n characters: <eqn $size=n; ''> The default size of the answer box is 10. 6. In Answer, type the correct numerical answer to the question. Important: Observe the following rules regarding the format of your numerical answer: • Do not use commas, spaces, or other separators between digits. • You can use scientific (“e”) notation, for example, 1.51e7. • You can type one or more words such as NONE, INFINITY, DNE, or NO SOLUTION; numerical questions are not case- or spacesensitive, but your students must type the words exactly to be marked correct. These rules also apply to your students when they respond to your question. 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10/2010 Creating General-Purpose Questions 54 11. 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 Numerical Question The following table summarizes an actual question. QID 1077998 Name Template2 2.NUM.01. Mode Numerical Question How many miles will a car travel in 3 minutes if its speed is constant at 60 mph? <br> <_> miles Answer <eqn $size=2; ''>3 Solution Since there are 60 minutes/hour, at 60 mph the car is traveling at 1 mile/minute. Display to Students Requiring Units in Numerical Questions You can require your students to enter a unit with their response by adding the correct unit after the numeric value in Answer. If you specify units, any equivalent answer specifying equivalent units is accepted. For example, your student could respond 1 mi or 5280 ft. You can configure your assignments to award partial credit for specifying compatible units even if the numerical part of the response is incorrect. Note: WebAssign cannot restrict the allowable units for numerical questions, for example, to require entry of MKS system units. If you need your students to enter a specific unit, create a multiple-part question that uses a numerical question for the value and a fill-in-theblank question for the unit. By default, answer format tips tell your students whether units are checked. You can hide answer format tips for your assignments. To require students to enter a unit with their response: 1. In Answer, type the correct numerical answer followed by a space and the unit, for example, km or m/s^2. 10/2010 55 WebAssign Creating Questions Guide 2. When testing your question, test with alternative units. WebAssign supports most standard units and unit abbreviations in common use. However, to ensure that the unit in your question is supported, test it with each of the following criteria: • correct and incorrect responses using the unit you specified • correct and incorrect responses using standard abbreviations or variant spellings of the unit you specified • correct and incorrect responses using at least one different compatible unit Example Numerical Question With Units The following table summarizes an actual question. QID 1159423 Name Template2 2.NUM.02. Mode Numerical Question How far will a car travel in 3 minutes if its speed is constant at 60 mph? <br> <_> Answer 3 miles Display to Students Checking Significant Figures in Numerical Questions You can require your students to specify the correct number of significant figures in their response by setting the $SIGFIGS variable in Answer. If you check significant figures, you might want to award partial credit for responses that use the correct number of significant figures even if the student’s calculation is not correct. See Setting Significant Figure Checking Options for Assignments in the WebAssign Instructor Guide. When your question checks significant figures, the default tolerance for the question is ±1 at the last significant digit. For example, if the answer is 330 to 2 significant digits, the responses 320, 330, and 340 would all be accepted. By default, answer format tips tell your students whether significant figures are checked. You can hide answer format tips for your assignments. To check students’ responses for significant figures: 1. In Answer, type the following code before the correct numerical answer: <eqn $SIGFIGS=digits; ''> where digits is the correct number of significant figures. 10/2010 Creating General-Purpose Questions 56 2. Type the correct answer on the same line. Ensure that your answer is specified to the correct number of significant figures. If it is not, it will be rounded to the correct number of significant figures and the tolerance will be based on the rounded answer. Example Numerical Question With Significant Figure Checking The following table summarizes an actual question. QID 1079760 Name Template2 2.NUM.03. Mode Numerical Question If the space shuttle maintains a constant speed of 7740 m/s for 32.5 minutes, how far will it have traveled? <br> <_> km Answer <eqn $SIGFIGS=3; 7740*1e‐3*(32.5*60)> Display to Students Checking Decimal Places in Numerical Questions You can require your students to specify a certain number of decimal places in their response by setting the $DECFIGS variable in Answer. If you check decimal places, you might want to award partial credit for responses that use the correct number of decimal places even if the student’s calculation is not correct. See Setting Significant Figure Checking Options for Assignments in the WebAssign Instructor Guide. When your question checks decimal places, the default tolerance for the question is ±1 at the last digit. For example, if the answer is 1.33 to 2 decimal places, the responses 1.32, 1.33, and 1.34 would all be accepted. By default, answer format tips tell your students whether decimal places are checked. You can hide answer format tips for your assignments. To check students’ responses for decimal places: 1. In Answer, type the following code before the correct numerical answer: <eqn $DECFIGS=n; ''> where n represents the nearest decimal value to which the answer should be specified, such as 10, 1, 0.1, 0.01, 0.001, or 0.0001. Important: Always set $DECFIGS to a power of 10. You can use “e” notation, such as 1e2. 2. Type the correct answer on the same line. Ensure that your answer is specified to the correct number of decimal places. If it is not, it will be rounded to the correct number of decimal places and the tolerance will be based on the rounded answer. 10/2010 57 WebAssign Creating Questions Guide Example Numerical Question With Decimal Place Checking The following table summarizes an actual question. QID 1159495 Name Template2 2.NUM.04. Mode Numerical Question Write the quotient of 3 and 7 to 5 decimal places.<br> <_> Answer <eqn $DECFIGS=0.00001; 3/7> Display to Students Changing Tolerance for Numerical Questions You can set the tolerance for your numerical questions as a numerical value by adding {tab} and the tolerance value after the answer. Important: Tolerances set in the question are ignored if different tolerance values are set for the sections or assignments for which the question is scheduled. See Setting Numerical Tolerance for Assignments in the WebAssign Instructor Guide. The default tolerance for numerical questions that do not check significant figures or decimal places is ±2%. For numerical questions that do check significant figures or decimal places, the default tolerance is ±1 at the last digit. To set the tolerance as a numerical value: 1. In Answer, type the following code immediately after the correct numerical answer: {tab} tolerance where tolerance is the non-negative numerical tolerance value by which your students’ responses can differ from your answer and be considered correct. For example, to specify an answer of 56 and accept answers between 55.97 and 56.03, type 56 {tab} 0.03. Notes: • The characters {tab} can be entered by typing on your keyboard or by clicking Add tab. You cannot enter these characters by pressing the Tab key on your keyboard. To specify the tolerance as a percentage of a non-randomized answer, manually calculate the tolerance by multiplying the answer by the percentage tolerance you want to use. 10/2010 Creating General-Purpose Questions 58 Example Numerical Question With Specified Tolerance The following table summarizes an actual question. QID 1159554 Name Template2 2.NUM.05. Mode Numerical Question 34 + 10 + 5 = <_> Answer 49 {tab} 0 Display to Students Requiring Computed Responses in Numerical Questions You can require your students to specify their response as the result of a computation instead of allowing them to use mathematical operators in their response. You can also require your students to reduce fractional responses. By default, answer format tips tell your students about the kind of response that is required. You can hide answer format tips for your assignments. To require students to perform computations before entering their response: 1. In Answer, type the one of the following codes before the correct numerical answer: Allowed Form of Responses Example Responses • • • • • • • • • • integer decimal any fraction word scientific notation 64 6.4 6/4 NO SOLUTION 6.4e2 Code Notes <eqn $SIMPLIFIED=1; ''> Depending on the question, you might want to set the tolerance to 0. Tolerance is always 0 when this code is used. • integer • decimal • any fraction • 64 • 6.4 • 6/4 <eqn $FRACTION=1; ''> • integer • reduced fraction • 64 • 3/2 <eqn $PROPERFRACTION=1; ''> Only exact decimal values are scored as correct. For example, 0.33333 is not the same as 1/3. Tolerance is always 0 when this code is used. Include <p:reduce> in Question to let your students know to reduce fractions. 2. Type the correct numerical answer on the same line. 10/2010 59 WebAssign Creating Questions Guide Example Numerical Question Requiring a Computed Response The following table summarizes an actual question. QID 1203080 Name Template2 2.NUM.06. Mode Numerical Question 34 + 10 + 5 = <_> Answer <eqn $SIMPLIFIED=1; ''>49 {tab} 0 Display to Students Example Numerical Question Requiring a Fraction or Decimal The following table summarizes an actual question. QID 1204532 Name Template2 2.NUM.07. Mode Numerical Question <watex>\frac{1}{2} + \frac{7}{8} = </watex><_> Answer <eqn $FRACTION=1; ''>11/8 Display to Students Example Numerical Question Requiring a Reduced Fraction or Integer The following table summarizes an actual question. QID 1203084 Name Template2 2.NUM.08. Mode Numerical Question <p:reduce> <div class="indent"> <watex>\frac{1}{2} <s:divide> \frac{7}{8} = </watex><_> </div> Answer <eqn $PROPERFRACTION=1; ''>4/7 Display to Students 10/2010 Creating General-Purpose Questions 60 Creating Image Map Questions An image map question requires your students to identify something in an image by clicking the image. Image map questions are particularly useful when you want your students to identify a named anatomical part in an illustration or geographical feature in a map. To create an image map question: 1. Create the image file that you want to use for your question. Best Practice: Keep the image dimensions smaller than 800 by 600 pixels to ensure that the image is displayed in the question without scrolling. 2. Click Questions > Create. The Question Editor opens. 3. In Name, type a name for the question. 4. In Mode, select Image Map. 5. In Question, type your question. 6. Click My Files under Page Tools. 7. If you have not already uploaded your image to WebAssign, use the following steps to do so. a. In the My Files window, click Import File. b. In the Import File window, click Browse. c. Navigate to the file you want to use on your computer and click Open. d. In the Import File window, click go. e. Close the Import File window. 8. In the My Files window, navigate to the file you want to use and select its check box. 9. Set Paste location of file (selected below) as to ID Only. 10. Set Destination Field to Question. 11. Click go. The unique WebAssign ID number for the image is added to Question on a new line. 12. Edit the line with the image ID number to add an answer placeholder string for the image map question like the following: <_ src="ID"> where ID is the ID number of the image you want to use. You can move this answer placeholder string to wherever it should be displayed in the question. 13. Click Redisplay. The question and image are displayed in the Display section of the Question Editor. 14. Click Coordinates below the image. 10/2010 61 WebAssign Creating Questions Guide 15. In the Coordinates window, select a shape and define the boundaries for a part of the image that your students should click to correctly answer the question. Note: Each shape defines a single key for the answer. You can define multiple keys to allow students to click any of several areas of the image for a correct response. • To add a rectangular key, click rectangle. Click the image to set the upper left point of the key. Click the image to set the lower right point. • To add a circular key, click circle. Click the image to set the center of the circle. Click the image at the edge of the circle to set the radius. • To add a polygonal key, click polygon. Click the image at each vertex of the polygon, specifying adjacent vertices consecutively. Click Draw Key to preview the key on your image. The key you defined is drawn in bright green on the image, and its definition is added to a list of Keys below the image. If a key is not correct, select its check box and click Remove Selected. Tip: To fine-tune the dimensions for a key that is not quite correct, add a new key of the same shape. Using the not-quite-correct key as a reference, type the new coordinate values instead of clicking the image. Repeat this step until you have defined all the keys you need for the question. 10/2010 Creating General-Purpose Questions 62 16. When the keys are drawn correctly on the image, select the check boxes for the keys you want to use and click Add Selected Key to Answer. The Coordinates window closes and the keys are added to Answer. Important: If you need to use the Coordinates window more than once to add keys to your question, you will need to manually edit the keys in Answer to ensure that all of the keys for each question part are listed on a single line and are delimited with the {tab} characters. This is necessary because although all of the keys for a question part must be listed on the same line, each time you click Add Selected Key to Answer, the keys are added on a new line. 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. If you need to manually edit the keys in Answer, the following reference information about how image map keys are specified might be useful: Shape Key Rectangle rect:left_x,top_y,right_x,bottom_y Circle circle:center_x,center_y,radius Polygon poly:x1,y1,x2,y2,x3,y3... 10/2010 63 WebAssign Creating Questions Guide 17. Optionally, type a Solution. 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. 18. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 19. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 20. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 21. 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 Image Map Question The following table summarizes an actual question. QID 1159575 Name Template2 2.MAP.01. Mode Image Map Question Click the cochlea to identify it. <br> <_ src="92012"> Answer circle:310,175,24 Display to Students 10/2010 Creating General-Purpose Questions 64 Creating Short-answer or Essay Questions Short-answer and essay questions are free response questions that allow your students to demonstrate their knowledge by providing an extended textual answer in their own words. There is no qualitative difference between the two kinds of questions; whether you describe the question as short-answer or essay generally is a reflection of the length of the expected response. Short-answer and essay questions are not automatically graded by WebAssign; they must be manually graded. To create a short-answer or essay question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Essay. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer box should be displayed. 5. Optionally, set the $rows or $cols variables at the beginning of Answer to change the size of the answer box. To do this: Begin Answer with this: Make the answer box n rows high <eqn $rows=n; ''> Make the answer box n characters wide <eqn $cols=n; ''> You can combine these declarations using a single <eqn> tag by separating each declaration with a semicolon. For example: <eqn $rows=10; $cols=60; ''> The default size of the answer box is 6 rows by 65 characters. The size of the answer box does not constrain the length of the student’s response, but it can suggest to students whether a brief or extended answer is expected. Tip: If an extended answer is required, you might suggest to students that they can compose their answer using their preferred wordprocessing software, and then copy and paste the text into the answer box when they are ready to submit their response. 6. In Answer, type a key that will help the grader determine whether or not the student’s response is correct. You might state the points that should be 10/2010 65 WebAssign Creating Questions Guide awarded for correctly addressing particular topics, or refer to a grading rubric. The key must be on a single line. Notes: • Even if you will be grading the essay answers yourself, you must type a key in Answer for the question to display correctly. You can use two periods for the answer key if you do not want to include meaningful text. • 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. 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 11. 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 Short-answer or Essay Question The following table summarizes an actual question. 10/2010 QID 1070062 Name Template2 2.ESS.01. Mode Essay Question Define economics in your own words.<_> Creating General-Purpose Questions 66 Answer <eqn $rows=3; $cols=60; ''>Economics is the social science that studies the production, distribution, and consumption of goods and services. Display to Students Creating PencilPad (Drawing) Questions PencilPad questions allow your students to create and submit a drawing in WebAssign. PencilPad questions are not automatically graded by WebAssign; they must be manually graded. To create a PencilPad question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select PencilPad. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer box should be displayed. 5. In Answer, type a key that will help the grader determine whether or not the student’s answer is correct. The key must be on a single line. Notes: • Even if you will be grading the PencilPad answers yourself, you must enter something in Answer. • If a key 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. 10/2010 67 WebAssign Creating Questions Guide Tip: Because PencilPad questions require students to submit a drawing, you might want to add an image to the key to help the grader. a. Under Page Tools, click My Files. If you have already uploaded your image to WebAssign, skip to step g. b. In the My Files window, click Import File. c. In the Import File window, click Browse. d. Navigate to the file you want to use and click Open. e. In the Import File window, click go. f. Close the Import File window. g. In the My Files window, navigate to the file you want to use and select its check box. h. Set Paste location of file (selected below) as to Image. i. Set Destination Field to Answer. j. Click go. A <userimage> tag is added to Answer on a new line. k. Move the <userimage> tag to the same line as the key for your question. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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. 10/2010 Creating General-Purpose Questions 68 Example PencilPad Question The following table summarizes an actual question. QID 1078917 Name Template2 2.PP.01. Mode PencilPad Question Draw a picture of a sine wave. Identify the Crest, Trough, Amplitude, and Wavelength.<br> You can use the letters C, T, A, W for labels.<_> Answer <userimage(92022)><br>Student must correctly identify all parts for credit. 10/2010 69 WebAssign Creating Questions Guide Key Display Display to Students Creating File Upload Questions File upload questions allow your students to submit a file — for example, a spreadsheet, presentation, or research paper — as their response. File upload questions are not automatically graded by WebAssign; they must be manually graded. 10/2010 Creating General-Purpose Questions 70 To create a file upload question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select File-Upload. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the answer box should be displayed. Describe any restrictions on the file type or size that will be accepted. 5. Optionally, set the $FILEUPLOADMAX, $ACCEPTFILETYPE, or $size variables at the beginning of Answer to specify any restrictions on the size or type of file to be uploaded, or to set the size of the file upload box. • By default, files that your students upload must be no larger than 100 KB. Although you can increase this size if needed, encourage your students to submit the smallest file size they can. This both helps your students who might have limited connection speeds, and it helps you, because you will need to download all of your students’ files to score them. Students who upload extremely large files might experience timeouts depending on their Internet connection and browser settings. • By default, your students can submit any file type. When restricting allowable file types, let your students know ahead of time what file formats will be accepted. You should ensure that you will be able to safely open and view any files that your students submit. At the same time, unless the assignment requires use of a specific application or creation of a specific type of file, you might not want to impose arbitrary restrictions on the tools that your students can use. To do this: Begin Answer with this: Set the maximum allowed file size to n bytes <eqn $FILEUPLOADMAX=n; ''> Restrict file uploads to files with the specified filename extensions <eqn $ACCEPTFILETYPE=['.ext', '.ext']; ''> Make the file upload box n characters wide <eqn $size=n; ''> You can combine these declarations using a single <eqn> tag by separating each declaration with a semicolon. For example: <eqn $FILEUPLOADMAX=52488; $ACCEPTFILETYPE=['.doc', '.docx','.odt','.pdf']; ''> 6. In Answer, type a key to help the grader evaluate the student’s response. This will often reference a rubric used to assess the submitted file. This information and any <eqn> tags should all be on a single line. 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. 10/2010 71 WebAssign Creating Questions Guide Even if you will be grading the questions yourself, you must enter something in Answer in order for the file upload box to be displayed when the question is used. 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 11. 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 File Upload Question The following table summarizes an actual question. QID 1078920 Name Template2 2.FILE.01. Mode File‐Upload Question Upload your research project. <_><br> Your can upload a PDF, Word, or OpenOffice Writer file. It must be less than 512 KB in size. Answer <eqn $size=5; $FILEUPLOADMAX = 524288; $ACCEPTFILETYPE = ['.doc','.docx','.odt','.pdf']; ''>Use the rubric. Display to Students 10/2010 3 Creating Multi-Part, Tutorial, and Answer-Dependent Questions Single-part questions work well for assessment and practice of simple factual material. But you can provide a richer learning experience for your students by creating multi-part, tutorial, or answer-dependent questions. • Multi-part questions have multiple question parts, and can be created using just one question mode or by combining multiple question modes (multi-mode questions). • Tutorial questions help your students work step by step through a series of question parts designed to provide instruction about a concept or procedure. • Answer-dependent questions let your students provide numerical data or estimates and perform calculations based on the provided data. You can format your questions with expandable headings to group question parts, and you can perform complex algorithmic evaluations to dynamically update your answer keys based on data that your students provided in earlier parts of the question. This section contains the following topics: • Creating Multi-Part Questions That Have One Question Mode • Creating Multi-Mode Questions • Adding Expandable Sections to Multi-Part Questions • Creating Tutorial Questions • Creating Answer-Dependent Questions • Performing Complex Operations in Answer Keys 10/2010 73 WebAssign Creating Questions Guide Creating Multi-Part Questions That Have One Question Mode When all parts of your question use the same question mode — for example, numerical — you can add additional answer placeholder strings <_> in Question and additional answer keys in Answer. For multiple-choice, multipleselect, and matching questions, you also need to indicate where each new set of answer choices begins. For most question modes, each answer box is created by adding the answer placeholder string <_> in Question, and each answer key is specified using a single line in Answer. Each new answer placeholder string <_> and answer key create a new question part. For multiple-choice, multiple-select, and matching questions, however, each answer key is specified using multiple lines, so you must indicate the beginning of each new answer key in one of the following ways: • For multiple-choice questions, add the <MCPART> tag at the start of each new answer key. • For multiple-select questions, add the <MSPART> tag at the start of each new answer key. • For matching questions, no tag is provided. Instead, create the question as a multi-mode question with multiple matching parts. See Creating MultiMode Questions on page 76. To create a multi-part question that uses only one question mode: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select the question mode that you want to use. 4. In Question, type your question. Use an answer placeholder string <_> to specify where the answer box should be displayed for each question part. Tip: Optionally, add the <MARK> tag to specify where the correct/incorrect mark should be displayed for each question part. This might be necessary when displaying answer choices horizontally or in tables for multiple-choice or multiple-select questions. 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 74 5. In Answer, provide an answer key for each question part. • For a multiple-choice question, type <MCPART> at the beginning of each new set of choices after the first question part. • For a multiple-select question, type <MSPART> at the beginning of each new set of choices after the first question part. • For a matching question, create the question as a multi-mode question with multiple matching parts. See Creating Multi-Mode Questions on page 76. • For all other question modes, provide each answer key on a single line as described in the documentation for that question type. 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. Important: Each line in Answer is significant. • Do not specify <MCPART> or <MSPART> on a separate line. • Do not add blank lines in Answer, for example, by pressing ENTER after the last answer key. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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. 10/2010 75 WebAssign Creating Questions Guide Example Multi-Part Numerical Question The following table summarizes an actual question. QID 1589520 Name Template2 3.MULTP.01. Mode Numerical Question Find the following for a sphere having a diameter of 8 cm. Specify units.<br> Volume: <_><br> Surface area: <_> Answer 268.08 cm^3 201.06 cm^2 Display Example Multi-Part Multiple-Choice Question The following table summarizes an actual question. 10/2010 QID 1589518 Name Template2 3.MULTP.02. Mode Multiple‐Choice Question Identify the organ system to which each organ belongs.<br> heart <_><br> lungs <_><br> kidneys <_> Answer <EQN $PULLDOWN=1; $ORDERED=1; ''>circulatory system digestive system endocrine system excretory system lymphatic system nervous system reproductive system respiratory system <MCPART><EQN $PULLDOWN=1; $ORDERED=8; ''>circulatory system digestive system endocrine system excretory system lymphatic system nervous system reproductive system respiratory system <MCPART><EQN $PULLDOWN=1; $ORDERED=4; ''>circulatory system digestive system endocrine system excretory system lymphatic system nervous system reproductive system respiratory system Creating Multi-Part, Tutorial, and Answer-Dependent Questions 76 Display to Students Example Multi-Part Multiple-Select Question The following table summarizes an actual question. QID 1589516 Name Template2 3.MULTP.03. Mode Multiple‐Select Question Identify the primary colors: <br><_> <_> <_> <_> <_> <_> <MARK> <br><br> Identify the secondary colors: <br><_> <_> <_> <_> <_> <_> <MARK> Answer <EQN $ORDERED=[1,3,5]; $SET_EACH_POSITION=1; ''>red orange yellow green blue purple <MSPART><EQN $ORDERED=[2,4,6]; $SET_EACH_POSITION=1; ''>red orange yellow green blue purple Display to Students Creating Multi-Mode Questions When different parts of your question use different question modes — for example, numerical and multiple-choice — you can create a multi-mode question to specify a list of the modes used in your question, and indicate where each new mode begins with <SECTION> tags in both Question and Answer. You use this method also when creating multi-part matching questions. To create a multi-mode question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. Beside Mode, click Multi-Mode Options. 10/2010 77 WebAssign Creating Questions Guide 4. In the Multi-Mode Options window, click the question modes that you want to use in your question in the order in which they will be used, or type the mode abbreviations in the Current Modes box at the bottom. Each mode that you add is shown in the Current Modes list on the right. You can click the list. to delete a mode from the list, or drag a mode to rearrange Important: When your question has consecutive multiple-choice, multiple-select, or matching question parts, you must specify the mode for each question part, for example, MM to create a question with two matching parts. For other question modes, you can choose to specify the mode either for each question part or only when the question mode changes. For example, to create a question with three numerical question parts followed by a multiple-choice part, you could select either NNNC or simply NC. Tip: The Poll mode lets you create polling questions with other modes. See Creating Polling Questions on page 81. When the list of modes is correct, click Save. 5. In Question, type your question. • After the first question mode, type the <SECTION> tag at the start of each additional question mode. If you specified consecutive instances of the same mode — for example, MM for two matching parts — type a <SECTION> tag at the beginning of each subsequent question part. Note: By default, the <SECTION> tag adds a line break. If you do not want a line break added, type <SECTION NOBR>. 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 78 • Use an answer placeholder string <_> to specify where the answer box should be displayed for each question part. Tip: Optionally, add the <MARK> tag to specify where the correct/incorrect mark should be displayed for each question part. This might be necessary when displaying answer choices horizontally or in tables for multiple-choice or multiple-select questions. Note: Omit the answer placeholder string <_> for matching question parts. 6. In Answer, provide an answer key for each question part as described in the documentation for that question type. After the first question mode, type the <SECTION> tag at the start of each additional question mode. If you specified consecutive instances of the same mode — for example, MM for two matching parts — type a <SECTION> tag at the beginning of each subsequent question part. Each <SECTION> tag in Question must have a corresponding <SECTION> tag in Answer. 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. Important: Each line in Answer is significant. • Do not specify <SECTION>, <MCPART>, or <MSPART> on a separate line. • Do not add blank lines in Answer, for example, by pressing ENTER after the last answer key. 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10/2010 79 WebAssign Creating Questions Guide 11. 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 Multi-Mode Question (Fill-in-the-Blank and MultipleChoice) The following table summarizes an actual question. QID 1589516 Name Template2 3.MULTM.01. Mode Multi‐Mode...BC Question Cephalopoda, Gastropoda, and Bivalvia are all classes of phylum <_>. <SECTION>These animals are <_>. Answer Mollusca <SECTION><EQN $PULLDOWN=1; ''>invertebrates vertebrates Display Example Multi-Mode Question (Algebraic, Numerical, and Multiple-Choice) The following table summarizes an actual question. 10/2010 QID 1589510 Name Template2 3.MULTM.02. Mode Multi‐Mode...QNC Question What is the formula for the volume of a sphere (use <i>r</i> for the radius)? <br> <i>V</i> = <_> <SECTION>What is the volume of a sphere with a radius of 5? <br> <_> <SECTION>If the radius doubles, what happens to the volume? <br> <_> Answer <EQN $PAD='devmath'; ''>r: 4/3 * pi * r^3 <SECTION>523.599 <SECTION>The volume increases by a factor of 2<sup>3</sup> The volume remains the same The volume doubles The volume quadruples It depends on the sphere Creating Multi-Part, Tutorial, and Answer-Dependent Questions 80 Display Example Multi-Part Matching Question The following table summarizes an actual question. QID 1589512 Name Template2 3.MULTM.03. Mode Multi‐Mode...MM Question Order the <b>terrestrial</b> planets by their characteristics.<br><br> <b>Average orbital distance from the Sun <MARK></b> <SECTION><b>Mass <MARK></b> Answer <EQN $ORDERLEFT=1; ''><i>nearest the sun</i> {tab} Mercury {tab} Venus {tab} Earth <i>furthest from the sun</i> {tab} Mars Jupiter Saturn Uranus Neptune <SECTION><EQN $ORDERLEFT=1; ''><i>least massive</i> {tab} Mercury {tab} Mars {tab} Venus <i>most massive</i> {tab} Earth Uranus Neptune Saturn Jupiter 10/2010 81 WebAssign Creating Questions Guide Display Creating Polling Questions You can configure one or more question parts as polling questions in order to grant students credit for any response. You can use polling questions to gather opinions from your students (as in a poll) or to record observational information, for example, the results of an experiment, when any response should be considered correct. Note: To gather numerical data from experiments, see Creating Answer-Dependent Questions on page 97. Your students’ responses, marks, and scores are shown normally for polling questions, as per your assignment settings. The only difference is that polling questions are marked correct for any response. Your students receive no credit if they do not respond to the question. To configure a question mode as a polling question: 1. Open your question in the Question Editor. 2. Beside Mode, click Multi-Mode Options. 3. In the Multi-Mode Options window, add the Poll mode before the mode that you want to use as a polling question. 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 82 You can use either the mode buttons or the mode abbreviation: • Click Poll in the list of Available Modes, and then drag it above the mode you want to use in the Current Modes list on the right. • Type P before the mode you want to use in the Current Modes box at the bottom. Notes: • The entire question mode is configured as a polling question. To add subsequent question parts that are not polling questions, add a new mode after the configured mode. Remember to add <SECTION> tags in Question and Answer. • When you configure multiple-choice or multiple-select modes as polling questions, the order of the choices is not randomized. When the list of modes is correct, click Save. 4. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 5. When your question displays and functions correctly, click Save. Example Polling Question The following table summarizes an actual question. QID 1589513 Name Template2 3.MULTM.04. Mode Multi‐Mode...PCE Question Was your experiment successful? <_> <SECTION>Explain <_> Answer Yes No <SECTION>Student explanation Display 10/2010 83 WebAssign Creating Questions Guide Adding Expandable Sections to Multi-Part Questions Because multi-part and multi-mode questions can be long, you can use the <accordion> and <part> tags to subdivide your question into sections that your students can individually expand or collapse. This lets your students work through the question in whatever order they choose. Each expandable section can include one or more question parts or instructional content. Note: To make your students work through a question in order from beginning to end, use the <tutorial> tag to create a tutorial question. Important: Do not use the <accordion> and <tutorial> tags in the same question. The one exception to this rule is that in a question that uses the <accordion> tag, you can create a popup tutorial. To add expandable sections to a multi-part or multi-mode question: 1. Open your question in the Question Editor. 2. In Question, add <accordion> and <part> tags as needed. Enclose a set of expandable sections with the <accordion> tag. You must use the closing </accordion> tag at the end of the expandable sections. Enclose each expandable section with the <part> tag. You must use the closing </part> tag at the end of each section. Note: The <part> and <SECTION> tags are not interchangeable. You must specify the <SECTION> tag wherever the question mode changes. For example: <accordion> <part>My first part: <_></part> <part><SECTION>My second part: <_></part> </accordion> 3. Optionally, add <part_label> or <part_title> tags for each section. By default, the title bar for the first expandable section displays the part label Part 1, and subsequent parts are numbered consecutively. You can use the <part_label> tag to change the part label for any part, or the <part_title> tag to add text that follows the part label. For example, the following code displays A - Introductory Material in the section title bar: <part><part_label>A</part_label> <part_title>Introductory Material</part_title> 4. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 5. When your question displays and functions correctly, click Save. 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 84 Example Accordion Question The following table summarizes an actual question. QID 1589521 Name Template2 3.ACC.01. Mode Multi‐Mode...CCCCE Question <b>Battle of Guilford Courthouse</b> <accordion><part><part_label>Part I</part_label><part_title>Multiple‐ Choice</part_title> When did this battle take place? <_><br> <SECTION>Where did this battle take place? <_><br> <SECTION>Who were the commanders? Americans:<_> <SECTION NOBR>British:<_><br> </part> <part><part_label>Part II</part_label><part_title>Short‐Answer</part_title> <SECTION>What was the outcome of this battle, and why was it a turning point in the Revolutionary War? <_><br> </part></accordion> Answer <EQN $PULLDOWN=1; ''>March 15, 1781 July 4, 1776 April 19, 1775 October 9, 1781 June 16, 1775 <SECTION><EQN $PULLDOWN=1; ''>Greensboro, NC Yorktown, VA Charlestown, MA Manhattan, NY Cowpens, SC <SECTION><EQN $PULLDOWN=1; ''>Nathanael Greene George Washington Dr. Joseph Warren Israel Putnam William Prescott <SECTION><EQN $PULLDOWN=1; ''>Lord Cornwallis Sir William Howe Sir Henry Clinton Banastre Tarleton General John Burgoyne <SECTION>Although Cornwallis technically won the battle, his forces were severely weakened, leading to his eventual surrender to Washington at Yorktown. Display 10/2010 85 WebAssign Creating Questions Guide Creating Tutorial Questions You can transform part or all of a multi-part or multi-mode question into a tutorial that guides your students step by step through the solution of a problem. Tutorial questions have a distinctive user flow: • Students must either correctly answer, skip, or use all of their submissions for each step before viewing the next step. • Students cannot go back to complete steps they have skipped. • The answer key is always displayed for steps after all submissions have been used or the step is answered correctly or skipped. • Students can click tutorial hint icons to display hints. Notes: • You cannot turn off display of answer keys or tutorial hints within a tutorial question. • To let your students work through a question in any order, see Adding Expandable Sections to Multi-Part Questions on page 83. As the name suggests, you use tutorial questions principally to help your students learn, not to evaluate their progress. Frequently, tutorials are used to help students understand how to solve a problem posed in the question. Because of this, sometimes you might not want your tutorial questions to count toward your students’ assignment scores. You can create both scored tutorials and unscored popup tutorials. • Scored tutorial questions are shown in the assignment itself and count toward the assignment score. In the Assignment Editor, you can set the point value for the entire tutorial or for each question part. • Popup tutorial questions are shown as buttons in the assignment, and do not count toward the assignment score. When your students click the button, the tutorial opens in a new window. Your tutorial might be the entire question or only part of the question. You can create more than one tutorial in a single question, and you can mix scored and popup tutorials in the same question. Important: For scored tutorial questions to work correctly, you must allow question part submission in your assignment. This section contains the following topics: • Creating Scored Tutorial Questions • Creating Popup Tutorial Questions 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 86 Creating Scored Tutorial Questions You can transform part or all of a multi-part or multi-mode question into a scored tutorial that guides your students step by step through the solution of a problem. Scored tutorial questions are shown in the assignment itself and count toward the assignment score. In the Assignment Editor, you can set the point value for the entire tutorial or for each question part. Notes: • To create a tutorial that is not scored and is displayed in a separate window, see Creating Popup Tutorial Questions on page 90. • To let your students work through a question in any order, see Adding Expandable Sections to Multi-Part Questions on page 83. Important: • Do not use the <accordion> and <tutorial> tags in the same question. The one exception to this rule is that in a question that uses the <accordion> tag, you can create a popup tutorial. • For scored tutorial questions to work correctly, you must allow question part submission in your assignment. Your tutorial might be the entire question or only part of the question. You can create more than one tutorial in a single question, and you can mix scored and popup tutorials in the same question. Skipping and Points For scored tutorials, the decision about whether to allow students to skip tutorial steps affects not only your students’ learning experience, but also the points that they can earn for the tutorial. By default, your students are allowed to skip tutorial steps, but they cannot go back later to complete the skipped steps. This means that students who skip a step permanently forgo any points they could have earned on the step, but they have an opportunity to earn points on any remaining steps in the tutorial. If you disallow skipping, your students must either answer each step correctly or use all of their submissions for the step before going on to the next step. Each method has its merits. Skipping steps gives your students an opportunity to move through the tutorial more quickly if they do not understand a step. Disallowing skipping encourages your students to attempt each step, even if only by guessing. Tip: If you disallow skipping, the number of allowed submissions for the tutorial question is very important. Too many submissions might cause students to give up on a step that they do not understand; too few submissions might not give students enough opportunity to figure out a step for themselves before showing the correct answer. To create a scored tutorial from a multi-part or multi-mode question: 1. Open your question in the Question Editor. 10/2010 87 WebAssign Creating Questions Guide 2. In Question, add the <tutorial> tag at the beginning of your tutorial. You can set several attributes to change the way your tutorial behaves. Attribute Description order="ascending" Shows steps in ascending order with the current step at the bottom. (By default, steps are displayed in ascending order with the current step at the top.) order="descending" Shows steps in descending order with the current step at the top. (By default, steps are displayed in ascending order with the current step at the top.) skip="no" Requires students to answer each step correctly or use all their submissions before going on to the next step. (By default, students can skip tutorial steps.) skip_text="text" Renames the Skip button to text (if you allow students to skip tutorial steps.) For example: <tutorial order="ascending" skip_text="Show the answer (no points earned) and move to the next step"> 3. After the <tutorial> tag, use the <premise> tag to set a title for the tutorial and display the overall problem or concept the tutorial addresses. You must use the closing </premise> tag at the end of the premise. Notes: • You must specify a title attribute for the <premise> tag. • Do not include any answer boxes in the premise. • The premise is always displayed at the top of the tutorial. • The premise is optional, but strongly recommended. For example: <premise title="Multiplying Fractions"> When you multiply fractions, you multiply the numerators and you multiply the denominators.<br><br> <watex>\[ \frac{3}{4} * \frac{13}{16} = \]</watex> </premise> 4. Enclose each tutorial step with the <step> tag. You must use the closing </step> tag at the end of each step. You can set several attributes to change the way each step is displayed. 10/2010 Attribute Description button="text" Requires students to click a button with the specified text in order to see the step. (By default, each step is displayed as soon as the student either correctly answers or skips the previous step.) label="text" Replaces the default label Step n of m with the specified text. Creating Multi-Part, Tutorial, and Answer-Dependent Questions 88 Attribute Description title="text" Displays the specified text after the step label. skip_text="text" Renames the Skip button to text (if you allow students to skip tutorial steps.) Note: The <step> and <SECTION> tags are not interchangeable. You must specify the <SECTION> tag wherever the question mode changes. For example: <step button="Start" label="Part I" title="Multiply the Numerators"> 3 ∙ 13 = <_> </step> 5. Optionally, add tutorial hints in any step with the <hint> tag. You must end each hint with the closing </hint> tag. Tutorial hints are shown as a lightbulb icon and display either Hint or a label that you specify with the label attribute. When your student clicks the icon, the contents of the <hint> tag are displayed in place of the label. Notes: • The <hint> tag can be used only in <step>. • Each step can contain only one <hint> tag. • The <hint> and <HINT> tags are not interchangeable. For example: <hint label="Show hint">Use the Pythagorean Theorem.</hint> 6. Optionally, use the <conclusion> tag to display information after your students complete or skip the last step. You must end the conclusion with the closing </conclusion> tag. Note: You must specify a title attribute for the <conclusion> tag. For example: <conclusion title="Conclusion">You have finished the tutorial.</conclusion> 7. End the tutorial with the closing </tutorial> tag. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. When your question displays and functions correctly, click Save. Example Tutorial Question The following table summarizes an actual question. QID 1589515 10/2010 89 WebAssign Creating Questions Guide Name Template2 3.TUT.01. Mode Multi‐Mode...QN Question <tutorial skip="no" order="ascending"> <premise title="Using the Substitution Method"> <watex>For simple systems of equations, you can often use the substitution method to solve for \[x\] and \[y\].\vspace{1em}\[ x + y = 6 \\ x ‐ y = 2 \]</watex></premise> <step><watex>Solve for \[x\] in terms of \[y\].\vspace{1em} \[ x + y = 6 \\ x = <_> \]</watex></step> <step><watex>Rewrite the second equation, substituting \[ 6‐y \] for \[ x \]. \vspace{1em}\[ x ‐ y = 2 \\ <_> = 2 \]</watex></step> <SECTION><step><watex>Solve for \[y\].\vspace{1em}\[ 6 ‐ y ‐ y = 2 \\ y = <_> \]</watex></step> <step><watex>Substitute 2 for \[y\] in either equation and solve for \[x\].\vspace{1em} \[ x + 2 = 6 \\x ‐ 2 = 2 \\ x = <_> \]</watex></step> </tutorial> Answer Display to Students 10/2010 <EQN $PAD='devmath'; ''>y:6‐y <EQN $PAD='devmath'; ''>y:(6‐y)‐y <SECTION><EQN $size=2; ''>2 <EQN $size=2; ''>4 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 90 Creating Popup Tutorial Questions You can transform part or all of a multi-part or multi-mode question into an unscored popup tutorial that guides your students step by step through the solution of a problem. Popup tutorial questions are shown as buttons in the assignment, and do not count toward the assignment score. When your students click the button, the tutorial opens in a new window. Notes: • To create a tutorial that is scored, see Creating Scored Tutorial Questions on page 86. • To let your students work through a question in any order, see Adding Expandable Sections to Multi-Part Questions on page 83. Important: Do not use the <accordion> and <tutorial> tags in the same question. The one exception to this rule is that in a question that uses the <accordion> tag, you can create a popup tutorial. Your popup tutorial will usually be only part of the question. You can create more than one tutorial in a single question, and you can mix scored and popup tutorials in the same question. Each popup tutorial is shown in the assignment as a button at the location of the <tutorial> tag. When your students click the button, the popup tutorial opens in a new window. If your popup tutorial includes randomized values, your students can click Try Another Version at the bottom of the tutorial to see different values. You cannot turn off the Try Another Version link. Tip: To reuse a popup tutorial in multiple questions, consider creating it as a scored tutorial and using the <PRACTICE> tag in each of your questions to display the tutorial as a practice question for no credit. This method also allows you to rename the button to something other than Tutorial. To create a popup tutorial from a multi-part or multi-mode question: 1. Open your question in the Question Editor. 2. In Question, add the <tutorial type="popup"> tag at the beginning of your tutorial. 10/2010 91 WebAssign Creating Questions Guide You can set several attributes to change the way your tutorial behaves. Attribute Description button="text" Sets the window and page title that are displayed in the popup tutorial. (By default, the window and page title are set to Tutorial.) order="ascending" Shows steps in ascending order with the current step at the bottom. (By default, steps are displayed in ascending order with the current step at the top.) order="descending" Shows steps in descending order with the current step at the top. (By default, steps are displayed in ascending order with the current step at the top.) skip="no" Requires students to answer each step correctly or use all their submissions before going on to the next step. (By default, students can skip tutorial steps.) skip_text="text" Renames the Skip button to text (if you allow students to skip tutorial steps.) For example: <tutorial type="popup" button="Multiplying Fractions Tutorial" order="ascending" skip_text="Show the answer (no points earned) and move to the next step"> 3. After the <tutorial> tag, use the <premise> tag to set a title for the tutorial and display the overall problem or concept the tutorial addresses. You must use the closing </premise> tag at the end of the premise. Notes: • You must specify a title attribute for the <premise> tag. • The contents of the <premise> tag are always displayed at the top of the tutorial. • The <premise> tag is optional, but strongly recommended. For example: <premise title="Multiplying Fractions"> When you multiply fractions, you multiply the numerators and you multiply the denominators.<br><br> <watex>\[ \frac{3}{4} * \frac{13}{16} = \]</watex> </premise> 4. Enclose each tutorial step with the <step> tag. You must use the closing </step> tag at the end of each step. 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 92 You can set several attributes to change the way each step is displayed. Attribute Description button="text" Requires students to click a button with the specified text in order to see the step. (By default, each step is displayed as soon as the student either correctly answers or skips the previous step.) label="text" Replaces the default label Step n of m with the specified text. title="text" Displays the specified text after the step label. skip_text="text" Renames the Skip button to text (if you allow students to skip tutorial steps.) Note: The <step> and <SECTION> tags are not interchangeable. You must specify the <SECTION> tag wherever the question mode changes. For example: <step button="Start" label="Part I" title="Multiply the Numerators"> 3 ∙ 13 = <_> </step> 5. Optionally, add tutorial hints in any step with the <hint> tag. You must end each hint with the closing </hint> tag. Tutorial hints are shown as a lightbulb icon and display either Hint or a label that you specify with the label attribute. When your student clicks the icon, the contents of the <hint> tag are displayed in place of the label. Notes: • The <hint> tag can be used only in <step>. • Each step can contain only one <hint> tag. • The <hint> and <HINT> tags are not interchangeable. For example: <hint label="Show hint">Use the Pythagorean Theorem.</hint> 6. Optionally, use the <conclusion> tag to display information after your students complete or skip the last step. You must end the conclusion with the closing </conclusion> tag. Note: You must specify a title attribute for the <conclusion> tag. For example: <conclusion title="Conclusion">You have finished the tutorial.</conclusion> 7. End the tutorial with the closing </tutorial> tag. 10/2010 93 WebAssign Creating Questions Guide 8. Click Save. Note: You cannot preview your tutorial changes until you save your question. 9. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 10. When your question displays and functions correctly, click Save. Example Question with Popup Tutorial The following table summarizes an actual question. QID 1251029 Name Template2 3.TUT.02. Mode Multi‐Mode...CCNC Question Two cars display fuel economy in different ways. Determine which car uses less fuel to travel the same distance. (Use the following conversion factors: 1 mile = 1.609 km; 1 gallon = 3.785 L.)<br><br> <_><br> <tutorial type="popup" button="Converting Fuel Economy" order="ascending"> <premise title="Converting Fuel Economy"> Two cars display fuel economy in different ways. Which car uses less fuel to travel the same distance? <ul><li>a car rated at 13 L/100 km</li> <li>a car rated at 22 miles/gallon</li></ul></premise> <SECTION><step title="Determine the units to use">Which units best answer the question "how much fuel is required to travel the same distance?"<br> <_> <_> <MARK></step> <SECTION NOBR><step title="Switch gallons and miles"> 22 miles/gallon = <_> gallons/mile <MARK></step> <step title="Change gallons to liters"> 0.0455 gallons/mile = <_> L/mile <MARK> (1 gallon = 3.785 L)</step> <step title="Change miles to 100 km"> 0.1720 L/mile = <_> L/100 km <MARK> (1 mile = 1.609 km) Note that 100 km is used as a unit.</step> <SECTION><step title="Compare values">Which car uses less fuel to travel the same distance? <_></step> </tutorial> Answer 10/2010 A car rated at 5.8 L/100 km A car rated at 34 miles/gallon <SECTION><EQN $SET_EACH_POSITION=1; ''>L/100 km miles/gallon <SECTION>0.04545 0.1720 27.68 <SECTION>a car rated at 13 L/100 km a car rated at 22 miles/gallon (27.68 L/100 km) Creating Multi-Part, Tutorial, and Answer-Dependent Questions 94 Display to Students Example Question with Reusable Popup Tutorial Using <PRACTICE> Reusable popup tutorials comprise two questions: the actual tutorial question, and any question that displays the tutorial link. 10/2010 95 WebAssign Creating Questions Guide The following table summarizes an actual question that uses the <PRACTICE> tag to show a tutorial question. QID 1589511 Name Template2 3.TUT.03. Mode Multiple‐Choice Question Two cars display fuel economy in different ways. Determine which car uses less fuel to travel the same distance. (Use the following conversion factors: 1 mile = 1.609 km; 1 gallon = 3.785 L.)<br><br> <_><br> <span class="tutorialButton iButton"><PRACTICE qid="1589517" link="Tutorial: Converting Fuel Economy" title="Converting Fuel Economy" style="none"></span> Answer A car rated at 5.8 L/100 km A car rated at 34 miles/gallon Display to Students The following table summarizes an actual tutorial question that can be shown using the <PRACTICE> tag. QID 1589517 Name Template2 3.TUT.04. Mode Multi‐Mode...CNC 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 96 Question <tutorial order="ascending"> <premise title="Converting Fuel Economy"> Two cars display fuel economy in different ways. Which car uses less fuel to travel the same distance? <ul><li>a car rated at 13 L/100 km</li> <li>a car rated at 22 miles/gallon</li></ul></premise> <step title="Determine the units to use">Which units best answer the question "how much fuel is required to travel the same distance?"<br> <_> <_> <MARK></step> <SECTION NOBR><step title="Switch gallons and miles"> 22 miles/gallon = <_> gallons/mile <MARK></step> <step title="Change gallons to liters"> 0.0455 gallons/mile = <_> L/mile <MARK> (1 gallon = 3.785 L)</step> <step title="Change miles to 100 km"> 0.1720 L/mile = <_> L/100 km <MARK> (1 mile = 1.609 km) Note that 100 km is used as a unit.</step> <SECTION><step title="Compare values">Which car uses less fuel to travel the same distance? <_></step> </tutorial> Answer <EQN $SET_EACH_POSITION=1; ''>L/100 km miles/gallon <SECTION>0.04545 0.1720 27.68 <SECTION>a car rated at 13 L/100 km a car rated at 22 miles/gallon (27.68 L/100 km) 10/2010 97 WebAssign Creating Questions Guide Display to Students Creating Answer-Dependent Questions You can create multi-part numerical questions that require your students to enter their observed or estimated data and to perform calculations based on their data. These questions are often used for lab classes to record the results of an experiment and perform analysis of the data. 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 98 A well-designed answer-dependent question implements the following behaviors: • Allows students to enter observed or estimated numerical data. Any response that falls within a defined range of values is scored correct. • Optionally, provides feedback to students for observed or estimated numerical data based on whether the value is lower than, higher than, or within the range of acceptable values. • Requires students to perform calculations based on the provided data points. • Enforces sequential entry of data and calculations so students cannot enter the results of calculations before entering the required data. The answer boxes for calculations are not enabled until your students enter the data required for the calculation. • Indicates to students when a calculation was performed correctly based on underlying data that are not within the range of acceptable values. Each calculation is scored correct only if the calculation was performed correctly and the underlying data are within the range of acceptable values. Like all numerical questions, answer-dependent questions can require students to specify units or to use a specified number of significant digits or decimal places in their responses. To create an answer-dependent question: 1. Create a multi-part or multi-mode question with numerical question parts for students to enter observed or estimated data and calculations based on that data. 2. Add the following code at the beginning of Question: <eqn include('/userimages/feedback/physlabs1.pl')> This code is required in order to use the userinput() function described in this topic. 3. Optionally, to provide feedback to students for observed or estimated numerical data based on whether the response is lower than, higher than, 10/2010 99 WebAssign Creating Questions Guide or within the range of acceptable values, add the following code in Question to specify the information that you want to provide: <eqn> %feedback = ( low => 'feedback_text', high => 'feedback_text', acceptable => 'feedback_text' ); '' </eqn> where feedback is the name of a hash variable that contains any feedback_text that you specify for responses that are lower than, higher than, or within the range of acceptable values. Tip: A hash is a special kind of array consisting of name/value pairs. In Perl, hash names are prefixed with %. You do not have to specify feedback for all three conditions. You might choose, for example, only to specify text for low and high conditions. To provide different kinds of feedback for different question parts, you can define multiple hashes. Each hash must have a unique name. Note: For your feedback to be displayed, you must reference the hash for an answer key as described in the following step. Your assignment settings must also allow hints to be shown. 4. To allow students to enter observed or estimated numerical data for a question part, specify the answer key as a range of values with the userinput() function. You can set a default value that is shown if no response is provided, units, and feedback for responses that are lower than, higher than, or within the range of acceptable values. Use the following code: <EQN $response=userinput(low,high,default,'unit',\%feedback)> unit where: • response is the name of a variable that stores your student’s response for later calculations. • low and high define the lower and upper limits of the range of acceptable values. • default is a value in between low and high that is displayed as the default answer key if no response was provided. • unit is an optional unit specification for question parts that require students to enter units. You must specify the units in two places — in the userinput() function to indicate units for the low, high, and default values, and at the end of the answer key to make the question part check units in your students’ responses. • feedback is the optional name of a hash variable that defines values for feedback to be shown if the student’s response is lower than, higher than, or within the range of acceptable values. Always prefix feedback 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 100 with \% — userinput() requires you to reference the hash name with this syntax rather than passing the hash directly. Tip: You can omit both low and high (but not one or the other), if needed. If you do this, your student’s response must match default to be scored as correct; however, you can provide feedback based on whether the response is higher or lower than default. For example, the following code in Answer accepts student measurements for the mass and displacement of two objects and provides different feedback for measurements of mass and volume: <EQN $mass1=userinput(0,10000,5000,'g',\%mass_feedback)> g <EQN $volume1=userinput(0,5000,2500,'ml',\%vol_feedback)> ml <EQN $mass2=userinput(0,10000,5000,'g',\%mass_feedback)> g <EQN $volume2=userinput(0,5000,2500,'ml',\%vol_feedback)> ml 5. To require students to perform calculations based on the provided data points, specify the answer key as a calculation in terms of the variables used to store your student’s observed or estimated numerical data for other question parts. For example, the following code in Answer accepts two values between 20 and 100, and then requires your students to multiply them: <EQN $A=userinput(20,100,50)> <EQN $B=userinput(20,100,50)> <EQN $SIMPLIFIED=1; $A * $B> To require your students to perform the computations instead of stating their response as a mathematical expression, set the $SIMPLIFIED, $FRACTION, or $PROPERFRACTION variables to 1 as you would for any other numerical question. 6. To enforce sequential entry of data and calculations, and to indicate to students when a calculation was performed correctly based on underlying data that are not within the range of acceptable values, define the relationship between the prerequisite data and calculation answer keys using the $LABEL and $LINK variables. In each line in Answer that defines an answer key for student data, set $LABEL to a unique identifier for the answer box. Important: The value that you set for $LABEL: • must be unique for each answer box • must not be the same as any variable name in the question One way to ensure this is to use a unique prefix, such as box_, for all $LABEL values. For example: <EQN $LABEL='box_A'; $A=userinput(20,100,50)> <EQN $LABEL='box_B'; $B=userinput(20,100,50)> 10/2010 101 WebAssign Creating Questions Guide In each line in Answer that defines an answer key for a calculation based on student data, set $LABEL to a unique identifier for the answer box. Then, set $LINK to identify the prerequisite answer boxes (using their $LABEL identifiers) followed by a colon and the calculation to be performed. For example: <EQN $LABEL='box_C'; $LINK='box_A, box_B: box_A * box_B'; $SIMPLIFIED=1; $A * $B> Specifying $LINK in this way enables two behaviors: • The current answer box is not enabled until your student enters values in the answer boxes labeled box_A and box_B. • If the values in either box_A or box_B are not within the range of acceptable values, but the student correctly calculates the value of box_A * box_B, the current answer box displays an icon indicating that the calculation was correct even though the data were not. Tip: If you do not want to indicate that the calculation is correct before your students provide correct data, set the formula in $LINK to no_icon. For example: <EQN $LABEL='box_C'; $LINK='box_A, box_B: no_icon'; $SIMPLIFIED=1; $A * $B> You can use any text value that is not a valid response to a numerical question, but no_icon is easy to remember. The values of $LABEL and $LINK are never displayed to your students. 7. When testing your question, be sure to test each of the following conditions: • Data that are lower or higher than the range of acceptable values • Calculations that are made correctly based on out-of-range data • Data that are within the range of acceptable values • Incorrect calculations • Correct calculations that are made based on data that are within the range of acceptable values • Data and calculations that correctly and incorrectly specify units 8. When your question displays and functions correctly, click Save. Example Answer-Dependent Question Without Feedback The following table summarizes an actual question. 10/2010 QID 1589519 Name Template2 3.ANDS.01. Mode Numerical Question <eqn include('/userimages/feedback/physlabs1.pl')> Multiply two numbers between 20 and 100. <br><br> <_> × <_> = <_> Creating Multi-Part, Tutorial, and Answer-Dependent Questions 102 Answer <EQN $A=userinput(20,100,50)> <EQN $B=userinput(20,100,50)> <EQN $A * $B> Display to Students Example Answer-Dependent Question With Feedback and Units The following table summarizes an actual question. QID 1589509 Name Template2 3.ANDS.02. Mode Numerical Question <eqn include('/userimages/feedback/physlabs1.pl')> <eqn> %feedback = (low => 'Check your measurements.', high => 'Check your measurements.'); '' </eqn> For both of the samples at your lab station, measure the volume and mass.<br> Then, calculate the density. Specify units for all values.<br><br> <table frame="void" rules="all"> <thead> <tr><th>Sample</th><th>Mass</th><th>Volume</th><th>Density</th></tr> </thead> <tbody> <tr><th>A</th><td><_></td><td><_></td><td><_></td></tr> <tr><th>B</th><td><_></td><td><_></td><td><_></td></tr> </tbody> </table> Answer <EQN $LABEL='box_massA'; $massA=userinput(0,20,10,'kg',\%feedback)> kg <EQN $LABEL='box_volA'; $volA=userinput(0,200,10,'cm^3',\%feedback)> cm^3 <EQN $LABEL='box_densityA'; $LINK='box_massA,box_volA: box_massA/box_volA'; $massA/$volA> kg/cm^3 <EQN $LABEL='box_massB'; $massB=userinput(0,20,10,'kg',\%feedback)> kg <EQN $LABEL='box_volB'; $volB=userinput(0,200,10,'cm^3',\%feedback)> cm^3 <EQN $LABEL='box_densityB'; $LINK='box_massB,box_volB: box_massB/box_volB'; $massB/$volB> kg/cm^3 Display to Students See Also: • Creating Numerical Questions on page 52 10/2010 103 WebAssign Creating Questions Guide Performing Complex Operations in Answer Keys When you create multi-part or multi-mode questions, especially answerdependent questions, you sometimes need to determine answer keys for later parts of the question based on your student’s responses to earlier parts of the question. But, your answer key must be specified on a single line in Answer. To perform complex or repetitive parsing or computations for answer keys, you can use the postcalc() function. The postcalc() function lets you define a variable in Question that holds the code that you want to evaluate in Answer. You can pass values to your code, and postcalc() returns the result of the last statement in your code. This helps you accomplish two things: • You can define a complex, multi-line algorithm that is evaluated to define an answer key based on your student’s responses to other parts of the question. • You can reuse a formula with different values for multiple lines in your answer key. To use the postcalc() function in an answer key: 1. Open your question in the Question Editor. 2. Add the following code at the beginning of Question: <eqn include('/userimages/feedback/physlabs1.pl')> This code is required in order to use the postcalc() function. 3. In Question, define a variable that contains the code that you want to be evaluated in your answer key. For example: <eqn> $mycalc='decform($a**2 + $b**2,3)'; '' </eqn> Your code can include multiple statements, and you can format it using multiple lines. Values that are passed to your code from the postcalc() function are assigned to the special variables $_[0], $_[1], and so on. Important: • Be sure to escape single or double quotation marks in your code that would end the variable definition. You can do this by preceding the quotation mark with a backslash as in the following example: $mycalc='$a=\'test\'; $b=3*$firstresult'; • Do not use the postcalc() function in your code. 4. In Answer, add the postcalc() function where your code should be evaluated. For example: <EQN postcalc($mycalc)> 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 104 To pass values to your code, list them after the variable that contains your code. For example: <EQN postcalc($mycalc,6)> The postcalc() function returns the result of the last statement in your code, so you can use it for variable assignment. For example: <EQN $mychoices[2] = postcalc($mycalc,6)> 5. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 6. When your question displays and functions correctly, click Save. Example Question Using postcalc() to Calculate the Answer Key The following table summarizes an actual question. QID 1589522 Name Template2 3.POSTC.01 Mode Numerical Question <eqn include('/userimages/feedback/physlabs1.pl')> <eqn> %total_feedback = (low => "Count more cells for an accurate sample."); %ID_feedback = (low => "Check your identification.", high => "Check your identification." ); $calc_range = '$LINK=\'box_total: no_icon\'; decform(userinput(max(0,$total*($_[0]‐0.05)), $total*($_[0]+0.05), $total*$_[0], \%ID_feedback),0)'; '' </eqn> View the slide of an onion root tip and count the cells in each phase of cell division. <br><br> <table frame="void" rules="none" border="0"> <tr><th>TOTAL</th><td><_></td></tr> <tr><th>Interphase</th><td><_></td></tr> <tr><th>Prophase</th><td><_></td></tr> <tr><th>Metaphase</th><td><_></td></tr> <tr><th>Anaphase</th><td><_></td></tr> <tr><th>Telophase</th><td><_></td></tr> </table> Answer <EQN $LABEL='box_total'; $total=decform(userinput(60,1000,100,\%total_feedback),0)> {tab} 0 <EQN $LABEL='box_inter'; $inter=postcalc($calc_range,0.56)> {tab} 0 <EQN $LABEL='box_proph'; $proph=postcalc($calc_range,0.28)> {tab} 0 <EQN $LABEL='box_metap'; $metap=postcalc($calc_range,0.08)> {tab} 0 <EQN $LABEL='box_anaph'; $anaph=postcalc($calc_range,0.06)> {tab} 0 <EQN $LABEL='box_telop'; $telop=postcalc($calc_range,0.03)> {tab} 0 Display to Students 10/2010 105 WebAssign Creating Questions Guide Example Question Using postcalc() to Parse Responses The following table summarizes a question that uses postcalc() to determine characteristics of the student’s triangle based on the lengths of its sides. QID 1589514 Name Template2 3.POSTC.02 Mode Multi‐Mode...NS Question <eqn include('/userimages/feedback/physlabs1.pl')> <eqn> @clues=(' ', 'Are all three sides equal?', 'Are two sides equal?', 'Are any sides equal?', 'Is there a right angle?', 'Is there an obtuse angle?', 'Are all the angles acute?' ); @reinforcement=(' ', 'A triangle with three equal sides is <i>equilateral</i>.', 'A triangle with two equal sides is <i>isosceles</i>.', 'A triangle with three different sides is <i>scalene</i>.', 'When one angle is 90°, it is a <i>right triangle</i>.', 'When one angle is greater than 90°, it is <i>obtuse</i>.', 'When all angles are less than 90°, it is <i>acute</i>.' ); $triangle=' @squares = sort {$a <=> $b} ($AB**2,$AC**2,$BC**2); if (@squares[0] == @squares[2]) {@choices=(1,2)} elsif (@squares[0] == @squares[1]) {@choices=(2)} elsif (@squares[1] == @squares[2]) {@choices=(2)} elsif ((@squares[0] != @squares[1]) && (@squares[0] != @squares[2]) && (@squares[1] != @squares[2])) {@choices=(3)} if (abs(@squares[2] ‐ @squares[1] ‐ @squares[0]) < @squares[2] * 0.05) {@choices=(@choices,4)} elsif (@squares[2] > @squares[0] + @squares[1]) {@choices=(@choices,5)} elsif (@squares[2] < @squares[0] + @squares[1]) {@choices=(@choices,6)} $HINT=join(\'<br>\',@clues[@choices]); $CORRECT_HINT=join(\'<br>\',@reinforcement[@choices]); $ORDERED=[@choices] '; '' </eqn> <tutorial order="ascending" skip="no"> <premise title="Types of Triangles"> On a sheet of paper, draw a triangle. Label the vertices A, B, and C. </premise> <step title="Measurement"> Measure each side of your triangle. <br> AB = <_> inches<br> AC = <_> inches<br> BC = <_> inches </step> <step title="Identification"> <SECTION>Which terms describe your triangle? (<p:selectall>)<br> <_> </step> </tutorial> 10/2010 Creating Multi-Part, Tutorial, and Answer-Dependent Questions 106 Answer <EQN $AB=userinput(1,100,5)> <EQN $AC=userinput(1,100,5)> <EQN $BC=userinput(1,100,5)> <SECTION><EQN postcalc($triangle); ''>equilateral isosceles scalene right obtuse acute Display to Students 10/2010 4 Creating Math Questions You can create questions for your math and science courses that allow your students to enter formatted mathematical notation or work with number lines or two-dimensional graphs. And, you can display correctly formatted mathematical notation in your questions using several different methods. Note: To create questions requiring your students to enter numerical answers, see Creating Numerical Questions on page 52. This section contains the following topics: • Displaying Notation with WaTeX • Displaying Notation with LaTeX • Displaying Notation with <symimage> • Displaying Math Notation with HTML Substitution • Creating mathPad Questions • Creating Number Line Questions • Creating Graphing Questions 10/2010 Creating Math Questions 108 Displaying Notation with WaTeX WebAssign provides a markup language — WaTeX — that you can use to display well-formatted math notation in your questions and assignments. WaTeX is similar in some respects to LaTeX in that both markup languages let you focus more on content and spend less time solving layout problems. But because WaTeX is rendered in HTML and LaTeX is rendered as a static image, WaTeX has some clear benefits for online coursework: • WaTeX display can be enlarged with the browser settings to accommodate students with visual impairments. • WaTeX markup allows you to put answer boxes in your markup, so you can, for example, prompt students to provide the numerator of a fraction, the argument of a trigonometric function, or the bounds of an integral. You can also use WaTeX to format matrix or long division problems. To use WaTeX markup in your questions or assignments, add the following code: <watex>markup</watex> where markup is any WaTeX markup described in the following table. Notes: • As in HTML, successive whitespace characters in WaTeX are ignored. To add multiple spaces, you can use <s:space>. • For multiple-choice, multiple-select, and matching questions, you can use WaTeX in Answer. If your markup is very long, you might want to assign it (using double quotes) to a variable in Question and then reference that variable in Answer. Using Math Mode When writing math questions, you will usually want to use WaTeX math mode, which is delimited by \[ and \]. Math mode provides the following behaviors that simplify entering math notation: • Alphabetic characters that are not part of a function name or Perl variable are presumed to be variables and are italicized. • Hyphens are replaced by minus signs. • Exponents can be typed using a caret (^). • Subscripts can be typed using an underscore (_). When using math mode: • Begin math mode by typing a backslash followed by a left bracket (\[). • End math mode by typing a backslash followed by a right bracket (\]). • To type non-italicized text such as words or units, or to add HTML or WebAssign tags, use \pre{} as described below. • You cannot use any of the WebAssign HTML substitution tags (see Displaying Math Notation with HTML Substitution on page 128). You can use WaTeX markup instead of each of these tags. 10/2010 109 WebAssign Creating Questions Guide Unless specified otherwise, all of the examples in the following table are displayed using math mode. WaTeX Notation Expression Code Example Display Perl variables $variable ${variable} <EQN $variable> $a ${a}x <EQN $a> 35 35x 35 2x\pre{ km} 2x km Use braces when the Perl variable is followed by other text. Use <EQN> to display the variable in black. Roman text, WebAssign tags, or HTML \pre{text} Not needed unless using math mode. Not needed for answer placeholder string <_>. Answer placeholder strings <_> Line breaks \\ \frac{6}{8} = \frac{<_>}{4} This cannot be done with <symimage> or LaTeX. 3x \\ 4y 3x 4y 3x \vspace{1em} 4y 3x Use \\ instead of <br \>. Consecutive line breaks are treated as a single line break. To add more vertical spacing, use \vspace. Line breaks with vertical spacing \vspace{nem} \vspace{npx} 4y Adds a line break with the specified amount of space between the lines. Do not add a space between the number and the unit. For on-screen display, ems and pixels are preferred units, but you can also use cm, in, mm, pc, or pt. Addition + x + 1 x+1 Subtraction ‐ x ‐ 1 x−1 Multiplication * \times (implicit) x * 2 x \times 2 2x x·2 x×2 2x Division \div x \div 2 x÷2 Fractions \frac{num}{den} \frac{x}{4} You can put a fraction in the numerator or denominator of another fraction. Binomial 10/2010 \left(\over{n}{k}\right) \left(\over{a}{b}\right) Creating Math Questions 110 Expression Code Example Combinations, permutations, and isotopes (over/under notation) \over{top}{bottom} \left(\over{52}{5}\right) = 2598960 This is sometimes used with <s:space> in the top or bottom to help vertical alignment. Display P\over{10}{3} = 720 \over{233}{91}\pre{Pa} Exponents (superscripts) ^ (caret) Bases (subscripts) _ (underscore) Parentheses x2 x^2 x^{12} x12 x_2 x_{(y + 3)} x2 x(y + 3) (arg) (x) (x) \left[size]( \right[size]) \left[1]( \frac{x}{3} \right[1]) If the superscript is more than 1 character, enclose it in braces {}. If the subscript is more than 1 character, enclose it in braces {}. Specify the optional size as an integer from 1 through 9. Brackets [arg] [x] \left[size][ \right[size]] \left[1][ \frac{x}{3} \right[1]] [x] Specify the optional size as an integer from 1 through 9. Braces {arg} {x} \left[size]\{ \right[size]\} \left[1]\{ \frac{x}{3} \right[1]\} {x} Specify the optional size as an integer from 1 through 9. Angle brackets Absolute values (vertical bars) \left[size]< \right[size]> \left<x\right> Specify the optional size as an integer from 0 through 9. \left[1]< \frac{x}{3} \right[1]> |arg| |x| \left[size]| \right[size]| \left[1]| \frac{x}{3} \right[1]| |x| Specify the optional size as an integer from 1 through 9. Magnitude (double vertical bars) \lleft[size]| \rright[size]| Greatest integer function (double brackets) \lleft[size][ \rright[size]] \lleft[0]|\overrightarrow{v }\rright[0]| Specify the optional size as an integer from 0 through 9. \lleft[x\rright] Specify the optional size as an integer from 1 through 9. 10/2010 111 WebAssign Creating Questions Guide Expression Code Example Square root \sqrt{arg} \sqrt{16} \sqrt{size}{arg} \sqrt{3}{\frac{1}{2}} Display Specify the optional size in positive integers; the height is approximately size lines. Nth root \sqrt[n]{arg} \sqrt[3]{27x} \sqrt{size}[n]{arg} \sqrt{3}[4]{\frac{x}{81}} Specify the optional size in positive integers; the height is approximately size lines. Factorial ! Trigonometry \sin \arcsin \isin \sinh \arcsinh \isinh \cos \arccos \icos \cosh \arccosh \icosh \tan \arctan \itan \tanh \arctanh \itanh \sec \arcsec \isec \sech \arcsech \isech \csc \arccsc \icsc \csch \arccsch \icsch \cot \arccot \icot \coth \arccoth \icoth 5! 5! \asin x arcsin x \cos <s:theta> cos θ \csch a csch a \tan(45<s:degree>) tan(45°) \icoth(x) coth-1(x) \arccos, \arcsin, and so on can be abbreviated like \acos or \asin, but the longer version of the function name is displayed. Exponential function e^n e^2 e2 Logarithms \ln(n) \log(n) \log_b(n) \ln(e^x) = x \log(1000) = 3 \log_2(128) = 7 ln(ex) = x log(1000) = 3 log2(128) = 7 Equality = a = 2<s:pi>r a = 2πr Inequality > < \geq \leq \neq <s:notgreater> <s:notless> x > 3 x < 3 x \geq 3 x \leq 3 x \neq 3 x <s:notgreater> 3 x <s:notless> 3 x x x x x x x Approximate \approx x \approx 3 x≈3 Plus or minus \pm x \pm 3 x±3 Minus or plus \mp x \mp 3 x Infinity \infty \infty ∞ Greek <s:letter_name> <s:pi> π Capital Greek <s:Letter_name> <s:Omega> Ω 10/2010 > < ≥ ≤ ≠ 3 3 3 3 3 3 3 3 Creating Math Questions 112 Expression Code Example Arrays \begin{array}{alignment} cell & cell \\ cell & cell \end{array} \begin{array}{rl} y = & <s:space>3x + 10 \\ 2y = & <s:space>4x ‐ 5 \end{array} Display For more information, see Creating WaTeX Arrays and Matrices on page 113. Matrices \begin{matrix}{alignment} cell & cell \\ cell & cell \end{matrix} A = \begin{matrix}{c}{2} x & y & z\\ a & b & c \end{matrix} For more information, see Creating WaTeX Arrays and Matrices on page 113. Determinants For more information, see Creating WaTeX Arrays and Matrices on page 113. \pre{det}(A) = |A| det(A) = |A| \left|\begin{array}{c} a & b \\ c & d \end{array}\right| = ad ‐ bc Ellipses \ddots \cdots \vdots \iddots \ldots \ddots \cdots \vdots \iddots \ldots Overline \overline{} 0.\overline{3} Indefinite summation \sum{arg} \sum{x_i} Definite summation \sum_{lower}^{upper}{arg} \sum_{i = 0}^{n}{x_i} Indefinite integrals \int{arg} \int{f(x)dx} Definite integrals \int_{lower}^{upper}{arg} \int_{0}^{1}{\sqrt{x}dx} Limits \lim_{lower}{arg} \lim_{n\rightarrow\infty}{x _n} \lim{}_{lower} \lim{}_{n\rightarrow\infty} x_n Right arrows \rightarrow \Longrightarrow \rightarrow \Longrightarrow Arrows over notation \overleftarrow{arg} \overrightarrow{arg} \overleftrightarrow{arg} \overleftarrow{AB} \overrightarrow{AB} \overleftrightarrow{AB} 0.3 → 10/2010 113 WebAssign Creating Questions Guide Expression Code Example Harpoons over notation \overleftharpoon{arg} \overrightharpoon{arg} \overleftrightharpoon{arg} \overleftharpoon{AB} \overrightharpoon{AB} \overleftrightharpoon{AB} Middle dot \cdot \cdot Circle \circ \circ Non-breaking text \nobr{} \nobr{1.2 \times 10^2} 1.2 × 102 Italics \it{} text \it{italicized} text text italicized text Not needed in math mode. Display · Boldface \bf{} \bf{boldface} boldface Strikeout \sout{} \sout{strikeout} strikeout Underline \uline{} \uline{underlined} underlined To enter other symbols, see Adding Special Characters to Your Questions on page 12. This section contains the following topics: • Creating WaTeX Arrays and Matrices • WaTeX Example: Aligning a System of Equations • WaTeX Example: Matrices • WaTeX Example: Arithmetic Long Division • WaTeX Example: Polynomial Long Division • WaTeX Example: Synthetic Division Creating WaTeX Arrays and Matrices WaTeX provides notation for adding arrays and matrices to your questions. In WaTeX, an array is a simple table with no borders; you can therefore use arrays not only to display tabular data, but also to control the positioning of items such as answer boxes or choices, equations, or even other arrays. For many questions, creating a WaTeX array is simpler and less time-consuming than creating the equivalent table using HTML. A matrix is a special kind of WaTeX array that automatically displays brackets around it just like mathematical matrices. You can: • add horizontal or vertical ruling for particular cells • put arrays and matrices inside of other arrays or matrices 10/2010 Creating Math Questions 114 You cannot: • directly apply HTML or CSS attributes to change the appearance or size of arrays or matrices • span cells horizontally or vertically in arrays or matrices To use complicated formatting or to allow entry of large amounts of tabular data, you might want to use an HTML table instead of a WaTeX array or matrix. Creating Arrays To add an array, type code using the following general syntax: \begin{array}{alignment} cell_contents & cell_contents \\ cell_contents & cell_contents \end{array} where: • \begin{array} starts the array. • alignment is a string comprised of one or more lowercase letters l, r, or c specifying left, right, or center alignment for each column. If you use fewer characters than there are columns, the last character defines the alignment for all remaining columns. • cell_contents represents anything you want to put in the cell. • An ampersand (&) separates each cell in a row. • A double backslash (\\) ends each row. This code is not needed to end the last row. • \end{array} ends the array. For example, to align two equations with respect to the equals sign, you could use the following code: Code Display \begin{array}{rcl} y & = & 3x + 10 \\ 2y & = & 4x ‐ 5 \end{array} Creating Matrices To add a matrix, type code using the following general syntax: \begin{matrix}{alignment}{rows} cell_contents & cell_contents \\ cell_contents & cell_contents \end{matrix} 10/2010 115 WebAssign Creating Questions Guide where: • \begin{matrix} starts the matrix. • alignment is a string comprised of one or more lowercase letters l, r, or c specifying left, right, or center alignment for each column. If you use fewer characters than there are columns, the last character defines the alignment for all remaining columns. • rows specifies the number of rows (1-9) in the matrix and is required to correctly display the brackets around the matrix. • cell_contents represents anything you want to put in the cell. • An ampersand (&) separates each cell in a row. • A double backslash (\\) ends each row. This code is not needed to end the last row. • \end{matrix} ends the matrix. For example, to display a simple 3×2 matrix, you could use the following code: Code Display A = \begin{matrix}{c}{2} x & y & z\\ a & b & c \end{matrix} Adding Row or Column Ruling You can add row or column ruling in arrays and matrices. • To add vertical ruling left of any cell, add the following markup in the cell: \vline • To add horizontal ruling above particular columns in a row, add the following markup anywhere in the row: \cline{from‐to} where from and to are the column numbers where the ruling should be displayed. Columns are numbered starting with 0 for the leftmost column. To add ruling above discontinuous columns, use multiple instances of \cline. To add ruling above a single column, specify the same column number for both from and to. For example: Code \begin{matrix}{c}{2} A & \vline B\\ C & \vline D \cline{0‐1} \end{matrix} 10/2010 Display Creating Math Questions 116 WaTeX Example: Aligning a System of Equations QID 1215889 Name Template2 4.WATEX.01. Mode Numerical Question Solve the system of equations. <div class="indent"> <watex>\[ \left[2]\{ \begin{array}{rcl} 2x + 4y & = & 26 \\ 3x ‐ y & = & 4 \end{array}\]</watex> </div> <watex>\[ x = <_>\\ y = <_> \]</watex> </div> Answer 3 5 Display to Students WaTeX Example: Matrices QID 1216105 Name Template2 4.WATEX.02. Mode Numerical 10/2010 117 WebAssign Creating Questions Guide Question The following matrices show the numbers of wins and losses at home and away for three youth soccer teams. <div class="indent"> <watex> \begin{array}{ccl} & W<s:space><s:space>L & \\ Home = & \begin{matrix}{c}{3} 2 & 3 \\ 0 & 4 \\ 3 & 2 \end{matrix} & \begin{array}{l} Bears \\ Cardinals \\ Giants \end{array} \end{array} <s:quad> \begin{array}{ccl} & W<s:space><s:space>L & \\ Away = & \begin{matrix}{c}{3} 1 & 2 \\ 0 & 3 \\ 1 & 3 \end{matrix} & \begin{array}{l} Bears \\ Cardinals \\ Giants \end{array} \end{array} </watex> </div> Use matrix addition to determine the total wins and losses for each team. <div class="indent"> <watex> \begin{array}{ccl} & W<s:quad><s:quad>L & \\ Total = & \begin{matrix}{c}{3} <_> & <_> \\ <_> & <_> \\ <_> & <_> \end{matrix} & \begin{array}{l} Bears \\ Cardinals \\ Giants \end{array} \end{array} </watex> </div> Answer <eqn $size=1; ''>3 5 0 7 4 5 Display to Students WaTeX Example: Arithmetic Long Division 10/2010 QID 1212389 Name Template2 4.WATEX.03. Mode Numerical Creating Math Questions 118 Question Answer Divide. <div class="indent"> <watex> \begin{array}{c} & \cline{1‐5} 123 & \vline 5 & <_> \cline{1‐3} & & \cline{2‐4} & & \cline{3‐5} & \end{array} </watex> </div> & & <_> & <_> & <_> & R<_>\\ & 6 & 1 & 7 & 4 & \\ & <_> & <_> & & & \\ & <_> & <_> & 7 & & \\ & <_> & <_> & <_> & & \\ & & <_> & <_> & 4 & \\ & & <_> & <_> & <_> & \\ & & & <_> & <_> & \\ <eqn $size=1; ''>4 5 6 86 4 9 2 6 9 6 1 5 8 2 7 3 8 8 6 Display to Students WaTeX Example: Polynomial Long Division QID 1212380 Name Template2 4.WATEX.04. Mode Symbolic 10/2010 119 WebAssign Creating Questions Guide Question Answer Divide. Type ^ to indicate exponents, as in x^2. <div class="indent"> <watex> \[ \begin{array}{c} & & & <_> & + & <_> \cline{1‐5} x ‐ 4 & \vline 2x^2 & + & 5x & ‐ & 50 & <_> & ‐ & <_> & & \cline{1‐3} & & & <_> & ‐ & 50 & & & <_> & ‐ & <_> \cline{3‐5} & & & & & <_> \end{array}\] </watex> </div> \\ \\ \\ \\ \\ <eqn $size=1; ''>x:2*x 13 x:2*x^2 x:8*x x:13*x x:13*x 52 2 Display to Students WaTeX Example: Synthetic Division 10/2010 QID 1215844 Name Template2 4.WATEX.05. Mode Multi‐Mode...NQN Question Divide <watex>\[x^3 ‐ 2x^2 ‐ 11x + 12 \pre{ by } x ‐ 3\]</watex>. Use synthetic division. <div class='indent'> <watex> \[ \begin{array}{c} <_> & \vline & <_> & <_> & <_> & <_> \\ \cline{1‐5}& & & <_> & <_> & <_> \\ \cline{1‐5}& & <_> & <_> & <_> & <_> \end{array} \] </watex></div> <SECTION>Express your answer as a polynomial: <_> <br /> <SECTION>Remainder: <_> Creating Math Questions 120 Answer <eqn $size=1; ''>3 1 ‐2 ‐11 12 3 3 ‐24 1 1 ‐8 ‐12 <SECTION><EQN $PAD='devmath'; ''>x: x^2 + x ‐ 8 <SECTION>‐12 Display to Students Displaying Notation with LaTeX You can include LaTeX markup to display well-formatted math notation in your questions and assignments in WebAssign. Unlike WaTeX, LaTeX is displayed as a static image in your questions and does not offer the flexibility to include answer boxes in your math notation. Note: WebAssign’s LaTeX installation does not include every LaTeX package. Always test your notation to ensure that it displays correctly. Use LaTeX to display math notation for the following reasons: • You need to display a formatted solution or learning materials as a PDF that is linked from your question or assignment. • You are already familar with LaTeX and do not want to use another method for displaying math notation. If you are not already familiar with LaTeX and do not need to display notation as a PDF, use WaTeX, the <symimage> tag, or HTML substitution. To include LaTeX markup in your question or assignment, enclose it in the <latex> tag: <latex>latex_markup</latex> 10/2010 121 WebAssign Creating Questions Guide Displaying Perl Variables in LaTeX To display the values of Perl variables in your LaTeX markup (for example, to use randomized values), use one of the methods described in the following table. Method Code Example Display value in red $variable ${variable} <latex>$ ${p}x=13 $</latex> Use braces or add a space after each variable name to distinguish it from other text. Display value in black <EQN $variable> Display all values in black <latex eqn=black>$variable <latex eqn=black>${variable} Do not use the lowercase <eqn> tag. Use braces or add a space after each variable name to distinguish it from other text. Display <latex>$ <EQN $p>x=13 $</latex> <latex eqn=black>$ ${p}x=13 $</latex> Displaying LaTeX as a PDF To display a larger set of LaTeX notation than a single mathematical expression — for example, to use LaTeX to format a solution or additional learning materials — you can display your LaTeX markup as a PDF that is linked from the question or assignment. To display your LaTeX markup as a linked PDF, set the pdf attribute in the <latex> tag to the text of the link you want your students to click: <latex pdf='link_text'> In your question or assignment, the specified link text will be displayed. When your students click the link, a PDF is displayed with your formatted notation. See Also: • LaTeX documentation at www.ctan.org • LaTeX documentation at www.latex-project.org Displaying Notation with <symimage> You can use the <symimage> tag to display well-formatted math notation in your questions and assignments in WebAssign. The markup used in the <symimage> tag is also used in NumberLine questions to display labels for points. Unlike WaTeX, notation displayed with the <symimage> tag is displayed as a static image in your questions and does not offer the flexibility to include answer boxes in your math notation. To use symimage markup in your questions or assignments, add the following code: <symimage(markup)> 10/2010 Creating Math Questions 122 where markup is any symimage markup described in <symimage> Notation on page 123. Notes: • When creating a flag for a NumberLine question, do not include the <symimage> tag itself; just specify the markup. • As in HTML, successive whitespace characters in symimage markup are ignored. To add a space explicitly, precede the space with two backslash characters (\\ ). Alphabetic characters that are not part of a function name or Perl variable are presumed to be variables and are italicized. Controlling the Size of the Displayed Notation Unlike WaTeX, which is automatically resized with the text in the browser window, images generated with the <symimage> tag are static. However, you can scale the initial image to one of seven sizes. Note: You cannot change the size of notation displayed in NumberLine questions. To change the size of the displayed notation, append the following notation in your <symimage> tag: , size => n where n is an integer from 1 through 7, with 3 being the default if you do not specify a size. For example: <symimage(sqrt(x/a), size => 6)> The following image shows how each size value is displayed. Controlling the Placement of the Displayed Notation You can control the vertical alignment and spacing of the displayed notation relative to the surrounding text. Note: You cannot change the placement of notation displayed in NumberLine questions. To align the displayed notation relative to the surrounding text, append one of the following notations in your <symimage> tag: , align => top , align => middle , align => bottom The top, middle, or bottom of the image is aligned with respect to the top, middle, or bottom of the text line where the image is displayed. The default alignment is bottom. 10/2010 123 WebAssign Creating Questions Guide To add extra space around the displayed notation, append the following notation in your <symimage> tag: , padding => n where n is a positive integer representing the number of pixels of whitespace to add on every side of the displayed notation. This is particularly useful when the <symimage> tag is used in multiple choice answers. For example: <symimage((3x+12)/(x^2), align => top, padding => 10)> aligns the top of the displayed fraction with the top of the line of text and adds 10 pixels of space on every side of the displayed image. <symimage> Notation Expression Code Example Perl variables $variable $a x Leave a space after the variable name. Roman text text(text_string) 2x+1 text( if ) x <= ‐1 Addition + x + 1 Subtraction ‐ x ‐ 1 Multiplication * cross (implicit) 2 * x 2 cross x 2x Division \/ x\/y You cannot display the division sign (÷) using <symimage> Fractions / x/y You can put a fraction in the numerator or denominator of another fraction. Exponents (superscripts) ^ (caret) ** If the superscript is not just a number or a variable, enclose it in parentheses (). x^2 x**(2y) ^1text(H)^alpha Precede the superscript with a space if it precedes notation. Bases (subscripts) _ (underscore) If the subscript is not just a number or a variable, enclose it in parentheses (). Precede the subscript with a space if it precedes notation. 10/2010 x_2 x_(y + 3) Display Creating Math Questions 124 Expression Code Example Binomial (over/under notation) (top__bottom)^() (7__3)^() Permutations and isotopes (combined subscript and superscript) _bottom^top Parentheses Display Type two underscores between the top and bottom expressions. Precede the subscript with a space if the combined subscript/superscript precedes notation. (arg)^() P_3^10 = 720 _91^233text(Pa) (x/2)^() Use this notation to explicitly add automatically-sized parentheses around an expression when they might otherwise be omitted. Brackets [arg] matrix(1,1,[arg]) [x] matrix(1,1,[x/3]) When using the matrix notation, the brackets are automatically sized to fit the contents. Some contents, such as fractions, are also resized. Braces matrix(1,1,{arg}) matrix(1,1,{x/3}) You cannot use {} without the matrix notation. When using the matrix notation, the brackets are automatically sized to fit the contents. Some contents, such as fractions, are also resized. Angle brackets Absolute values (vertical bars) langle arg rangle langle x/3 rangle Angle brackets are not resized. |arg| |x| abs(arg) abs(x/3) When using the abs notation, the vertical bars are automatically sized to fit the contents. Overbrace arg^^\\} (x+y+z)^^\\} After the argument, add 2 carets, 2 backslashes, and the right brace. Enclose the argument in parentheses if needed. Underbrace arg__\\_} (x+y+z)__\\_} After the argument, add 2 underscores, 2 backslashes, another underscore, and the right brace. Enclose the argument in parentheses if needed. Square root sqrt(arg) sqrt(16) Nth root rootn(arg) root3(27x) You can use only alphanumeric characters (a-z, A-Z, 0-9) and underscores for n. 10/2010 125 WebAssign Creating Questions Guide Expression Code Example Factorial ! 5! Trigonometry sin(x) asin(x) sinh(x) asinh(x) cos(x) acos(x) cosh(x) acosh(x) tan(x) atan(x) tanh(x) atanh(x) sec(x) asec(x) sech(x) asech(x) csc(x) acsc(x) csch(x) acsch(x) cot(x) acot(x) coth(x) acoth(x) asin(x) cos(theta) csch(a) tan(45 deg) Exponential function e^n exp(n) e^2 exp(2) Logarithms ln(n) log(n) log_b(n) ln(e^x) = x log(1000) = 3 log_2(128) = 7 You can use only alphanumeric characters (a-z, A-Z, 0-9) and underscores for b. Equality = a = 2 pi r Inequality > < >= <= != x > 3 x < 3 x >= 3 x <= 3 x != 3 Approximate ~= !~= x ~= 3 x !~= 3 Plus or minus +/‐ x +/‐ 3 Infinity infinity infinity Greek Type the name of lowercase Greek letters in lowercase. Type the names of uppercase Greek letters in proper case. pi Omega Matrices matrix(rows,cols,[cell,cell]) matrix(rows,cols,{cell,cell}) matrix(rows,cols,|cell,cell|) matrix(2,3,[a,b,c,d,e,f]) matrix(3,2,{a,b,c,d,e,f}) The contents of the matrix are specified cell by cell in row-column order. Use brackets, braces, or vertical bars to enclose the matrix contents. Determinants Use either the text or matrix notation illustrated in the example. text(det)(A) = |A| matrix(2,2,|a,b,c,d|)=ad‐bc Ellipses ... _... \... ... _... \... Indefinite summation sum arg sum x_i 10/2010 Display Creating Math Questions 126 Expression Code Example Definite summation sum_lower^upper arg sum__lower^^upper arg sum_(i = 0)^n x_i Display You can use two underscores and two carets to display the bounds using the same font size as the argument; see the example for Definite integrals. Indefinite integrals int arg int f(x)dx Definite integrals int_lower^upper arg int__lower^^upper arg int_0^1 sqrt(x)dx int__0^^1 sqrt(x)dx You can use two underscores and two carets to display the bounds above and below the integral using the same font size as the argument. Products prod_lower^upper arg prod__lower^^upper arg prod_(i=m)^infinity x_i You can use two underscores and two carets to display the bounds using the same font size as the argument; see the example for Definite integrals. Closed integrals cintegral_lower^upper arg cintegral__lower^^upper arg cintegral_C y^3 \\ dx + x^2 \\ dy You can use two underscores and two carets to display the bounds above and below the integral using the same font size as the argument; see the example for Definite integrals. Differentiation diff (difff(x))/(diffx) Partial derivatives partial (partial^2u)/(partialx^2) Limits lim_(x‐>p) lim__(x‐>p) lim_(x‐>0) Any expression can be used below the limit function. You can use two underscores to display the expression below the limit function using the same font size as the argument; see the example for Definite integrals. Arrows ‐> ‐‐> <‐ <‐‐ <‐> ==> <== <=> ‐> ‐‐> <‐ <‐‐ <‐> ==> <== <=> 10/2010 127 WebAssign Creating Questions Guide Expression Code Example Arrows over notation ^^‐> ^^‐‐> ^^<‐ ^^<‐‐ ^^<‐> A^^‐> A^^‐‐> A^^<‐ A^^<‐‐ A^^<‐> Enclose the argument in parentheses as needed. Arrows under notation __‐> __‐‐> __<‐ __<‐‐ __<‐> A__‐> A__‐‐> A__<‐ A__<‐‐ A__<‐> Use two underscores. Enclose the argument in parentheses as needed. Harpoons ~> <~ <~> ~> <~ <~> Harpoons over notation ^^~> ^^<~ ^^<~> A^^~> A^^<~ A^^<~> Enclose the argument in parentheses as needed. Harpoons under notation __~> __<~ __<~> A__~> A__<~ A__<~> Use two underscores. Enclose the argument in parentheses as needed. Middle dot middot x middot y Bold Roman <b>text</b> text(For all ) x text( in ) <b>R</b>, Text is displayed in bold and unitalicized. Do not use inside text() notation. Underline <u>text</u> To display un-italicized text with underlining, put text() inside of <u> and not the other way around. <u>all </u>\\ x <u>text(all)</u>\\ x Union union A union B Intersection intersect A intersect B Proportional To propto proportional x propto y Perpendicular To perp perpendicular x perp y Hat ^^\\^ x^^\\^ Vector ^^‐> ^^\\‐> x^^‐> Accent ^^\\' x^^\\' Tilde ^^\\~ x^^\\~ 10/2010 Display Creating Math Questions 128 Expression Code Example Grave ^^\\` x^^\\` Script small L ell ell Reduced Planck constant (hbar) hbar E=hbar omega Overline ^^\\_ x^^\\_ Formula {(statement,statement) f(x)={(|2x| text(if)\\ x <= 0,3x text(if)\\ x >0) Use as many statements as needed. Each statement must contain the same number of text() codes. These codes are used to control horizontal alignment of the statements with each other. You can put empty text() codes in each statement to align items even if you do not need to display Roman text. Display display: Displaying Math Notation with HTML Substitution WebAssign provides several special tags that allow you to render specific kinds of notation using HTML substitution. Like WaTeX — and unlike LaTeX or <symimage> markup — you can include answer boxes in your formatted notation. Using HTML substitution is often simpler than using WaTeX, but its functionality is also much more limited than WaTeX. Notes: • You cannot use HTML substitution tags inside of other HTML substitution tags, WaTeX, LaTeX, or <symimage> markup. • You cannot use WaTeX, LaTeX, or <symimage> markup inside of HTML substitution tags. HTML Substitution Tags for Math Six tags are provided for displaying math notation using HTML substitution. Inside each of these tags, you can use the math notation described in Notation That Can Be Used in HTML Substitution Tags for Math on page 129. Expression Code Example Display General math <h:math>markup</h:math> <h:math> $a x^2 </h:math> 9x2 Fractions <h:frac> n='numerator' d='denominator' </h:frac> <h:frac> n='x^2' d='x+$ a' </h:frac> Use WaTeX to display a fraction in the numerator or denominator of another fraction or under a square root. Square roots <h:sqrt>markup</h:sqrt> <h:sqrt> x + 6 </h:sqrt> 10/2010 129 WebAssign Creating Questions Guide Expression Code Example Matrices <h:matrix> cell | cell ; cell | cell </h:matrix> <h:matrix> a | b ; c | d </h:matrix> Use | to separate columns and ; to indicate the end of a row. Ensure that there is a space between the contents of a cell and the | or ; delimiters. Determinants <h:determinant> cell | cell ; cell | cell </h:determinant> Use | to separate columns and ; to indicate the end of a row. Ensure that there is a space between the contents of a cell and the | or ; delimiters. Long division <h:longdiv> divisor | dividend </h:longdiv> Display <h:determinant> $a | b ; c | d </h:determinan t> <h:longdiv> x+5 | x^2+6x+5 </h:longdiv> Notation That Can Be Used in HTML Substitution Tags for Math Except where noted, you can use all of the notation in the following table in each of the HTML substitution tags for displaying math notation. Math variables are automatically italicized. You can also use any of the <s> tags described in Adding Special Characters to Your Questions on page 12. Expression Code Example Display Perl variables $variable ${variable} <EQN $variable> $a x + 1 ${a}x + 1 <EQN $a>x + 1 9x + 1 9x + 1 9x + 1 Use braces or add a space after each variable name to distinguish it from other text. Do not use the lowercase <eqn> tag. Addition + x + 1 x+1 Subtraction ‐ x ‐ 1 x−1 Multiplication * times cross (implicit) x * 2 x times 2 x cross 2 2x x·2 x×2 x×2 2x Division divide / x divide 2 x / 2 x÷2 x/2 Exponents (superscripts) ^ (caret) x^2 x^(2y) x2y Bases (subscripts) _ (underscore) x_2 x_((y + 3)) x2 x(y + 3) 10/2010 If the superscript is more than a single number or a single variable, enclose it in parentheses. If the subscript is more than a single number or a single variable, enclose it in parentheses. x2 Creating Math Questions 130 Expression Code Example Display Parentheses () 4(x+1) x_((y + 3)) 4(x + 1) x(y + 3) |x| abs(x) |x| abs(x) In cases where a set of parentheses is required to format notation, such as with exponents, use two pairs of parentheses to explicitly display the parentheses. Absolute value |arg| abs(arg) You cannot use vertical bars to specify absolute values in in the <h:longdiv> tag. Square root x + sqrt(y+3) sqrt(arg) You cannot use sqrt() in the <h:sqrt> or <h:longdiv> tags. Factorial ! Trigonometry sin arcsin sinh arcsinh cos arccos cosh arccosh tan arctan tanh arctanh sec arcsec sech arcsech csc arccsc csch arccsch cot arccot coth arccoth 5! 5! asin x sin-1x cos theta cosθ csch<s:space>a csch a tan(45<s:degree>) tan(45°) When arccos, arcsin, and so on are abbreviated like acos or asin, the function is displayed using exponential notation, like sin-1x. Exponential function e^n e^2 e2 Logarithms ln(n) log(n) log_b(n) ln(e^x) = x log(1000) = 3 log_2(128) = 7 ln(ex) = x log(1000) = 3 log2(128) = 7 Equality = a = 2 pi r a = 2πr Inequality > < >= <= != x > 3 x < 3 x >= 3 x <= 3 x != 3 x x x x x Approximate ~= x ~= 3 x≈3 Infinity infinity infinity ∞ Greek Type the name of lowercase Greek letters in lowercase. Type the names of uppercase Greek letters in proper case. pi Omega π Ω > < ≥ ≤ ≠ 3 3 3 3 3 10/2010 131 WebAssign Creating Questions Guide Creating mathPad Questions WebAssign’s mathPad and calcPad tools let your students quickly enter the standard mathematical notation that is displayed in their textbook. Note: Although mathPad and calcPad have been tested and can be used in your classes, they are Beta features that are still undergoing development. It is not currently possible for instructors to create their own calcPad questions. The difference between mathPad and calcPad is that calcPad provides tools for entering the kinds of mathematical notation that are needed in pre-calculus and later math classes but which might be confusing to students taking developmental math, algebra, and basic trigonometry courses. If you want your students to respond with a numerical answer and not a mathematical expression, see Creating Numerical Questions on page 52. This section contains the following topics: • Choosing Evaluation Modes for Your Math Questions • Creating mathPad Questions Using Symbolic Mode • Creating Answer Keys for Questions Using Symbolic Mode • Changing the Default Values and Tolerance for Symbolic Evaluation • Creating mathPad Questions Using Algebraic Mode with Mathematica • Creating Answer Keys for Questions Using Algebraic Mode with Mathematica 10/2010 Creating Math Questions 132 Choosing Evaluation Modes for Your Math Questions For many question types in WebAssign, such as Multiple-Choice or PencilPad, the question mode you select has immediately visible effects on the question you are creating. When you create questions that evaluate mathematical expressions, however, the question mode you select affects what kind of responses your students can enter and how your students’ responses are evaluated, but has no corresponding visual effect. Note: If your students should respond with a numerical answer and not a mathematical expression, see Creating Numerical Questions on page 52. Before creating a question that asks your students to enter a mathematical expression or equation, determine how that expression should be evaluated. Symbolic Mode Symbolic questions evaluate your students’ responses symbolically by substituting a series of values for the variables in the response and in the key. If the response and the key are equal for all tested values, then the response is accepted as correct. This evaluation behavior provides reliable scoring of responses and can accept any form of a mathematical expression that is equivalent to the key. However, it cannot evaluate responses that are equations, and it cannot evaluate whether responses are in a particular form, such as a completely factored expression. Algebraic Mode Using Mathematica Algebraic questions evaluate your students’ responses algebraically using Mathematica, in much the same way you would solve an equation. Notes: • You must know how to write Mathematica expressions. For reference information, see reference.wolfram.com/mathematica/. • Older questions created using Algebraic mode do not necessarily use Mathematica; however, the general principles still apply, and these questions will continue to function. Algebraic mode is a much more powerful method for evaluating your students’ responses, but specifying your key in Algebraic mode can sometimes be more complicated than with Symbolic mode. Additionally, you cannot by default accept any mathematically equivalent response using Algebraic mode; you must therefore make sure that your students understand what form of response is needed. 10/2010 133 WebAssign Creating Questions Guide Choosing Which Mode To Use Based on Selected Criteria Refer to the following table to help you decide which mode to use. Best Practice: If you can use either Symbolic mode or Algebraic mode, use Symbolic mode. Criterion / Example Accept any response that is equivalent to the key Allow your students to type commas in large numbers The answer is a single mathematical expression that is not an equation. Solve for x: 2x+y2-6=0 x=___ The answer is a finite list of set members. List the first three natural numbers. The answer is any member of a set. List any multiple of both 2 and 3. The answer is a single ordered pair. What are the coordinates of the center of the circle defined by the following equation: (x+3)2+(y-4)2=25 The answer is two or more ordered pairs. List the coordinates of the first five data points shown on the graph. The answer is a vector. Find a vector perpendicular to ‹1,2›. The answer is an equation. What is the equation for a circle with center (x,y) and radius r? Only a particular form of the answer is correct. Factor the expression: x2-x-12 Key can specify multiple correct answers. Key can perform complex evaluation functions for you, such as factoring polynomials or computing derivatives. 10/2010 Symbolic Mode Algebraic Mode Using Mathematica Creating Math Questions 134 Creating mathPad Questions Using Symbolic Mode You can create mathPad questions that use Symbolic mode to evaluate arithmetic and algebraic expressions, but not equations, for equivalency to the answer. Because responses are graded for mathematical equivalency, the form of the student’s response is not considered. For example, 4x+12 would be equivalent to (x+3)4. Prerequisite: Before using this procedure, see Choosing Evaluation Modes for Your Math Questions on page 132. To create a mathPad question using Symbolic mode: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Symbolic. 4. In Question, type your question. • Use the answer placeholder string <_> to specify where the answer box should be displayed. • Be sure that your question identifies any variables that the student should use in their answer. 5. In Answer, type the following items on a single line: <eqn $PAD='devmath'; ''>variable_list:answer_key where variable_list is a comma-delimited list of the variables used in the answer key, and answer_key specifies the correct answer to the problem in symbolic notation. For example: x_1, y_1, x_2, y_2: sqrt((x_1‐x_2)^2 + (y_1‐y_2)^2) Notes: • 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. • For information about specifying answer keys for Symbolic questions, see Creating Answer Keys for Questions Using Symbolic Mode on page 136. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10/2010 135 WebAssign Creating Questions Guide 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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 mathPad Question Using Symbolic Mode The following table summarizes an actual question. QID 1078951 Name Template2 4.MATHP.01. Mode Symbolic Question <watex>What is the formula for the distance \[d\] between the two points \[(x_1,y_1)\] and \[(x_2,y_2)\]?\\ \begin{array}{rl} \[ d = \] & <_>\\ \end{array}</watex> Answer <eqn $PAD='devmath'; ''> x_1,y_1,x_2,y_2:sqrt((x_2‐x_1)^2+(y_2‐ y_1)^2) Display to Students 11. Optionally, type a Solution. 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. 12. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 10/2010 Creating Math Questions 136 13. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 14. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 15. 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. Creating Answer Keys for Questions Using Symbolic Mode When typing the answer key for a question in Symbolic mode, you can include a broad range of mathematical expressions. Specifying Numeric Values in Answer Keys Do not use commas to separate digits in numbers. This can cause ambiguous answer keys and let your students receive credit for incorrect answers. For example, x + 1,234 is interpreted both as 1234 + x and as a list with two elements: x + 1 and 234. Do not use mixed numbers. Instead, use improper fractions or express the mixed number as a sum, for example 7/4 or 1+3/4. Specifying Math Variables in Answer Keys Although not always required, you can declare your math variables at the beginning of the answer key in a comma-delimited list ending with a colon, as in the following example. x_1, y_1, x_2, y_2: sqrt((x_1‐x_2)^2 + (y_1‐y_2)^2) Best Practice: Declare your variables to ensure that WebAssign interprets your answer key exactly as you intend. 10/2010 137 WebAssign Creating Questions Guide Variable names in answer keys must observe the following conventions: • Variable names must start with a letter. • Variable names must include only letters, numbers, and underscores; underscores in variable names indicate subscripting. • Variable names are case-sensitive; X is different from x. • Variable names should not duplicate the names of functions or of the numeric value pi. • Variables having the names of Greek letters are displayed in mathPad and calcPad as the corresponding Greek letters. Greek letters except for π are treated as variables. The letter π is treated as a constant. • The variable e can be used, but it will be treated as both Euler’s number and as a variable name, so either response is marked correct. The following table lists some examples. Math Notation Answer Key Notation x x1 x1 books λ x x1 x_1 books lambda Be sure that your question identifies any variables that the student should use in their answer. Specifying Perl Variables in Answer Keys If you have defined a Perl variable for use in your answer key — for example, to randomize numeric values in your question — always enclose it with the <EQN> tag as in the following example: <EQN $d>x + <EQN $e> To avoid confusion, use different names for Perl variables and math variables in your question. Specifying Math Expressions in Answer Keys The functions and values in the following table are case-sensitive: for example, ABS(x) cannot be substituted for abs(x). 10/2010 Creating Math Questions 138 For many functions in the following table, parentheses can be omitted if the argument is simple and unambiguous — for example, a single variable or constant. Include parentheses when you need to ensure that a specific order of operations is observed. The default order of operations for symbolic answer keys is: subscripts, then factorials, then exponentiation, then multiplication and division, then addition and subtraction. Expression Math Notation Symbolic Answer Key Notation Addition x+y x + y Subtraction x−y x ‐ y Multiplication 2x 2∙x 2×x 2x 2 * x No distinction is made between explicit or implicit multiplication. Division or fractions x÷3 x / 3 No distinction is made between responses specified as stacked fractions or using the division sign (÷). Exponentiation x3 x^3 x**3 Notes Square root sqrt(x) Other roots rootn(x) root(x,n) rootn(x) works only when n is an integer. Subscript xn x(a + b) x_n x_(a + b) If the subscript includes mathematical operators, including implicit multiplication, enclose it in parentheses. Factorial x! x! Factorials are calculated only for natural numbers. Absolute value |x| abs(x) Greek letters α+β Ω alpha + beta Omega Type the name of lowercase Greek letters in lowercase. Type the names of uppercase Greek letters in proper case. Greek letters except for π are treated as variables. The letter π is treated as a constant. In mathPad, your students must type the names of all Greek letters except for π and θ. Pi (π) π pi Euler’s number e e exp(1) Exponential function e3 e^3 exp(3) Logarithm (base 10) log x log10 x log x log(x) Substituting 3.14 only approximates this value. You and your students should use pi to indicate the exact value of pi unless the question specifically instructs the student to use an approximation to pi. 10/2010 139 WebAssign Creating Questions Guide Math Notation Symbolic Answer Key Notation Notes Logarithm (arbitrary base) log16(x) logb(x) log_16(x) log_(b)(x) If the base is anything other than a number, enclose it in parentheses. Natural logarithm ln x ln(x) ln x Grouping, Order of Operations 4 (x + 1) 4 [x + 1] 4 {x + 1} 4(x + 1) 4[x + 1] 4{x + 1} Scientific / “e” notation 2.46 × 106 2.46e+6 2.46 * 10^6 2.46e+6 Trigonometric functions sin x cos x tan θ cot (π − θ) sec A csc x sin x cos(x) tan theta cot(pi ‐ theta) sec(A) csc x Angles are expressed in radians. Inverse trigonometric functions arcsin x arcsin x sin^(‐1)(x) arccos x cos^(‐1)(x) arctan x tan^(‐1)(x) arccot x cot^(‐1)(x) arcsec x sec^(‐1)(x) arccsc x csc^(‐1)(x) Angles are expressed in radians. sinh x cosh x tanh x coth x sech x csch x sinh x cosh x tanh x coth x sech x csch x In mathPad questions, your students must type these functions rather than selecting them from mathPad. Ordered pairs, ordered tuples (x, y) (x, y, z) (x, y) (x, y, z) Comma-delimited lists in parentheses are evaluated as ordered tuples. Sets, unordered lists of elements {1, 2} 3, 4 {1, 2} 3, 4 To accept only standard roster notation with braces, set $ROSTER_ONLY=1. Infinity ∞ infinity Undefined UNDEFINED UNDEFINED Expression sin-1(x) arccos x cos-1(x) arctan x tan-1(x) arccot x cot-1(x) arcsec x sec-1(x) arccsc x No distinction is made among the three types of grouping symbols. Parentheses can also be used to delimit ordered tuples; braces can also be used to delimit unordered lists. For each inverse trigonometric function, you can abbreviate “arc” to “a” as in asin(x). csc-1(x) Hyperbolic functions 10/2010 Specify inverse hyperbolic functions using the -1 notation as for trigonometric functions. By default, your students’ responses will match your key if they enumerate every element at least once, regardless of repetition. Thus, {1,2,2} = {1,2}. To require your students to enumerate all instances of repeated elements in a set, set $NO_REPETITION=1. Creating Math Questions 140 Expression Math Notation Symbolic Answer Key Notation Degree 30° 30 deg Imaginary unit i i No solution NO SOLUTION NO SOLUTION Empty set empty empty Notes Degrees are not evaluated mathematically by default. For this reason, your students must enter the exact form of the answer that you provide and not a mathematicallyequivalent response. For example, if you specified cos(60 deg), your students would be marked incorrect for submitting either 0.5 or sin(30°). Use only for mathPad questions. Changing the Default Values and Tolerance for Symbolic Evaluation Your students’ responses to symbolic questions are evaluated by substituting numeric values for each variable in the answer key and in your students’ responses. If the answer key and response are equivalent to within a specified tolerance for all three values, the answer is considered correct. You can change both the default values and the tolerance that are used when evaluating responses to your symbolic questions. Understanding Default Values and Tolerance By default, the following three numeric values are substituted for each variable in your answer key and in your students’ responses: • 0.123456789012 • 0.345678901234 • 0.890123456789 For each of these values, your student’s response is compared to the answer key. If the response and the key are within the specified tolerance — by default, 0.001 — for every value, the response is considered to be correct. For example, if the correct answer to your question is x2 + 1 and your student submitted 2x2 + 1, the response and the answer key would be compared for three values of x, as illustrated in the following graph and table. 10/2010 141 WebAssign Creating Questions Guide Value of x (rounded) Value of Answer Key (x2 + 1) Value of Response (2x2 + 1) Difference 0.1235 1.0152 1.0305 0.0152 0.3457 1.1195 1.2390 0.1195 0.8901 1.7923 2.5846 0.7923 Although at the first comparison point, the difference between the answer and the student’s response seems small — 0.0152 — this difference is much greater than the default tolerance of 0.001, so the response is marked incorrect. In this example, because the key and response contained only one variable, only three values were checked. When the key or response contains multiple variables, each value is substituted for each variable so every combination of values is checked. This is illustrated in the following table. Value of x (rounded) Value of y (rounded) Value of Answer Key 2(x2 + y2) Value of Response (x2 + y2) Difference 0.1235 0.1235 0.0610 0.0305 -0.0305 0.1235 0.3457 0.2695 0.1347 -0.1347 0.1235 0.8901 1.6151 0.8076 -0.8076 0.3457 0.1235 0.2695 0.1347 -0.1347 0.3457 0.3457 0.4780 0.2390 -0.2390 0.3457 0.8901 1.8236 0.9118 -0.9118 0.8901 0.1235 1.6151 0.8076 -0.8076 0.8901 0.3457 1.8236 0.9118 -0.9118 0.8901 0.8901 3.1693 1.5846 -1.5846 The number of comparisons that are performed between the answer key and response increases exponentially with the number of variables used in the key. Best Practice: Use four or fewer variables in your questions. 10/2010 Creating Math Questions 142 Although the default values used for evaluating symbolic questions might seem to be arbitrary, they work well for a wide variety of questions. How and why you might need to change the default values or tolerance — such as for absolutevalue questions — are discussed in the following sections. Changing the Default Values for Symbolic Evaluation To change the values WebAssign substitutes for variables in your answer key and your students’ responses, you set the array variable $DEFAULTVALS to the values you want to use. Best Practice: Use four or fewer values for each variable in your questions. To set values: Prepend this to your answer key: Notes As a list <EQN $DEFAULTVALS=[a, b, c];''> If you specify only one list, the values are substituted only for the first variable in your answer key and your students’ responses. Additional variables use the default values. For example: <EQN $DEFAULTVALS=[1.23,‐3.45];''>x:x^2+1 As a range of integers <EQN $DEFAULTVALS=[a..b];''> For example: <EQN $DEFAULTVALS=[3..6];''>x:x^2+1 Differently for different variables <EQN $DEFAULTVALS=[[a, b, c],[a, b, c]];''> or <EQN $DEFAULTVALS=[[a..b],[a..b]];''> For example: <EQN $DEFAULTVALS=[[‐3,1],[‐2,2]];''>x,y:x^2+y^2 or <EQN $DEFAULTVALS=[[‐3..1],[‐2..2]];''>x,y:x^2+y^2 Only for specific variables <EQN $DEFAULTVALS=[[],[a, b, c]];''> or <EQN $DEFAULTVALS=[[],[a..b]];''> For example: <EQN $DEFAULTVALS=[[‐3,1],[]];''>x,y:x^2+y^2 or <EQN $DEFAULTVALS=[[],[‐2..2]];''>x,y:x^2+y^2 If you specify only one range, the values are substituted only for the first variable in your answer key and your students’ responses. Additional variables use the default values. The first set of values is substituted for the first declared variable, the second set for the second variable, and so on. You must explicitly declare the variables in your answer key. See Specifying Math Variables in Answer Keys on page 136. Specify an empty list [] for any variable for which you would like to use the default values. You must explicitly declare the variables in your answer key. See Specifying Math Variables in Answer Keys on page 136. 10/2010 143 WebAssign Creating Questions Guide Changing the Tolerance for Symbolic Evaluation To change the tolerance WebAssign uses when comparing your answer key and your students’ responses, you set the variable $MAXERR to the tolerance you want to use. To set the tolerance: Add this to your answer key: As a numeric value <EQN $MAXERR=value;''> Notes For example: <EQN $MAXERR=0.01;''> As a percent of the evaluated answer key <EQN $MAXERR='n%';''> For example: Enclose the percent string in single quotation marks. <EQN $MAXERR='0.1%';''> Specific situations requiring you to change either the default values or the tolerance are discussed in the following sections. Changing the Default Values for Absolute-Value Questions If the answer key for your symbolic question contains the absolute value of an expression containing a variable, you need to ensure that the expression evaluates to both positive and negative values to ensure that your students’ responses also include the absolute value notation. For example, if your answer key is abs(x+1) your students could respond with x+1 and still be marked correct, since x+1 evaluates to a positive number for all of the default values. To avoid this situation, you could change your answer key to the following: <EQN $DEFAULTVALS=[‐1.123, 0.345, 0.890]; ''>abs(x+1) This causes your answer key and your students’ responses to be compared not for the default values, but for the values you specified: -1.123, 0.345, and 0.890. With the new values, x+1 evaluates to -0.123, 1.345, and 1.890 and is marked as incorrect, while |x+1| is marked correct. Changing the Default Values for Factorial Questions If the answer key for your symbolic question contains the factorial of an expression containing a variable, you need to ensure that the expression evaluates only to natural numbers. For example, if your answer key is (x/2)! x/2 must evaluate to a natural number to correctly compare your students’ responses to the answer key. To ensure this, you could change your answer key to the following: <EQN $DEFAULTVALS=[2, 4, 6]; ''>(x/2)! 10/2010 Creating Math Questions 144 This causes your answer key and your students’ responses to be compared not for the default values, but for the values you specified: 2, 4, and 6. With the new values, (x/2)! evaluates to 1, 2, and 6. Changing the Default Values or Tolerance for Questions with Fractions or Exponents In some symbolic questions with fractions or exponents, the default values can evaluate too close to 0 to distinguish correct and incorrect responses. You must determine from the question itself whether changing the default values or the tolerance will resolve the problem. For example, if your answer key is 1/(x+100) Your students could enter 1/(x+110) and still be marked correct because the expression evaluates very close to 0 using the default values. In this case, you could use a couple different approaches. You could change the default values as in the following answer key: <EQN $DEFAULTVALS=[‐101..‐99]; ''>1/(x+100) Or, you could decrease the tolerance, as in the following answer key: <eqn $MAXERR=1e‐5; ''>1/(x+100) Consider a different example. If your answer key is (x/2)^20 Your students could enter (x ÷ 3)20 and still be marked correct because the expression evaluates very close to 0 using the default values. In this case, the best approach is probably to change the default values so the expression will not evaluate so close to 0. You could change your answer key to the following: <EQN $DEFAULTVALS=[1.234, 2.346, 8.901]; ''>(x/2)^20 Creating mathPad Questions Using Algebraic Mode with Mathematica You can create mathPad questions that use Algebraic mode and a Mathematica grading statement to compare the answer key and your students’ responses for mathematical equivalence. Using Algebraic mode and Mathematica lets you accurately evaluate your students’ responses in situations where Symbolic evaluation cannot be used — for example, to distinguish between factored and unfactored expressions, or for questions with multiple correct answers. Prerequisites: • Before using this procedure, see Choosing Evaluation Modes for Your Math Questions on page 132. • You must know how to write Mathematica expressions. For reference information, see reference.wolfram.com/mathematica/. To create a mathPad question using Algebraic mode with Mathematica: 1. Click Questions > Create. The Question Editor opens. 10/2010 145 WebAssign Creating Questions Guide 2. In Name, type a name for the question. 3. In Mode, select Algebraic. 4. In Question, type your question. • Use the answer placeholder string <_> to specify where the answer box should be displayed. • Be sure that your question identifies any variables that the student should use in their answer. 5. Create and test your Mathematica grading statement and answer key with correct and incorrect student responses. • Your answer key is a Mathematica expression specifying the correct answer to the question; sometimes the answer key is one of mutiple possible correct answers • Your grading statement is a Mathematica statement providing information about how to compare your answer key and your students’ responses. Use the following steps to test your answer key and grading statement with different responses: a. In the Question Editor, click Mathematica under Page Tools to open the WebAssign Mathematica tool. b. In the Mathematica window, type your grading statement, using Mathematica expressions for the answer key and student response that you want to test. c. Click Execute. Your grading statement is evaluated using the expressions you specified for the answer key and student response, and the result is displayed. If your grading statement evaluates to True, then the response will be marked correct. Otherwise, the response will be marked incorrect. For example, if your question asks students to calculate an indefinite integral, your grading statement might compare the derivatives of your answer key and of your student’s response: 10/2010 Creating Math Questions 146 The answer key specifies one of the correct responses: 3 · sin(x2) + 2x + C. The specified response is also a valid answer and the grading statement evaluates as True. Note: Most, but not all, Mathematica expressions are valid in WebAssign. Any expression that works in the WebAssign Mathematica tool will work in your question. 6. In Answer, type the following items on a single line: <eqn $CASGRADER='mathematica'; $PAD='devmath'; ''> variable_list:answer_key {tab} grading_statement where: • variable_list is a comma-delimited list of the variables used in the answer key. • answer_key is the Mathematica answer key you created in the previous step. • grading_statement is the Mathematica grading statement you created, with your answer key and student response expressions replaced by the keywords key and response. When the question is scored, the actual answer key and student response values will be used in place of these keywords. Notes: • The characters {tab} can be entered by typing on your keyboard or by clicking Add tab. You can abbreviate this notation as {}. You cannot enter these characters by pressing the TAB key on your keyboard. • 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. For example, the following answer key and grading statement allows students to submit the equation of an ellipse in standard form with the 1 on either side of the equation: <EQN $CASGRADER='mathematica'; $PAD='devmath';'' > x,y:(x+4)^2/9+(y‐5)^2/5 == 1 {tab} Apply[List,key] == {(response)[[1]],(response)[[2]]}||Apply[List,key] == {(response)[[2]],(response)[[1]]} The following responses would be accepted as correct: or Responses not in the standard form, such as the following, would be marked incorrect: 10/2010 147 WebAssign Creating Questions Guide 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 11. 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 mathPad Question Using Algebraic Mode with Mathematica The following table summarizes an actual question. 10/2010 QID 1344935 Name Template2 4.MATHP.02. Mode Algebraic Question Find the equation in standard form of the following ellipse: <div class="indent"> Center: (‐4, 5)<br> Vertices: (‐7, 5) and (‐1, 5)<br> Foci: (‐6, 5) and (‐2, 5) </div> <_> Creating Math Questions 148 Answer <EQN $CASGRADER='mathematica'; $PAD='devmath';'' > x,y:(x+4)^2/9+(y‐5)^2/5 == 1 {tab} Apply[List,key] == {(response)[[1]],(response)[[2]]}||Apply[List,key] == {(response)[[2]],(response)[[1]]} Display to Students 12. Optionally, type a Solution. 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. 13. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 14. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 15. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 16. 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. Creating Answer Keys for Questions Using Algebraic Mode with Mathematica To write answer keys and grading expressions for questions that use Algebraic mode with Mathematica, you must know how to write Mathematica expressions. In addition, you should be aware of the following WebAssignspecific considerations. 10/2010 149 WebAssign Creating Questions Guide Specifying Math Variables in Answer Keys Although not always required, you can declare your math variables at the beginning of the answer key in a comma-delimited list ending with a colon, as in the following example. x_1, y_1, x_2, y_2: sqrt((x_1‐x_2)^2 + (y_1‐y_2)^2) Best Practice: Declare your variables to ensure that WebAssign interprets your answer key exactly as you intend. Variable names in answer keys must observe the following conventions: • Variable names must start with a letter. • Variable names must include only letters, numbers, and underscores; underscores in variable names indicate subscripting. • Variable names are case-sensitive; X is different from x. • Variable names should not duplicate the names of functions or of the numeric value pi. • Variables having the names of Greek letters are displayed in mathPad and calcPad as the corresponding Greek letters. Greek letters except for π are treated as variables. The letter π is treated as a constant. • The variable e can be used, but it will be treated as both Euler’s number and as a variable name, so either response is marked correct. The following table lists some examples. Math Notation Answer Key Notation x x1 x1 books λ x x1 x_1 books lambda Be sure that your question identifies any variables that the student should use in their answer. Specifying Perl Variables in Answer Keys If you have defined a Perl variable for use in your answer key — for example, to randomize numeric values in your question — always enclose it with the <EQN> tag as in the following example: <EQN $d>x + <EQN $e> To avoid confusion, use different names for Perl variables and math variables in your question. Creating Mathematica Expressions Most, but not all, Mathematica expressions are valid in WebAssign. Any expression that works in the WebAssign Mathematica tool will work in your question. For Mathematica reference information, see reference.wolfram.com/mathematica/. 10/2010 Creating Math Questions 150 Creating Number Line Questions Understanding the NumberLine Tool There are two types of number line questions that use the NumberLine tool: one in which students locate points and graph intervals and inequalities on a real number line graph, referred to as default mode, and another, referred to as points mode, where students indicate point positions on a number line graph. Default Mode The NumberLine tool in this mode includes a formatted display area in the middle and a row of buttons at the bottom. The first five buttons are tool buttons. The next six are graphing symbols. Students use the tools to manipulate symbols on the number line graph to solve the exercise. Note that students can use either the open and closed circles or the parentheses and brackets to answer questions; when WebAssign scores their response, no distinction is made about which kind of notation was used so long as it is equivalent to the answer key. You can drag symbols from the graphing symbols palette onto the number line graph. Note that you cannot completely overlap a symbol with another symbol. Upon placing a symbol, the symbol style drawer opens above the symbol. Students can use the symbol style drawer to change the type of symbol that is displayed. Below is an example of what this mode looks like in an exercise within WebAssign. 10/2010 151 WebAssign Creating Questions Guide Points Mode The NumberLine tool in points mode includes a set of points at the top, a formatted display area in the middle, and a row of tool buttons at the bottom. The student drags the points from above the number line graph to the correct place on the number line graph to solve the exercise. Note that you cannot completely overlap two points. Below is an example of what this mode looks like in an exercise within WebAssign. 10/2010 Creating Math Questions 152 This section contains the following topics: • Creating a NumberLine Question • Coding NumberLine Questions • Coding a Question in Default Mode • Coding a Question in Points Mode • Answer Key Objects • Grading Creating a NumberLine Question The NumberLine tool is a palette for students to input solutions to exercises that require the use of a number line. There are two modes: one is used to locate points, graph intervals, and graph inequalities on a number line; the other to indicate point positions on a number line graph. To create a number line question: 1. From the Create menu, select Question. 2. Enter a name for the question and select NumberLine as the Mode. This name will be listed on your My Questions list. 3. In the Question field, type the text that you want to be displayed for the question. For each instance of the NumberLine tool, use a <_>. Example code: Plot the following interval on the real number line. <div class='indent'>(‐2, 1]</div> <_> 4. In the Answer field, type the correct answer to your question. Example code: (‐2,1] 5. Click Test/Preview to view and test the question. The key icon is displayed at the bottom of the question next to the numerical portion of the answer key. The students will not see the correct answer marked with the key icon unless they are viewing the key. 6. When editing is complete, click Save to assign a question ID number to the question. The question will be accessible from your My Questions list. Example NumberLine Question QID 1237726 Name Template2 4.NL.01. Mode NumberLine 10/2010 153 WebAssign Creating Questions Guide Question Plot the following interval on the real number line. <div class='indent'>(‐2, 1]</div> <_> Answer (‐2,1] Displayed to Students Coding NumberLine Questions You can code two types of questions that use the NumberLine tool: one in which students locate points and graph intervals and inequalities on a number line graph, referred to as default mode, and another, referred to as points mode, where students indicate point positions on a number line graph. Note that all code is typed in the answer field. Parameters for Answer Field The text for a NumberLine answer field involves: • all display attributes and their values • answer key objects (for example, 3.2; (6.45, 6.75]) • (For points mode only) all distractors. 10/2010 Creating Math Questions 154 Best Practices for All Randomizations So that students have a consistent user experience, the following rules must be observed for randomization to work effectively: • NumberLine tool attributes (range, tickmarks, minor_tickmarks) must not be randomized. • If an answer key object or endpoint falls on a labeled tickmark, all randomizations of that object or endpoint must fall on a labeled tickmark. • If an answer key object or endpoint falls on an unlabeled tickmark, all randomizations of that object or endpoint must fall on an unlabeled tickmark. • If an answer key object or endpoint falls between two consecutive tickmarks, all randomizations of that object or endpoint must fall between two consecutive tickmarks. NumberLine Tool Algorithm For an optimum user experience for students, the following rules have been implemented. • Between a labeled and unlabeled tickmark, there must be space for at least two closed circle symbols. • Between two labeled tickmarks, there must be space for at least four closed circle symbols. • There must be an odd number of tickmarks. • Unlabeled (or minor) tickmarks must evenly bisect the intervals in which they are found. If a specified range display attribute does not follow all of these rules, the NumberLine tool will instead extend the range slightly to attempt to enforce this rule. If the specified range display attribute is found to be completely unworkable, the algorithm will return the default tickmarks based on a range of -5 to 5. Coding a Question in Default Mode In default mode, the following syntax is used in the answer field. range:[‐1,1]; (‐0.75,0.25] Note: A semicolon is necessary to delimit multiple elements. 10/2010 155 WebAssign Creating Questions Guide The following table shows the display attributes that you can specify. Default Value Attribute Syntax Description range range:[lower_bound, upper_bound] Indicates the desired minimum range. If the tickmarks attribute is specified, the range attribute is ignored. [-5,5] tickmarks tickmarks:[lower_bound, increment,upper_bound] Indicates the lower bound (lower_bound) and upper bound (upper_bound) of the labeled tickmarks, as well as the tickmark interval size (increment) desired. Calculated by the NumberLin e tool minor_tickmarks minor_tickmarks:[false] Indicates whether to display unlabeled tickmarks. Valid values are true or false. true Note: If an answer extends beyond the right side if the Answer box, it is wrapped to the next line, but it is still considered a single line so long as you don’t press Enter. If no values are specified for the range attribute, the tool defaults to a range value of [-5,5]. For the range attribute and for the tickmarks attributes, the range or the interval size between tickmarks is determined automatically. The tool will attempt to use the specified range or interval size; however, if the specified range or interval size returns no usable images for the number line graph, the tool determines an appropriate range or interval size. If the tickmarks attribute is specified, a range attribute is unnecessary and is ignored. If the value of minor_tickmarks is not set to false, the tool populates as many minor tickmarks as possible. Examples The following tables show a few coding examples. Code range:[‐1,1]; (‐0.75,0.25] Description • The range is from -1 to 1. • The answer key is (-0.75,0.25]. Displayed to Students 10/2010 Creating Math Questions 156 Code range:[‐8,8]; minor_tickmarks:[false]; ‐3;0;3;6 Description • The requested range is from -8 to 8. • minor_tickmarks is set to false, so no minor, that is, unlabeled, tickmarks are displayed. In this example, since no minor tickmarks would be displayed by default given a range of [-8,8], it is not necessary to specify this attribute. • The answer key is -3;0;3;6. Displayed to Students Code range:[‐8,9];[‐2,2] Description • The requested range is from -8 to 9. The tool determines that for an optimum student user experience, the range needs to be extended to [-8,12]. • The answer key is [-2,2]. Displayed to Students Coding a Question in Points Mode In points mode, the following syntax is used to code a question: flag#:[position,label] where # is a number, position specifies the location on the number line graph to which the point must be dragged, and label specifies the label for the point. Note: A semicolon is necessary to delimit multiple elements. 10/2010 157 WebAssign Creating Questions Guide For the label variable, use the syntax for the <symimage> tag; for details see Creating Math Questions. The following table shows examples for coding the label variable. To Show: Code This: Example Code Block pi symbol pi flag1:[3.14,pi] stacked fraction x/y flag1:[0.5,1/2] square root sqrt(x) flag1:[3,sqrt(9)] nth root rootn(x) flag1:[<EQN 2**(1/3)>,root3(2)] Displayed to Students For points that cannot be located within the range of the number line graph, the position value is distractor. If all point values are set to distractor, the answer key must be specified as no solution. Examples The following table shows example code using points mode and its explanation. 10/2010 Example Description flag1:[0.5,1/2] Indicates that flag1 has a correct position value of 0.5 on the number line graph and the stacked fraction 1/2 is displayed as its label. flag1:[3.14,pi] Indicates that flag1 has a correct position value of 3.14 on the number line graph and an image of pi is displayed as its label. flag1:[1,1]; flag2:[distractor,1 5] Indicates that flag1 has a correct position value of 1 on the number line graph and an image of 1 is displayed as its flag. Flag2 is a distractor and the image of 15 is displayed as its label. Note: The upper_bound of the range must be set to less than 15. flag1:[distractor,1]; flag2:[distractor,2 ]; no solution Since all two points are distractors, the answer key must be set to no solution. Creating Math Questions 158 Answer Key Objects The answer key objects (for example, 3.2; (6.45, 6.75]) specify the correct answer for the question. The Number Line mode uses an intuitive syntax to distinguish between objects on the number line. Note that punctuation endpoints refers to the parentheses and bracket graphing symbols. To Do This: Use This Notation: Example Single closed circle Expressed as an evaluated number. 3.2 Single open circle Expressed as an evaluated number wrapped in parentheses. (1.4) Punctuation endpoints for intervals Expressed as evaluated numbers with the punctuation mark at the appropriate position. [‐1.3, 2.4) Multiple objects and intervals Separated by semicolons. 3.2; (6.45, 6.75] Specify ‐infinity and infinity as left Notes Intervals are expressed per usual mathematical notation (i.e., the lower and upper bounds are separated by a comma). (‐infinity, 3] (5, infinity] and right endpoints of intervals, respectively. Specify the answer key as no solution no solution Specify the answer key as the entire real number line (‐infinity, infinity) Notes: • Two answer key objects must not be placed so that they are less than 1/4 of the distance between two consecutive tickmarks. • If an answer key object is overlapping a tickmark but the answer is not actually on the tickmark, your tickmark spacing is too small. Decrease the range attribute to a smaller range. 10/2010 159 WebAssign Creating Questions Guide Below are examples of malformed answer keys and the corrected version. Malformed Example Why? Corrected Example (3,5];[4,6) The intervals overlap. (3,6) or (3,4;4,5;5,6) 3 is in the interval [2,4]. 3;[2,4] [2,4] or [2,3;3,4] Note: If for some reason your answer key cannot be understood — because of a typographical or other error — by default the key changes to -2;[1,3] with a default range of -5 to 5. If you see this answer key unexpectedly, there is a problem with the answer key you specified. Syntax examples Since all values must be evaluated to work, no values should include expressions involving operators that are not evaluated. You must use the <eqn> tag to evaluate expressions. The following examples show the proper syntax for the answer field for both single objects and intervals. In the examples, n is an evaluated number. Type Syntax Description Single point n Closed point at x = n Single point (n) Open point at x = n Interval n0, n1 Interval between two closed points Interval (n0), (n1) Interval between two open points Interval n0, n1) Interval between a closed point at x = n0 and a right parenthesis at x = n1 Interval (n0, n1 Interval between a left parenthesis at x = n0 and a closed point at x = n1 Interval [n0, n1] Interval between a left bracket at x = n0 and a right bracket at x = n1 Interval (‐infinity, n Interval between the left infinity arrow and a closed point at x = n Interval n, infinity) Interval between a closed point and the right infinity arrow Interval (‐infinity, infinity) Entire real line Grading For the purposes of grading, no partial credit is awarded. Each instance of the number line graph is worth one point. 10/2010 Creating Math Questions 160 If a student enters a mathematically malformed response, the student receives an error message and does not lose a submission attempt, unless you have chosen to count syntax errors as submissions at the class or assignment level. For example, if a student enters an interval from a right parenthesis to a left parenthesis, an error message is displayed. Mathematically-Equivalent Answers For the purposes of grading, the following equivalent answers are acceptable: • Lone open points in the user's response are ignored. For example, a response of of will be graded as though it were simply a response . Note: However, an answer key of 3;(4) is malformed and will not function. • Punctuation endpoints and point endpoints are treated as equivalent. For example, a response of will be graded the same as a response of . • Mathematically equivalent intervals are treated as equivalent. For example, a response of will be graded the same as a response of . 10/2010 161 WebAssign Creating Questions Guide Tolerance If an answer key object lies on a tickmark (labeled or unlabeled), a response object that overlaps that tickmark is counted as correct. If an answer key object lies in a space between two consecutive tickmarks, a response object that is within a small distance (1/4 of the distance between two consecutive tickmarks) of the answer key object's position is counted as correct provided that the response object falls between the same two consecutive tickmarks that the answer key object falls between. A handy way to remember this rule is that this precision is expected when a student measures using a ruler. Creating Graphing Questions A graphing question provides a graphing tool in the question for students to graph points, lines, segments, rays, circles, parabolas, and inequalities on a Cartesian coordinate plane. Graphing questions are automatically scored. To create a graphing question: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Graphing. 4. In Question, type your question. Use the answer placeholder string <_> to specify where the graphing tool should be displayed. 5. In Answer, type notation that describes the objects that you want the student to graph and the appearance of the grid. Each line in Answer represents a separate answer and defines a new graph, so do not press 10/2010 Creating Math Questions 162 ENTER unless you wish to have the student create multiple separate graphs. The following table describes the notation used to specify the objects that you want the student to graph. If the student needs to graph more than one object, separate each object with a semicolon, for example point:(9,3);point(6,7);point(2,2) Object How to specify answer Examples point Specify the point coordinates. point: (‐9, 3) point: (x, y) line Specify a linear equation for x and y, or specify two points on the line. line: y = 3*x ‐ 6 line: (0,‐6), (2,0) line: y = m*x + b line: y ‐ k = m * (x ‐ h) line: (x1,y1), (x2,y2) ray closed endpoint Specify the endpoint of the ray, followed by another point on the ray. ray open endpoint Specify the endpoint of the ray, followed by another point on the ray. line segment closed endpoints Specify the endpoints of the line segment. line segment open endpoints Specify the endpoints of the line segment. line segment closed and open endpoints Specify the endpoints of the line segment. circle Specify the center coordinates and radius of the circle or specify an equation. ray: [(0,0), (4,4)) ray: [(x1,y1), (x2,y2)) ray: ((5,0), (10,12)) ray: ((x1,y1), (x2,y2)) segment: [(5,0), (4,0)] segment: [(x1,y1), (x2,y2)] segment: ((212,45), (52,10)) segment: ((x1,y1), (x2,y2)) segment: ((5,0), (52,10)] segment: [(5,0), (52,10)) segment: ((x1,y1), (x2,y2)] segment: [(x1,y1), (x2,y2)) circle: (4, 3), 5 circle: (x‐4)^2+(y‐3)^2 = 25 circle: (a, b), r circle: (x‐a)^2 + (y‐b)^2 =r^2 parabola vertical axis Specify an equation for the parabola in the following form, or specify its vertex, a second point, and orientation: parabola: y = (x^2)/4 + 2*x ‐ 6 parabola: (3,3), (5,5), V parabola: y = a*x^2 + b*x + c parabola: (x1,y1), (x2,y2), V parabola horizontal axis Specify an equation for the parabola in the following form, or specify its vertex, a second point, and orientation: parabola: x = y^2 ‐ 2*y parabola: (3,3), (5,5), H parabola: x = a*y^2 + b*y + c parabola: (x1,y1), (x2,y2), H dashed line or parabola Prefix the keyword line or parabola with the keyword dashed. dashed line: y = 3*x ‐ 6 dashed parabola: (3,3), (5,5), H 10/2010 163 WebAssign Creating Questions Guide Object How to specify answer Examples linear inequality Specify an equation for the linear inequality. region: y ‐ 5 >= 3*x region: y > m*x + b region: y >= m*x + b region: y < m*x + b region: y <= m*x + b region: y ‐ k > m * (x ‐ h) region: y ‐ k >= m * (x ‐ h) region: y ‐ k < m * (x ‐ h) region: y ‐ k <= m * (x ‐ h) circular inequality Specify an equation for the circular inequality in the following form: region: (x‐4)^2+(y‐3)^2 <= 25 region: (x‐a)^2 + (y‐b)^2 > r^2 parabolic inequality Specify an equation for the parabolic inequality using the same form as for a parabola. region: x > 3*y^2 ‐ 5*y + 6 region: y > a*x^2 + b*x + c region: x <= a*y^2 + b*y + c intersection of inequalities Specify equations for each inequality on the same line, separated by semicolons. region:y >= x^2 ‐ 5; region:y < 2 no solution Specify the following code for a question with no solution: nosol nosol 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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. 10/2010 Creating Math Questions 164 Example Graphing Question The following table summarizes an actual question. QID 1077759 Name Template2 4.GRAPH.01. Mode Graphing Question <watex>Graph the equation \[y = 3x + 5\].</watex><br> <_> Answer line: y=3*x+5 Display to Students This section contains the following topics: • Specifying Equations in Graphing Question Answer Keys • Configuring the Graphing Tool Grid Display and Snap Behavior Specifying Equations in Graphing Question Answer Keys When you use line, circle, parabola, or region in your graphing question answer key, you have the option of specifying an equation for the key. You can use the following notation in your equations. Notes: • Do not use commas or spaces to separate digits in numbers. For example, 1000000 is correct, but 1,000,000 and 1 000 000 are not. • Do not use mixed numbers. Instead, use improper fractions. For example, 7/4 is correct, but 1 3/4 is not correct. 10/2010 165 WebAssign Creating Questions Guide Expression Notation Examples Math variables The only allowed variables in graphing question answer keys are x and y. line: y=x+1 Addition + line: y=x+1 Subtraction ‐ line: y=x‐1 Multiplication * line: y=x*2 You must use explicit multiplication. Division or fractions / line: y=x/4 Exponentiation ^ parabola: y=x^2 circle:(x‐1)^2+(y+3)^2=25 Ensure that your equation specifies a linear, circular, or parabolic function. Equality = line: y=x+1 Inequality > < >= <= region: y>x+1 region: y<x+1 region: y>=x^2+3*x+1 region: (x‐1)^2+(y+3)^2<=25 Order of Operations () circle:(x‐1)^2+(y+3)^2=25 Pi (π) pi parabola: y=pi*x^2 Substituting 3.14 only approximates this value. Configuring the Graphing Tool Grid Display and Snap Behavior In your graphing questions, you can specify the display and behaviors for each coordinate axis. You can set the minimum and maximum displayed values and the spacing between gridlines and value labels. You can hide gridlines, labels, or coordinate axes. And you can configure the snap spacing, which determines how objects drawn on the graphing tool are positioned relative to the coordinate grid when they “snap” to the nearest specified unit. To configure the grid display and snap behavior for the graphing tool, you can add any of the following notation to the answer line, delimiting each item with a semicolon. For example, to set the minimum and maximum values displayed for the graph of a linear equation, your answer key could be: line: y=x+1; axes: [0, 30, 0, 30] Spacing values must be positive decimal numbers; minimum and maximum values for axes must be decimal numbers, and the maximum must be greater than the minimum. Default Value Configuration Notation Set the maximum and minimum values displayed on the grid. axes: [x_minimum, x_maximum, y_minimum, y_maximum] -10, 10, -10, 10 axes: [0, 30, 0, 30] Hide the y-axis yav:false true yav:false 10/2010 Example Creating Math Questions 166 Configuration Notation Default Value Example Hide the x-axis xav:false true xav:false Hide the y-axis value labels yvv:false true yvv:false Hide the x-axis value labels xvv:false true xvv:false Hide horizontal gridlines ygv:false true ygv:false Hide vertical gridlines xgv:false true xgv:false Set the y-axis value label spacing yvs:spacing 1 yvs:50 Set the x-axis value label spacing xvs:spacing 1 xvs:40 Set the y-axis grid spacing ygs:spacing 1 ygs:25 Set the x-axis grid spacing xgs:spacing 1 xgs:20 Set the y-axis snap spacing yss:spacing 1 yss:0.25 Set the x-axis snap spacing xss:spacing 1 xss:0.1 10/2010 5 Creating Chemistry Questions You can create questions for your chemistry courses that let your students enter correctly formatted chemical notation or draw chemical structures and reactions that are scored automatically. You can also use tools to display chemical notation or chemical structures in your questions. ChemPad lets your students enter chemical notation that includes correctly formatted subscripts, superscripts, and reaction arrows. What’s more, chemPad provides chemically aware scoring and hints that help your students identify mistakes in their responses. MarvinSketch lets your students answer questions by drawing chemical structures and reactions that are scored automatically. You can also use MarvinSketch to display chemical structures in your questions using a variety of modes, including ball-and-stick drawings that your students can rotate in 3 dimensions to view from any angle. This section contains the following topics: • Displaying Chemistry Notation in Your Questions • Creating chemPad Questions • Creating MarvinSketch Questions 10/2010 Creating Chemistry Questions 168 Displaying Chemistry Notation in Your Questions Although you can use standard HTML tags like <i> and <sup> to display correctly formatted chemistry notation in your questions, WebAssign provides several tags that can make displaying chemistry notation easier. Note: Do not combine the notation described in this topic with LaTeX or <symimage> markup. Displaying Chemical Formulas You can use the <h:chemical> tag to display most chemical formulas correctly using a simplified notation that precedes subscripts with an underscore (_) and superscripts with a caret (^). See the following examples. Example Display <h:chemical> H_2O </h:chemical> H2 O <h:chemical> Ca^2+ </h:chemical> Ca2+ <h:chemical> SO_4^2‐ </h:chemical> SO42- <h:chemical> [Co(SCN)_2(H_2O)_4]^+ </h:chemical> [Co(SCN)2(H2O)4]+ Displaying Isotopes You can use the <watex> tag and its \over markup to display isotope mass numbers over atomic numbers. See the following example. Example Display <watex> \over{233}{91}Pa </watex> Displaying Chemical Reactions You can use the <h:reaction> tag to display most chemical reactions correctly using a simplified notation that precedes subscripts with an underscore (_) and superscripts with a caret (^), and replaces ‐>, <‐, and <‐> with reaction arrows. See the following examples. Example Display <h:reaction> 2 H_2O_2 ‐> 2 H_2O + O_2 </h:reaction> 2 H2O2 → 2 H2O + O2 <h:reaction> N_2(g) + O_2(g) <‐> 2 NO(g) </h:reaction> N2(g) + O2(g) ↔ 2 NO(g) <h:reaction> 4 NO(g) + O_2(g) <‐ 2 N_2O_3(g) </h:reaction> 4 NO(g) + O2(g) ← 2 N2O3(g) Optionally, you can type either <s:revrxarrow> or ⇌ to display ⇌ . 10/2010 169 WebAssign Creating Questions Guide Displaying Electron Configurations You can use the <h:e‐config> tag to display electron configuration notation correctly without having to indicate superscripts or italics. See the following examples. Example Display <h:e‐config> 1s2 2s2 2p5 </h:e‐config> 1s2 2s2 2p5 <h:e‐config> [He] 2s2 2p5 </h:e‐config> [He] 2s2 2p5 Displaying Equilibrium Expressions You can combine the <watex> tag and its \frac markup with the <h:chemical> tag to display equilibrium expressions with fractions. See the following example. Example Display <watex>\[ K_b \] = \frac{ <h:chemical>[OH^‐ ] <s:middot> [C_5H_5NH^+] </h:chemical> } { <h:chemical>[C_5H_5N] </h:chemical> } </watex> Tips: • In the <h:chemical>, <h:reaction>, <h:e‐config>, and <watex> tags, you can display Perl variables without enclosing them in <eqn> or <EQN>. Just type the variable, for example, $a, inside the tag where its value should be displayed. You might need to use a space to separate the variable name from any letters or numbers that follow it. • You can add uppercase or lowercase Greek letters by typing <s:lettername> in your question, for example, <s:nu> for ν or <s:Delta> for Δ. See Also: • Displaying Notation with WaTeX on page 108 • Displaying Notation with LaTeX on page 120 • Displaying Notation with <symimage> on page 121 • Adding Special Characters to Your Questions on page 12 Creating chemPad Questions You can create chemPad questions to let your students enter chemical notation that includes correctly formatted subscripts, superscripts, and reaction arrows. 10/2010 Creating Chemistry Questions 170 The chemPad tool also provides chemically aware hints when your students submit incorrect responses, for example, to let your students know that they have an unbalanced equation. Note: ChemPad hints are shown to your students only after they submit a response to the question, and only if you enable displaying Hints, Tutorials & eBook Links for the assignment. Enabling the chemPad tool when you are writing a question is simple — you set $PAD='chem' in Answer. But creating effective chemPad questions also involves specifying how your students’ responses should be parsed, in order to: • restrict or allow different kinds of chemically equivalent notation, for example, elements in a formula listed in non-standard order • accurately score correct and incorrect student responses • provide meaningful hints when your students enter incorrect responses To do this, you must set the $CHEM variable to specify one or more parsing methods as described in the following topics. Tip: Use the question titled chemPad.tutorial in an assignment to teach yourself and your students how to answer questions using chemPad. This section contains the following topics: • Creating chemPad Questions for Formulas • Creating List and Rank-Order chemPad Questions • Creating chemPad Questions for Reactions • Creating chemPad Questions for Kinetic or Equilibrium Expressions • Creating chemPad Questions for Electrochemical Cell Notation • Creating chemPad Questions for Electron Configuration • Creating chemPad Answer Keys Creating chemPad Questions for Formulas When you create chemPad questions that are answered with a chemical formula, you can choose whether to allow chemically equivalent responses or to require your students to enter the standard formula that matches your answer key. You can also create chemPad questions for which the correct response is the keyword NONE. 10/2010 171 WebAssign Creating Questions Guide You can enable support for specific kinds of chemically equivalent notation in your students’ responses: • For some introductory chemistry questions, you can let your students specify elements in any order, for example, either CH4N2O or CN2H4O. • You can let your students enter condensed formulas such as (NH2)2CO for CH4N2O. Allowing condensed formulas also allows potentially undesirable variations like HNHCHNHO. • You can let your students enter charges with the sign either preceding or following the value, such as Mg2+ or Mg+2. • You can let your students specify ionizable protons either at the beginning of the formula or in their standard place, such as CH3CO2H or HCH3CO2. • You can let your students use alternative nuclear particle names, such as β or e, and specify nuclide superscripts and subscripts in either order, for example, by typing either ^0_‐1beta or _‐1^0beta to display . • You can let your students enter solvate dot notation, such as CoCl2 · 2 H2O. • When the correct chemical formula must be stated in exactly one way — or if the answer is the keyword NONE — you can require your students’ responses to exactly match your answer key. To create a chemPad question for which the answer is a formula: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. In Question, type your question. Provide relevant information about assumptions or expectations for the question, for example, the conditions for the question — STP, SATP, or reaction/prevailing conditions — or whether states-of-matter should be specified in the response. Use the answer placeholder string <_> to specify where the answer box should be displayed. 5. In Answer, type the following items on a single line: <EQN $PAD='chem'; $CHEM='method'; ''>answer_key where answer_key specifies the correct answer to the problem, and method is one of the following chemPad parsing methods: Allowed Notation Example Method Only exact key match CH4N2O none (specify $CHEM='none') 10/2010 Formula elements in any order CH4N2O or CN2H4O fmla Condensed formulas (NH2)2CO or CH4N2O fmla,index Ion charges Mg2+ or Mg+2 ion Ionizable protons first CH3CO2H or HCH3CO2 ion,acid Creating Chemistry Questions 172 Allowed Notation Nuclear particles and nuclides Example or Nuclear particles with charges Solvate dot Method nclr nclr,ion CoCl2 · 2 H2O solvate For example: Answer Code H2SO4 <EQN $PAD='chem'; $CHEM='none'; ''>H_{2}SO_{4} HNO3 <EQN $PAD='chem'; $CHEM='fmla'; ''>HNO_{3} CH4N2O <EQN $PAD='chem'; $CHEM='fmla,index'; ''>CH_{4}N_{2}O Mg2+ <EQN $PAD='chem'; $CHEM='ion'; ''>Mg^{2+} NH4+ <EQN $PAD='chem'; $CHEM='ion,acid'; ''>NH_{4}^{+} <EQN $PAD='chem'; $CHEM='nclr'; ''>^{0}_{‐1}beta CuSO4 · 6 H2O <EQN $PAD='chem'; $CHEM='solvate'; ''>CuSO_{4} . 6 H_{2}O Notes: • 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. • As with other fill-in-the-blank questions, you can specify alternative answer keys separated by the characters {tab}. • For information about how to specify chemical notation in your answer key, see Creating chemPad Answer Keys on page 191. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10/2010 173 WebAssign Creating Questions Guide 10. 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 chemPad Question (Allow Equivalent Formulas) The following table summarizes an actual question. QID 1534325 Name Template2 5.CHEMP.01. Mode Fill‐in‐the‐Blank Question Write the formula for the product of SO<sub>3</sub> + H<sub>2</sub>O. <br> <_> Answer <EQN $PAD='chem'; $CHEM='fmla'; ''>H_{2}SO_{4} Display to Students Example chemPad Question (Require Exact Key Matching) The following table summarizes an actual question. QID 1534329 Name Template2 5.CHEMP.02. Mode Fill‐in‐the‐Blank Question Provide the chemical formula for nitric acid. <br> <_> Answer <EQN $PAD='chem'; $CHEM='none'; ''>HNO_{3} Display to Students 10/2010 Creating Chemistry Questions 174 Example chemPad Question (Solvate) The following table summarizes an actual question. QID 1534314 Name Template2 5.CHEMP.03. Mode Fill‐in‐the‐Blank Question Provide the chemical formula for cobalt(II) chloride dihydrate.<br> <_> Answer <EQN $PAD='chem'; $CHEM='solvate'; ''>CoCl_{2} . 2 H_{2}O Display to Students Creating List and Rank-Order chemPad Questions When you create chemPad questions that are answered with a list of items, you can choose whether order is important or not. Unordered lists are delimited by commas and order is not important, so the following responses are equivalent: • Li, Na, K • K, Na, Li Rank-order lists are delimited by three symbols: >, <, and =. These symbols are used to indicate items’ relative ranking, so the following responses are not equivalent: • H < He < Li • Li < H < He Either-order lists, like rank-order lists, are delimited by three symbols: >, <, and =. These symbols are used to indicate items’ relative ranking, but your students can specify their response either in ascending or descending order, so the following responses are equivalent: • H < He < Li • Li > He > H Note: Do not specify answer keys containing the < or > characters directly in Answer, as these characters might be interpreted as the start or end of a tag. Instead, assign your answer key to a variable and reference the variable as described in this topic. To create a chemPad question for which the answer is a list: 1. Click Questions > Create. The Question Editor opens. 10/2010 175 WebAssign Creating Questions Guide 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. In Question, add the following code, replacing answer_key with your answer key: <eqn> $mykey='answer_key'; '' </eqn> This code assigns your answer key to the variable $mykey. You can use a different variable name if needed. For example: Answer Code He, Ne, Ar, Kr, Xe, Rn (in any order) <eqn> $mykey='He, Ne, Ar, Kr, Xe, Rn'; '' </eqn> NO2 > N2 > NH3 <eqn> $mykey='NO_{2} > N_{2} > NH_{3}'; '' </eqn> NO2 > N2 > NH3 or NH3 < N2 < NO2 <eqn> $mykey='NO_{2} > N_{2} > NH_{3}'; '' </eqn> Note: To ensure that your answer key is unambiguous, always specify rank-order answer keys in either ascending or descending order. Incorrect: Li > H < He Correct: H < He < Li Correct: Li > He > H 5. In Question, type your question. Provide relevant information about assumptions or expectations for the question, for example, the conditions for the question — STP, SATP, or reaction/prevailing conditions — or whether states-of-matter should be specified in the response. Use the answer placeholder string <_> to specify where the answer box should be displayed. 6. In Answer, type the following items on a single line: <EQN $PAD='chem'; $CHEM='method'; $mykey> where method is one of the following chemPad parsing methods: 10/2010 List Type Delimiters Method Unordered , rnk Rank-order ><= rnk Either-order ><= rnk,either Creating Chemistry Questions 176 For example: Answer Code He, Ne, Ar, Kr, Xe, Rn (in any order) <EQN $PAD='chem'; $CHEM='rnk'; $mykey> NO2 > N2 > NH3 <EQN $PAD='chem'; $CHEM='rnk'; $mykey> NO2 > N2 > NH3 or NH3 < N2 < NO2 <EQN $PAD='chem'; $CHEM='rnk,either'; $mykey> By default, your students must specify each chemical formula exactly as listed in your answer key. To allow specific kinds of notation, you can add a comma and one of the following methods after rnk or rnk,either: Notation Example Method Formula elements in any order CH4N2O or CN2H4O fmla Condensed formulas (NH2)2CO or CH4N2O fmla,index Solvate dot CuSO4 · 6 H2O solvate Nuclear particles and nuclides or Nuclear particles with charges nclr nclr,ion Ion charges Mg2+ or Mg+2 ion Ionizable protons first CH3CO2H or HCH3CO2 ion,acid For example: <EQN $PAD='chem'; $CHEM='rnk,either,fmla,index'; $mykey> Notes: • Specify methods only in the order listed here. • 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. • As with other fill-in-the-blank questions, you can specify alternative answer keys separated by the characters {tab}. For example: <EQN $PAD='chem'; $CHEM='rnk'; $mykey> {tab} <EQN $mykey2> • For information about how to specify chemical notation in your answer key, see Creating chemPad Answer Keys on page 191. 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 10/2010 177 WebAssign Creating Questions Guide 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 11. 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 chemPad Question (Unordered List) The following table summarizes an actual question. QID 1534331 Name Template2 5.CHEMP.04. Mode Fill‐in‐the‐Blank Question <eqn> $mykey='He, Ne, Ar, Kr, Xe, Rn'; '' </eqn> List the noble gases in any order. (Separate substances in the list with a comma.)<br> <_> Answer <EQN $PAD='chem'; $CHEM='rnk'; $mykey> Display to Students Example chemPad Question (Rank-Order List) The following table summarizes an actual question. 10/2010 QID 1534321 Name Template2 5.CHEMP.05. Mode Fill‐in‐the‐Blank Creating Chemistry Questions 178 Question <eqn> $mykey='NO_{2} > N_{2} > NH_{3}'; '' </eqn> Rank the following gases by mass density (at identical temperatures and pressures) in decreasing order: <h:chemical>N_2, NH_3, and NO_2</h:chemical>. (Use the appropriate <, =, or > symbol to separate substances in the list.)<br> <_> Answer <EQN $PAD='chem'; $CHEM='rnk'; $mykey> Display to Students Example chemPad Question (Either-Order List) The following table summarizes an actual question. QID 1534315 Name Template2 5.CHEMP.06. Mode Fill‐in‐the‐Blank Question <eqn> $mykey='NO_{2} > N_{2} > NH_{3}'; '' </eqn> Rank the following gases by mass density (at identical temperatures and pressures): <h:chemical>N_2, NH_3, and NO_2</h:chemical>. (Use the appropriate <, =, or > symbol to separate substances in the list.)<br> <_> Answer <EQN $PAD='chem'; $CHEM='rnk,either'; $mykey> Display to Students 10/2010 179 WebAssign Creating Questions Guide Creating chemPad Questions for Reactions When you create chemPad questions that are answered with a reaction expression, your students can enter the order of compounds (with their coefficients) differently from the answer key in either the reactants or the products. For example, O2 + CH4 → CO2 + H2O is considered equivalent to CH4 + O2 → H2O + CO2. Your students can also enter solvate dot notation if needed. You can choose whether to allow alternative reaction arrows in your students’ responses. You can require your students to use the reaction arrow specified in your answer key, allow them to use any reaction arrow, allow either an equilibrium arrow or a right arrow, or allow either an equilibrium arrow or a left arrow. Note: Do not specify answer keys containing the < or > characters directly in Answer, as these characters might be interpreted as the start or end of a tag. Instead, assign your answer key to a variable and reference the variable as described in this topic. To create a chemPad question for which the answer is a reaction: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. In Question, add the following code, replacing answer_key with your answer key: <eqn> $mykey='answer_key'; '' </eqn> This code assigns your answer key to the variable $mykey. You can use a different variable name if needed. For example: 10/2010 Answer Code CH4 + 2 O2 → CO2 + 2 H2O <eqn> $mykey='CH_{4} + 2 O_{2} ‐‐> CO_{2} + 2 H_{2}O'; '' </eqn> 2 SO2 + O2 ⇌ 2 SO3 <eqn> $mykey='2 SO_{2} + O_{2} <=> 2 SO_{3} '; '' </eqn> Creating Chemistry Questions 180 Answer Code H3PO4(aq) + 3 NaOH(aq) → 3 H2O(l) + Na3PO4(aq) <eqn> $mykey='H_{3}PO_{4}(aq) + 3 NaOH(aq) ‐‐> 3 H_{2}O(l) + Na_{3}PO_{4}(aq)'; '' </eqn> 4 NO(g) + O2(g) ← 2 N2O3(g) <eqn> $mykey='4 NO(g) + O_{2}(g) <=> 2 N_{2}O_{3}(g)'; '' </eqn> 5. In Question, type your question. Provide relevant information about assumptions or expectations for the question, for example, the conditions for the question — STP, SATP, or reaction/prevailing conditions — or whether states-of-matter should be specified in the response. Use the answer placeholder string <_> to specify where the answer box should be displayed. 6. In Answer, type the following items on a single line: <EQN $PAD='chem'; $CHEM='method'; $mykey> where method is one of the following chemPad parsing methods: Reaction Type Allowed Reaction Arrows Method Any Only the reaction arrow specified by the answer key. rxn Equilibrium → or ⇌ or ← rxn,equ Product-favored → or ⇌ rxn,eqr Reactant-favored ← or ⇌ rxn,eql For example: Answer Code CH4 + 2 O2 → CO2 + 2 H2O <EQN $PAD='chem'; $CHEM='rxn'; $mykey> 2 SO2 + O2 ⇌ 2 SO3 <EQN $PAD='chem'; $CHEM='rxn,equ'; $mykey> H3PO4(aq) + 3 NaOH(aq) → 3 H2O(l) + Na3PO4(aq) <EQN $PAD='chem'; $CHEM='rxn,eqr'; $mykey> 4 NO(g) + O2(g) ← 2 N2O3(g) <EQN $PAD='chem'; $CHEM='rxn,eql'; $mykey> By default, your students must specify each chemical formula exactly as listed in your answer key. To allow specific kinds of notation, you can add a comma and one of the following methods after rxn, rxn,equ, rxn, eqr, or rxn,eql: Notation Example Method Formula elements in any order CH4N2O or CN2H4O fmla Condensed formulas (NH2)2CO or CH4N2O fmla,index 10/2010 181 WebAssign Creating Questions Guide Notation Nuclear particles and nuclides Example or Nuclear particles with charges Method nclr nclr,ion Ion charges Mg2+ or Mg+2 ion Ionizable protons first CH3CO2H or HCH3CO2 ion,acid For example: <EQN $PAD='chem'; $CHEM='rxn,equ,fmla,index'; $mykey> Notes: • You do not need to specify the solvate mode for your students to enter solvate dot notation. • Specify methods only in the order listed here. • 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. • As with other fill-in-the-blank questions, you can specify alternative answer keys separated by the characters {tab}. For example: <EQN $PAD='chem'; $CHEM='rxn'; $mykey> {tab} <EQN $mykey2> • For information about how to specify chemical notation in your answer key, see Creating chemPad Answer Keys on page 191. 7. Optionally, type a Solution. 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. 8. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 9. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 11. 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. 10/2010 Creating Chemistry Questions 182 You can use your question in an assignment and see it in your My Questions list only after it is saved. Example chemPad Question (Reaction) The following table summarizes an actual question. QID 1534317 Name Template2 5.CHEMP.07. Mode Fill‐in‐the‐Blank Question <eqn> $mykey='2 HCl + CaCO_{3} ‐‐> CaCl_{2} + CO_{2} + H_{2}O'; '' </eqn> Show the reaction between hydrochloric acid and calcium carbonate that produces calcium chloride, water, and carbon dioxide. (<p:lowcoeff> Omit states‐of‐matter in your answer.)<br> <_> Answer <EQN $PAD='chem'; $CHEM='rxn'; $mykey> Display to Students Example chemPad Question (Reaction) The following table summarizes an actual question. QID 1534332 Name Template2 5.CHEMP.08. Mode Fill‐in‐the‐Blank Question <eqn> $mykey='C_{5}H_{5}N(aq) + H_{2}O(l) <=> C_{5}H_{5}NH^{+}(aq) + OH^{‐}(aq)'; '' </eqn> Write the reaction for pyridine, <h:chemical>C_5H_5N</h:chemical>, acting as a base in water. (<p:lowcoeff> Include states‐of‐matter under SATP conditions in your answer.)<br> <_> 10/2010 183 WebAssign Creating Questions Guide Answer <EQN $PAD='chem'; $CHEM='rxn,ion,acid'; $mykey> Display to Students Example chemPad Question (Nuclear Equation) The following table summarizes an actual question. QID 1534326 Name Template2 5.CHEMP.09. Mode Fill‐in‐the‐Blank Question <eqn> $mykey='^{131}_{53}I ‐‐> ^{0}_{‐1}beta + ^{131}_{54}Xe'; '' </eqn> Write the nuclear equation for beta decay of Iodine‐131. (<p:lowcoeff> Omit states‐of‐matter in your answer.)<br> <_> Answer <EQN $PAD='chem'; $CHEM='rxn,nclr'; $mykey> Display to Students Creating chemPad Questions for Kinetic or Equilibrium Expressions When you create chemPad questions that are answered with a kinetic or equilibrium expression, your students can change the order of compounds (with their exponents) relative only to their position in a fraction. 10/2010 Creating Chemistry Questions 184 For example, is considered equivalent to . Your students can also enter multiplication or solvate dot notation if needed. Notes: • When your students enter subscripted or superscripted letters in chemPad, they must enclose the subscript or superscript in braces {} to receive credit. For example, to enter Kb, your students must type K_{b}. • Your students must specify solvate dots in their responses. However, if they omit multiplication dots, their responses will still be scored correctly. To create a chemPad question for which the answer is a kinetic or equilibrium expression: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. In Question, type your question. Provide relevant information about assumptions or expectations for the question, for example, the conditions for the question — STP, SATP, or reaction/prevailing conditions — or whether states-of-matter should be specified in the response. Use the answer placeholder string <_> to specify where the answer box should be displayed. 5. In Answer, type the following items on a single line: <EQN $PAD='chem'; $CHEM='rqn'; ''>answer_key where answer_key specifies the correct answer to the problem, and method is one of the following chemPad parsing methods: Notation Example Method Formula elements in order specified by answer key CH4N2O rqn Formula elements in any order CH4N2O or CN2H4O rqn,fmla Condensed formulas (NH2)2CO or CH4N2O rqn,fmla,index Ion charges Mg2+ or Mg+2 rqn,ion Ionizable protons first CH3CO2H or HCH3CO2 rqn,ion,acid 10/2010 185 WebAssign Creating Questions Guide For example: Answer Code <EQN $PAD='chem'; $CHEM='rqn,ion'; ''> K_{b} = [OH^{‐}] . [C_{5}H_{5}NH^{+}] / [C_{5}H_{5}N] Notes: • 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. • As with other fill-in-the-blank questions, you can specify alternative answer keys separated by the characters {tab}. • For information about how to specify chemical notation in your answer key, see Creating chemPad Answer Keys on page 191. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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 chemPad Question (Equilibrium Expression) The following table summarizes an actual question. 10/2010 QID 1534319 Name Template2 5.CHEMP.10. Mode Fill‐in‐the‐Blank Creating Chemistry Questions 186 Question Write the <i>K</i><sub>b</sub> equilibrium expression for pyridine, C<sub>5</sub>H<sub>5</sub>N, acting as a base in water. (<p:lowcoeff> Omit states‐of‐matter in your answer.)<br> <_> Answer <EQN $PAD='chem'; $CHEM='rqn,ion,acid'; ''>K_{b} = [OH^{‐}] . [C_{5}H_{5}NH^{+}] / [C_{5}H_{5}N] Display to Students Creating chemPad Questions for Electrochemical Cell Notation When you create chemPad questions that are answered with electrochemical cell notation, your students must enter the notation in the manner prescribed by the answer key, so, for example, Zn(s) | ZnSO4(aq) || CuSO4(aq) | Cu(s) can not be substituted for Zn(s) | Zn+2(aq) || Cu+2(aq) | Cu(s). Your students can specify charges in various ways, for example, either Mg2+ or Mg+2. To create a chemPad question for which the answer is electrochemical cell notation: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. In Question, type your question. Provide relevant information about assumptions or expectations for the question, for example, the conditions for the question — STP, SATP, or reaction/prevailing conditions — or whether states-of-matter should be specified in the response. Use the answer placeholder string <_> to specify where the answer box should be displayed. 5. In Answer, type the following items on a single line: <EQN $PAD='chem'; $CHEM='vcell'; ''>answer_key where answer_key specifies the correct answer to the problem. 10/2010 187 WebAssign Creating Questions Guide For example: Answer Code H+ | H2 | Pt <EQN $PAD='chem'; $CHEM='vcell'; ''>H^{+} | H_{2} | Pt Notes: • 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. • As with other fill-in-the-blank questions, you can specify alternative answer keys separated by the characters {tab}. • For information about how to specify chemical notation in your answer key, see Creating chemPad Answer Keys on page 191. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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 chemPad Question (Electrochemical Cell Notation) The following table summarizes an actual question. 10/2010 QID 1534320 Name Template2 5.CHEMP.11. Mode Fill‐in‐the‐Blank Creating Chemistry Questions 188 Question Write the standard line notation for the following cell. Assume all concentrations are 1.0 <i>M</i> and all partial pressures are 1.0 atm.<br > <h:chemical>Zn(s) + Ag^+(aq) ⇌ Zn^2+(aq) + Ag(s)</h:chemical><br> <_> Answer <EQN $PAD='chem'; $CHEM='vcell'; ''>Zn(s) | Zn^{2+}(aq) || Ag^{+}(aq) | Ag(s) Display to Students Creating chemPad Questions for Electron Configuration When you create chemPad questions that are answered with electron configuration notation, your students can use either numerical or Aufbau order, but answer keys are shown in Aufbau order, for example, [Ar] 4s2 3d10. You can choose the kinds of electron configuration notation to allow in your students’ responses. Full requires your students to use full notation — for example, 1s2 2s2 2p2. Noble requires your students to use noble gas notation — for example, [He] 2s2 2p2. Either lets your students use either full notation — for example, 1s2 2s2 2p2 — or noble gas notation — for example, [He] 2s2 2p2. Orbit lets your students use variants for orbital hybridization, for example, dsp3 or sp3d, that are considered equivalent. To create a chemPad question for which the answer is an electron configuration: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. In Question, type your question. Provide relevant information about assumptions or expectations for the question. Use the answer placeholder string <_> to specify where the answer box should be displayed. 5. In Answer, type the following items on a single line: <EQN $PAD='chem'; $CHEM='method'; ''>answer_key 10/2010 189 WebAssign Creating Questions Guide where answer_key specifies the correct answer to the problem, and method is one of the following chemPad parsing methods: Behavior Example Method Require full notation 1s2 2s2 2p2 econf,full Require noble gas notation [He] 2s2 2p2 econf,noble Allow either full or noble gas notation 1s2 2s2 2p2 or econf,either [He] 2s2 2p2 Allow variants for orbital hybridization dsp3 or sp3d econf,orbit For example: Answer 2 2 1s 2s 2p Code 2 <EQN $PAD='chem'; $CHEM='econf,full'; ''> 1s^{2} 2s^{2} 2p^{2} [He] 2s2 2p2 <EQN $PAD='chem'; $CHEM='econf,noble'; ''> [He] 2s^{2} 2p^{2} 1s2 2s2 2p2 or <EQN $PAD='chem'; $CHEM='econf,either'; ''> 1s^{2} 2s^{2} 2p^{2} [He] 2s2 2p2 sp2 <EQN $PAD='chem'; $CHEM='econf,orbit'; ''>sp^{2} Notes: • 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. • As with other fill-in-the-blank questions, you can specify alternative answer keys separated by the characters {tab}. • For information about how to specify chemical notation in your answer key, see Creating chemPad Answer Keys on page 191. 6. Optionally, type a Solution. 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. 7. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 8. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 9. Optionally, 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 10/2010 Creating Chemistry Questions 190 search results. To change the permission, see Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 10. 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 chemPad Question (Electron Configuration) The following table summarizes an actual question. QID 1534316 Name Template2 5.CHEMP.12. Mode Fill‐in‐the‐Blank Question Write the electron configuration for Ca.<br> <_> Answer <EQN $PAD='chem'; $CHEM='econf,either'; ''>1s^{2} 2s^{2} 2p^{6} 3s^{2} 3p^{6} 4s^{2} Display to Students Example chemPad Question (Orbital Hybridization) The following table summarizes an actual question. QID 1534318 Name Template2 5.CHEMP.13. Mode Fill‐in‐the‐Blank Question What hybrid orbital would be expected for the central atom in SO<sub>2</sub>?<br> <_> Answer <EQN $PAD='chem'; $CHEM='econf,orbit'; ''>sp^{2} Display to Students 10/2010 191 WebAssign Creating Questions Guide Creating chemPad Answer Keys When you create your chemPad answer key, use the codes described in the following table. Type spaces where they belong in your notation, such as between quantum levels in an electron configuration and between chemical formulas and arrows or plus signs in reaction equations. Note: Be sure that your question provides relevant information about assumptions or expectations for the question, for example, the conditions for the question — STP, SATP, or reaction/prevailing conditions — or whether states-of-matter should be specified in the response. Best Practice: Always enclose the contents of superscripts or subscripts in braces {}, even though technically you can omit them when the superscript or subscript includes only numbers and charges. Expression Code Example Display Subscript _ (underscore) H_{2}O H2 O Superscript ^ (caret) Ca^{2+} Ca2+ Electron configuration See examples. 1s^{2} 2s^{2} 2p^{5} 1s2 2s2 2p5 [He] 2s^{2} 2p^{5} [He] 2s2 2p5 SO_{4}^{2‐} SO42- [Co(SCN)_{2}(H_{2}O)_{4}] ^{+} [Co(SCN)2(H2O)4]+ Combining subscripts and superscripts See examples. ^{233}_{91}Pa Forward reaction arrow --> 2 H_{2}O_{2} ‐‐> 2 H_{2}O + O_{2} 2 H2O2 → 2 H2O + O2 Equilibrium reaction <=> N_{2}(g) + O_{2}(g) <=> 2 NO(g) N2(g) + O2(g) ⇌ 2 NO(g) Reverse reaction arrow <‐‐ 4 NO(g) + O_{2}(g) <‐‐ 2 N_{2}O_{3}(g) 4 NO(g) + O2(g) ← 2 N2O3(g) States of matter (g) (l) (s) CH_{4}(g) + 4 S(s) ‐‐> CS_{2}(l) + 2 H_{2}S( g) CH4(g) + 4 S(s) → CS2(l) + 2 H2S(g) Lowercase Greek letters The lowercase letter name ^{0}_{‐1}beta Uppercase Greek letters The capitalized letter name DeltaH_{f} Stacked fraction / Multiplication or solvate dot (·) . (period) K_{c} = [COCl] . [Cl] / [CO] . [Cl_{2}] Delimiters between items in rank-order questions > < = 10/2010 K < P < Br ΔHf K < P < Br Creating Chemistry Questions 192 Expression Code Example Display Delimiters between items in an unordered list , HClO, H^{+}, ClO^{‐} HClO, H+, ClO- Phase boundary, salt bridge (electrochemical cell) |, || Zn(s) | Zn^{2+}(aq) || Ag^{+}(aq) | Ag(s) Zn(s) | Zn2+(aq) || Ag+(aq) | Ag(s) None (no solution) NONE NONE NONE (Students enter NONE instead of leaving answer box empty) As with other Fill-in-the-Blank questions, you can specify multiple correct answers delimited with the {tab} characters. This is most commonly used when you require exact key matching. For example, to allow students to identify chromic acid as either H2CrO4 or H2Cr2O7, your answer key would be: H_{2}CrO_{4} {tab} H_{2}Cr_{2}O_{7} Creating MarvinSketch Questions You can create questions that use the MarvinSketch tool to allow your students to create or complete drawings of chemical structures and reactions that are scored automatically. You can also use MarvinSketch to display chemical structures in your questions. Tip: Use the question titled marvinsketch.tutorial in an assignment to teach yourself and your students how to answer questions using MarvinSketch. This section includes the following topics: • Understanding MarvinSketch Drawing Modes • Creating MarvinSketch Questions That Do Not Display an Initial Drawing • Creating MarvinSketch Questions That Display an Initial Drawing • Displaying Chemical Structures in Your Questions with MarvinSketch • Using the MarvinSketch Key Generation Tool • Creating MarvinSketch Questions That Use Canonical or Combinatorial SMILES Strings 10/2010 193 WebAssign Creating Questions Guide Understanding MarvinSketch Drawing Modes Whether you are using MarvinSketch to display chemical structures and reactions or to have your students draw them, you need to select the correct drawing mode for your drawing. Important: The treatment of hydrogen atoms varies by drawing mode and affects how your students’ drawings are scored. • Explicit means that all hydrogens must be added to the drawing manually. • Implicit means that the correct number of hydrogens are automatically assumed to be present, and might be labeled either for all atoms or for heteroatoms only. When hydrogens are displayed implicitly, you and your students can still draw them manually, but chemically equivalent drawings that differ from the answer key by representing implicit hydrogens explicitly or vice-versa will be scored as incorrect. The following table describes the MarvinSketch drawing modes that are available in WebAssign: Drawing Mode Description complete Used to draw the entire molecular structure, including hydrogens. • Hydrogens: explicit, labeled • Carbons: labeled condensed Used to draw the molecular structure except for hydrogens, especially in organic chemistry. • Hydrogens: implicit, labeled • Carbons: labeled skeleton Used to draw complex organic molecules. • Hydrogens: implicit, labeled only for heteroatoms • Carbons: not labeled skeleton_adv For students in higher-level chemistry courses, displays molecules like skeleton mode and enables the Advanced Templates toolbar. Used to draw complex organic molecules. • Hydrogens: implicit, labeled only for heteroatoms • Carbons: not labeled reaction Used to draw chemical reactions. Displays molecules like condensed mode, but lets you add a reaction arrow and automatically adds + signs among the reactants and the products. • Hydrogens: implicit, labeled • Carbons: labeled 10/2010 Display Creating Chemistry Questions 194 Drawing Mode Description reaction_adv For students in higher-level chemistry courses, displays molecules like skeleton mode and enables the Advanced Templates toolbar. Display Used to draw chemical reactions. Lets you add a reaction arrow and automatically adds + signs among the reactants and the products. • Hydrogens: implicit, labeled only for heteroatoms • Carbons: not labeled lewis Used to draw Lewis structures. • • • • resonance Hydrogens: explicit, labeled Carbons: labeled Lone pairs and radicals: explicit, displayed Formal atomic charges: explicit, displayed Used to draw resonance structures. You must provide a template with mapping numbers for molecules having symmetry. Providing a template with mapping numbers is a best practice for all resonance structure drawings. • • • • mechanism Hydrogens: explicit, labeled Carbons: labeled Lone pairs and radicals: explicit, displayed Formal atomic charges: explicit, displayed Used to draw reaction mechanisms showing the movement of electrons. You must provide a template with mapping numbers for molecules displaying symmetry or for reaction mechanisms for which a non-equivalent choice exists between starting or ending locations. Providing a template with mapping numbers is a best practice for all reaction mechanism drawings. • • • • mechanism_adv Hydrogens: explicit, labeled Carbons: labeled Lone pairs and radicals: explicit, displayed Formal atomic charges: explicit, displayed For students in higher-level chemistry courses, displays molecules like skeleton mode and enables the Advanced Templates toolbar. Used to draw reaction mechanisms showing the movement of electrons. You must provide a template with mapping numbers for molecules displaying symmetry or for reaction mechanisms for which a non-equivalent choice exists between starting or ending locations. Providing a template with mapping numbers is a best practice for all reaction mechanism drawings. • Hydrogens: implicit, labeled only for heteroatoms • Carbons: not labeled 10/2010 195 WebAssign Creating Questions Guide Drawing Mode Description 3D Used to draw ball-and-stick models that can be rotated in three dimensions. Display • Hydrogens: explicit, not labeled • Carbons: not labeled • Heteroatoms: not labeled spacefill Used to draw space-filling models that can be rotated in three dimensions. • Hydrogens: explicit, not labeled • Carbons: not labeled • Heteroatoms: not labeled Use the three advanced modes — mechanism_adv, reaction_adv, and skeleton_adv — to let your students in higher-level chemistry courses quickly draw rings and other structures using the Advanced Templates toolbar in MarvinSketch. Creating MarvinSketch Questions That Do Not Display an Initial Drawing For many MarvinSketch questions, you might want your students to draw a structure or reaction starting with an empty drawing area. This kind of question can ask your students to perform both analytical and synthetic thinking, much like an essay question. Note: For questions where the relative position of each atom is important — resonance structures, reaction mechanisms, hybridization states, chiral centers, and reaction centers — you must display an initial drawing. See Creating MarvinSketch Questions That Display an Initial Drawing on page 199. Before creating your question, decide which drawing mode you want to use: complete, condensed, skeleton, skeleton_adv, reaction, reaction_adv, lewis, resonance, mechanism, mechanism_adv, 3D, or spacefill. See Understanding MarvinSketch Drawing Modes on page 193. To create a MarvinSketch question without a template: 1. Click Questions > Create. The Question Editor opens. 10/2010 Creating Chemistry Questions 196 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. Create your answer key using the MarvinSketch Key Generation tool. a. Click Marvin under Page Tools. b. For Marvin Type, select the drawing mode that you want to use. c. Draw the chemical structure. d. Click Get Key. e. Select and copy the entire contents of the text box. This is your answer key. 5. In Question, add the following code, replacing answer_key with your answer key: <eqn> $mykey='answer_key'; '' </eqn> Important: • Always enclose the MarvinSketch answer key in single quotes ('), not double quotes ("). • Do not paste MarvinSketch XML answer keys directly in Answer. Instead, assign your answer key to a variable and reference the variable as described in this topic. This code assigns the MarvinSketch answer key to the variable $mykey. You can use a different variable name if needed. Note: Question has a 65,536 character limit; any characters beyond that limit are not saved. Depending on the size and complexity of your MarvinSketch XML, if you need to specify more than about 12 answer keys, your question might exceed this limit without warning. 10/2010 197 WebAssign Creating Questions Guide 6. In Question, type your question. Use the answer placeholder string <_> to specify where the MarvinSketch answer box should be displayed. Tip: Use the following code in your question to link a term to a practice question that teaches your students how to use MarvinSketch to draw the structure: <PRACTICE qid='question_ID' link='term' style='none'> where term is the term that you want to link, and question_ID is one of the following question names: marvin.micro.tutorial.charges. marvin.micro.tutorial.coordinate bonds. marvin.micro.tutorial.electron flow. marvin.micro.tutorial.functional groups. marvin.micro.tutorial.generic groups. marvin.micro.tutorial.isotopes. marvin.micro.tutorial.lone pairs. marvin.micro.tutorial.mapping. marvin.micro.tutorial.organometallics. marvin.micro.tutorial.radicals. marvin.micro.tutorial.wedge bonds. For example: Assign <PRACTICE qid='marvin.micro.tutorial.lone pairs.' link='lone pairs' style='none'> where appropriate. 7. In Answer, type the following items on a single line: <EQN $MARVIN='mode'; $mykey> where mode is the MarvinSketch drawing mode that you want to use. Notes: • 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. • As with other fill-in-the-blank questions, you can specify alternative answer keys separated by the characters {tab}. For example: <EQN $MARVIN='condensed'; $mykey1> {tab} <EQN $mykey2> 8. Optionally, type a Solution. 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. 9. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 10. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 10/2010 Creating Chemistry Questions 198 11. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 12. 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 MarvinSketch Question The following table summarizes an actual question. QID 1534330 Name Template2 5.MARVIN.01. Mode Fill‐in‐the‐Blank Question <eqn> # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Set $mykey to the answer key created # with the MarvinSketch Key Generation tool # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ $mykey='<?xml version="1.0" ?><cml><MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3" elementType="O H H" x2="‐0.8433333039283752 0.4903458178996605 ‐2.1770124257564105" y2="1.2100000381469727 1.9800000381469727 1.9800000381469731" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a1 a3" order="1" /> </bondArray> </molecule> </MChemicalStruct></MDocument></cml>'; '' </eqn> Draw a water molecule. <BR> <_> 10/2010 199 WebAssign Creating Questions Guide Answer <EQN $MARVIN='complete'; $mykey> Display to Students Creating MarvinSketch Questions That Display an Initial Drawing For some MarvinSketch questions, you might want your students to start with an initial drawing — a template — and modify 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: Use a template that labels some or all of the atoms with mapping numbers whenever the specific identity of each atom is important for grading — for example, for molecules displaying symmetry, or for mechanisms when alternative starting or ending locations are not correct. Using a template that labels atoms with mapping numbers can be helpful for any question for which the relative position of each atom is important — resonance structures, reaction mechanisms, hybridization states, chiral centers, and reaction centers. Before creating your question, decide which drawing mode you want to use: complete, condensed, skeleton, skeleton_adv, reaction, reaction_adv, lewis, resonance, mechanism, mechanism_adv, 3D, or spacefill. See Understanding MarvinSketch Drawing Modes on page 193. To create a MarvinSketch question with a template: 1. Click Questions > Create. The Question Editor opens. 2. In Name, type a name for the question. 3. In Mode, select Fill-in-the-Blank. 4. Create your template using the MarvinSketch Key Generation tool. a. Click Marvin under Page Tools. b. For Marvin Type, select the drawing mode that you want to use. 10/2010 Creating Chemistry Questions 200 c. Draw the chemical structure. If needed, label atoms with mapping numbers. Right-click the atom you want to label and then select Map > M#, where # is the mapping number to set. d. Click Get Key. e. Select and copy the entire contents of the text box. This is your template. 5. In Question, add the following code, replacing template with your template: <eqn> $mytemplate='template'; Important: • Always enclose the MarvinSketch template in single quotes ('), not double quotes ("). • Do not paste MarvinSketch XML templates directly in Answer. Instead, assign your template to a variable and reference the variable as described in this topic. This code assigns the MarvinSketch template to the variable $mytemplate. You can use a different variable name if needed. 6. Create your answer key using the MarvinSketch Key Generation tool. Important: Always start with the template when creating your answer key. a. If needed, open the Marvin Sketch Key Generation tool by clicking Marvin under Page Tools. Then, select the drawing mode that you want to use. b. If needed, copy the template from your question and paste it into the drawing area. c. Change the template exactly the way you want your students to do when they answer the question. Do not move the template’s atoms. d. Click Get Key. e. Select and copy the entire contents of the text box. This is your answer key. 10/2010 201 WebAssign Creating Questions Guide 7. In Question, add the following code, replacing answer_key with your answer key: $mykey='answer_key'; '' </eqn> Important: • Always enclose the MarvinSketch answer key in single quotes ('), not double quotes ("). • Do not paste MarvinSketch XML answer keys directly in Answer. Instead, assign your answer key to a variable and reference the variable as described in this topic. This code assigns the MarvinSketch answer key to the variable $mykey. You can use a different variable name if needed. Note: Question has a 65,536 character limit; any characters beyond that limit are not saved. Depending on the size and complexity of your MarvinSketch XML, if you need to specify more than about 6 templates and 6 answer keys, your question might exceed this limit without warning. 8. In Question, type your question. Use the answer placeholder string <_> to specify where the MarvinSketch answer box should be displayed. Tip: Use the following code in your question to link a term to a practice question that teaches your students how to use MarvinSketch to draw the structure: <PRACTICE qid='question_ID' link='term' style='none'> where term is the term that you want to link, and question_ID is one of the following question names: marvin.micro.tutorial.charges. marvin.micro.tutorial.coordinate bonds. marvin.micro.tutorial.electron flow. marvin.micro.tutorial.functional groups. marvin.micro.tutorial.generic groups. marvin.micro.tutorial.isotopes. marvin.micro.tutorial.lone pairs. marvin.micro.tutorial.mapping. marvin.micro.tutorial.organometallics. marvin.micro.tutorial.radicals. marvin.micro.tutorial.wedge bonds. For example: Assign <PRACTICE qid='marvin.micro.tutorial.lone pairs.' link='lone pairs' style='none'> where appropriate. 10/2010 Creating Chemistry Questions 202 9. In Answer, type the following items on a single line: <EQN $MARVIN='mode'; $MARVIN_START=$mytemplate; $mykey> where mode is the MarvinSketch drawing mode that you want to use. Notes: • 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. • As with other fill-in-the-blank questions, you can specify alternative answer keys separated by the characters {tab}. For example: <EQN $MARVIN='condensed'; $MARVIN_START=$mytemplate; $mykey1> {tab} <EQN $mykey2> 10. Optionally, type a Solution. 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. 11. Click Test/Preview to test the appearance and behavior of the question. See Testing Questions on page 9. 12. Click Redisplay to show certain kinds of errors in the Display section of the Question Editor. Make any needed changes to your question. 13. Optionally, 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 Sharing Questions With Other Instructors on page 23. • If you make your question publicly available, you might want to provide descriptive information to help others search for it. See Adding Search Metadata to Your Questions on page 26. 14. 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 MarvinSketch Question The following table summarizes an actual question. QID 1534324 Name Template2 5.MARVIN.02. Mode Fill‐in‐the‐Blank 10/2010 203 WebAssign Creating Questions Guide Question <eqn> # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Set $mytemplate to the template created with the key generation tool # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ $mytemplate='<?xml version="1.0" ?><cml><MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6 a7" elementType="C N H H H O O" x2="‐3.5199999809265137 ‐1.9799999809265136 ‐5.059999980926514 ‐3.5199999809265137 ‐3.5199999809265137 ‐1.2099999809265136 ‐1.2099999809265145" y2="0.5866666436195374 0.5866666436195374 0.5866666436195371 2.1266666436195374 ‐0.9533333563804627 1.9203457654475728 ‐0.7470124782084988" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a1 a3" order="1" /> <bond atomRefs2="a1 a4" order="1" /> <bond atomRefs2="a1 a5" order="1" /> <bond atomRefs2="a2 a6" order="2" /> <bond atomRefs2="a2 a7" order="1" /> </bondArray> </molecule> </MChemicalStruct></MDocument></cml>'; # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Set $mykey to the answer key created with the key generation tool # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ $mykey='<?xml version="1.0" ?><cml><MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6 a7" elementType="C N H H H O O" formalCharge="0 1 0 0 0 0 ‐1" lonePair="0 0 0 0 0 2 3" x2="‐3.5199999809265137 ‐1.9799999809265136 ‐5.059999980926514 ‐3.5199999809265137 ‐3.5199999809265137 ‐1.2099999809265136 ‐1.2099999809265145" y2="0.5866666436195374 0.5866666436195374 0.5866666436195371 2.1266666436195374 ‐0.9533333563804627 1.9203457654475728 ‐0.7470124782084988" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a1 a3" order="1" /> <bond atomRefs2="a1 a4" order="1" /> <bond atomRefs2="a1 a5" order="1" /> <bond atomRefs2="a2 a6" order="2" /> <bond atomRefs2="a2 a7" order="1" /> </bondArray> </molecule> </MChemicalStruct></MDocument></cml>'; '' </eqn> Complete the following Lewis structure such that it obeys the octet rule. <BR> (Assign lone pairs, radical electrons, and atomic charges where appropriate.)<BR> <_> Answer <EQN $MARVIN='lewis'; $MARVIN_START=$mytemplate; $mykey> 10/2010 Creating Chemistry Questions 204 Display to Students (template) Display to Students (answered) Example Resonance Structure MarvinSketch Question The following table summarizes an actual question. QID 1534333 Name Template2 5.MARVIN.03. Mode Fill‐in‐the‐Blank 10/2010 205 WebAssign Creating Questions Guide Question <eqn> # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Set $mytemplate to the template created with the key generation tool # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ $mytemplate='<?xml version="1.0" ?><cml><MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3" elementType="O O O" mrvMap="2 1 3" x2="‐1.0266666412353516 ‐2.360345763063387 0.30701248059268416" y2="3.4833333492279053 2.713333349227905 2.7133333492279053" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a1 a3" order="1" /> </bondArray> </molecule> </MChemicalStruct></MDocument></cml>'; # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Set $mykey to the answer key created with the key generation tool # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ $mykey='<?xml version="1.0" ?><cml><MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6" elementType="O O O O O O" formalCharge="1 0 ‐1 1 ‐1 0" mrvMap="2 1 3 2 1 3" lonePair="1 2 3 1 3 2" x2="‐1.0266666412353516 ‐2.360345763063387 0.30701248059268416 4.583333492279053 3.249654370451017 5.9170126141070885" y2="3.4833333492279053 2.713333349227905 2.7133333492279053 3.5199999936421715 2.74999999364217 2.749999993642172" /> <bondArray> <bond atomRefs2="a1 a2" order="2" /> <bond atomRefs2="a1 a3" order="1" /> <bond atomRefs2="a4 a5" order="1" /> <bond atomRefs2="a4 a6" order="2" /> </bondArray> </molecule> </MChemicalStruct></MDocument></cml>'; '' </eqn> Draw the resonance structures for ozone. (Copy and paste the given template as many times as necessary. Assign lone pairs, radical electrons, and atomic charges where appropriate.)<BR> <_> Answer <EQN $MARVIN='resonance'; $MARVIN_START=$mytemplate; $mykey> 10/2010 Creating Chemistry Questions 206 Display to Students (template) Display to Students (answered) Displaying Chemical Structures in Your Questions with MarvinSketch For some questions, you want to display sketches of chemical structures or reactions. You can display these using MarvinSketch in the question, the answer (for question modes like multiple-choice), or the solution. For 3-dimensional structures, your students can even rotate the structure to examine it from all angles. Before creating your question, decide which drawing mode you want to use: complete, condensed, skeleton, skeleton_adv, reaction, reaction_adv, lewis, resonance, mechanism, mechanism_adv, 3D, or spacefill. See Understanding MarvinSketch Drawing Modes on page 193. To display a MarvinSketch drawing in your question: 1. Open your question in the Question Editor. 2. Create your drawing using the MarvinSketch Key Generation tool. a. Click Marvin under Page Tools. b. For Marvin Type, select the drawing mode that you want to use. c. Draw the chemical structure. 10/2010 207 WebAssign Creating Questions Guide d. Click Get Key. e. Select and copy the entire contents of the text box. This is the MarvinSketch XML representation of your drawing. 3. In Question, add the following code, replacing drawing_string with the string copied from the MarvinSketch Key Generation tool: <eqn> $mysketch='drawing_string'; '' </eqn> Important: • Always enclose drawing_string in single quotes ('), not double quotes ("). • Do not paste MarvinSketch XML drawings directly in Answer. Instead, assign your drawing to a variable and reference the variable as described in this topic. This code assigns the MarvinSketch XML to the variable $mysketch. You can use a different variable name if needed. 4. In Question, Answer, or Solution, add the following code where you want the drawing to be displayed: <MARVIN type='mode' size='widthxheight'><EQN $mysketch></MARVIN> Important: Always use <EQN> — not <eqn> — inside the <MARVIN> tag. where: • mode is the MarvinSketch drawing mode you want to use for your drawing (see Understanding MarvinSketch Drawing Modes on page 193). • widthxheight is an optional string specifying the width and height of the drawing in pixels — for example, 400x300. The default size is 200x200 pixels. Note: 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 MarvinSketch XML, if you need to specify more than about 12 drawings, your question might exceed this limit without warning. Example Displaying MarvinSketch Drawing in Question The following table summarizes an actual question. QID 1534327 Name Template2 5.MARVIN.04. Mode Multiple‐Choice 10/2010 Creating Chemistry Questions 208 Question <eqn> # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Set $mysketch to the drawing string created # with the MarvinSketch Key Generation tool # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ $mysketch='<?xml version="1.0" ?><cml><MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10" elementType="C C C C C C O C O O" x2="‐3.5199999809265137 ‐2.186320859098478 ‐0.8526417372704422 ‐0.8526417372704421 ‐2.1863208590984775 ‐3.519999980926513 0.48103738455759326 ‐2.186320859098478 ‐0.8526417372704422 ‐3.5199999809265132" y2="3.3366665840148926 4.106666584014892 3.336666584014892 1.796666584014892 1.0266665840148916 1.796666584014892 4.106666584014892 5.646666584014892 6.416666584014892 6.416666584014893" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a2 a3" order="2" /> <bond atomRefs2="a3 a4" order="1" /> <bond atomRefs2="a4 a5" order="2" /> <bond atomRefs2="a5 a6" order="1" /> <bond atomRefs2="a6 a1" order="2" /> <bond atomRefs2="a3 a7" order="1" /> <bond atomRefs2="a2 a8" order="1" /> <bond atomRefs2="a8 a9" order="1" /> <bond atomRefs2="a8 a10" order="2" /> </bondArray> </molecule> </MChemicalStruct></MDocument></cml>'; '' </eqn> Identify the molecule. <table><tr><td width="250"><_></td> <td><MARVIN type="skeleton"><EQN $mysketch></MARVIN></td></tr></table> Answer salicyclic acid caffeine ethanol benzoic acid hydrochloric acid Display to Students Example Displaying a 3D MarvinSketch Drawing The following table summarizes an actual question. QID 1534323 Name Template2 5.MARVIN.05. Mode Multiple‐Choice 10/2010 209 WebAssign Creating Questions Guide Question <eqn> # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Set $mysketch to the drawing string created # with the MarvinSketch Key Generation tool # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ $mysketch='<?xml version="1.0" ?><cml><MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6 a7 a8" elementType="N C C C N C O N" x3="1.518111046253925 0.7098611208235075 1.2639133173670165 0.3893656028200501 ‐0.9409757271521195 ‐1.4537796806202696 ‐2.6835525429313587 ‐0.629343582994419" y3="0.4565010211802556 0.8228931681812932 1.0565198678487076 1.4219076428100446 1.538308105031128 1.3083271846978313 1.4234628831935976 0.9541439518993567" z3="0.2753843242825775 ‐0.8040519242599867 ‐2.078380971631672 ‐3.1173134584648845 ‐2.8719388084203796 ‐1.6353615769713545 ‐1.4398425459557693 ‐0.6155229284819566" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a2 a3" order="2" /> <bond atomRefs2="a3 a4" order="1" /> <bond atomRefs2="a4 a5" order="2" /> <bond atomRefs2="a5 a6" order="1" /> <bond atomRefs2="a6 a7" order="2" /> <bond atomRefs2="a6 a8" order="1" /> <bond atomRefs2="a2 a8" order="1" /> </bondArray> </molecule> </MChemicalStruct></MDocument></cml>'; '' </eqn> Identify the nucleobase. <table><tr><td width="250"><_></td> <td><MARVIN type="3D"><EQN $mysketch></MARVIN></td></tr></table> Answer cytosine guanine adenine thymine Display to Students Using the MarvinSketch Key Generation Tool You can use MarvinSketch to draw chemical structures to display in your questions or to use as question keys or templates when your students use MarvinSketch to draw their responses. Tip: Use the question titled marvinsketch.tutorial to teach yourself how to draw structures using MarvinSketch. To draw a chemical structure or reaction: 1. In the Question Editor, click Marvin under Page Tools. 10/2010 Creating Chemistry Questions 210 2. For Marvin Type, select the MarvinSketch drawing mode you want to use. See Understanding MarvinSketch Drawing Modes on page 193. Important: Always draw your chemical structure using the mode that you want to specify in your question. If you are creating a question with a template, always use the same mode to create the template and the answer key. 3. Draw the chemical structure or reaction using the same tools that are available to your students, as described below. The following considerations apply only when you are creating a question: • Your students do not have access to the menu bar in MarvinSketch, but will instead draw structures using the toolbars. • You can click File > Clear Desk to erase your entire drawing. • You can click File > Save to save your structure in a variety of formats, including MarvinSketch XML and SMILES strings. • You can copy MarvinSketch XML, SMILES strings, or other formatted notation recognized by MarvinSketch and paste it in the drawing area to quickly create the specified structures. • Changes that you make in the View menu — for example, to the background color or zoom level — are not reflected in your questions, either in displayed chemical structures, templates, or answer keys. In 10/2010 211 WebAssign Creating Questions Guide your questions, the zoom level is automatically changed so that the entire structure is displayed. • Do not create a multi-page document using File > Document Settings. Although this is useful when printing chemical structures, it can cause display problems in WebAssign questions. 4. If the location of single and double bonds is not relevant, click to aromatize the structure before creating your answer key. This lets MarvinSketch score equivalent responses correctly. If needed, you can select a specific part of a molecule — for example, the maleimide in phthalimide — and click to dearomatize it to help with proper bond assignment in the 5-membered ring. 5. When you are finished drawing the structure, click either 2-dimensional drawings) or accomplishes three things: (for (for 3-dimensional drawings). This • The drawing is converted to either a 2-dimensional or 3-dimensional representation. • Bond lengths and angles are standardized or optimized. • If any bonds were inadvertently not connected, or were connected to incorrect locations, the problem should become apparent and you can then correct it. 6. Click Get Key. 7. Click in the text box, and then press CTRL+A followed by CTRL+C to select and copy the MarvinSketch XML. You can use the MarvinSketch XML in your questions to display the chemical structure drawing in a question, to specify a MarvinSketch answer key, or to define a MarvinSketch template. Drawing Chemical Structures in MarvinSketch The following table describes how to draw and edit chemical structures and reactions in MarvinSketch. Task Steps Add an atom of one of the following elements: H, C, N, O, P, S, F, Cl, Br, I 1. Click the element symbol. 2. Click in the drawing area. Add any atom Add a special atom type or node, such as Q, M, X, and LP 10/2010 1. 2. 3. 4. Click . Click the element symbol in the periodic table. Close or move the Periodic System window. Click in the drawing area. 1. 2. 3. 4. 5. Click . Click the Advanced tab. Click the symbol on the Advanced page. Close or move the Periodic System window. Click in the drawing area. Creating Chemistry Questions 212 Task Steps Add an atom and its bond to an existing atom 1. Click the element symbol for the new atom. 2. Drag from the existing atom until the symbol for the new atom is displayed under the pointer. Add two bonded carbon atoms Add a chain of carbon atoms Replace an atom Add a single bond between existing atoms Add a double bond between existing atoms 1. Click the bond tool . 2. Click in the drawing area. 1. Click . 2. Drag in the drawing area until the number of carbon atoms you want to insert is displayed under the pointer. 1. Click the element symbol for the new atom. 2. Click the atom to be replaced. 1. Click the bond tool . 2. Drag from one atom to another. 1. Click the arrow on the right side of the bond tool and select Double. 2. Drag from one atom to another. Change a bond type 1. Click the arrow on the right side of the bond tool and select the new bond type. 2. Click the bond to be changed. Draw a reaction arrow (adds + signs among reactants and products; treats structures and names above arrow as agents) Add agent names to a reaction arrow Draw a graphical arrow 1. Click the reaction arrow tool . 2. Drag the pointer in the drawing area in the direction the arrow should point. 1. 2. 3. 4. Click . Click the Advanced tab. Click Pseudo on the Advanced page. Type the agents in Value (subscripts are automatically formatted for values like H2O). 5. Close or move the Periodic System window. 6. Click above or below the reaction arrow. 1. Click the graphical arrow tool . 2. Drag the pointer in the drawing area in the direction the arrow should point. Add a single electron (monovalent radical) to an atom 1. Click the radical tool 2. Click an atom. Add lone pairs to an atom 1. Click the arrow on the right side of the lone . pairs tool and select the number of lone pairs to add. 2. Click an atom. Draw a curved harpoon to show the movement of a single electron 1. Click the arrow on the right side of the electron flow tool and select 1 Electron. 2. Click the source for the electron. 3. Click the target for the electron. 10/2010 213 WebAssign Creating Questions Guide Task Steps Draw a curved arrow to show the movement of two electrons 1. Click the arrow on the right side of the electron Set the charge for an atom 1. Right-click the atom. 2. Select Charge > value, where value is the charge you want to use. Decrease an atom’s charge Increase an atom’s charge Select a single item flow tool and select 2 Electrons. 2. Click the source for the electrons. 3. Click the target for the electrons. 1. Click . 2. Click an atom. 1. Click . 2. Click an atom. 1. Click the arrow on the right side of the selection tool and select Rectangle Selection. 2. Click the item you want to select. Select an entire structure 1. Click the arrow on the right side of the selection tool and select Structure Selection. 2. Click any part of a structure. Select items in a rectangular region 1. Click the arrow on the right side of the selection tool and select Rectangle Selection. 2. Drag the pointer diagonally across the drawing area to select items. Select items in an arbitrary region 1. Click the arrow on the right side of the selection tool and select Lasso Selection. 2. Drag the pointer to draw a boundary around the items you want to select. Select multiple items 1. Click the arrow on the right side of the selection tool and select Rectangle Selection. 2. Click the first item you want to select. 3. Hold the SHIFT key and click any additional items you want to select. Copy selected items to the clipboard Paste items from the clipboard Click or press CTRL+C. 1. Click or press CTRL+V. 2. Click in the drawing area where you want to paste the clipboard items. Delete selected items Click or press DELETE. Delete items by clicking 1. Click . 2. Click the items you want to delete. 10/2010 Move an atom 1. Drag the atom to a new location. Move selected items 1. Move the pointer toward the center of the selection until a square is displayed. 2. Drag the selection to a new location. Creating Chemistry Questions 214 Task Steps Undo your last change Click Set a mapping number for an atom Transform selected structure or entire drawing to aromatic representation Transform selected structure or entire drawing to non-aromatic representation or press CTRL+Z. 1. Right-click the atom you want to change. 2. Select Map > M# where # is the mapping number to set. Click . Click . Flip a structure horizontally 1. Select the structure to flip. 2. Right-click the structure and select Transform > Horizontal Flip. Flip a structure vertically 1. Select the structure to flip. 2. Right-click the structure and select Transform > Vertical Flip. Rotate a structure to align a bond horizontally 1. Right-click a bond in the structure. 2. Select Align > Horizontally. Rotate a structure to align a bond vertically 1. Right-click a bond in the structure. 2. Select Align > Vertically. Rotate selected items in 2 dimensions 1. Move the pointer toward the center of the Rotate the drawing in 3 dimensions Rotate selected structure in 3 dimensions Clean drawing in 2 dimensions Clean drawing in 3 dimensions Zoom in or out selection until a rotation cue is displayed. 2. Drag the selection to rotate it around its center. 1. Click . 2. Drag the pointer to rotate the drawing. 1. Move the pointer toward the center of the selection until a square is displayed. 2. Right-click in the square and select Transform > Rotate in 3D. 3. Drag the pointer to rotate the structure. Click . Standardizes bond lengths and angles to improve appearance. The drawing is converted to a 2-dimensional drawing if needed. Click . Standardizes bond lengths and angles to improve appearance. The drawing is converted to a 3-dimensional drawing if needed. Zooming does not affect scoring. You can: • Click or . • Select a zoom level from the list • Type a new zoom level in the box. . 10/2010 215 WebAssign Creating Questions Guide Creating MarvinSketch Questions That Use Canonical or Combinatorial SMILES Strings Sometimes, you want to display a randomly selected molecule in your question. Or, you might even want to combine molecules — for example, in condensation reactions or peptide sequences. Specifying the chemical structure using SMILES (Simplified Molecular Input Line Entry System) strings instead of the native MarvinSketch XML lets you combine or otherwise change the chemical structure programmatically, and offers a space-efficient method for defining arrays of chemical structures that can be used in your question. Canonical SMILES strings uniquely identify a particular molecule. The canonical SMILES representation of any molecule is dependent on the software program’s canonicalization algorithm. For this reason, the canonical SMILES string for a molecule in MarvinSketch might be different from the canonical SMILES string generated by another application. Combinatorial SMILES strings identify a discrete structure in a molecule, and can be combined to form canonical SMILES strings. Important: • Always use canonical or combinatorial SMILES strings. • Only a subset of SMILES notation is supported for use in MarvinSketch questions. • Do not use SMILES strings for reactions or to specify atom mapping. • Other formats, such as molfile formats, protein data bank files, InChi strings, and IUPAC names, are not supported for use in WebAssign questions. You might be able to use one of these formats to display a structure in your question, but you should never use them to define answer keys that your students must draw, as this could result in scoring problems with your students’ responses. Although the native MarvinSketch XML format provides the most comprehensive description of your chemical structures, it is long, difficult to read, and cannot be manipulated by your question code. With SMILES, your question code can easily combine or change SMILES strings, for example, to reflect a chemical process or to randomize your question. For example, you could use either MarvinSketch XML or SMILES to display an ethanol molecule: 10/2010 MarvinSketch XML SMILES <?xml version="1.0" ?><cml><MDocument> <MChemicalStruct> <molecule title="ethanol" molID="m1"> <atomArray atomID="a1 a2 a3" elementType="C C O" x2="2.309999999999999 3.643679121828035 4.97735824365607" y2="‐1.3336791218280357 ‐2.1036791218280357 ‐1.3336791218280353" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a2 a3" order="1" /> </bondArray> </molecule> </MChemicalStruct></MDocument></cml> CCO Creating Chemistry Questions 216 Using SMILES Strings in MarvinSketch Questions The best way to ensure that your SMILES string works correctly in MarvinSketch is to use MarvinSketch to generate SMILES. Before creating your question, decide which drawing mode you want to use: complete, condensed, skeleton, skeleton_adv, reaction, reaction_adv, lewis, resonance, mechanism, mechanism_adv, 3D, or spacefill. See Understanding MarvinSketch Drawing Modes on page 193. To use a SMILES string in your question: 1. Create your drawing using the MarvinSketch Key Generation tool. a. Click Marvin under Page Tools. b. For Marvin Type, select the drawing mode that you want to use. c. Draw the chemical structure. 2. In the MarvinSketch Key Generation tool, click File > Save. 3. In Files of Type, select SMILES. 4. Navigate to the location where you want to save the file, type a File Name, and then click Save. 5. In a text editor, open the file you saved and copy its contents. 6. Paste the SMILES string that you copied into your question. You can use the SMILES string in your questions instead of MarvinSketch XML to display the chemical structure drawing in a question, to specify a MarvinSketch answer key, or to define a MarvinSketch template. Example Displaying Chemical Structures Using SMILES The following table summarizes an actual question. QID 1534322 Name Template2 5.MARVIN.06. Mode Multiple‐Choice Question <eqn> # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Select 1 of 8 molecules to identify # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ @dat = (["ethanol", "CCO"], ["isopropanol", "CC(O)C"], ["methanol", "CO"], ["n‐propanol", "CCCO"], ["n‐butanol", "CCCCO"], ["isobutanol", "CC(C)CO"], ["propene", "C=CC"], ["ethylene", "C=C"]); @choices = pick(5, 0..$#dat); '' </eqn> Identify the molecule. <table><tr><td width="250"><_></td> <td><MARVIN type='condensed'><EQN $dat[$choices[0]][1]></MARVIN></td></tr></table> 10/2010 217 WebAssign Creating Questions Guide Answer <EQN $dat[$choices[0]][0]> <EQN $dat[$choices[1]][0]> <EQN $dat[$choices[2]][0]> <EQN $dat[$choices[3]][0]> <EQN $dat[$choices[4]][0]> Display to Students Example MarvinSketch Question Using SMILES Answer Key The following table summarizes an actual question. 10/2010 QID 1534328 Name Template2 5.MARVIN.07. Mode Fill‐in‐the‐Blank Question <eqn> # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ # Set $mykey to one of 2730 possible tripeptides # ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ @dat = (["Ala", "NC(C)C(=O)"], ["Arg", "NC(CCCNC(N)=N)C(=O)"], ["Asn", "NC(CC(N)=O)C(=O)"], ["Asp", "NC(CC(O)=O)C(=O)"], ["Cys", "NC(CS)C(=O)"], ["Gln", "NC(CCC(N)=O)C(=O)"], ["Glu", "NC(CCC(O)=O)C(=O)"], ["Gly", "NCC(=O)"], ["Ile", "NC(C(C)CC)C(=O)"], ["Leu", "NC(CC(C)C)C(=O)"], ["Lys", "NC(CCCCN)C(=O)"], ["Met", "NC(CCSC)C(=O)"], ["Ser", "NC(CO)C(=O)"], ["Thr", "NC(C(C)O)C(=O)"], ["Val", "NC(C(C)C)C(=O)"]); ($a, $b, $c) = pick(3, 0..$#dat); $label = $dat[$a][0] . '‐' . $dat[$b][0] . '‐' . $dat[$c][0]; $mykey = $dat[$a][1] . $dat[$b][1] . $dat[$c][1] . 'O'; '' </eqn> Draw the structure of the tripeptide <eqn $label>. <br> <_> Creating Chemistry Questions 218 Answer <EQN $MARVIN='condensed'; $mykey> Display to Students See Also: • SMILES notation: www.daylight.com/dayhtml/doc/theory/theory.smiles.html 10/2010 219 WebAssign Creating Questions Guide 10/2010 A List of Symbols Symbols that you can add to your questions using the WebAssign <s> tag are listed in the following sections. This section contains the following topics: • Letter Forms • Greek Letter Forms • Punctuation and Spacing Symbols • Number Forms and Mathematical Symbols • Symbols for Chemistry and Physics • Arrows and Miscellaneous Symbols 10/2010 221 WebAssign Creating Questions Guide Letter Forms You can use these symbols in your questions or assignments. Codes Examples <s:a‐umlaut> ä <s:aacute> á Notes <s:aarrow> ‐ <s:zarrow> <s:Aarrow> ‐ <s:Zarrow> <s:aarrowbold> ‐ <s:zarrowbold> <s:Aarrowbold> ‐ <s:Zarrowbold> <s:aarrowitalic> ‐ <s:zarrowitalic> <s:Aarrowitalic> ‐ <s:Yarrowitalic> <s:aarrowbolditalic> ‐ <s:zarrowbolditalic> <s:Aarrowbolditalic> ‐ <s:Zarrowbolditalic> Codes might not exist for all letters. <s:abar> ‐ <s:zbar> <s:Bbar> ‐ <s:Zbar> <s:abarbold> ‐ <s:zbarbold> <s:Abarbold> ‐ <s:Zbarbold> <s:abaritalic> ‐ <s:zbaritalic> <s:Abaritalic> ‐ <s:Zbaritalic> <s:abarbolditalic> ‐ <s:zbarbolditalic> <s:Abarbolditalic> ‐ <s:Zbarbolditalic> Codes might not exist for all letters. <s:agrave> à <s:ahat> ‐ <s:zhat> <s:Ahat> ‐ <s:Zhat> <s:ahatbold> ‐ <s:zhatbold> <s:Ahatbold> ‐ <s:Zhatbold> <s:ahatitalic> ‐ <s:zhatitalic> <s:Ahatitalic> ‐ <s:Zhatitalic> <s:ahatbolditalic> ‐ <s:zhatbolditalic> <s:Ahatbolditalic> ‐ <s:Zhatbolditalic> Codes might not exist for all letters. <s:avec> ‐ <s:zvec> <s:Avec> ‐ <s:Zvec> <s:avecbold> ‐ <s:zvecbold> <s:Avecbold> ‐ <s:Zvecbold> <s:avecitalic> ‐ <s:zvecitalic> <s:Avecitalic> ‐ <s:Zvecitalic> <s:avecbolditalic> ‐ <s:zvecbolditalic> <s:Avecbolditalic> ‐ <s:Yvecbolditalic> <s:vecabold> ‐ <s:veczbold> <s:vecAbold> ‐ <s:vecZbold> Codes might not exist for all letters. <s:bdbldot> <s:cBbar> <s:circleA> ‐ <s:circleZ> <s:hbar2> 10/2010 <s:ibold> i Alternatively, type <b>i</b>. <s:jbold> j Alternatively, type <b>j</b>. List of Symbols 222 Codes Examples Notes <s:kbold> k Alternatively, type <b>k</b>. <s:ldot> <s:o‐umlaut> ö <s:oslash> ø <s:rdbldot> <s:rdot> <s:rtarrowE> <s:rtarrowF> <s:scriptE> <s:scripte> <s:scriptl> <s:scriptM> <s:scriptP> <s:scriptp> <s:scriptU> <s:sdot> <s:u‐umlaut> ü <s:ubold> u Alternatively, type <b>u</b>. <s:vbold> v Alternatively, type <b>v</b>. <s:xdblbar> <s:xdbldot> <s:xdot> <s:Xtilde> <s:xtilde> <s:ydblbar> <s:ydbldot> <s:zdbldot> <s:zdot> 10/2010 223 WebAssign Creating Questions Guide Greek Letter Forms You can use these symbols in your questions or assignments. Codes Examples <s:alpha> ‐ <s:omega> <s:Alpha> ‐ <s:Omega> α-ω Α-Ω - <s:alphabar> ‐ <s:omegabar> <s:Alphabar> ‐ <s:Omegabar> α <s:alphabold> Notes Alternatively, type <b><s:alpha></b>. <s:alphadbldot> ‐ <s:omegadbldot> <s:Alphadbldot> ‐ <s:Omegadbldot> - <s:alphadot> ‐ <s:omegadot> <s:Alphadot> ‐ <s:Omegadot> - <s:alphahat> ‐ <s:omegahat> <s:Alphahat> ‐ <s:Omegahat> - <s:alphavec> ‐ <s:omegavec> <s:Alphavec> ‐ <s:Omegavec> - - - - - <s:betaminus> β- <s:betaplus> β+ <s:mutilde> Alternatively, type ω <s:omegabold> <b><s:omega></b>. <s:phi2> φ <s:taubold> τ Alternatively, type <b><s:tau></b>. Alternatively, type θ <s:thetabold> <b><s:theta></b>. <s:thetasmall> <s:vas_rho> <s:vecthetahat> Punctuation and Spacing Symbols You can use these symbols in your questions or assignments. 10/2010 Codes Examples <s:cdots> ··· <s:dagger> † <s:mdash> — <s:middot> · Notes List of Symbols 224 Codes Examples <s:ndash> – <s:paragraph> ¶ Notes <s:tab> <s:space> non-breaking space <s:double> 2 non-breaking spaces <s:quad> 4 non-breaking spaces Number Forms and Mathematical Symbols You can use these symbols in your questions or assignments. Codes Examples Notes <s:and> <s:angle> <s:approx> ≈ <s:asymptotic> <s:bigdiv> / <s:bra> <s:circle1> ‐ <s:circle5> - <s:circleminus> <s:circleplus> <s:ckgreater> <s:ckgreaterequal> <s:ckless> <s:cklessequal> <s:compose> <s:congruent> <s:cross> <s:degree> ° <s:divide> ÷ <s:doubleint_r> <s:doublelineint> <s:empty> Ø <s:eqq> <s:equivalent> 10/2010 225 WebAssign Creating Questions Guide Codes Examples <s:greaterorequal> ≥ <s:greaterthan> > <s:half> ½ Notes Same as > <s:implies> <s:infinity> <s:int> ∫ <s:intbig> <s:intersect> <s:isin> <s:italicf> ƒ <s:ket> <s:lceiling> <s:leftgrint> <s:lessorequal> ≤ <s:lessthan> < <s:lfloor> <s:lineint> <s:minus> − <s:minusplus> <s:muchgreaterthan> » <s:muchlessthan> « <s:multiply> <s:nabla> <s:notcongruent> <s:notdivides> <s:notequal> <s:notequiv> <s:notgreater> <s:notin> <s:notless> <s:notsubset> <s:or> <s:orthogonal> <s:parallel_s> 10/2010 ≠ Same as < List of Symbols 226 Codes Examples Notes <s:parallel> <s:partial> ∂ <s:plusminus> ± <s:rceiling> <s:Reals> <s:repzero> <s:rfloor> <s:rightgrint> √ <s:sqrt> <s:squareminus> <s:squareplus> <s:subset> <s:subseteq> <s:subsetneq> <s:therefore> × <s:times> <s:triangleminus> <s:triangleplus> <s:union> <s:vecstart> ‹ <s:vecstop> › Symbols for Chemistry and Physics You can use these symbols in your questions or assignments. Codes Examples Notes <s:abline> <s:alphaparticle> <s:angstrom> Å <s:blackdot> <s:cleardot> <s:coldrtarrow> <s:decrtarrow> <s:degree> ° 10/2010 227 WebAssign Creating Questions Guide Codes Examples <s:doublebond> <s:eertarrow> <s:emf> <s:H2Ortarrow> <s:implies> <s:micro> µ <s:ml> <s:neg> <s:neutron> <s:nuclearparticles> <s:oaline> <s:orb_d> <s:orb_none> <s:orb_u> <s:orb_ud> <s:orthogonal> <s:propto> <s:proton> <s:ptrtarrow> <s:revrxarrow> <s:revrxarrow1> <s:revrxarrowH20> <s:revrxarrowhv> <s:revrxnarrowk> <s:revrxnarrowkco> <s:revrxnarrowko2> <s:revrxnk1> <s:revrxnk2> 10/2010 ‾ Notes List of Symbols 228 Codes Examples Notes <s:revrxnkf> <s:rtarrowac> <s:rtarrowAcid> <s:rtarrowAcidic> <s:rtarrowacidic> <s:rtarrowalpha> <s:rtarrowBacteria> <s:rtarrowBase> <s:rtarrowBasic> <s:rtarrowbeta> <s:rtarrowcatalyst> <s:rtarrowDelta> <s:rtarrowelec> <s:rtarrowelecap> <s:rtarrowelect> <s:rtarrowH20> <s:rtarrowHeat> <s:rtarrowheatpressure> <s:rtarrowhex> <s:rtarrowhotCuOs> <s:rtarrowhv> <s:rtarrowk1> <s:rtarrowk2> <s:rtarrowk3> <s:rtarrowk4> <s:rtarrowL> <s:rtarrowlight> <s:rtarrowlong> <s:rtarrowox> <s:rtarrowp> <s:rtarrowPt> 10/2010 229 WebAssign Creating Questions Guide Codes Examples Notes <s:rtarrowpt825> <s:rtarrowyeast> <s:triplebond> Arrows and Miscellaneous Symbols You can use these symbols in your questions or assignments. Codes Examples <s:arrowbold> <s:bdot> <s:odot> <s:ydot> <s:bicond> <s:cents> ¢ <s:clubs> <s:diamonds> <s:hearts> <s:spades> <s:curvedleftarrow> <s:curvedrtarrow> <s:curvedupdownarrow> <s:downarrow> ↓ <s:leftarrow> ← <s:leftrtarrow> ↔ <s:red_deg> ° <s:red_pi> π <s:rightarrow> → <s:sm_preview> <s:star> <s:sun> <s:uparrow> <s:wedgearrow> 10/2010 ↑ Notes List of Symbols 230 10/2010 B List of Prompts Prompts that you can add to your questions using the WebAssign <p> tag are listed in the following sections. This section contains the following topics: • Prompts for Accounting Questions • Prompts for Chemistry and Physics Questions • Prompts for Mathematics Questions • Prompts for Statistics Questions • Miscellaneous Prompts 10/2010 List of Prompts 232 Prompts for Accounting Questions You can use these prompts in your questions or assignments. Tag Displayed Prompt <p:fset> You MUST enter the number "0", the number zero, in all cells that should be BLANK. <p:taccount> Enter transactions in the T-accounts in the order they appear, including the beginning balances, if available. You MUST enter the number "0", the number zero, in all cells that should be BLANK. Compute the final balance, if requested. Prompts for Chemistry and Physics Questions You can use these prompts in your questions or assignments. Tag Displayed Prompt <p:anion> [Ni(CN)4]2- for Ni(CN)42- <p:cation> [NH4]+ for NH4+ <p:charge> Type your answer using the format +1 and -2. <p:electronconfig1> Type your answer using the format 1s2 2s2 for 1s22s2. <p:electronconfig2> Type your answer using the format [Ar] 4s2 3d10 4p2 for [Ar]4s23d104p2. <p:formula1> CO2 for CO2 <p:formula2> Al(OH)3 for Al(OH)3 <p:indicate> Indicate the direction with the sign of your answer. <p:kcomplex> [A2]1+ / ([B2] * [C]1-) for [A21+] / ([B2] * [C1-]) <p:ksimple> [CO2]2/[H2][Fe]2 for [CO2]2 / [H2][Fe]2 <p:namecomplexion> Type your answer using the format iron(II) ion for Fe2+. <p:nameioniccompound> Type your answer using the format copper(II) chloride for CuCl2. <p:nonphysical> If the situation described is non-physical enter NONPHYSICAL. <p:nuclear> Enter the first (raised) number in the first box, the second (lower) number in the second box, and the symbol of the element in the third box. <p:nuclear2> Use beta for β and e to represent an electron. <p:orbitaldiagram> Enter UP to indicate an upwards pointing arrow, DOWN to indicate a downwards pointing arrow, UP/DOWN to indicate two arrows, and BLANK to indicate no arrows. <p:oxidation> Type your answer using the format +1 and -2. <p:ranking> Use only '>' or '=' symbols. If any elements are equal, show their equality in alphabetic order - for example: a>b=c. <p:scinot> Type your answer using one of the following formats, 1.2e-3 for 0.0012 and 1.20e+2 for 120. <p:sciround> If you enter your answer in scientific notation, round the decimal value to two decimal places. Use equivalent rounding if you do not enter your answer in scientific notation. 10/2010 233 WebAssign Creating Questions Guide Tag Displayed Prompt <p:spreadsheet> You will not submit this spreadsheet. However, the results will be needed later in this problem. <p:usevariables> Do not substitute numerical values, use variables only. <p:variables> Use the following variables as necessary: Prompts for Mathematics Questions You can use these prompts in your questions or assignments. Tag Displayed Prompt <p:arctrig> Remember to enter inverse trigonometric functions such as sin–1(x) as either asin(x) or arcsin(x). <p:calc_programs> Graphing utility programs are available here. <p:calc_question> A graphing calculator is recommended. <p:commalist> Enter your answers as a comma-separated list. <p:commalisteq> Enter your answers as a comma-separated list of equations. <p:constraint> Include each constraint. <p:constraintcorner> Include each constraint and corner point. <p:dependent> If the system is dependent, enter DEPENDENT. <p:diverges> If the quantity diverges, enter DIVERGES. <p:dne> If an answer does not exist, enter DNE. <p:emptyset> Enter EMPTY for the empty set. <p:expand> Expand your answer completely. <p:factor> Factor your answer completely. <p:graphline> Graph the points and the line. <p:graphsegments> Graph segments with closed endpoints only. <p:impossible> If not possible, enter IMPOSSIBLE. <p:inconsistent> If the system is inconsistent, enter INCONSISTENT. <p:independent> If the system is independent, enter INDEPENDENT. <p:infinitelymany> If there are infinitely many solutions, enter INFINITELY MANY. <p:infinity> If you need to use ∞ or –∞, enter INFINITY or –INFINITY, respectively. <p:integration> Use C for the constant of integration. <p:lnabs> Remember to use ln |u| where appropriate. <p:logic> Use ~ for logical not, \/ for logical or, /\ for logical and, -> for implies and <-> to represent the biconditional. <p:lowcoeff> Use the lowest possible coefficients. <p:lrslope> larger slope <p:lrv> larger value <p:lrxv> larger x-value <p:lryv> larger y-value <p:lrzv> larger z-value 10/2010 List of Prompts 234 Tag Displayed Prompt <p:ltv> largest value <p:ltxv> largest x-value <p:ltyv> largest y-value <p:ltzv> largest z-value <p:matrixlist> Enter each matrix in the form [[row 1], [row 2], ...], where each row is a comma-separated list. <p:multiplicity> Enter all answers including repetitions. <p:nf> If the expression is not factorable, enter NF. <p:nfinteger> If it is not factorable using integers, enter NF. <p:noinverse> If the inverse is undefined, enter UNDEFINED. <p:norealsoln> If there is no real solution, enter NO REAL SOLUTION. <p:nosoln> If there is no solution, enter NO SOLUTION. <p:notreal> If the solution is not a real number, enter NOT REAL. <p:ordercomplex> Order your answers smallest to largest first by real part, then by imaginary part. <p:orderop> Order your answers from smallest to largest x, then from smallest to largest y. <p:powertrig> Enter trigonometric powers such as sin2(x) as (sin(x))2. Read More. <p:prime> If the expression is not factorable using integers, enter PRIME. <p:primepoly> If the polynomial is prime, enter PRIME. <p:reals> If all real numbers are solutions, enter REALS. <p:reduce> Reduce all fractions completely. <p:rowop> Enter your row operation as a formula using R_1 for row 1 and so on. Example: 'add two times row 3 to row 2' would be written as 2*R_3 + R_2 -> R_2. 'Swap row 1 with row 2' would be written as R_1 <-> R_2. <p:selectgraph> Select the correct graph. <p:simplify> Simplify your answer completely. <p:srslope> smaller slope <p:srv> smaller value <p:srxv> smaller x-value <p:sryv> smaller y-value <p:srzv> smaller z-value <p:stv> smallest value <p:stxv> smallest x-value <p:styv> smallest y-value <p:stzv> smallest z-value <p:undefined> If an answer is undefined, enter UNDEFINED. <p:vector> Enter each vector as a comma-separated list of its components. <p:vectorlist> Enter each vector in the form [x1, x2, ...]. 10/2010 235 WebAssign Creating Questions Guide Prompts for Statistics Questions You can use these prompts in your questions or assignments. Tag Displayed Prompt <p:lrtv> larger t-value <p:lttv> largest t-value <p:srtv> smaller t-value <p:sttv> smallest t-value Miscellaneous Prompts You can use these prompts in your questions or assignments. Tag Displayed Prompt <p:fig> Figure <p:format> Type your answer using the format <p:order12> Enter your answers from smallest to largest. <p:orderaz> Enter your answers in alphabetical order. <p:orderroots> Enter your answers from smallest to largest starting with the first answer blank. Enter NONE in any remaining answer blanks. <p:papersub> Do this on paper. Your instructor may ask you to turn in this work. <p:selectall> Select all that apply. <p:unused> Enter NONE in any unused answer blanks. 10/2010 Creating Questions Quick Reference This document provides brief information about coding elements used to create questions. For more information, see the online help at www.webassign.net/user_support/faculty/. WebAssign Question Modes Mode Description Algebraic Students submit a mathematical expression or equation that is evaluated algebraically. Essay Students submit an extended textual response. Scored manually. File-Upload Students submit a file. Scored manually. Fill-in-the-Blank Students submit a brief textual response. Graphing Students draw on a Cartesian coordinate plane. Image Map Students click a displayed image. Java Students use Java, Flash, or other applet to answer the question. Matching Students match items from two lists. Multiple-Choice Students select one response from a list. Multiple-Select Students select one or more responses from a list. NumberLine Students place or draw points, lines, segments, or rays. Numerical Students submit a numerical response which might include units or be checked for significant figures. PencilPad Students draw a figure. Scored manually. Poll Used with other modes to create questions that collect information only. All responses are scored correct. Symbolic Students submit a mathematical expression (not an equation) that is evaluated by value substitution. WebAssign Tags Displaying Content The listed tags are valid in Question, Answer, and Solution unless otherwise indicated. Content Tag Notes Image <userimage(file_ID)> Displays an image that you have copied to WebAssign. Chemical drawings <MARVIN> Displays a chemical drawing. See Creating MarvinSketch Questions. Symimage markup <symimage(markup)> Displays image of markup. See Displaying Notation with <symimage>. LaTeX markup <latex> markup Displays LaTeX as an image </latex> or as a linked PDF file. <latex pdf= 'link_text'> markup </latex> 10/2010 Content Tag Notes Math or chemistry notation <h:> See: • Displaying Math Notation with HTML Substitution • Displaying Chemistry Notation in Your Questions WaTeX markup <watex> markup </watex> Displays scalable HTML representation of markup. See Displaying Notation with WaTeX. Predefined prompts <p:> See List of Prompts Symbols <s:> See List of Symbols Link to a file <userfile(file_ID)> Adds a link to a file that you have copied to WebAssign. Link to practice question <PRACTICE> qid='question_id' </PRACTICE> <PRACTICE qid='question_id' link='link_text' title='window_title ' style='none'> In Question or Solution, opens the specified question in a new window; no credit is awarded for answers to the practice question. Optionally set the style attribute to 'none' or use CSS values. Multi-Part, Accordion, and Tutorial Questions The listed tags are valid only in Question unless otherwise indicated. Purpose Tag Notes <accordion> Accordion Do not use in <part> <part_label> label </part_label> the same <part_title> title </part_title> question with content tutorial. </part> ...more_parts... </accordion> <tutorial> In-Line <premise title="title"> content </premise> Tutorial <step label="label" title="title"> content Do not use in <hint> hint_text </hint> the same </step> question with ...more_steps... accordion. <conclusion title="title"> content </conclusion> </tutorial> Purpose Tag Notes <tutorial type='popup' button='button_label'> Pop-Up <premise title="title"> content </premise> Tutorial <step label="label" title="title"> content Do not use in <hint> hint_text </hint> the same </step> question with ...more_steps... accordion. <conclusion title="title"> content </conclusion> </tutorial> MultipleChoice <MCPART> In Answer, separates parts of multipart Multiple-Choice questions. MultipleSelect <MSPART> In Answer, separates parts of multipart Multiple-Select questions. Multi-Mode <SECTION> In both Question and Answer, marks the break between question modes. Multi-Mode <SECTION NOBR> In Question, marks the break between question modes without adding <br>. Insert a corresponding <SECTION> tag in Answer. Controlling Question Behavior The listed tags are valid only in Question unless otherwise indicated. Purpose Tag Notes Adds a Submit button. Use with Submit button for <SUBMIT> <SUBMIT link = question part submission. question part "link_text"> Answer box <_> Specifies placement of the answer box or control. Identify incorrect choices <INCORRECT> Marks the start of incorrect choices (Multiple-Select Answer only). Significant figures help <SIGFIGS> Sets position of significant figures help. Symbolic formatting help <SYMBOLIC> Sets position of symbolic formatting help. Hints <HINT> Sets the position of a hint. Correct / incorrect <MARK> marks Sets the position of correct/incorrect marks. Use Perl Use <eqn> in Question or Solution. Displays the result in red (to 3 significant figures for Numerical mode). Use <EQN> in Answer (optionally, in Question or Solution). Displays the result without modification. <eqn> <EQN> webassign.net • 1730 Varsity Drive Suite 200 • Raleigh, NC 27606 • Tel: (800) 955-8275 or (919) 829-8181 • [email protected] 236 Creating Questions Quick Reference Supported Perl Functions and Operators The following list includes both WebAssign-specific functions and a subset of the standard Perl functions and operators that are available when creating questions. Conditional Processing and Logic Operation Usage Notes Conditional Behavior Logical And, Or, Not if (condition) {do_if_true} else {do_if_false}; An abbreviated form is: && You can also use the words and, or, not — but the symbols have higher precedence. || (condition) ? {do_if_true} : {do_if_false}; ! Numerical Operators Operation Usage Notes Test Numerical Equality == Returns true (1) or false (0). Use eq to compare strings. Test Numerical Inequalities (≠><≥≤) != > < >= <= Returns true (1) or false (0). To compare strings, use ne, gt, lt, ge, le. Addition, Subtraction, Multiplication, Division + * Exponentiation ** Order of Operations () ‐ / Math Functions Operation Usage Do not use [] or {}. Notes Absolute value abs(n) Square root sqrt(n) Least Common Multiple lcm(n1,n2,...) Argument can be a list or an array. Greatest Common gcd(n1,n2,...) Argument can be a list or an array. Divisor Notes Trigonometric Functions sin(n) cos(n) tan(n) Inverse Trigononometric Functions asin(n) acos(n) atan(n) Arctangent of y/x atan2(y,x) 10/2010 sec(n) csc(n) cot(n) asec(n) acsc(n) acot(n) Usage pi (π) pi Notes Operation Usage Notes sigfigs(n) rad(n) Converts degrees to radians. Get significant digits Degrees to radians Returns the number of significant digits in n, ignoring trailing zeros. Radians to degrees deg(n) Converts radians to degrees. Get canonical angle in degrees canonicaldeg(n) Converts angle in degrees to value in range −180 to 180. Display significant digits sigform(n, digits) Returns n rounded to the specified number of significant digits. Uses “e” notation if needed, for example, 2.30e+04. Notes Get decimal places decfigs(n) Returns a power of 10 that represents the smallest significant decimal place in n. Ignores trailing zeros. Display scientific notation scinot(n, digits) Returns n formatted as scientific notation with the specified number of significant digits, for example 2.31 × 104. Do not use results for additional computation. Display “e” notation sciform(n, digits) Returns n in “e” notation with up to the specified number of significant digits after the decimal point, for example 2.31e+04. Logarithmic Functions Operation Usage Exponential function exp(n) Euler’s number raised to n. Natural Log log(n) n>0 Log (base 10) log10(n) n>0 Combinatoric Functions Operation Usage The value of n must be in radians. Non-canonical values of n might return approximate values. Returns principal values in radians. Returns radians from −π through π. Notes Sum sum(n1,n2,...) Argument can be a list or array. Average (mean) avg(n1,n2,...) Argument can be a list or array. Maximum value max(n1,n2,...) Returns the greatest value. Argument can be a list or array. Minimum value min(n1,n2,...) Returns the least value. Argument can be a list or array. combination(n,k) Returns the number of sets of k Reduced fraction fraction(n,d) Combinations C(n,k) Returns the fraction n/d in reduced form, for example, 1/2 or 1. If used in Answer, specify $FRACTION=1. Permutations P(n,k) Rounded integer decdisplay(n) permutation(n,k) Returns the number of unique Returns n rounded to the nearest integer. Uses “e” notation when |n| ≥ 1e+05. Add commas commas(n) Returns n with commas between digit groups to the left of the decimal point, for example, 12,345.678901. Do not use results for additional computation. Add spaces spaces(n) Returns n with spaces between digit groups on both sides of the decimal point, for example, 12 345.678 901. Do not use results for additional computation. Display as words spell_number(n) Returns the integer part of n in words, for example, “negative twenty-three”. Does not add commas. Factorial (n!) n≥0 Trigonometric Functions Operation Usage Operation elements that can be picked from an n-element set. (ab is different from ba) sets of k elements that can be picked from an n-element set. factorial(n) Display of Numerical Values The listed functions are mostly used in Question or Solution to format values for display. Operation Usage Notes n must be an integer from 1 through 100. Rounding, Significant Digits, Scientific Notation Operation Usage Notes decform(n, Round to places) specified decimal places Returns n rounded to the specified number of decimal places. Round up (next ceil(n) greater integer) Returns the first integer greater than n, for example, ceil(23.2) is 24, ceil(-23.7) is -23. Round down (next lesser integer) floor(n) Returns the first integer less than n, for example, floor(23.7) is 23, floor(-23.2) is 24. Return integer only int(n) Returns only the integer component of n, for example, int(23.7) is 23, int(-23.2) is 23. spell_ordinal(n) Returns the integer part of n as an Display as words (ordinal) ordinal number in words, for example, “thirteenth”. Does not add commas. webassign.net • 1730 Varsity Drive Suite 200 • Raleigh, NC 27606 • Tel: (800) 955-8275 or (919) 829-8181 • [email protected] 237 Creating Questions Quick Reference Randomization Functions Operation Usage Notes Returns a randomly selected item from list. Get one value from list pickone(list) Get corresponding value from list picksame(list) Returns the item from list that Variable Description $SIMPLIFIED Set $SIMPLIFIED=1 to require students to perform computations. Otherwise, students can enter either 5 or 2+3. Students can specify proper or improper fractions, for example, 10/2. corresponds to the item returned by the preceding pickone function. $size pick(n,list) Get multiple values from list Returns n randomly selected values from list. $thisnum Returns numerical value from student’s response to numerical with units question. Get random integer Returns a random integer in the range from low through high in the specified increments. Optionally, specify one or more values to exclude. $thisunit Returns unit from student’s response to numerical with units question. $TOL Sets asymmetrical tolerances. For example: randnum(low, high, increment, exclude) Informational Functions Operation Usage Time submitted before due Notes granted extensions) that the question was submitted. Assignment get_data(deployID, studentID) responses get_data(deployID, studentID, questionID) Returns an array of one student’s responses for an assignment (optionally, a single question on the assignment). Use $DEPLOYMENT_ID and $STUDENT to specify the current assignment instance and the current student. Perl Variables Used by WebAssign The listed variables are valid only in Answer unless otherwise indicated. Numerical Questions See Creating Numerical Questions. Variable Description $DECFIGS Sets the required decimal places, for example, $DECFIGS=100 or $DECFIGS=0.01. $SIGFIGS Sets the required number of significant figures as a positive integer, for example, $SIGFIGS=3. $NO_SIGFIGS_HINT Hides the significant figures help icon/link. $FRACTION Set $FRACTION=1 to require students to perform computations and accept only exact answers as integers, decimals, fractions, or mixed numerals. $PROPERFRACTION Set $PROPERFRACTION=1 to require students to perform computations and accept only exact answers as integers or reduced fractions. 10/2010 $TOL={min => 0, max => 4} $LABEL &beforeDue('days') Returns the number of days, &beforeDue('hours') hours, or minutes before the &beforeDue('minutes') assignment is due (including any Sets the width of the answer box, for example, $size=20. $LINK For answer-dependent questions, set $LABEL to a unique identifier for each answer box that is used as a dependency for another answer box. For answer-dependent questions, set $LINK to define the dependencies of the current answer box by referencing the labels of other answer boxes. Math Questions (Algebraic and Symbolic Modes) See Creating Math Questions. Variable Description $CASGRADER (Algebraic) Sets the grading mechanism, for example, $CASGRADER=mathematica. $DEFAULTVALS (Symbolic) Sets the list of values that will be used when comparing student responses to the answer key, for example, $DEFAULTVALS=[‐1.1, 0.4, 0.9]. $MAXERR=n $MAXERR='n%' (Symbolic) Set $MAXERR to the allowable tolerance (>0) for evaluated student responses. $NO_REPETITION (Symbolic) Set $NO_REPETITION=1 to match each element of a set only once, so {1,2,2} ≠ {1,2}. $NO_SYMBOLIC_HINT (Symbolic) Set $NO_SYMBOLIC_HINT=1 to hide the symbolic formatting help icon/link for the current answer box only. $ROSTER_ONLY $PAD $size (Symbolic) Set $ROSTER_ONLY=1 to require that students enclose unordered sets in braces, e.g., {1,2}. Enables one of two pads for answering math questions (and hides symbolic formatting help icon): $PAD='devmath' enables mathPad. $PAD='calc' enables calcPad. Sets the width of the answer box when not using mathPad or calcPad, for example, $size=20. Multiple-Choice and Multiple-Select Questions See Creating Multiple-Choice Questions, Creating Multiple-Select Questions. Variable Description $ORDERED=n $ORDERED=list To display choices in the order listed in Answer, set $ORDERED to the positions (starting with 1) of one or more correct choices. $SET_EACH_POSITION To set the location of each choice individually, set $SET_EACH_POSITION=1 in Answer. In Question, add an answer box <_> for each choice. Choices are still displayed in random order. $thisanswer Returns position (starting with 0) of student’s response to multiple-choice question. For multipleselect, use @$thisanswer. $PULLDOWN (Multiple-Choice) Set $PULLDOWN=1 to display choices as a drop-down list. $Select_Option (Multiple-Choice) When choices are displayed as a drop-down list, set $Select_Option to the text that should be displayed by default. If not specified, ‐‐‐Select‐‐‐ is shown. $thiskey (Multiple-Choice) Returns position (starting with 0) of correct response to multiple-choice question. Matching Questions See Creating Matching Questions. Variable Description $LABEL For matching questions, set $LABEL to "a", "A", or "1" to set the numbering style when displaying images or formatted notation in the second column. $ORDERLEFT Set $ORDERLEFT=1 to display the left-hand list in the specified order. $ORDERRIGHT Set $ORDERRIGHT=1 to display the right-hand list in the specified order. Fill-in-the-Blank Questions See Creating Fill-in-the-Blank Questions. Variable Description $CASE Make answer case-sensitive. Also for Java mode. $SPACE Make answer space-sensitive. Also for Java mode. $REDUCE Ignores multiple, preceding, and trailing whitespace in responses. Also for Java mode. $size Sets the width of the answer box, for example, $size=20. Essay Questions See Creating Short-answer or Essay Questions. Variable Description $cols Sets the width of the answer box, for example, $cols=50. $rows Sets the height of the answer box, for example, $rows=8. webassign.net • 1730 Varsity Drive Suite 200 • Raleigh, NC 27606 • Tel: (800) 955-8275 or (919) 829-8181 • [email protected] 238 Creating Questions Quick Reference File-Upload Questions See Creating File Upload Questions. Variable Description $ACCEPTFILETYPE Sets acceptable filename extensions, for example, $ACCEPTFILETYPE=['.doc','.docx']. $FILEUPLOADMAX Sets maximum file size in bytes, for example, $FILEUPLOADMAX=204800. $size Sets the width of the answer box, for example, $size=80. Chemistry Questions (Fill-in-the-Blank Mode) See Creating Chemistry Questions. Variable Description $PAD Enables a pad for answering chemistry questions (and hides symbolic formatting help icon): $PAD='chem' enables chemPad. $CHEM Sets the chemPad grading mode. $CP_MAX_WIDTH Sets the maximum width of the chemPad tool, for example, $CP_MAX_WIDTH=400. $MARVIN Displays the MarvinSketch tool for answer entry and sets the MarvinSketch mode, for example, $MARVIN='complete'. $MARVIN_START Sets a template for a MarvinSketch question, usually using a key generated with the MarvinSketch Key Generation Tool. Variable Description $QUESTION_NUM Returns current question number on assignment. $RESPONSE_NUM Returns number of submissions made. $STUDENT Returns unique ID of the student completing the question. $THIS_SCORE Set to override question part score. $THISBOXNAME Returns full name of answer box, for example, RN_355_1_0_83 is the box name for a random numerical box of question ID 355. It is the first part (0) of the first question (1) on the assignment and 83 is the random seed. $thisresponse Returns student’s response for the answer box. $TOOLTIP Set to customize or hide answer format tip, for example, $TOOLTIP='' or $TOOLTIP='Enter a whole number'. Mode-Independent Variables These variables can be used in all questions. Variable Description $ASSIGNMENT_ID Returns current assignment ID. $CORRECT Returns true (1) if student’s response is correct. $DEPLOYMENT_ID Returns the unique identifier for this scheduled instance of this assignment. Not the same as the assignment ID. $EMAIL Returns the email address of the student completing the question. $FULLNAME Returns the full name of the student completing the question. $HINT Set the hint to be displayed. $CORRECT_HINT Set the hint to be displayed after a correct response. $HINT_ON_CORRECT Set to displays available hints even when your student’s response is correct. $pi Returns a calculated value of pi. $POINTS Returns point value of question part. $QUESTION_ID Returns the current QID. 10/2010 webassign.net • 1730 Varsity Drive Suite 200 • Raleigh, NC 27606 • Tel: (800) 955-8275 or (919) 829-8181 • [email protected] 239
© Copyright 2026 Paperzz