Author a Math App question to be graded by Maple

You can author a Math App question to include grading code built inside of the Math App itself (instead of inputting the grading code directly into Möbius) to grade student responses.

NOTE: A Math App is created as a Maple document (.mw file extension) and can only be authored using the MapleTM software program. Access to Maple software and existing knowledge of the Maple language allow you to author Math Apps. Check out the Maple online help for more details on using Maple.

The Maple grading procedure is defined within the Math App's Maple worksheet when it's created through the Maple software program.

You must define an Actions module in the Startup Code of the Math App, and that module must contain an exported procedure called Grade that's used to grade the student response.

TIP: Check out Author a Math App question to learn how to incorporate your Math App into a Möbius question.

This help topic shows you how to:

  • Create a basic Math App using the Maple software program;
  • Define a grading procedure within the Math App using the Maple software program; and
  • Configure your Math App question in Möbius to reference the grading procedure.

Create a Math App

Here's an example of how to create a basic Math App within Maple:

  1. Start a new Maple document in the Maple software program.

  1. Click the (A) Plot Component and (B) Slider Component from the Components palette to add them to your document.

  1. Right-click the inserted Slider component and click Component Properties.

  1. Make the following changes in the Slider Properties window:

  • Change the Value at Lowest Position to -5
  • Change the Value at Highest Position to 5
  • Change the Spacing of Major Tick Marks to 5
  • Change the Spacing of Minor Tick Marks to 1
  • Ensure the check boxes for the following options are selected:
  • Enable Input
  • Visible
  • Show Track
  • Show Axis Labels
  • Show Axis Tick Marks
  • Continuous Update On Drag
  1. Click OK.

  1. Right-click the Slider component and click Edit Value Changed Code.

  1. Remove the default code in the Component Code Editor and replace it with the following:

Copy this code
DocumentTools:-Do(%Plot0=plot(x^2+%Slider0*x+4, x=-5..5, y=-5..10));
  1. Click the save icon and then exit the Component Code Editor.

  1. Save your Maple document with the .mw file extension.

Define a grading procedure within the Math App

Here's how to define the grading procedure within your Math App:

  1. Open your Math App in the Maple software program from the Create a Math App section of this help topic. Click Startup Code (or press Ctrl+Shift+E) from the Edit menu.

  1. Define an Actions module with an exported procedure called Grade, by adding the following code into the empty Startup Code window:

Copy this code
Actions := module()
    export Grade;
    Grade:=proc()
        if DocumentTools:-GetProperty(Slider0,value)=-2 then
            return 1;
        else
            return 0;
        end if;
    end proc;
end module;

NOTE: In this example grading procedure:

  • The student will receive full marks (1) if the slider position is left at -2.
  • The student will receive no marks (0) if the slider is left at any other position.

NOTE: The Actions module is required for communication with Möbius. The Actions module can optionally define the following exports:

  • InitParams — Takes arguments from Möbius to initialize the worksheet with different parameters.
  • Grade — A procedure that returns a number in the range 0.0 to 1.0.

You'll also need to export any variables that you want Möbius to read so that Möbius can communicate with your Math App worksheet. Check out Use Math App authoring guidelines.

  1. Click the save icon and then close the Startup Code window.

  1. Save your Maple document with the .mw file extension. Your new Math App now has an Actions:-Grade procedure that calculates the grade.

Configure your Math App question to use the grading procedure

Once you've saved your Math App with the Actions:-Grade procedure, that allows for automatic grading of the Math App question without adding any additional code to Möbius.

Navigate to the Question Editor in Möbius and follow the steps described in Author a Math App question to configure your question to use the Math App's grading procedure.

IMPORTANT: Be sure to select the Grading Algorithm in Math App option (selected by default) at step 8 of Author a Math App question when defining how the Math App question is to be graded.

When this option is selected, MapleNet will run the Actions:-Grade procedure within the Math App to calculate the students grade for the question.