Custom functions/modules/libraries in MapleTA

I need to be able to enter number line plots into MapleTA questions and answers; I have found no built-in functions to do so, and as such have created my own crude Maple function for drawing them piece by piece.  However, this function is a bit longer and uglier than I would like to see replicated in every single question that uses it, so I was hoping to have questions share this function between them, hopefully in the form of a module or library, eventually with a variety of such functions, which I can maintain in one central location.

Is it possible to share custom Maple functions between questions (better yet, between courses) in MapleTA?  Many thanks in advance.

Phil

I suspect not

We looked in to this on TA3.  One can use Maple libraries, but bizzarely only as part of Maple grading code - not in the algorithm, etc.    Posibly this has been improved in TA4, but i doubt it.  This restriction  makes them pretty useless, I think.

Toby

 

Too bad.

That is unfortunate indeed; thanks for the information.  Maybe grep & sed will help make maintaining the code a bit easier.

Thanks again...

Phil

Still trying...

Upon revisiting the designer interface (which I had previously abandoned in favor of command-line text editors for the sake of speed and usability), I was reminded that there was an "official" method for including libraries. I thought I might take the naive approach and see if I can't kludge something together; however, even the maple-recommended method doesn't seem to do much.

When I create even a maple-graded question and use the designer (as prescribed in the official documentation here: http://www.maplesoft.com/tacontent/view.aspx?SID=5389 ) to add a library from the course website for processing a plot (resulting in a libname='...' argument to plotmaple), I invariably receive the following error:

java.lang.IllegalArgumentException: The Maple library, https://#domain#/mapleta/web/#course#/Public_Html/maple.lib, cannot be located.

The original URL is in fact valid, and my browser can download the file directly without a problem. What gives? Am I doing something wrong? Is our site configured wrong? Or does the feature simply not work as advertised in the documentation?

Phil

Any official responses?

Looking through the documentation again, it does look to me like I'm doing things correctly.  My library can be used within Maple itself, and can be accessed from the web server as a file, but MapleTA persists with the "java.lang.IllegalArgumentException: The Maple library, (valid URL of a .lib file), cannot be located." error.

If the documentation did not assert that this is an intended use of MapleTA's algorithm designer I would just give up, but of course it does.  Is this feature supported or not?  Is there any way to at least narrow down the possible causes for the given error message?

Phil

A guess

The bit of the error message where it says ".lib file" makes me wonder. Maybe it used to work with .lib/.ind Maple library archive pairs, but no longer works with newer .mla libraries?

If you're really desperate, could you consider copying your Maple installation's original maple.mla library (as a backup), making it writable, and then adding your custom functionality to it?

 

No luck

Good point; I tried a .mla library, though, with similar results (a different error message), so I'm afraid that may not be a solution.

Altering the Maple installation is not desirable, either; the goal is to streamline future course materials development by making commonly used functions available for future course modules without, and unfortunately modifying the core Maple libraries would be likely to do as much harm as good (since the system administrator is then required to intervene directly to update libraries, and also because problems with these libraries could then affect other courses and would most certainly affect future system upgrades).

Thanks anyway; both worthwhile thoughts.

libname

Okay, you wouldn't want to touch your system maple.mla library. The administrative burden, and updates issue, are important.

I was wondering how exactly you have been using your new library. You mentioned that you could access it fine in Maple proper (not TA). Do you do this by reassigning libname in the Maple session? I mean, does the library reside in some folder which is not normally found under the default libname? Maybe it would work, if TA did not have to do that and could rely on the default libname.

If that is the case then maybe a solution could involve ensuring that the library archive is found by the default libname. You do not want any solution that involves adding libraries to anywhere under your Maple installation folder (which may even reside on a networked drive). But Maple should automatically add to libname any folder that looks like a "personal" installation of a Maple toolbox. For example, suppose that in Maple the command kernelopts(homedir) reported "C:\Documents and Settings\pagan". If I were to add a new chain of folders "C:\Documents and Settings\pagan\maple\toolbox\12\foo\lib" then that would also appear in libname in subsequent fresh Maple 12 sessions. I would not have to reassign libname with a command.

If you are using older .lib Maple library archives then make sure that both the .ind and .lib files get put in place together. For the newer .mla format, there is just the one file to place.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}