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 worksheet (.mw file extension) and can only be created using the MapleTM software program. The Math App Maple worksheet is then referenced by Möbius by either uploading the worksheet or entering a MapleNet URL (if you have access to a MapleNet server). 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.

The Actions module must contain an exported procedure called Grade which is used by Maple to grade the student response and communicate with Möbius.

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
  • Configure your Math App question in Möbius to reference your pre-defined Maple grading procedure that's contained within the Math App's Maple worksheet

Create a Math App

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

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

  1. Click the (A) Plot Component and (B) Slider Component from the Components palette to add them to your worksheet 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. Add the following code to the Component Code Editor above end use;

Copy this code
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 Math App Maple worksheet (.mw file extenstion).

Define a grading procedure within the Math App

Here's how to define the grading procedure within your Maple worksheet to make your Math App gradable by Maple:

  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 a module export Grade in your Math App by inserting the following startup 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.

IMPORTANT: If the Grade procedure is put into a module with a different name, the grading routine won't work properly.

TIP: Your Math App Maple worksheet's grading procedure can be as simple or as complex as needed for the question that you're authoring.

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

  1. Save your Math App Maple worksheet (.mw file extenstion). Your Math App is now gradable by Maple.

Configure your Math App question to reference your grading procedure

Once you've saved your Math App with a grading procedure, that allows the Math App question to be graded by Maple.

Navigate to the Question Editor in Möbius and follow the steps described in Author a Math App question to configure your Math App question to use your pre-defined grading procedure that's contained within the Math App's Maple worksheet.

NOTE: Depending on where your Math App is saved, you'll either:

  • Upload your saved Math App (after it's been first uploaded into your Class File Manager) directly into the Math App question
  • Enter the MapleNet URL

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.

This grading option can only be selected if the Math App's Maple worksheet contains a grading procedure.