4.3 Additional Options in the Question Editor - Maple T.A. 10 Help

Instructor   |    Proctor   |    Student   |    System Administrator   |    System Requirements

4.3 Additional Options in the Question Editor

The instructor has options to add various components while developing questions in the Question Editor. For more details, click on the following:

The Algorithm Designer

For every question type, you can use algorithmically generated variables in question statements, answers, hints, or feedback. Using variables in questions you can generate variations on a single template question.

To create a question that uses randomly generated data in a question, you must define variables.

Maple-generated plots to be included in questions are also defined in the Algorithm Editor using the plotmaple command. When you define a plot in the Algorithm Editor, you can use Preview to see the plot image, verify the plot statement is correct, and edit it if necessary. For more information, see Plotting Using Maple.

When editing a question in the Question Editor, you can add or edit algorithms.

To add or edit algorithms:

  1. In the Question Editor screen, expand the Algorithm area.
  1. The Algorithm Editor opens. See Figure 4.4. The buttons above the algorithm text box perform the following tasks.
  • Show Designer displays the Algorithm Designer. After you click Show Designer, the system replaces it with Hide Designer. Clicking Hide Designer hides the Algorithm Designer. Only one of these two options is visible at a time.
  • Refresh algorithm preview evaluates your variable definition and control statements, and returns a value for each variable in the Variable/Value region located below the algorithm text region. If you define a plot in the Algorithm Editor, the plot image is displayed. You can verify the plot statement is correct, and edit it if necessary.

Algorithm Editor

Figure 4.4: Algorithm Editor


  1. Add or edit algorithm statements (variable definitions and variable control statements).
  • If you know the system algorithm syntax, directly add or edit statements in the algorithm text region.
  • If you don't know the system syntax, click Show Designer to display the Algorithm Designer. You can only add (not edit) statements using the Algorithm Designer.

4. When you have finished adding and editing variable statements, click Finish to save your changes and return to the Question Details screen.

Note: When refreshing the algorithmic variable with a plot statement, you need to change the plot statement in order for the new image to appear. Changing a plotdevice or plotoption entry will not update the plot.

See Also:

Overview of Algorithmic Question Capabilities

Plotting Using Maple

Adding and Editing Algorithms

Use the Algorithm Designer to simplify adding algorithmic variables.

  1. You can add any type of algorithmic statement. In the appropriate section of the Algorithm Designer, enter and select the required information in the template.
  1. To add the statement and refresh the values in the algorithm text box, click OK.
  1. Repeat these steps to add other statements.

For detailed information, see the appropriate section:

Generating Random Number Variables

Create a Random Number Variable

Figure 4.5: Create a Random Number Variable


You can use the Algorithm Designer to create range-based variables.

  1. Enter the variable name in the first cell. You do not need to use the $ or ${} notation.
  1. Select the type of number to generate (whole number or decimal number generation with 1 to 8 decimal places).
  1. Enter the minimum and maximum values for the range, and the increment (step).

Note: For each expression, you can enter a:

  • Variable name, for example, x or monthly totals. You do not need to use the $ or ${} notation.
  • Number, for example, 5 or 2.67
  • Math expression or formula, for example, x^2 + 1
  1. To add the variable definition to the algorithm text box, click OK.
  1. You can use the Algorithm Designer to generate multiple variables.

Generating Condition-based Variables

You can also set variable values based on conditions and relationships to other variables.

  1. Enter the variable name in the first cell. You do not need to use the $ or ${} notation.
  1. Enter the expression defining the variable if the condition is satisfied.
  1. Enter the condition by:
  1. Entering two expressions
  1. Selecting the relation
  1. Enter the expression defining the variable if the condition is not satisfied.

Notes:

  1. Each expression you use must be a:
  • Variable name, for example, x or monthly totals. You do not need to use the $ or ${} notation.
  • Number, for example, 5 or 2.67
  • Math expression or formula, for example, x^2 + 1
  1. You must define variables referenced in the condition before defining the conditional variable.
  1. To add the variable definition to the algorithm text box, click OK.
  1. You can use the Algorithm Designer to generate multiple variables.

Using Maple to Generate Random Number Variables and Generate a Plot

You can use Maple commands to define random variables using any Maple function.

  1. Start by adding the variable name in the first cell. You do not need to use the $ or ${} notation.
  1. Select the type of variable to generate, variable or plot.
  1. Enter the Maple commands used to define the random variable or enter the plot statement. The plot statement accepts plot device options. See Setting Plot Options for a list of plot options.

Guidelines for Maple Commands in Maple-based Variables

  1. To generate a random number using Maple, you must use the multiple commands: randomize(): <random_command> for each random variable. Otherwise, the same output is generated in each instantiation of the question.
  1. When entering multiple commands, ensure that all (except the last) have a trailing colon. The last command must not have a trailing colon.
  1. You must use the $ or ${} notation when including variables in a Maple command.
  1. When referencing negative, random variables in a maple variable definition, be sure to place the negative variable in parentheses, otherwise an error message will return.
  1. To add the variable definition to the algorithm text box, click OK.
  1. You can use the Algorithm Designer to generate multiple variables.

You can also use a Maple repository when generating random variables. Click Maple Repository to import and link to a Maple repository.

Establishing Conditions Between Variables

You can also use the Algorithm Designer to set conditions that must be met when the system generates variable values.

  1. Enter the condition by:

a. Entering two expressions

b. Selecting the relation

Notes:

  1. Each expression you use must be a:
  • Variable name, for example, x or monthly totals. You do not need to use the $ or ${} notation.
  • Number, for example, 5 or 2.67
  • Math expression or formula, for example, x^2 + 1
  1. You must define variables referenced in the condition before defining the condition statement.
  1. To add the condition statement to the algorithm text box, click OK.
  1. You can use the Algorithm Designer to define multiple condition statements.

See Also:

Overview of Algorithmic Question Capabilities

Generating Random Numbers in Questions

Mathematical and Logical Operators in Algorithms and Answers

Working with Variable Data

Adding and Editing Information Fields, Hints, or Feedback

Adding and Editing Information Fields

When editing a question in the Question Editor, you can add or edit information fields. Information fields allow you to add information subfields to a question to indicate subtopic, learning objective, level of difficulty, authorship, ownership, or other information. The information field values allow sorting and filtering in the question repository and during assignment creation, and they facilitate performance reporting by information field category.

To add or edit the info fields:

  1. In the Question Editor screen, click Edit or click here to add one link in the Information Fields area.
  1. Enter or edit field names and corresponding values in the Field and Value text boxes.
  1. Each question can contain any number of information fields. To add rows, click Add Row.
  1. Click Save to save all changes.

See Also:

The info Field

Adding and Editing Hints

When editing a question in the Question Editor, you can add or edit hints.

To add or edit the hints:

  1. On the Question Editor screen, click Add in the Hints area to see the following screen:

  1. Enter the following information:
  • Name: enter the name of the hint.
  • Order: if you are authoring multiple hints, they can be sorted in a specific order. Use the drop-down menu to specify the order.
  • Penalty: Define a penalty for the question if you want students to be penalized for using a hint during an assignment. Assign a weight between 0 and 1 for the penalty. By default, the penalty has weight of 0.0, which means a student will not be penalized if they use the hint.
  1. In the textbox provided, enter your comment for the hint. Hints can include text, HTML-formatted text, symbolic math expressions, algorithmic variables, inserted objects, JavaScript code, variables, and more. To add or edit HTML-formatted text, click Source () in the menu bar.
  1. Click Save to save all changes.
  1. Each question can contain any number of hints. To display an additional, repeat steps 1-4.
  1. Once a hint has been added, the Add button will change to Edit. Click Edit to edit the hint.

See Also:

Hints, Coaching, and Performance Feedback

Adding and Editing Feedback

When editing a question in the Question Editor, you can add or edit the comment.

To add or edit a comment:

  1. On the Question Editor screen, click Edit in the Feedback area.
  1. Enter or edit the comment in the Text Editor. Feedback can include HTML-formatted text, JavaScriptTM, symbolic math expressions, algorithmic variables, inserted objects, and more. To add or edit HTML-formatted text, click Source () in the menu bar.
  1. Click Save to save all changes.

See Also:

Text Formatting in Questions

Comments and Performance Feedback

Using the Comment Field in a Maple Question

Deleting Information Fields, Hints, or Feedback

To remove an information field, hint or feedback:

  1. Open an existing question from the Question Repository by clicking the black triangle.
  1. Click the Edit in the Information Fields, Hints or Feedback.
  1. Delete the text in the entry region.
  1. Click Save.

The system returns to the default behavior when grading the question.

See Also:

Question Fields

Text Formatting in Questions

You can use HTML 4.0 tags to control the display of character formatting in most question fields. (For a list, see Special Characters in Questions.) To do so, click Source () in the toolbar of the text editor region of the question and include the appropriate format tags.

Note: This requires an HTML or text editor and knowledge of HTML.

Table 4.1: Examples of HTML Tags to Use for Formatting Text

HTML Formatting 

Function

<p>Text of paragraph</p>

Sets the enclosed text as a paragraph

<br>Text of new line

Sets a new line break (carriage return) in the current paragraph

<b>Text</b>

Boldfaces the enclosed text

<i>Text</i>

Italicizes the enclosed text

<sub>TexFot</sub>

Subscripts the enclosed text

<sup>Text</sup>

Superscripts the enclosed text

<font face="..">Text</font>

Sets text font

<font size="..">Text</font>

Sets text size

<font color="..">Text</font>

Sets text color


Testing the Grading of a Question

  1. Preview the question by clicking the Preview button on the left pane of the question summary page. Alternatively, from Question Repository, select Preview from the drop-down arrow for a question.
  1. Enter a response to the question (as if you were a student).
  1. Click Grade.
  1. The system grades the question and displays the result.
  1. Click Back to return to the Display Question screen. If there is algorithmic variable data, the random values are regenerated when the question is re-displayed.
  1. To check the form of the question with different algorithmic variable data values, click Refresh in the preview window.

Maple Plots

Use the Maple computer algebra system to generate sophisticated 2-D and 3-D plots in your questions and feedback. See Plotting Using Maple. You can add a Maple plot using any authoring method.

See Also:

Plotting a Student Response

Plotting Using Maple

Images and Reference Files in Questions

You can use image files in GIF, JPEG, or PNG formats in questions. To place an image in a question, first upload the file to your class web site. Then include a reference to the image in the question.

You can also link to a file that has been uploaded to your class web site. The following file formats are supported: htm, html, gif, jpg, png, pdf, xls, class, jar, js, css, shtml, exe, zip, swf, lib.

Uploading Images and Reference Files to the Class Web Site

  1. From the Class Homepage, select Class File Manager.
  1. Navigate to the appropriate subfolder on the web site or click Create new subfolder () to create a new subfolder. For maintainability, it is recommended that you create a subfolder and place your images in it.
  1. Click Upload file(s) to this point.
  1. To the file to upload, click Choose File.
  1. You can upload a single file or a zip archive.

To upload a single file:

  1. Select Single File.
  1. To specify a new name for the uploaded file on the web site, enter it in the Save As text field. It is important to retain the file extension in the name. The default name is the file name on your computer.
  1. Click OK to upload the file.

To upload a zip archive:

  1. Select the Zip Archive.
  1. To extract the files from the selected zip archive and upload them to the web site, click OK. (This is the recommended method for uploading multiple files.) If the file is not a zip archive, the system does not upload the file.

The system returns to the Class File Manager screen. The uploaded file(s) appear in the web site explorer.

  1. To upload additional files, repeat steps 3 to 5.

Important: The maximum size of a file that can be uploaded is 5 MB.

Example of Reference to Image on the Class Web Site

To include an image in a question using the Question Editor:

  1. Create or edit a question in the Question Editor.
  1. In the field where you want to include the image (question text, feedback, or hints), click the image icon () from the menu bar.
  1. Under the Image Info tab, click Browse Server and select the image. You will be shown a preview of the image.
  1. Click OK to add the image.

To use an HTML reference to an image file you have uploaded to your class web site, use:

<img src="../classes/myclassurl/question-image.gif">

where myclassurl is the unique identifier in your class URL, and question-image.gif is the name of the image file.

If you have created subfolders in your class web site, use:

<img src="../classes/myclassurl/subfolder/question-image.gif">

where subfolder is the subfolder (or subfolders) specifying the subfolder path.

Example of Link to File on the Class Web Site

To include a link to a file (for example, a PDF) in a question using the Question Editor:

  1. Create or edit a question in the Question Editor.
  1. In the field where you want to include the link (question text, feedback, or hints), click the link icon () from the menu bar.
  1. Under the Link Info tab, click Browse Server and select the file.
  1. Click OK to add the link.

To use an HTML reference to the file you have uploaded to your class web site, use:

<a href=”../classes/myclassurl/filename”>

where myclassurl is the unique identifier in your class URL, and filename is the name of the file.

If you have created subfolders in your class web site, use:

<a href=”../classes/myclassurl/subfolder/filename”>

where subfolder is the subfolder (or subfolders) specifying the subfolder path.

External Images or Reference Sources

You can use any URL that points to a resource to reference, provided the URL will be continuously available to you and your students. However, it is recommended that you use only images and references on your class web site. For external resources, enter the full URL.

Notes

  • File names can consist of only alphanumeric characters and a single period.
  • To include an image in a question, comment, or hint, you must first upload the image file to the class web site on your server.
  • If the image is not uploaded to the class web site, the question text appears with a lost image icon. You cannot check the appearance and behavior of the question properly until you upload the files to your class web site.
  • You can browse and tag images in your class web site during Clickable Image question creation or editing in the Question Editor.
  • Note on Uploaded Questions: If you upload a third-party question, you may need to edit the image reference URLs in the .qu script file before installing it. Also, you must upload any image or reference files to your class web site.
  • Note on the Proctored Browser: When an assignment is taken in the Proctored Browser mode, all links to image files, reference files, and external URLs will exit the fullscreen mode. When creating an assignment for which you require students to use the Proctored Browser, you should take care to ensure that the questions do not use any such files. It is recommended that you always preview and test an assessment in Proctored Browser mode to ensure it behaves as expected before administering it. For more information on the Proctored Browser, including information on how to preview an assignment in the Proctored Browser, see Using Proctored Browser.

See Also:

The Class File Manager

Questions with Labeled Images

You can include a GIF or JPG image with labels in a question. The labels can be static or use algorithmically generated variable data.

You must first upload an image to the class web site. See Images and Reference Files in Questions.

To add an HTML label to an image in a question through the Question Editor, use the Edit Source functionality and include the following HTML code in your question.

To edit the source of a question, click Source () in the toolbar of the text editor region of the question. Include the following code:

<div class="labelledImage" style="height: IMAGEHEIGHTpx; width: IMAGEWIDTHpx; float: none;">
<img src="IMAGEURL">
<div style="left: LABEL_LEFT_OFFSETpx; top: LABEL_TOP_OFFSETpx" class="centered">LABEL_CONTENT</div>
</div>

where

  • The height and width parameters IMAGEHEIGHT and IMAGEWIDTH specify the dimensions of the image in pixels. To determine the height and width of the graphic, use a third-party graphics application (for example, Microsoft® Paint).
  • The image parameter IMAGE_URL specifies the path and filename of the image file.
  • The size parameter value specifies the number of labels. You can specify zero or more labels.
  • The class="centered" tag is optional, and centers the label. If omitted, the label will be left aligned to your left offset.

You can create multiple labels for one image by adding multiple <div> labels.

The location and contents of each label are specified using three parameters.

  1. The left parameter LABEL_LEFT_OFFSET specifies the horizontal offset (in pixels) of the middle of the ith label from the left side of the image.
  1. The top parameter LABEL_TOP_OFFSET specifies the vertical offset (in pixels) of the baseline of the ith label from the top of the image.
  1. The LABEL_CONTENT specifies the content of the label. It can include algorithmic variables.

You can also add an HTML label to a question using plain text script authoring by adding this code to the question field (or, any HTML field in the question definition in the .qu script file).

See Also:

Images and Reference Files in Questions

Plotting Using Maple

Overview of Algorithmic Question Capabilities

Labeling Graphics in Questions Source Script

Flash Movies and Java Applets in Questions

You can use Flash movies or Java applets in questions. The process is similar to using an image in a question. In addition, you can create questions where students are graded directly on their interaction with the Flash movie or the applet. For more information on this advanced functionality, see Flash Questions and Applet Questions.

To include a Flash movie in a question, you must first upload the Flash movie to a subfolder on the Class web site. Next, you can include a reference to the Flash movie in your question. To do this in the Question Editor, follow these steps:

  1. Create or edit a question in the Question Editor.
  1. In the field where you want to include the movie (question text, feedback, or hints), click the flash icon () from the menu bar.
  1. Under the General tab, click Browse Server and select the movie you have uploaded to the Class web site. You will be shown a preview of the movie.
  1. Click OK to add the movie.

To include an applet in a question:

  1. Create and deploy the Java applet.
  1. Create and deploy a Java class grading.
  1. Author the question.

For details on this process, see Applet Questions.

Note: While an applet question cannot be created in the Question Editor, it is possible to embed an applet graph in a question that is created in the Question Editor, using the Edit Source functionality to edit the source code directly.

See Also:

Applet Questions

Flash Questions

Creating Popup References in Questions

To add a popup reference to a question, insert and customize the sample HTML code (from the example below) in your question.

Example

To create a popup HTML reference file in a question:

  1. Create an HTML file containing instructions or reference information. For example,
instructions.aspx
  1. From the Class Homepage, under Class Details, click Class File Manager to upload this file to the class website. For details, see The Class File Manager.
  1. Add the following sample HTML code to your question:
<a href="javascript:window.open('../classes/yourclassURL/instructions.aspx',
   'instructions',  'width=450,height=650,scrollbars').focus();">
Click here for instructions</a> 

where http://www.yourschool.com/classes/yourclassURL is your class web site URL.

To add HTML code through the Question Editor, click Source () in the menu bar. You can also add a popup reference to a question using plain text script authoring by adding this code to the question field (or, any HTML field in the question definition in the .qu script file).

Behavior

The question contains a link called Click here for instructions. When you click the link, a new window of size 450x650 pixels opens containing the instructions.aspx file contents.

To change the description of the content in the HTML file, the filename, or the window size, edit the sample code in the example above.

Using a Maple Repository

You can access your personal Maple library archives from within your Maple questions. To do this, you must first upload your archives files into the class file space on the server. When you create a Maple-graded question, you then specify the location of the archive as part of the question definition. When executing the Maple code associated with that question, the Maple libname variable will automatically be set to access the archive files specified.

Important: When setting up multiple archives inside the same directory, ensure that there are no name conflicts. If you want to share your question bank with another class, you must share the Maple files and the test bank files.

Uploading a Maple Repository

A Maple repository is a .mla file.

To use a repository, you must upload the .mla file.

  1. From the Class Homepage select the Questions menu.
  1. Select New Question.
  1. From the Question Type, select Maple-graded.
  1. Click Optionally import a Maple repository.
  1. Click Maple Repository to select the repository. The Class File Manager screen is displayed.
  1. Select a folder (location) to which to import the Maple repository.
  • You can expand an existing folder by clicking the arrow icon.
  • To create a new folder, click the Create new subfolder icon (). The folder arrow points down. The repository will upload to this folder location.
  1. Click the icon Upload files(s) to this point icon (). The Upload Files screen is displayed.
  1. Click Choose File to locate the .mla file.
  1. Select from Single File or Zip Archive to save the uploaded file.
  1. Click OK. The file is now saved in the Class Web Site.
  1. Select the file on the Class Web Site screen. The Question Statement & Answer screen opens with the .mla path and filename in the LIB location field.

Linking to a Maple Repository

To use an existing repository, you must link to the .mla file.

  1. From the Class Homepage select the Questions menu.
  1. Select New Question.
  1. From the Question Type screen, select Maple-graded.
  1. Click Optionally import a Maple repository.
  1. Click Maple Repository to select the repository. The Class File Manager screen is displayed.
  1. Expand the folders containing library files by clicking the arrow icon.
  1. Select the file on the Class Web Site screen. The Question Statement & Answer screen opens with the .mla path and filename in the LIB location field.
  • If you have multiple archives in the same directory, you must specify the directory name and not the .mla file. To specify the directory, edit out the .mla file name in the path that populates the LIB File Location field.

Note: Maple libraries are not available for use in algorithm variable definition statements.

See Also:

Maple-graded Questions