Use Math App authoring guidelines

A Math App question presents your interactive MapleTM document online using the Möbius math engine (MapleNetTM).

The Math App (that is, the Maple document that you uploaded to Möbius) is in read-only mode when presented with MapleNet, however students are still able to interact with the components in the document.

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

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.

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).

TIP: Check out Author a Math App question to be graded by Maple to learn how to incorporate a grading routine right inside your Math App question.

Authoring guidelines are presented below to help you get the most out of your Math App questions.

Actions module and startup code

Möbius uses the following two processes for a Math App component in an activity:

  • A save state process in order to preserve the student's partial answer.
  • A restore process to load the save state when the student returns to that question.

As a result, you need to declare all variables and procedures for loading and reloading your Math App within an Actions module, defined in the Startup Code.

TIP: Check out the Maple online help for more information on the structure of modules in Maple programming.

Möbius checks the Actions module for exported procedures:

  • InitParams — A procedure that runs when the Maple document is loaded in Möbius, and accepts the Initialization Parameters defined in the Math App question.
  • Grade — A procedure that runs when the Math App question is graded and returns a floating point number between 0.0 and 1.0.
  • Any other procedures that may be used by components in the worksheet.

IMPORTANT: The module must be named Actions. If the Grade procedure is defined in a differently-named module, it won't work properly and your question won't be properly graded when you select the Grading Algorithm in Math App option.

IMPORTANT: Due to name collision with a new Maple command, the Actions module can't be defined if the DocumentTools Maple package is loaded globally in the worksheet. This means you can't load DocumentTools using the with or use commands, and you must use the long form name of any command in the DocumentTools package.

TIP: Here's a sample startup code:

Copy this code
Actions := module()
        export InitParams, Grade;    
    local x, y;

InitParams := proc(param1,param2,...)
    <startup options go here>
end proc;

Grade:=proc()
if x-y=0
then return 1;
else return 0;
end if;
end proc;

end module;

Any variables should be captured inside the Actions module as one of the following so that Möbius can communicate with your Math App Maple worksheet:

  • An export or exported procedure which is used within the Math App itself, or is one of the previously listed exports.
  • A local variable for variables not called for by Möbius or Maple outside the Actions module.
  • A global variable for variables called for by Möbius or Maple outside the Actions module.

TIP: You can declare both static variables and algorithmic variables in Math App questions. These declared variables are initialized by the Math App when the question is loaded. The variable name entered in the Initialization Parameters text field in Möbius must match the parameter declaration in the InitParams procedure in the Math App's Maple worksheet. If you want to pass an algorithmic variable to the Math App, first define the variable in the Algorithm pane of the Question Editor in Möbius, then assign the value of the parameter to this algorithmic variable in the Initialization Parameters field.

When viewing a Math App component in an activity for the first time, the Maple math engine will open and display the worksheet as it was saved, and then run the Startup Code to update the Math App.

This can result in students seeing visible changes when the worksheet is displayed; consider saving the worksheet in Maple in a default state.

TIP: Consider adding a cleanup procedure (e.g. Actions:-Reset) to the Startup Code for your Math App, particularly if you're interested in students getting a reset button (set Actions:-Reset(); to be the click code for the button component).

To get the worksheet to your default state, add a line at the end of Startup Code calling the cleanup procedure, and re-run the worksheet. Be sure to remove or comment out the last line before saving the worksheet.

Copy this code
Actions := module()
        export Reset;    

Reset := proc()
    <cleanup for each component>
end proc;

end module;

Actions:-Reset();

Support of Maple features in MapleNet

Embedded components

Math Apps in Möbius are initialized using MapleNet.

The following table summarizes MapleNet support for different embedded components, as well as any limitations of those that are supported:

ComponentSupportedLimitations
ButtonYesfontcolor isn't supported
Check BoxYesfontcolor and fillcolor aren't supported
Combo BoxYesfontcolor isn't supported
Data TableNo 
DialYes 
LabelYesfontcolor and fillcolor aren't supported
List BoxYesfontcolor and fillcolor aren't supported
Math ExpressionYesfillcolor isn't supported
MeterYes 
MicrophoneNo 
PlotYesfillcolor and mouseMode aren't supported
Radio ButtonYesfillcolor and fontcolor aren't supported
Rotary GaugeYes 
ShortcutYes 
SliderYesfontcolor and fillcolor aren't supported
SpeakerNo 
Text AreaYesfontcolor isn't supported
Toggle ButtonYes 
VideoNo 
Volume GaugeYes 

Plot types and plot options

Maple plots in Möbius can be defined using Maple code and the plotmaple algorithm command, and are then generated using MapleNet.

The following table summarizes limitations on the support for different plot types and plot options:

NOTE: For these plots, either an image will be rendered, or the plot will be rendered without the unsupported feature.

Plot Option/TypeLimitations
Polar PlotRendered as an image
Logarithmic AxisRendered as an image
Dual AxisRendered as an image
2D Grid PlotUnsupported
2D Mesh PlotRendered as an image
Background Image for PlotRendered as an image
2D colorschemeUses one color from the scheme for the plot
Array PlotsUnsupported
smartplotUnsupported