5.10 Math App Questions - Maple T.A. 2016 Help
Maple T.A. Online Help

Instructor
Search Maple T.A. 2016 Help:

5.10 Math App Questions

Description

Math App questions display a worksheet that the student has to interact with. The Math App question type allows an instructor to embed a Maple worksheet into the question. The final state of the worksheet is what is graded.

When working with Math App questions, you can upload a Maple worksheet as a file or enter the URL of a MapleNet worksheet directly.

Grading

You can grade a Math App question directly inside of Maple T.A. The Math App will be presented to students in the form of a question. A student will then have the ability to manipulate the Math App in order to get credit for this particular question in Maple T.A.

When the student finishes the question, the final state of the Math App question is graded.

You can choose which type of grading to use. There are four options to choose from:

a. No Grading: The Math App will be used for student exploration only.

b. Manual Grading: The Math App will be manually graded by the instructor.

c. Grading Algorithm in Math App: The Math App itself contains a grading procedure called Actions:-Grade. This grading procedure must return a value between 0.0 and 1.0 which represents the student's grade.

d. Grading Algorithm in Maple T.A.: The grading code is specified in the question in Maple T.A. The specified Maple code used to grade the student response should return a value between 0.0 and 1.0 which represents the student's grade.

How to Make a Math App Question Gradeable through Maple

General Steps for making a Math App gradeable through Maple (the Math App itself).

1. Define an `Actions` module with a module export `Grade` in your Math App. This module is recommended for communication with Maple T.A. Note: If you put the Grade procedure in a module with a different name, it will not work properly. The Actions module can optionally define the following exports:

• `InitParams`: can take arguments from Maple T.A. to initialize the worksheet with different parameters.

• `Grade`: a procedure that returns a number in the range 0..1.

• `Answer`: can be used to show the correct answer.

2. Create a Math App question in Maple T.A. using the Math App.

3. Select the option to use the grading algorithm in your Math App worksheet.

How to Make a Math App Question Gradeable through Maple T.A.

  1. Define an Actions module in your Math App. Export all the procedures and variables you would like to call from Maple T.A.

2. Create a Math App question in Maple T.A. using the Math App.

3. Select Maple T.A. Grading and define the grading code to grade the student response.

General Overview on Creating Math App Questions in Maple T.A.

  1. Create your worksheet in Maple. This worksheet will contain the Math App question content (sliders, math containers, etc). Create this question with or without grading scheme.
  1. Upload your worksheet to Maple T.A.
  1. In Maple T.A., go to the Question Designer.
  1. Enter name and text for the question.
  1. Click Response Area ().
  1. From the Choose Question Type list, select Math App.
  1. As part of the question creation process, browse to the uploaded Math App worksheet and select it.
  1. (Optional) Initialize any parameters in the worksheet.
  1. Select the Grading scheme you prefer to use. For more details, see Grading Math App Questions.

Instructions

To create a Math App question:

  1. From the Class Homepage, click Content Repository in the top menu.
  1. From the Create New drop-down menu, select Question/Text.
  1. On the Edit Response Area screen:
  • Enter a Question Name.
  • Enter the Question Text: enter an appropriate description of the question. Optional: To enter the question using symbolic math, click the Equation Editor () icon. For more information on the Equation Editor, see Formatting Tips.
  1. Click Response Area ().
  1. Under Choose Question Type, select Math App.
  1. Weighting: specify the weight of this response area in the overall question. (By default, the Weighting is set to 1).
  1. In the Worksheet File section: choose a Maple worksheet file by clicking or alternatively, enter the URL of a MapleNet worksheet.
  1. (Optional) In the Initialization Parameters section, declare any variables that you want the worksheet you chose above to initialize when the question loads. This is not a requirement, you can leave it blank if there are no variables to initialize in the worksheet.
  1. Use the radio buttons to choose the type of Grading to be used to grade the final state of the worksheet:
  • No Grading: The Math App will be used for student exploration only.
  • Manual Grading: The Math App will be manually graded by the instructor.
  • Grading Algorithm in Math App: The Math App contains a grading procedure called Actions:-Grade)
  • Grading Algorithm in Maple T.A.: You can enter a Maple code to grade the student response. Note: If you select this option, enter the Maple code you wish to use to grade the student response in the box below.
  1. Click OK.
  1. Click Save to save the question, then click Preview to view it.

Next Steps

To edit further details in the Content Repository, see Editing Question Details.

Creating a Math App in a Worksheet

There are several different ways you can create your Math Apps using Maple.

  1. Create a Math App using the Exploration Assistant in Maple.
  1. Create a Math App using Maple embedded components.
  1. Download an existing Math App from the Maple Cloud and make modifications to it.

Create a Math App with the Exploration Assistant

There are two ways you can use the Exploration Assistant:

  1. Right-click and select Explore from the context-sensitive menus.
  1. Call the Explore command.
Using the Context Menu

General steps for invoking the Exploration Assistant through the context menu.

  1. Enter your expression in a Maple worksheet.
  1. Right-click the expression and select Explore. A new Explore dialog box appears.
  1. Enter lower and upper values for the parameters you want to explore. Select the skip box beside any variables or parameters you do not want to change. Click Explore.
  1. A new table is created inline with the expression and sliders for your indeterminates. Move the sliders back and forth to see how they change the solution.
  1. You can now save the assistant for future using File > Save.

Example 1: Explore an Integral Expression
  1. Enter the expression:

. Tip: You can use the Expression palette to insert the integral.

  1. Right-click the expression and select Explore. A new Explore dialog box appears. From here, you can set the range of values you would like to explore, as well as select which variables you would like to skip. When you select skip, that parameter remains as a symbolic unknown in the expression; no slider will be created to control that value.
  1. Enter -5 for the lower values of a and b, and 5 for the upper values. Beside the variable x, check off the skip box. This will leave the variable x unchanged in the expression. When you are finished, click Explore. A new table is generated inline, with a math container for the expression and sliders for the indeterminates a and b.
  1. Move the sliders back and forth to see how they change the solution.

Calling the Explore Command

General steps for calling the Explore command.

  1. Enter the expression, , where is the expression you want to explore and press Enter. The Explore dialog box opens.
  1. Enter lower and upper values for the parameters you want to explore. Select the skip box beside any variables or parameters you do not wish to change. Click Explore.
  1. A new table is created inline with the expression and sliders for your indeterminates. Move the sliders back and forth to see how they change the solution.
  1. You can now save the assistant using File > Save.
Example 2: Explore an Expansion of Powers

  1. Enter the expression, and press Enter.
  1. In the Explore dialog box, enter 1 for the lower value of n. Beside each of the variables x and y, check the skip box on the right, this will keep these variables in the solution. When you are finished, click Explore.
  1. A new table is created inline with a math container for the expression and a slider for n. Move the slider back and forth to see how it changes the expansion.
  1. You can now save the assistant using File > Save.

Create a Math App with Embedded Components

To create Math Apps using components, you first have to expand the Components palette to insert them into your worksheet. After you have chosen all the components you would like to use in your Math App, you can edit the Startup Code to link all your components together.

Example 3A: Explore a Quadratic Expression

Start with a new Maple worksheet.

  1. From the Components palette, click the Plot Component and Slider Component to add them to your document.
  1. Right-click the Slider component and select Component Properties.
  1. Change the Value at Lowest Position to -5.
  1. Change the Value at Highest Position to 5
  1. Change the Spacing of Major Tick Marks to 5.
  1. Change the Spacing of Minor Tick Marks to 1.
  1. Check the boxes for the following Options:
  • Enable Input
  • Visible
  • Show Track
  • Show Axis Labels
  • Show Axis Tick Marks
  • Update Continuously while Dragging
  1. Click OK.
  1. Right-click the Slider component and select Edit Value Changed Action. You will see some existing code already in the new window. This code is purely instructional and will not have any affect on what you append to it.
  1. Add the following code to the Component Code Editor above the end use; statement:
Do(%Plot0=plot(x^2+%Slider0*x+4, x=-5..5, y=-5..10));
  1. Click the save icon () and exit the Code Editor.
  1. Save the Maple worksheet as mathapp.mw

The Math App is now complete. As you move the Slider component, notice how the Plot component is updated.

Example 3B: A Math App Question, Gradeable through Maple

This Math App question asks students to display a plot of a specific quadratic expression of: .

  1. Open the Math App worksheet that you created in the previous section, called "Example: Explore a Quadratic Expression"
  1. From the Edit menu, select Startup Code. You will notice that the Startup Code is currently blank. In order to have Maple T.A. communicate with your Math App document, you will need to export any variables you want Maple T.A. to be able to read. For this example, insert the following code into the Startup Code window.
Actions := module()
    export Grade;
    Grade:=proc()
        if DocumentTools:-GetProperty(Slider0,value)=-2 then
            return 1;
        else
            return 0;
        end if;
    end proc;
end module;
  1. Click the save icon () and close the Code Editor.
  1. Save and then close your worksheet.
  1. Log in to your Maple T.A. server.
  1. From your Class Homepage, click Content Repository in the top menu.
  1. From the Create New drop-down menu, select Question/Text.

  1. On the Edit Response Area screen:
  • Enter a title for the question under Question Name.
  • Enter the following instructions in the Question Text: Using the slider, draw the plot of .

  1. Click Response Area ().
  1. Under Choose Question Type, select Math App.
  1. Weighting: specify the weight of this response area in the overall question. (By default, the Weighting is set to 1).
  1. In the Worksheet File section: choose a Maple worksheet file by clicking .
  1. Find the Math App file to upload using the Class File Manager. For more information, see Uploading Images and Reference Files to the Class File Manager.
  1. (Optional) In the Initialization Parameters section, declare any variables that you want the worksheet you chose above to initialize when the question loads. You can leave it blank if there are no variables to initialize in the worksheet.
  1. Use the radio buttons to select the Grading scheme you prefer to use. For more details, see Grading Math App Questions.
  1. Click OK.
  1. Click Save to save the question, then click Preview to view and test it. See figure below.
Math App Example 3B Question

Figure 5.37: Math App Example 3B Question


Example 3C: A Math App Question, Gradeable through Maple T.A.

This example again uses the Math App worksheet that you created in the previous section called "Example 3A: Explore a Quadratic Expression".

It asks students to display a plot of a specific quadratic expression.

  1. Log in to your Maple T.A. server and then go to your Class Homepage.
  1. From your Class Homepage, click Content Repository in the top menu.
  1. From the Create New drop-down menu, select Question/Text.

  1. On the Edit Response Area screen:
  • Enter a title for the question under the Question Name panel.
  • Enter instructions in the Question Text text field, for example: Using the slider, draw the plot of .

  1. Click Response Area ().
  1. Under Choose Question Type, select Math App.
  1. In the Worksheet File section: choose a Maple worksheet file by clicking .
  1. Find the Math App file to upload using the Class File Manager. For more information, see Uploading Images and Reference Files to the Class File Manager.
  1. Using the radio buttons, select Grading Algorithm in Maple T.A.
  1. Insert the following command into the input box:

if DocumentTools:-GetProperty(Slider0,value)=-2 then
    return 1;
else
    return 0;
end if

  1. Click OK.
  1. Click Save to save the question.
  1. To see how the question works, click Preview.
Example 4: Exploring a 2-D Plot
  1. In Maple, enter the command:
  1. Right-click the expression and select Explore. The Explore dialog box opens.
  1. Enter 1 for the lower end values of a and b. When you are finished, click Explore.
  1. A new table is created inline with a math container for the expression and sliders for a and b. Move the sliders back and forth to see how they change the plot.

 

Tip: If you are going to explore a 2-D plot, it is not necessary to define the range for x. However, if you do not define x then you must select skip for x. Default values will then be used for the range.

 

Initializing Parameters in a Math App Question

In Maple T.A., you can declare static or algorithmic variables to be used in a Math App question. These declared variables are initialized by the Math App when the question is loaded.

Working With Math App Variables in Maple T.A.

  1. Open the Maple worksheet that contains the Math App.
  1. In the Startup Code for the Math App, you must have an InitParams procedure defined within the Actions module. Also, you must export the InitParams procedure.
  1. Log in to Maple T.A.
  1. Create or edit a Math App question. For more details, see Matching Questions.
  1. Edit the value you are passing to the Math App as a parameter in the Initialization Parameters text field. The variable name in Maple T.A. must match the parameter declaration in the InitParams procedure in the Math App. If you want to pass an algorithmically generated variable to the Math App, define the variable first using the Algorithm Designer in the Question Designer, then assign the value of the parameter to this algorithmic variable in Initialization Parameters.
  1. Click OK, then Save.

Example 5: Editing a Math App Variable through Maple T.A.

Defining the InitParams procedure in the Math App

In the first part of this example, you will create a Math App called ParameterTest to be used in Maple T.A. for a Math App question.

  1. Open a new Maple worksheet.
  1. Place a text area embedded component in the worksheet. By default, it will be called TextArea0.
  1. Place a slider component in the worksheet below the text area.
  1. Right-click on the Slider component and select Component Properties from the context menu.
  1. Enter 0 in the Value at the Lowest Position field.
  1. Enter 10 in the Value at the Highest Position field.
  1. Enter 2 in the Spacing of Major Tick Marks field.
  1. Enter 1 in the Spacing of Minor Tick Marks field.
  1. Select Show Axis Labels.
  1. Click OK.
  1. Add the following text to the left of the text area embedded component:

"The parameter passed in from Maple T.A. is:"

  1. Next, above the slider embedded component, add the following text:

"Move the slider to this number"

See Figure 5.38.

Parameter Test for Math App Question

Figure 5.38: Parameter Test for Math App Question


The next step is to add startup code to the worksheet.

  1. Open the Startup Code code editor (from the Edit menu, select Startup Code).
  1. Add the following code to the code editor:

Actions := module()
   export InitParams, Grade, Num := 3;
   InitParams := proc( { val::posint := 5 } )
       Num := val;
       DocumentTools:-Do(%TextArea0 = Num);
   end;

   Grade := proc()
       `if`( DocumentTools:-Do(%Slider0) = Num, 1.0, 0.0 );
   end;
end module:

DocumentTools:-Do(%TextArea0="");

Inside the Actions module, the InitParams procedure defines a variable, Num that is used in TextArea0. Num takes the value, val, which will be passed as a parameter from Maple T.A.

  1. Click the save icon () and close the Code Editor dialog.
  1. Save your Maple worksheet as ParameterTest.mw

Defining the Variable in Maple T.A.

Next, you will define a variable in Maple T.A. that is passed to InitParams through the val parameter.

  1. Log in to your Maple T.A. server and then go to your Class Homepage.
  1. From your Class Homepage, select the Content Repository in the top toolbar.
  1. Click Create New and from the drop-down menu, select Question/Text.
  1. On the Edit Response Area screen:
  • Enter a title for the question under Question Name. (For example, Defining the Variable in Maple T.A.)
  • Click OK.

  1. Click the add icon () and expand the Algorithm section.
  1. Click Show Designer to display the Algorithm Designer.
  1. Under Random Number, change the first line to read: a is a random whole number between 1 and 10 in the steps of 1.
  1. Then, click Add.
  1. Click Response Area ().
  1. Under Choose Question Type, select Math App.
  1. Weighting: specify the weight of this response area in the overall question. (By default, the Weighting is set to 1).
  1. In the Worksheet File section: choose a Maple worksheet file by clicking .
  1. Use the Class File Manager to upload the file called ParameterTest.mw (created in the first part of this example). For more information, see Uploading Images and Reference Files to the Class File Manager.
  1. In the Initialization Parameters section, assign a, as the value for parameter, val. In other words, enter: val=$a;
  1. Using the radio buttons, select Grading Algorithm in Math App.
  1. Click OK, then click Save to save the question.
  1. Click Preview to see the question, as shown in Figure 5.39.

Defining the Variables Question Preview

Figure 5.39: Defining the Variables Question Preview