Maple T.A. Package

The new MapleTA package gives Maple users access to many of the built-in commands available for learning and assessment previously only available in Maple T.A., meaning that a broader range of questions can now be authored directly in Maple. Also, Maple-graded questions in Maple T.A. can now be imported into Maple, and in addition, questions authored in Maple can be exported to Maple T.A.

Built-in Commands For Question Generation and Assessment

Maple T.A. is an easy-to-use web-based system for creating tests and assignments, and automatically assessing student responses and performance. It supports complex, free-form entries of mathematical equations and intelligent evaluation of responses, making it ideal for science, technology, engineering, mathematics (STEM), or any other course that requires mathematics. 

The Maple T.A. software uses Maple's computation engine to assess student responses. Checking for equivalent results in the domain of mathematics is a hard problem that is best solved using a symbolic language like Maple. Even simple problems, such as a student answering y+x when the expected answer is x+y, can be very difficult in a system that does not understand the mathematics behind the student's answer. 

While Maple T.A. has access to all of Maple's mathematical operations, it also has a selection of built-in commands that can be used in algorithms that do not access Maple's engine. This can be used in a broader range of questions. The functionality of these built-in commands is now reproduced in the MapleTA[Builtin] subpackage. 

Sample Question

Consider a sample question that explores the concept of binomial coefficients from Maple T.A.  The question states: 

 

To initialize the random variables $A and $B, you might see the code like this in Maple T.A.'s algorithm section. 

$A=range(5,10);$B=range(1,4);$number=binomial($A, $B); 

The range command in Maple T.A. generates a random integer in the specified range. This command is now mirrored in Maple 18 when you load the MapleTA:-Builtin package. We will do this implicitly via the uses command in the following procedure: 

initialize := proc () local a, b, n; a := MapleTA:-Builtin:-range(5, 10); b := MapleTA:-Builtin:-range(1, 4); n := MapleTA:-Builtin:-binomial(a, b); Grading:-Quiz:-Set(`$A` = a, `$B` = b, `$number` = ...
initialize := proc () local a, b, n; a := MapleTA:-Builtin:-range(5, 10); b := MapleTA:-Builtin:-range(1, 4); n := MapleTA:-Builtin:-binomial(a, b); Grading:-Quiz:-Set(`$A` = a, `$B` = b, `$number` = ...
initialize := proc () local a, b, n; a := MapleTA:-Builtin:-range(5, 10); b := MapleTA:-Builtin:-range(1, 4); n := MapleTA:-Builtin:-binomial(a, b); Grading:-Quiz:-Set(`$A` = a, `$B` = b, `$number` = ...
initialize := proc () local a, b, n; a := MapleTA:-Builtin:-range(5, 10); b := MapleTA:-Builtin:-range(1, 4); n := MapleTA:-Builtin:-binomial(a, b); Grading:-Quiz:-Set(`$A` = a, `$B` = b, `$number` = ...
initialize := proc () local a, b, n; a := MapleTA:-Builtin:-range(5, 10); b := MapleTA:-Builtin:-range(1, 4); n := MapleTA:-Builtin:-binomial(a, b); Grading:-Quiz:-Set(`$A` = a, `$B` = b, `$number` = ...
initialize := proc () local a, b, n; a := MapleTA:-Builtin:-range(5, 10); b := MapleTA:-Builtin:-range(1, 4); n := MapleTA:-Builtin:-binomial(a, b); Grading:-Quiz:-Set(`$A` = a, `$B` = b, `$number` = ...
initialize := proc () local a, b, n; a := MapleTA:-Builtin:-range(5, 10); b := MapleTA:-Builtin:-range(1, 4); n := MapleTA:-Builtin:-binomial(a, b); Grading:-Quiz:-Set(`$A` = a, `$B` = b, `$number` = ...
initialize := proc () local a, b, n; a := MapleTA:-Builtin:-range(5, 10); b := MapleTA:-Builtin:-range(1, 4); n := MapleTA:-Builtin:-binomial(a, b); Grading:-Quiz:-Set(`$A` = a, `$B` = b, `$number` = ...
 

The last line of the initialize procedure above makes the connections between computed variables and those used for grading or display. This is not necessary if you just want to compute with the commands in the MapleTA[Builtin] package.  

For completeness, we will also show how this question could be created and graded using the Grading[Quiz] command: 

grade := proc () local n, r; n, r := Grading:-Quiz:-Get(`$number`, `$RESPONSE`); evalb(r = n) end proc; -1 

Now that we have the essential ingredients for the question, we can play it inside Maple as follows: 

Grading:-Quiz(question, grade, initialize); 1 

There are Embedded componentEmbedded component balls of different colors in a sack.
How many distinct combinations of Embedded componentEmbedded component balls can you remove from the sack?

Embedded component

Check AnswerTry AnotherEmbedded component

proc () local n, r; n, r := Grading:-Quiz:-Get(`$number`, `$RESPONSE`); evalb(r = n) end proc  

 

The sutdent can click the "Try Another" button a few times to see how the variables inside the question change. Inside Maple, a student can explore calculations. One may discover the expression palette has the choose notation. For removing two balls from a bag of eight, you could compute: 

binomial(8, 2) 

28
 

Or, you might discover Maple's binomial command: 

binomial(8, 2); 1 

28
 

Or, you may derive the answer from the binomial coefficient formula:  

`/`(`*`(factorial(8)), `*`(factorial(2), `*`(factorial(`+`(8, -2))))) 

28
 

Letting students explore solutions within Maple creates the opportunity for discovery; that is, learning in a way that will stick with the student, rather than being forgotten as soon as the exam is submitted.   

Finally, this question can also be exported for use directly inside Maple T.A. 

MapleTA:-Export(Grading:-Quiz(question, grade, initialize, output = mapleta),  

We re-ran the Quiz command with the option, output=mapleta to produce a form suitable for export (rather than display an interactive question).  This result is then given to MapleTA[Export] in order to generate the file named "coursemodule.zip".  This file can be imported into Maple T.A. as a course module and used in assignments.  

Similarly, course modules exported from Maple T.A. can be loaded into Maple, and the questions they contain can be played using the Quiz command in the Grading package.

Importing and Exporting Questions From Maple T.A

The "maple-graded" style of question in Maple T.A. can be imported into Maple and run via the Quiz command. 

The MapleTA:-Import command will read a course module zip file and import all of its questions into a Record-based data structure that closely mirrors the XML in the course-module manifest. A sample structure might look like the following (omitting optional fields): 

TAQuestion := Record("name" = "  Quadratic Factor Question  ", "mode" = "Maple", "text" = "    Factor the following algebraic expression x<sup>2</sup> + ${A}x + ${B}. Your answer should be in the form (x+a)(x+b).  ", "algorithm" = "  $a=rint(1,10);$b=rint(2,10);$A=int($a+$b);$B=int($a*$b);$factor=maple(\"factor(x^2+${A}*x+${B})\"); ", "mapleAnswer" = "    $factor;  ",         "maple" =  "    evalb(($ANSWER)-($RESPONSE)=0);  "  ): 

 

This imported structure is recognized by the Quiz command and it builds the appropriate question in Maple. 

Grading:-Quiz(TAQuestion); 1 

Factor the following algebraic expression x2 + Embedded componentEmbedded componentx + Embedded componentEmbedded component. Your answer should be in the form (x+a)(x+b).  

Embedded component

Check AnswerTry AnotherEmbedded component

A course module usually contains multiple questions. 

cmfile := cat(kernelopts(mapledir),  

cmquestions := [MapleTA:-Import(cmfile)]; -1 

numelems(cmquestions); 1 

18
 

Grading:-Quiz(cmquestions[1]); 1 

Convert Embedded componentEmbedded component feet to meters. Answers require 4 significant digits.Do not include units in your response.  

Embedded component

Check AnswerTry AnotherEmbedded component

Grading:-Quiz(cmquestions[3]); 1 

Solve the expression x3 - x = 0.

Embedded componentEmbedded component
Enter only the expression for x, omitting "x =".  

Embedded component

Check AnswerTry AnotherEmbedded component

Similarly, all Quiz-based questions can be exported back to Maple T.A. The Quiz command takes an 'output' = 'mapleta' option that will generate a Record structure as described above. This Record can then be passed to the MapleTA:-Export command to generate a course module suitable for importing into Maple T.A. 

As an example, let's define a question and see how it looks.  

qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
qinit := proc () local p; p := nextprime((rand(2 .. 7))()); Grading:-Quiz:-Set(`$P` = p); [`+`(`*`(p, `*`((rand(1 .. 2))())), 1), `+`(`*`(p, `*`((rand(3 .. 4))())), 1), `*`(p, `*`((rand(1 .. 2))())), ...
 

 

For which values of X does ( X mod Embedded componentEmbedded component) = 1

Embedded componentEmbedded component
Embedded componentEmbedded component
Embedded componentEmbedded component
Embedded componentEmbedded component
Embedded componentEmbedded component

Check AnswerTry AnotherEmbedded component

Now, let's use the same question parameters, but specify the 'output' option. We'll also give the question a name so it can be easily identified inside Maple T.A.

 










 

This can be exported as a course module: 

 

MapleTA:-Export(Q,