# Import Maple TA questions and course modules into Maple browsing

• Hi, I have only a little bit of experience in Maple TA and Maple. I would like to know if I can import Maple TA questions and Maple TA course modules from Maple TA into Maple, and run them in Maple using Grading[Quiz] command or otherwise.

The Maple tutorials say yes, you can do it, but, due to my lack of experience, I find the instructions and examples given a little bit confusing. I have asked this question also on the Maple forum, but I haven't received yet a clear answer. Would be anyone so kind to clarify this through clear examples? What can you import from Maple TA into Maple and how this can be done and how the imported Maple TA questions or course modules can be used in Maple software? I would highly appreciate your support. Thank you.

• I don't have much experience with this feature so I will investigate further but here's what I know so far.

To import a Maple T.A. question bank into Maple you can use the following command. You will need to put the .zip file in the same folder as the maple worksheet where you run this code.

moduleFileName:="maple-ta-kinematics-and-dynamics.zip";
moduleFullPath:=cat(interface(worksheetdir), "/", moduleFileName);
questions:=MapleTA:-Import(moduleFullPath);


In the last line I am selecting a particular question to display to the student so they can enter a response.

For some questions the Grading:-Quiz will fail depending on the question type. So far I am getting failure messages on the following question types

• Multipart
• Blanks
• Numeric
• Formula

It does appear to work on

• Non Permuting Multiple Choice (but not in all cases)
• Multiple choice

If you want to test a question bank you can try the following code. It outputs the question type (or mode) and FAIL if the import fails for a given question

moduleFileName:="maple-ta-kinematics-and-dynamics.zip";
moduleFullPath:=cat(interface(worksheetdir), "/", moduleFileName);
questions:=MapleTA:-Import(moduleFullPath):
qNum:=1:
for item in questions do
res:=cat("qNum=", qNum, " mode=",item:-mode):
try
catch:
res:=cat(res,"   FAIL"):
end try:
print(res);
qNum:=qNum+1;
end do:


Here is a sample output for a module I tried to import.

"mode =Blanks   FAIL"
"mode =Non Permuting Multiple Choice"
"mode =Numeric   FAIL"
"mode =Multipart   FAIL"
"mode =Multipart   FAIL"
"mode =Multipart   FAIL"
"mode =Multipart   FAIL"
"mode =Formula   FAIL"
"mode =Non Permuting Multiple Choice   FAIL"
"mode =Numeric   FAIL"
"mode =Inline   FAIL"

I did find this resource for creating questions Quizzes in Maple using the MapleTA package - http://www.maplesoft.com/support/help/Maple/view.aspx?path=examples/QuizYou may have already seen this but it could be useful.

I am not sure about the use of MathML because that is normally used in a browser. As I said earlier, I will investigate further and get back to you.

• Thank you so much. I will go through all these and try to understand them. Here is the support I've got so far. Using

file := cat(kernelopts(mapledir), "/data/help/MapleTA/coursemodule.zip");
questions := [MapleTA:-Import(file)];

I've been able to run the first question, Changing 1 to 2, second question and so on up to 18. There are 18 questions in total part of the course module.

Now my question is what I replace file := cat(kernelopts(mapledir), "/data/help/MapleTA/coursemodule.zip"); with to be able to use my own Maple TA zip files save on my computer. And is there any way to run all the questions of the modules using the set of commands only once, or I do need to run it for each question at a time?

Again thank you so much for support.

• @mathstutor

I find it easier to put the maple worksheet and the .zip file in the same directory and then use the following to import.

moduleFileName:="YourZipFile.zip";
moduleFullPath:=cat(interface(worksheetdir), "/", moduleFileName);
questions:=MapleTA:-Import(moduleFullPath):


Then you can use as in the examples above.

Grading:-Quiz(questions[1]);


The cat joins together strings or text. So we use it to build up the path to the zip file on your machine.

In my example interface(worksheetdir) gives the current directory of the maple worksheet you are working in (I think this needs Maple 2015 for the interface(worksheetdir). So basically you get

"/users/jon" + "/" + "YourZipFile.zip"   (note slashes are opposite because I'm on mac)

The result of cat is then "/users/jon/YourZipFile.zip" which is stored in the moduleFullPath variable and then passed to MapleTA:-Import() function.

Not sure how to show all the questions at once but I'm working on it.

• Thank you so much for your support and taking your time to clarify all my questions. I think Grading-Quiz command works best with graded Maple questions. It doesn't work with modules, but only with individual questions. Maybe the idea of importing Maple TA into Maple isn't such a great thing, it's time consuming and it's working only for a limited types of questions. I feel I should focus more on creating Maple questions and use them with Grading-Quiz command. Thank you again for all your time and work you have put into helping me with all my requests. This is highly appreciated.

• No problem @mathstutor. From my investigations I came to the same conclusion.