aimmath-commit Mailing List for AiM Assessment in Mathematics
Brought to you by:
gustav_delius,
npstrick
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(73) |
Aug
(96) |
Sep
(240) |
Oct
(34) |
Nov
(12) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(6) |
Mar
(17) |
Apr
(6) |
May
(5) |
Jun
|
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(19) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(14) |
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Neil S. <nps...@us...> - 2005-04-29 15:49:25
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19673/doc Modified Files: Tag: aim-xml install.html Log Message: Index: install.html =================================================================== RCS file: /cvsroot/aimmath/AIM/doc/install.html,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** install.html 14 Sep 2003 07:50:33 -0000 1.4 --- install.html 29 Apr 2005 15:49:16 -0000 1.4.4.1 *************** *** 1 **** ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <!-- @(#)$Id$ --> <HEAD> <TITLE>Installation Instructions for AiM</TITLE> <META http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> </HEAD> <BODY> <h1>Installing AiM</h1> There are separate instructions for <ul> <li><a href="installwin.html">Installing AiM under Windows</a><p/></li> <li><a href="installlin.html">Installing AiM under Linux</a><p/></li> <li><a href="installosx.html">Installing AiM under OS X</a><p/></li> </ul> </BODY> </HTML> \ No newline at end of file --- 1 ---- ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <!-- @(#)$Id$ --> <HEAD> <TITLE>Installation Instructions for AiM</TITLE> <META http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> </HEAD> <BODY> <h1>Installing AiM (OpenMaple/RQP version)</h1> This version of AiM runs only with Maple 9.5, because it uses the openmaple package to handle communication between Java and Maple. It has support for the Remote Question Protocol. There are separate instructions for <ul> <li><a href="installwin.html">Installing AiM under Windows</a><p/></li> </ul> The instructions for other operating systems have not yet been modified for this version of AiM. The old instructions are here: <ul> <li><a href="installlin.html">Installing AiM under Linux</a><p/></li> <li><a href="installosx.html">Installing AiM under OS X</a><p/></li> </ul> </BODY> </HTML> \ No newline at end of file |
From: Neil S. <nps...@us...> - 2005-04-29 15:09:54
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29897/maple/aim Modified Files: Tag: aim-xml MatrixQuestion.mpl Quiz.mpl SOAP.mpl Zone.mpl Log Message: Index: Zone.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Zone.mpl,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** Zone.mpl 31 Mar 2005 12:38:12 -0000 1.6.2.1 --- Zone.mpl 29 Apr 2005 15:09:45 -0000 1.6.2.2 *************** *** 218,221 **** --- 218,222 ---- local studenthead,studentfoot,studenthtml,studentloginfile, adminhead,adminfoot,adminhtml,adminloginfile,fd; + global Config; try *************** *** 243,247 **** [["form", "name" = "aimform", ! "action" = this['ServletURL'], "method" = "POST"], [["inputhidden", "name" = "Command", "value" = ""]], --- 244,248 ---- [["form", "name" = "aimform", ! "action" = Config['ServletURL'], "method" = "POST"], [["inputhidden", "name" = "Command", "value" = ""]], *************** *** 309,313 **** [["form", "name" = "aimform", ! "action" = this['ServletURL'], "method" = "POST"], [["inputhidden", "name" = "Command", "value" = "admin/Subject" ]], --- 310,314 ---- [["form", "name" = "aimform", ! "action" = Config['ServletURL'], "method" = "POST"], [["inputhidden", "name" = "Command", "value" = "admin/Subject" ]], Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Quiz.mpl,v retrieving revision 1.8.2.4 retrieving revision 1.8.2.5 diff -C2 -d -r1.8.2.4 -r1.8.2.5 *** Quiz.mpl 25 Apr 2005 22:36:46 -0000 1.8.2.4 --- Quiz.mpl 29 Apr 2005 15:09:45 -0000 1.8.2.5 *************** *** 1526,1530 **** `HTML/ToString`( `aim/HTMLPage`(__("AIM Quiz"), - ["javascript",`aim/MatrixQuestion/Script`], ["javascript",`aim/SubmitScript`], this['Header'], --- 1526,1529 ---- Index: MatrixQuestion.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/MatrixQuestion.mpl,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -C2 -d -r1.4.2.3 -r1.4.2.4 *** MatrixQuestion.mpl 22 Apr 2005 07:15:43 -0000 1.4.2.3 --- MatrixQuestion.mpl 29 Apr 2005 15:09:45 -0000 1.4.2.4 *************** *** 10,43 **** ###################################################################### - `Package/Assign`( - `aim/MatrixQuestion/Script`::string, - "This is a script to be included in the HTML page header for any quiz - containing matrix questions. It defines a function that is used to - condense a matrix of strings into a single string, by inserting the - character @|@ between horizontally adjacent cells, and the newline - character between rows. - ", - " function squashmatrix(n) { - var f,i,j,label,s,t,rows,cols; - f = document.aimform; - rows = f.elements[n + 'NumRows'].value; - cols = f.elements[n + 'NumCols'].value; - s = ''; - for (i = 1; i <= rows; i++) { - for (j = 1; j <= cols; j++) { - label = '' + n + 'Row' + i + 'Col' + j; - t = f.elements[label].value; - s += t; - if (j < cols) { s += '|'; } - } - if (i < rows) { s += '\\n'; } - } - f.elements[n].value = s; - }; - " - ): - - ###################################################################### - `Class/Declare`(`aim/MatrixQuestion`, ['Extends',`aim/Question`], --- 10,13 ---- *************** *** 394,399 **** for j to cols do onchange := ! sprintf("%s+'"'+document.getElementById('%s_Row%d_Col%d').value+'"'", ! onchange,i,j); if j < cols then onchange := cat(onchange,"+'|'"); --- 364,369 ---- for j to cols do onchange := ! sprintf("%s+document.getElementById('%s_Row%d_Col%d').value", ! onchange,cgilabel,i,j); if j < cols then onchange := cat(onchange,"+'|'"); *************** *** 421,425 **** onchange=\"%s\"/> ", ! cgilabel,i,j,boxsize,rawmat[i,j],onchange), "</td>\n"; od; --- 391,395 ---- onchange=\"%s\"/> ", ! cgilabel,i,j,cgilabel,i,j,boxsize,rawmat[i,j],onchange), "</td>\n"; od; *************** *** 430,435 **** "</table>\n</td><td valign=\"middle\">", this['PostPrompt'],"</td></tr></table>", ! sprintf("<input type='hidden' name='%s' value='%s'/>\n", ! cgilabel,rawans); RETURN(cat(html)); --- 400,405 ---- "</table>\n</td><td valign=\"middle\">", this['PostPrompt'],"</td></tr></table>", ! sprintf("<input type='hidden' name='%s' id ='%s' value='%s'/>\n", ! cgilabel,cgilabel,rawans); RETURN(cat(html)); Index: SOAP.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Attic/SOAP.mpl,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** SOAP.mpl 25 Apr 2005 23:08:02 -0000 1.1.2.5 --- SOAP.mpl 29 Apr 2005 15:09:45 -0000 1.1.2.6 *************** *** 103,114 **** ['Process', proc(inp,out) ! local item,errs; out["format"] := inp["format"]; - out["maxScore"] := round(100 * item['Value']); try item := `aim/SOAP/GetItem`(inp); catch "Compilation failure": errs := lastexception[3]; - out["sourceCached"] := false; out["sourceErrors"] := [["http://errors.aiminfo.net/CompilationFailed", --- 103,112 ---- ['Process', proc(inp,out) ! local item,errs,val; out["format"] := inp["format"]; try item := `aim/SOAP/GetItem`(inp); catch "Compilation failure": errs := lastexception[3]; out["sourceErrors"] := [["http://errors.aiminfo.net/CompilationFailed", *************** *** 117,120 **** --- 115,126 ---- return(); end try; + val := item['Value']; + if frac(val) <> 0 then + out["sourceErrors"] := + [["http://errors.aiminfo.net/NonIntegerValue", + __("Item value must be an integer"),""]]; + return(); + fi; + out["maxScore"] := round(val); return(); end *************** *** 200,204 **** vrsion['CGIPrefix'] := ! cat(inp["embedPrefix"],"RawAnswer"); responses := table(inp["responses"]); --- 206,210 ---- vrsion['CGIPrefix'] := ! cat(inp["namePrefix"],"RawAnswer"); responses := table(inp["responses"]); *************** *** 244,248 **** t); out["outcomeVars"] := eval(t); ! out["outputs"] := inst['ShowParts',context]; NULL; end --- 250,254 ---- t); out["outcomeVars"] := eval(t); ! out["output"] := inst['ShowParts',context]; NULL; end |
From: Neil S. <nps...@us...> - 2005-04-29 15:09:54
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/try In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29897/maple/aim/try Modified Files: Tag: aim-xml Question.mpl Quiz.mpl Log Message: Index: Question.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/try/Question.mpl,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** Question.mpl 31 Mar 2005 12:38:15 -0000 1.5.2.1 --- Question.mpl 29 Apr 2005 15:09:45 -0000 1.5.2.2 *************** *** 81,85 **** ['Script', "", ! cat("seedchanged = false; function randomize() { --- 81,85 ---- ['Script', "", ! "seedchanged = false; function randomize() { *************** *** 88,96 **** } ! ", ! `aim/MRQuestion/Script`, ! "\n\n", ! `aim/MatrixQuestion/Script`, ! "\n\n") ], --- 88,92 ---- } ! " ], Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/try/Quiz.mpl,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** Quiz.mpl 31 Mar 2005 12:38:15 -0000 1.5.2.1 --- Quiz.mpl 29 Apr 2005 15:09:45 -0000 1.5.2.2 *************** *** 68,86 **** ['Script', "", ! cat("seedchanged = false; ! function randomize() { ! f.QuizSeed.value = ! Math.round(Math.random() * 1000000000000) + ''; ! } ! ! function Validate() { ! Mark(); ! } ! ", ! `aim/MRQuestion/Script`, ! "\n\n", ! `aim/MatrixQuestion/Script`, ! "\n\n") ], --- 68,81 ---- ['Script', "", ! "seedchanged = false; ! function randomize() { ! f.QuizSeed.value = ! Math.round(Math.random() * 1000000000000) + ''; ! } ! function Validate() { ! Mark(); ! } ! " ], |
From: Neil S. <nps...@us...> - 2005-04-29 15:09:54
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29897/maple Modified Files: Tag: aim-xml ConfigFields.mpl Make.mpl Servlet.mpl Log Message: Index: Make.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Make.mpl,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -C2 -d -r1.4.2.3 -r1.4.2.4 *** Make.mpl 25 Apr 2005 22:36:46 -0000 1.4.2.3 --- Make.mpl 29 Apr 2005 15:09:44 -0000 1.4.2.4 *************** *** 136,139 **** --- 136,140 ---- if (MakingDist <> true) then pread("AliceServer.mpl"): + DefaultZone['MakeLoginPage']: fi: Index: ConfigFields.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/ConfigFields.mpl,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** ConfigFields.mpl 31 Mar 2005 12:37:53 -0000 1.4.2.1 --- ConfigFields.mpl 29 Apr 2005 15:09:44 -0000 1.4.2.2 *************** *** 111,121 **** ServletConfigFields := [ ! ['MapleProgram', string," ! The absolute path to the maple program. Under Windows, the path ! should use backslashes as separators, and should not contain any ! spaces; in particular, 'Program Files' is disallowed. The recommended ! location is /usr/bin/maple (under Linux) or c:\\Maple\\bin.wnt\\cmaple ! (under Windows)."], ['MapleInitOptions', --- 111,117 ---- ServletConfigFields := [ ! ['ServletURL', string," ! The base URL used to access the Alice servlet."], ['MapleInitOptions', *************** *** 138,154 **** c:\\TtH\\tth (under Windows)."], - ['KillProgram', - string," - The absolute path to the kill program (used to kill Maple processes on this OS). - Under Windows, the path should use backslashes as separators, and - should not contain any spaces; in particular, 'Program Files' is - disallowed."], - - ['KillProgramArg', - string," - The argument for the kill program to tell it to kill the process whose PID - Is the final arg. Typically this is -k for the Process.exe program in Windows, and - -9 for the kill command in UNIX."], - ['AliceHistorySize', posint," --- 134,137 ---- *************** *** 163,170 **** The time limit on administrative commands in milliseconds."], - ['MaxMapleProcesses', - posint," - The maximum number of Maple processes that can be running at one time."], - ['TempDir', string," --- 146,149 ---- Index: Servlet.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Servlet.mpl,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** Servlet.mpl 31 Mar 2005 12:37:53 -0000 1.6.2.1 --- Servlet.mpl 29 Apr 2005 15:09:44 -0000 1.6.2.2 *************** *** 100,103 **** --- 100,110 ---- initparam( + "ServletURL", + "The URL used to access the servlet", + 'complain', + 'ServletURL' + ): + + initparam( "AliceMapleDir", "The top directory for the AIM maple code.", *************** *** 120,130 **** initparam( - "MapleProgram", - "The command used to start Maple", - 'omit', - 'MapleProgram' - ): - - initparam( "MapleInitOptions", "Initialization options for Maple processes started by the servlet", --- 127,130 ---- *************** *** 134,151 **** initparam( - "MaxMapleProcesses", - "The maximum number of maple processes to be run by the server", - 8, - 'MaxMapleProcesses' - ): - - initparam( - "BusyMessage", - "The message to return if this count is exceeded.", - "The Alice server is busy. Please try again in a few minutes.", - 'BusyMessage' - ): - - initparam( "TtHProgram", "The command used to run the TeX-to-HTML converter tth.", --- 134,137 ---- |
From: Neil S. <nps...@us...> - 2005-04-29 15:09:52
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29897/java Modified Files: Tag: aim-xml Alice.java Log Message: Index: Alice.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Alice.java,v retrieving revision 1.8.4.5 retrieving revision 1.8.4.6 diff -C2 -d -r1.8.4.5 -r1.8.4.6 *** Alice.java 25 Apr 2005 22:36:34 -0000 1.8.4.5 --- Alice.java 29 Apr 2005 15:09:43 -0000 1.8.4.6 *************** *** 65,69 **** // This controls how much logging information is generated by TtH ! private String ServletURI; // The message to print if the server is too busy. --- 65,69 ---- // This controls how much logging information is generated by TtH ! private String ServletURL; // The message to print if the server is too busy. *************** *** 87,91 **** TempDir = getInitParameter("TempDir"); ZoneFile = getInitParameter("ZoneFile"); ! ServletURI = getInitParameter("ServletURI"); // It doesn't necessarily matter if these ones are null --- 87,91 ---- TempDir = getInitParameter("TempDir"); ZoneFile = getInitParameter("ZoneFile"); ! ServletURL = getInitParameter("ServletURL"); // It doesn't necessarily matter if these ones are null *************** *** 289,294 **** } ! if (ServletURI == null) { ! missing.addElement("ServletURI"); } --- 289,294 ---- } ! if (ServletURL == null) { ! missing.addElement("ServletURL"); } *************** *** 548,552 **** PrintWriter logWriter; - Maple maple; MapleArgList commandargs; --- 548,551 ---- *************** *** 558,562 **** if (alicereq.isWSDL) { writeLog("Sending WSDL file\r\n\r\n"); ! sendWSDL(response,ServletURI); return; } --- 557,561 ---- if (alicereq.isWSDL) { writeLog("Sending WSDL file\r\n\r\n"); ! sendWSDL(response,ServletURL); return; } *************** *** 589,593 **** restartEngine(); writeLog("Error executing SOAP command:\r\n" + e.getMessage() + "\r\n\r\n"); ! writeSOAPFault(out,"Server","Server error",ServletURI,e); return; } finally { --- 588,592 ---- restartEngine(); writeLog("Error executing SOAP command:\r\n" + e.getMessage() + "\r\n\r\n"); ! writeSOAPFault(out,"Server","Server error",ServletURL,e); return; } finally { |
From: Neil S. <nps...@us...> - 2005-04-29 15:08:28
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29251/classes Modified Files: Tag: aim-xml Alice.class AliceLog.class AliceLogEntry.class AliceRequest.class MapleArgList.class Log Message: Index: MapleArgList.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Attic/MapleArgList.class,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 Binary files /tmp/cvsO0MIN9 and /tmp/cvsmgVJA2 differ Index: AliceLog.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLog.class,v retrieving revision 1.6.4.6 retrieving revision 1.6.4.7 diff -C2 -d -r1.6.4.6 -r1.6.4.7 Binary files /tmp/cvsc2qMg6 and /tmp/cvsm7PS7Y differ Index: AliceLogEntry.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLogEntry.class,v retrieving revision 1.5.4.6 retrieving revision 1.5.4.7 diff -C2 -d -r1.5.4.6 -r1.5.4.7 Binary files /tmp/cvspRsINd and /tmp/cvsJyDbI6 differ Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.6.4.7 retrieving revision 1.6.4.8 diff -C2 -d -r1.6.4.7 -r1.6.4.8 Binary files /tmp/cvsexOgXy and /tmp/cvsOS325r differ Index: AliceRequest.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceRequest.class,v retrieving revision 1.7.4.6 retrieving revision 1.7.4.7 diff -C2 -d -r1.7.4.6 -r1.7.4.7 Binary files /tmp/cvswpek9I and /tmp/cvsvmymoC differ |
From: Neil S. <nps...@us...> - 2005-04-29 15:06:50
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28626/classes Removed Files: Tag: aim-xml Maple.class MaplePool.class Log Message: --- MaplePool.class DELETED --- --- Maple.class DELETED --- |
From: Neil S. <nps...@us...> - 2005-04-29 15:05:04
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27846/classes Added Files: Tag: aim-xml MapleArgList.class Log Message: --- NEW FILE: MapleArgList.class --- (This appears to be a binary file; contents omitted.) |
From: Neil S. <nps...@us...> - 2005-04-29 15:02:48
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26889/classes Modified Files: Tag: aim-xml Alice.class Log Message: Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.6.4.6 retrieving revision 1.6.4.7 diff -C2 -d -r1.6.4.6 -r1.6.4.7 Binary files /tmp/cvstRkji8 and /tmp/cvsOixd6Q differ |
From: Neil S. <nps...@us...> - 2005-04-28 22:19:00
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22898/WEB-INF/maple Modified Files: ImageCache.mpl Log Message: Index: ImageCache.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/ImageCache.mpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ImageCache.mpl 28 Apr 2005 21:46:52 -0000 1.6 --- ImageCache.mpl 28 Apr 2005 22:18:51 -0000 1.7 *************** *** 271,277 **** ['Method','Clean'::'void', ! "Delete all unlocked image files in the cache more than 10 minutes old. If the second argument @age_@ is supplied, then the cutoff is ! @age_@ seconds rather than 10 minutes. ", proc(this, --- 271,277 ---- ['Method','Clean'::'void', ! "Delete all unlocked image files in the cache more than 100 minutes old. If the second argument @age_@ is supplied, then the cutoff is ! @age_@ seconds rather than 100 minutes. ", proc(this, |
From: Neil S. <nps...@us...> - 2005-04-28 21:47:36
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7525/WEB-INF/classes Modified Files: Alice.class AliceLog.class AliceLogEntry.class AliceRequest.class Maple.class MaplePool.class Log Message: Index: MaplePool.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/MaplePool.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsu0ykO2 and /tmp/cvskDQNZT differ Index: AliceLog.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLog.class,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvs8PkaN9 and /tmp/cvs7io720 differ Index: Maple.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Maple.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvs7sqeQ3 and /tmp/cvsGrXw8U differ Index: AliceLogEntry.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLogEntry.class,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsLjOHka and /tmp/cvsHimKF1 differ Index: AliceRequest.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceRequest.class,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 Binary files /tmp/cvs8bNtse and /tmp/cvsu9WeQ5 differ Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsP1vIHf and /tmp/cvsvrvY76 differ |
From: Neil S. <nps...@us...> - 2005-04-28 21:47:36
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes/tth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7525/WEB-INF/classes/tth Modified Files: TtH.class TtHReader.class Log Message: Index: TtHReader.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/tth/TtHReader.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvswPZM72 and /tmp/cvs7nhqjU differ Index: TtH.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/tth/TtH.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvspobRPb and /tmp/cvs4tFC52 differ |
From: Neil S. <nps...@us...> - 2005-04-28 21:47:01
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7247/WEB-INF/maple Modified Files: ImageCache.mpl Log Message: Image expiry time increased from 600 to 6000 seconds Index: ImageCache.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/ImageCache.mpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ImageCache.mpl 10 Mar 2004 01:34:58 -0000 1.5 --- ImageCache.mpl 28 Apr 2005 21:46:52 -0000 1.6 *************** *** 280,284 **** local age,now,oldlock,oldtime,newlock,newtime,k,keys; ! if nargs = 1 then age := 600 else age := age_; fi; oldtime := eval(this['CreationTime']); --- 280,284 ---- local age,now,oldlock,oldtime,newlock,newtime,k,keys; ! if nargs = 1 then age := 6000 else age := age_; fi; oldtime := eval(this['CreationTime']); |
From: Neil S. <nps...@us...> - 2005-04-28 21:44:30
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6090/WEB-INF/java Modified Files: Alice.java Log Message: Set the ProcessID variable in each Maple process. Also, most \n's replaced using println() etc, to make line endings work better on different platforms. Index: Alice.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Alice.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Alice.java 5 Sep 2003 09:57:07 -0000 1.8 --- Alice.java 28 Apr 2005 21:44:21 -0000 1.9 *************** *** 219,223 **** if (configError == null) { ! writeLog("Alice servlet initialized\n" + ParamReport() + "\n"); // Start the Maple process pool --- 219,223 ---- if (configError == null) { ! writeLog("Alice servlet initialized", ParamReport()); // Start the Maple process pool *************** *** 229,238 **** maplePool.logFile = LogFile; ! writeLog("Maple process pool started\n"); } } else { ! writeLog("Alice servlet not initialized because of " + ! "configuration problems: \n\n " + ! configError + "\n\n"); } } --- 229,240 ---- maplePool.logFile = LogFile; ! writeLog("Maple process pool started"); } } else { ! try { ! writeLog("Alice servlet not initialized because of configuration problems: ", ! "", ! configError); ! } catch(Exception e) {;} } } *************** *** 452,455 **** --- 454,458 ---- "See the AIM installation documentation for more details. \n" + "</p>\n"; + } } *************** *** 483,487 **** } } else { ! s = "The parent directory does not exist."; } } --- 486,499 ---- } } else { ! try { ! d.mkdir(); ! if (d.canWrite()) { ! // OK ! } else { ! s = "The containing directory has been created, but it is not writeable"; ! } ! } catch (Exception e) { ! s = "The containing directory does not exist, and could not be created"; ! } } } *************** *** 490,495 **** } if (s.length() > 0) { ! p.println(n + " was set to '" + LogFile + "'"); ! p.print("<br />\n" + s + "\n<br />\n"); } } --- 502,509 ---- } if (s.length() > 0) { ! p.println(n + " was set to '" + l + "'"); ! p.println("<br />"); ! p.println(s); ! p.println("<br />"); } } *************** *** 556,568 **** msg = new PrintWriter(msg_); ! msg.write("Fatal error getting new Maple process:\n" + ! "Exception message:\n" + e.getMessage() + "\n\n" + ! "Stack trace:\n"); ! e.printStackTrace(msg); ! ! msg.write("\n\n"); ! throw(new UnavailableException(msg_.toString())); } --- 570,581 ---- msg = new PrintWriter(msg_); ! msg.println("Fatal error getting new Maple process:"); ! msg.println("Exception message:"); ! msg.println(e.getMessage()); ! msg.println("Stack trace:"); e.printStackTrace(msg); ! msg.println(); ! throw(new ServletException(msg_.toString())); } *************** *** 577,582 **** initMaple(maple); ! writeLog("Command sent to maple process " + ! maple.id + ":\n" + "`aim/Main`(" + commandargs + "):\n\n"); if (LastRequestFile != null) { --- 590,595 ---- initMaple(maple); ! writeLog("Command sent to maple process " + maple.id + ":", ! "`aim/Main`(" + commandargs + "):",""); if (LastRequestFile != null) { *************** *** 588,592 **** logWriter.close(); } catch( Exception e ) { ! throw new ServletException("Could not write last request file\n",e); } } --- 601,605 ---- logWriter.close(); } catch( Exception e ) { ! throw new ServletException("Could not write last request file",e); } } *************** *** 616,620 **** } ! maple.exec("`aim/Main`(" + commandargs + "):\n", webOutput, alicereq.mathdisplay, tthOpt); } catch(Exception e) { logentry.close("ERROR"); --- 629,633 ---- } ! maple.exec("`aim/Main`(" + commandargs + "):", webOutput, alicereq.mathdisplay, tthOpt); } catch(Exception e) { logentry.close("ERROR"); *************** *** 625,633 **** msg = new PrintWriter(msg_); ! msg.write("Error while executing Maple command:\n" + ! "`aim/Main`(" + commandargs + "):\n-----------------\n" + ! "Exception message:\n" + e.getMessage() + "\n\n" + ! "Stack trace:\n"); ! e.printStackTrace(msg); --- 638,648 ---- msg = new PrintWriter(msg_); ! msg.println("Error while executing Maple command:"); ! msg.println("`aim/Main`(" + commandargs + "):"); ! msg.println("-----------------"); ! msg.println("Exception message:"); ! msg.println(e.getMessage()); ! msg.println(); ! msg.println("Stack trace:"); e.printStackTrace(msg); *************** *** 683,693 **** Enumeration names; String name; ! StringWriter rlog; String[] values; String value; if (LogFile != null) { ! rlog = new StringWriter(); ! rlog.write("Request parameters:\n"); names = alicereq.getParameterNames(); while(names.hasMoreElements()) { --- 698,711 ---- Enumeration names; String name; ! StringWriter rlog_; ! BufferedWriter rlog; String[] values; String value; if (LogFile != null) { ! rlog_ = new StringWriter(); ! rlog = new BufferedWriter(rlog_); ! rlog.write("Request parameters:"); ! rlog.newLine(); names = alicereq.getParameterNames(); while(names.hasMoreElements()) { *************** *** 695,707 **** values = alicereq.getParameterValues(name); ! rlog.write(name + ": " + values.length + " value(s)\n"); for (int i = 0; i < values.length; i++) { value = values[i]; ! rlog.write("> " + Maple.quote(value) + " (" + value.length() + ")\n"); } } ! rlog.write("\n\n"); ! writeLog(rlog.toString()); } } --- 713,728 ---- values = alicereq.getParameterValues(name); ! rlog.write(name + ": " + values.length + " value(s)"); ! rlog.newLine(); for (int i = 0; i < values.length; i++) { value = values[i]; ! rlog.write("> " + Maple.quote(value) + " (" + value.length() + ")"); ! rlog.newLine(); } } ! rlog.newLine(); ! rlog.newLine(); ! writeLog(rlog_.toString()); } } *************** *** 781,787 **** String s; if (p == null) { ! return("<tr>\n<td>" + n + "</td>\n<td>(missing)</td>\n</tr>\n"); } else { ! return("<tr>\n<td>" + n + "</td>\n<td>" + p + "</td>\n</tr>\n"); } } --- 802,808 ---- String s; if (p == null) { ! return("<tr><td>" + n + "</td><td>(missing)</td></tr>"); } else { ! return("<tr><td>" + n + "</td><td>" + p + "</td></tr>"); } } *************** *** 797,801 **** logWriter.close(); } catch (Exception e) { ! throw new ServletException("Could not write log file\n",e); } } --- 818,855 ---- logWriter.close(); } catch (Exception e) { ! throw new ServletException("Could not write log file",e); ! } ! } ! } ! ! private void writeLog(String s1,String s2) ! throws ServletException { ! if (LogFile != null) { ! try { ! PrintWriter logWriter = new PrintWriter(new FileWriter(LogFile,true)); ! DateFormat df = DateFormat.getDateTimeInstance(); ! logWriter.println(df.format(new Date())); ! logWriter.println(s1); ! logWriter.println(s2); ! logWriter.close(); ! } catch (Exception e) { ! throw new ServletException("Could not write log file",e); ! } ! } ! } ! ! private void writeLog(String s1,String s2,String s3) ! throws ServletException { ! if (LogFile != null) { ! try { ! PrintWriter logWriter = new PrintWriter(new FileWriter(LogFile,true)); ! DateFormat df = DateFormat.getDateTimeInstance(); ! logWriter.println(df.format(new Date())); ! logWriter.println(s1); ! logWriter.println(s2); ! logWriter.println(s3); ! logWriter.close(); ! } catch (Exception e) { ! throw new ServletException("Could not write log file",e); } } *************** *** 803,847 **** private String ParamReport() { ! StringBuffer s = new StringBuffer(); ! s.append("Alice initialization parameters:\n"); ! s.append("AliceMapleDir=" + AliceMapleDir + "\n"); if (MapleProgram == null) { ! s.append("MapleProgram=null\n"); } else { ! s.append("MapleProgram=" + MapleProgram + "\n"); } if (MapleInitOptions == null) { ! s.append("MapleInitOptions=null\n"); } else { ! s.append("MapleInitOptions=" + MapleInitOptions + "\n"); } if (LogFile == null) { ! s.append("LogFile=null\n"); } else { ! s.append("LogFile=" + LogFile + "\n"); } if (LastRequestFile == null) { ! s.append("LastRequestFile=null\n"); } else { ! s.append("LastRequestFile=" + LastRequestFile + "\n"); } if (TtHProgram == null) { ! s.append("TtHProgram=null\n"); } else { ! s.append("TtHProgram=" + TtHProgram + "\n"); } if (TtHLogFile == null) { ! s.append("TtHLogFile=null\n"); } else { ! s.append("TtHLogFile=" + TtHLogFile + "\n"); } ! return( s.toString() ); } --- 857,902 ---- private String ParamReport() { ! StringWriter s_ = new StringWriter(); ! PrintWriter s = new PrintWriter(s_); ! s.println("Alice initialization parameters:"); ! s.println("AliceMapleDir=" + AliceMapleDir); if (MapleProgram == null) { ! s.println("MapleProgram=null"); } else { ! s.println("MapleProgram=" + MapleProgram); } if (MapleInitOptions == null) { ! s.println("MapleInitOptions=null"); } else { ! s.println("MapleInitOptions=" + MapleInitOptions); } if (LogFile == null) { ! s.println("LogFile=null"); } else { ! s.println("LogFile=" + LogFile); } if (LastRequestFile == null) { ! s.println("LastRequestFile=null"); } else { ! s.println("LastRequestFile=" + LastRequestFile); } if (TtHProgram == null) { ! s.println("TtHProgram=null"); } else { ! s.println("TtHProgram=" + TtHProgram); } if (TtHLogFile == null) { ! s.println("TtHLogFile=null"); } else { ! s.println("TtHLogFile=" + TtHLogFile); } ! return( s_.toString() ); } *************** *** 857,869 **** try { trapOutput_ = new StringWriter(); ! trapOutput = new PrintWriter(trapOutput_); ! initcommand = "currentdir(\"" + AliceMapleDir + "\"):\n"; maple.exec(initcommand,trapOutput); } catch (Exception ex) { - //TODO: check that these \n's are OK in Windows msg_ = new StringWriter(); ! msg = new PrintWriter(msg_); ! msg.write("Exception while starting new Maple process:\n" + ! ex.getMessage() + "\n"); ex.printStackTrace(msg); --- 912,923 ---- try { trapOutput_ = new StringWriter(); ! trapOutput = new PrintWriter(trapOutput_,true); ! initcommand = "currentdir(\"" + AliceMapleDir + "\"):"; maple.exec(initcommand,trapOutput); } catch (Exception ex) { msg_ = new StringWriter(); ! msg = new PrintWriter(msg_,true); ! msg.println("Exception while starting new Maple process:"); ! msg.println(ex.getMessage()); ex.printStackTrace(msg); *************** *** 876,880 **** if (trapOutput_.toString().trim().length() > 0) { String err = "Unexpected output while starting new " + ! "Maple process:\n" + trapOutput_.toString() + "\n"; maplePool.discardMaple(maple); throw(new ServletException(err)); --- 930,934 ---- if (trapOutput_.toString().trim().length() > 0) { String err = "Unexpected output while starting new " + ! "Maple process:" + trapOutput_.toString(); maplePool.discardMaple(maple); throw(new ServletException(err)); *************** *** 893,896 **** --- 947,951 ---- try { + maple.exec("ProcessID:=" + maple.id + ":"); maple.exec("read \"AliceServer.mpl\":", trapOutput); } catch(Exception ex) { *************** *** 898,904 **** msg_ = new StringWriter(); ! msg = new PrintWriter(msg_); ! msg.write("Error while reading AliceServer.mpl:\n" + ! ex.getMessage() + "\n"); ex.printStackTrace(msg); throw(new ServletException(msg_.toString())); --- 953,959 ---- msg_ = new StringWriter(); ! msg = new PrintWriter(msg_,true); ! msg.println("Error while reading AliceServer.mpl:"); ! msg.println(ex.getMessage()); ex.printStackTrace(msg); throw(new ServletException(msg_.toString())); *************** *** 909,913 **** String err = "Unexpected output while initializing new " + ! "Aim process:\n" + trapOutput_.toString() + "\n"; throw(new ServletException(err)); } --- 964,968 ---- String err = "Unexpected output while initializing new " + ! "Aim process:" + trapOutput_.toString(); throw(new ServletException(err)); } *************** *** 921,925 **** // close all Maple processes try { ! writeLog("Closing down servlet\n"); maplePool.drain(); } catch (Exception ex) {} --- 976,980 ---- // close all Maple processes try { ! writeLog("Closing down servlet"); maplePool.drain(); } catch (Exception ex) {} *************** *** 1223,1236 **** } ! return("<tr>\n" + ! "<td>" + id + "</td>\n" + ! "<td>" + st + "</td>\n" + ! "<td>" + tt + "</td>\n" + ! "<td>" + studentID + "</td>\n" + ! "<td>" + command + "</td>\n" + ! "<td>" + subject + "</td>\n" + ! "<td>" + quiz + "</td>\n" + ! "<td>" + status + "</td>\n" + ! "</tr>\n"); } } --- 1278,1295 ---- } ! StringWriter s_ = new StringWriter(); ! PrintWriter s = new PrintWriter(s_); ! s.println("<tr>"); ! s.println("<td>" + id + "</td>"); ! s.println("<td>" + st + "</td>"); ! s.println("<td>" + tt + "</td>"); ! s.println("<td>" + studentID + "</td>"); ! s.println("<td>" + command + "</td>"); ! s.println("<td>" + subject + "</td>"); ! s.println("<td>" + quiz + "</td>"); ! s.println("<td>" + status + "</td>"); ! s.println("</tr>"); ! ! return(s_.toString()); } } *************** *** 1270,1275 **** s = ! "<table border width='100%'>\n" + ! "<tr>\n" + "<th>Process</th>" + "<th>Start time</th>" + --- 1329,1334 ---- s = ! "<table border width='100%'>" + ! "<tr>" + "<th>Process</th>" + "<th>Start time</th>" + *************** *** 1282,1286 **** "</tr>" + s + ! "</table>\n"; return(s); --- 1341,1345 ---- "</tr>" + s + ! "</table>"; return(s); |
From: Neil S. <nps...@us...> - 2005-04-26 01:55:18
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22787/WEB-INF/maple Added Files: Tag: aim-xml Console.mws Log Message: --- NEW FILE: Console.mws --- {VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "currentdir(\"C:/Tomc at/webapps/AIM/WEB-INF/maple\"):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "read(\"Console.mpl\"):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "2 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 } |
From: Neil S. <nps...@us...> - 2005-04-26 01:45:37
|
Update of /cvsroot/aimmath/AIM In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16381 Added Files: Tag: aim-xml tp.css tp.js Log Message: --- NEW FILE: tp.css --- /* * date: 2002-10-13 * info: http://inspire.server101.com/js/tp/ */ /* links */ ul.tabs { list-style: none; margin: 0; padding: 0; border: none; font-size: 80%; } ul.tabs li { position: relative; float: left; width: 6em; margin: 0; padding: 0 4px 0 0; } ul.tabs a { display: block; width: 5em; padding: .5em; border: 1px solid #00F; border-bottom: none; border-top-width: 2px; text-decoration: none; } ul.tabs a, ul.tabs a:link, ul.tabs a:visited { background: #EEF; color: #00F; } ul.tabs a.active, ul.tabs a:link.active, ul.tabs a:visited.active { background: #FFF; color: #00F; font-weight: bold; } ul.tabs a.active { position: relative; top: 1px; } /* panels */ div.tabs { padding: .5em; } div.tabs div.tabs { padding: 0; } div.tabs div.tabs div { clear: left; padding: .5em; border: 1px solid #00F; } --- NEW FILE: tp.js --- /* * date: 2002-10-11 * info: http://inspire.server101.com/js/tp/ */ var tp = []; var tpl = []; function tpSet(i, c) { if (document.createElement) { var e = document.getElementById(i); var l = document.createElement('ul'); var p = document.createElement('div'); e.className = l.className = p.className = c; var a, j, t; for (j = 2; j < arguments.length; j++) { c = document.getElementById(t = arguments[j]); tp[t] = c.parentNode.removeChild(c); a = l.appendChild(document.createElement('li')); a.className = c.className; tpl[t] = a = a.appendChild(document.createElement('a')); a.setAttribute('href', 'javascript:tpShow(\''+i+'\', \''+t+'\');'); a.appendChild(document.createTextNode(c.getAttribute('title'))); } p.appendChild(tp[arguments[2]]); tpl[arguments[2]].className = 'active'; while (e.firstChild) e.removeChild(e.firstChild); e.appendChild(l); e.appendChild(p); }} function tpShow(e, p) { e = document.getElementById(e).lastChild; tpl[e.replaceChild(tp[p], e.firstChild).getAttribute('id')].className = null; tpl[p].className = 'active'; } |
From: Neil S. <nps...@us...> - 2005-04-25 23:08:27
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24069/classes Modified Files: Tag: aim-xml Alice.class AliceLog.class AliceLogEntry.class AliceRequest.class Log Message: Index: AliceLog.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLog.class,v retrieving revision 1.6.4.5 retrieving revision 1.6.4.6 diff -C2 -d -r1.6.4.5 -r1.6.4.6 Binary files /tmp/cvsyOR1Tb and /tmp/cvsPwOaS1 differ Index: AliceLogEntry.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLogEntry.class,v retrieving revision 1.5.4.5 retrieving revision 1.5.4.6 diff -C2 -d -r1.5.4.5 -r1.5.4.6 Binary files /tmp/cvsfJtDAg and /tmp/cvs4ZbOB6 differ Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.6.4.5 retrieving revision 1.6.4.6 diff -C2 -d -r1.6.4.5 -r1.6.4.6 Binary files /tmp/cvs84uBJn and /tmp/cvscKaTPd differ Index: AliceRequest.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceRequest.class,v retrieving revision 1.7.4.5 retrieving revision 1.7.4.6 diff -C2 -d -r1.7.4.5 -r1.7.4.6 Binary files /tmp/cvsTWvccx and /tmp/cvsqXgkon differ |
From: Neil S. <nps...@us...> - 2005-04-25 23:08:11
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24069/maple/aim Modified Files: Tag: aim-xml SOAP.mpl Log Message: Index: SOAP.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Attic/SOAP.mpl,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** SOAP.mpl 25 Apr 2005 22:36:46 -0000 1.1.2.4 --- SOAP.mpl 25 Apr 2005 23:08:02 -0000 1.1.2.5 *************** *** 136,140 **** ['Process', proc(inp,out) ! out["templateVars"] = ["seed" = [sprintf("%d",rand())]]; end ] --- 136,140 ---- ['Process', proc(inp,out) ! out["templateVars"] := ["seed" = [sprintf("%d",rand())]]; end ] |
From: Neil S. <nps...@us...> - 2005-04-25 23:08:11
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24069/maple Modified Files: Tag: aim-xml rqp.wsdl Log Message: Index: rqp.wsdl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/rqp.wsdl,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** rqp.wsdl 25 Apr 2005 22:36:46 -0000 1.1.2.4 --- rqp.wsdl 25 Apr 2005 23:08:02 -0000 1.1.2.5 *************** *** 120,126 **** <!-- ServerInformation operation --> ! <message name="ServerInformation"> ! <part name="foo" type="xs:string"/> ! </message> <message name="ServerInformationResponse"> <part name="identifier" type="xs:anyURI" /> --- 120,124 ---- <!-- ServerInformation operation --> ! <message name="ServerInformation"/> <message name="ServerInformationResponse"> <part name="identifier" type="xs:anyURI" /> |
From: Neil S. <nps...@us...> - 2005-04-25 22:37:32
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6326/java Modified Files: Tag: aim-xml Alice.java Added Files: Tag: aim-xml PipedAlice.java Log Message: --- NEW FILE: PipedAlice.java --- /* * @(#)$Id: PipedAlice.java,v 1.1.2.1 2005/04/25 22:36:35 npstrick Exp $ * * Copyright (C) 2003 Neil Strickland * Distributed without warranty under the GPL - see README for details * * This is the main servlet for the AIM system. * * * The home page for any AIM installation contains a form like this * * <form method="post" action="servlets/Alice">...</form> * * The web pages created dynamically by the system also contain similar * forms. Whenever such a form is submitted, the 'doPost' method of this * servlet is invoked to process the form. The data entered in the form * by the user are passed to the servlet in the 'request' argument of the * 'doPost' method. For example, if the form contains an element like * [...1501 lines suppressed...] "<th align='left'>Process</th>" + "<th align='left'>Start time</th>" + "<th align='left'>Time taken</th>" + "<th align='left'>Student ID</th>" + "<th align='left'>Command</th>" + "<th align='left'>Subject</th>" + "<th align='left'>Quiz</th>" + "<th align='left'>Status</th>" + "</tr>" + s + "</table>\r\n"; return(s); } } // Local Variables: // c-basic-offset: 2 // compile-command: "compile.bat" // End: Index: Alice.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Alice.java,v retrieving revision 1.8.4.4 retrieving revision 1.8.4.5 diff -C2 -d -r1.8.4.4 -r1.8.4.5 *** Alice.java 21 Apr 2005 10:09:09 -0000 1.8.4.4 --- Alice.java 25 Apr 2005 22:36:34 -0000 1.8.4.5 *************** *** 1,94 **** - /* - * @(#)$Id$ - * - * Copyright (C) 2003 Neil Strickland - * Distributed without warranty under the GPL - see README for details - * - * This is the main servlet for the AIM system. - * - * - * The home page for any AIM installation contains a form like this [...1026 lines suppressed...] + return argsarray; + } + + public String toString() { + StringBuffer s; + Enumeration argsenum; + s = new StringBuffer(); + argsenum = args.elements(); + while (argsenum.hasMoreElements()) { + s.append(Alice.quote((String) argsenum.nextElement())); + if (argsenum.hasMoreElements()) { + s.append(","); + } + } + return(s.toString()); + } + } + // Local Variables: // c-basic-offset: 2 |
From: Neil S. <nps...@us...> - 2005-04-25 22:36:56
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6326/maple/aim Modified Files: Tag: aim-xml Quiz.mpl SOAP.mpl Log Message: Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Quiz.mpl,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -C2 -d -r1.8.2.3 -r1.8.2.4 *** Quiz.mpl 22 Apr 2005 07:15:43 -0000 1.8.2.3 --- Quiz.mpl 25 Apr 2005 22:36:46 -0000 1.8.2.4 *************** *** 1621,1625 **** [["inputhidden", "name" = "Command", ! "value" = "Mark"]], seedfield, ["h1", --- 1621,1625 ---- [["inputhidden", "name" = "Command", ! "value" = "MarkQuiz"]], seedfield, ["h1", Index: SOAP.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Attic/SOAP.mpl,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** SOAP.mpl 22 Apr 2005 07:15:44 -0000 1.1.2.3 --- SOAP.mpl 25 Apr 2005 22:36:46 -0000 1.1.2.4 *************** *** 85,89 **** ['Input',"source"::`XML/string`], ! ['Input',"format"::`XML/anyURI`], ['Input',"index"::`XML/unsignedInt` = 0], --- 85,90 ---- ['Input',"source"::`XML/string`], ! ['Input',"format"::`XML/anyURI` = ! "http://www.aiminfo.net/itemFormats/aimsource"], ['Input',"index"::`XML/unsignedInt` = 0], *************** *** 103,106 **** --- 104,109 ---- proc(inp,out) local item,errs; + out["format"] := inp["format"]; + out["maxScore"] := round(100 * item['Value']); try item := `aim/SOAP/GetItem`(inp); *************** *** 114,119 **** return(); end try; - out["format"] := inp["format"]; - out["maxScore"] := round(100 * item['Value']); return(); end --- 117,120 ---- |
From: Neil S. <nps...@us...> - 2005-04-25 22:36:54
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6326/maple Modified Files: Tag: aim-xml Aim.mpl Make.mpl rqp.wsdl Log Message: Index: Aim.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Aim.mpl,v retrieving revision 1.6.2.3 retrieving revision 1.6.2.4 diff -C2 -d -r1.6.2.3 -r1.6.2.4 *** Aim.mpl 31 Mar 2005 12:37:52 -0000 1.6.2.3 --- Aim.mpl 25 Apr 2005 22:36:35 -0000 1.6.2.4 *************** *** 28,33 **** ", proc() ! local f,param,require,command,commandprocedure,starttime,endtime, ! subjname,subj,id,password,auth,html,extranames,now; global Config,DefaultZone,`aim/AssignedNames`,AimCache,AimImageCache; --- 28,33 ---- ", proc() ! local param,require,command,commandprocedure,starttime,endtime, ! subjname,subj,id,password,auth,html,extranames,now,i,XMLtext,r; global Config,DefaultZone,`aim/AssignedNames`,AimCache,AimImageCache; *************** *** 42,60 **** fi; - # convert the arguments to a maple table, stored in the variable # param. This table is passed down to the procedures that do all # the real work. ! ! f := proc(e) ! if type([e],[string = string]) then ! RETURN(lhs(e) = `Util/Unixify`(rhs(e))); ! else ! RETURN(); ! fi; ! end; ! ! try ! param := table(map(f,[args])); catch: error(__("Cannot interpret parameters")); --- 42,58 ---- fi; # convert the arguments to a maple table, stored in the variable # param. This table is passed down to the procedures that do all # the real work. ! try ! param := table([]); ! i := 1; ! while i+1 <= nargs do ! if not(type([args[i..i+1]],[string,string])) then ! error(__("Non-string arguments")); ! fi; ! param[args[i]] := `Util/Unixify`(args[i+1]); ! i := i+2; ! od; catch: error(__("Cannot interpret parameters")); *************** *** 72,75 **** --- 70,82 ---- fi; + if (param["Command"] = "SOAP") then + XMLtext := param["XMLtext"]; + if not(type([XMLtext],[string])) then + error(__("No XML text for SOAP command")); + fi; + r := eval(`aim/RPC/Service`['Process',XMLtext]); + return(r['ToString']); + fi; + # Define a convenience function to access the parameter table require := proc(tbl,key) *************** *** 141,145 **** # endtime-starttime,`Date/CurrentRawDate`() - now); ! printf("%s",html); end ): --- 148,152 ---- # endtime-starttime,`Date/CurrentRawDate`() - now); ! return(html); end ): *************** *** 179,190 **** ]): - `Package/Assign`( - `aim/AdminCommands`::list(string), - "The list of commands that require administrator-level authentication. - ", - [] - # This list is filled in when the various aim/admin/*.mpl files - # are read. - ): --- 186,189 ---- Index: Make.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Make.mpl,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -C2 -d -r1.4.2.2 -r1.4.2.3 *** Make.mpl 31 Mar 2005 12:37:53 -0000 1.4.2.2 --- Make.mpl 25 Apr 2005 22:36:46 -0000 1.4.2.3 *************** *** 91,101 **** kernelopts(printbytes = false): - # KM - # DIST pread("Package.mpl"): if `Package/IsLoaded` <> true then pread("FullPackage.mpl"): `Package/IsLoaded` := true: fi: - # END KM if MakeTrans = true then --- 91,98 ---- *************** *** 116,119 **** --- 113,117 ---- fi; line := readline("PackageList"): + od: *************** *** 128,131 **** --- 126,130 ---- # sensible error message for this eventuality. + save( `aim/AdminCommands`, *************** *** 135,140 **** ###################################################################### - pread("Aim.mpl"): - if (MakingDist <> true) then pread("AliceServer.mpl"): --- 134,137 ---- Index: rqp.wsdl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/rqp.wsdl,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** rqp.wsdl 21 Apr 2005 10:09:09 -0000 1.1.2.3 --- rqp.wsdl 25 Apr 2005 22:36:46 -0000 1.1.2.4 *************** *** 120,124 **** <!-- ServerInformation operation --> ! <message name="ServerInformation" /> <message name="ServerInformationResponse"> <part name="identifier" type="xs:anyURI" /> --- 120,126 ---- <!-- ServerInformation operation --> ! <message name="ServerInformation"> ! <part name="foo" type="xs:string"/> ! </message> <message name="ServerInformationResponse"> <part name="identifier" type="xs:anyURI" /> |
From: Neil S. <nps...@us...> - 2005-04-22 07:38:26
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8765/WEB-INF/java Added Files: Tag: aim-xml Zog.java compile.bat compzog.bat Log Message: --- NEW FILE: Zog.java --- import java.util.*; import java.io.*; class StreamGobbler extends Thread { InputStream is; String type; StreamGobbler(InputStream is, String type) { this.is = is; this.type = type; } public void run() { try { InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line=null; while ( (line = br.readLine()) != null) System.out.println(type + ">" + line); } catch (IOException ioe) { ioe.printStackTrace(); } } } public class Zog { public static void main(String args[]) { try { String osName = System.getProperty("os.name" ); String[] cmd = new String[5]; // cmd[0] = "cmd.exe"; // cmd[1] = "/c"; // cmd[2] = "cmaple9.5.exe -q -c print(2+2) -c quit"; cmd[0] = "C:/Program Files/Maple 9.5/bin.win/cmaple9.5.exe"; cmd[1] = "-c"; cmd[2] = "print(2+2)"; cmd[3] = "-c"; cmd[4] = "quit"; Runtime rt = Runtime.getRuntime(); // System.out.println("Execing " + cmd[0] + " " + cmd[1] + " " + cmd[2] + " " + cmd[3] + " " + cmd[4]); Process proc = rt.exec("C:/Program Files/Maple 9.5/bin.win/cmaple9.5.exe"); // any error message? // StreamGobbler errorGobbler = new // StreamGobbler(proc.getErrorStream(), "ERROR"); // any output? StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT"); OutputStream os = proc.getOutputStream(); PrintWriter pw = new PrintWriter(os,true); System.out.println("T0"); pw.print("fopen(\"C:/zzz.txt\",APPEND):fprintf(\"C:/zzz.txt\",\"A: %d\\n\",iolib(25)):fclose(\"C:/zzz.txt\"):printf(\"a: %d\\n\",iolib(25)):"); os.write("\r\n".getBytes()); System.out.println("T1"); pw.flush(); System.out.println("T2"); pw.print("fopen(\"C:/zzz.txt\",APPEND):fprintf(\"C:/zzz.txt\",\"B: %d\\n\",iolib(25)):fclose(\"C:/zzz.txt\"):printf(\"b: %d\\n\",iolib(25)):"); os.write("\r\n".getBytes()); System.out.println("T3"); pw.flush(); System.out.println("T4"); pw.print("quit;"); os.write("\r\n".getBytes()); System.out.println("T5"); pw.flush(); System.out.println("T6"); // pw.close(); System.out.println("T7"); // kick them off // errorGobbler.start(); outputGobbler.start(); // any error??? int exitVal = proc.waitFor(); System.out.println("ExitValue: " + exitVal); } catch (Throwable t) { t.printStackTrace(); } } } // Local Variables: // c-basic-offset: 2 // compile-command: "compzog.bat" // End: --- NEW FILE: compile.bat --- SET CLASSPATH=C:\Sun\AppServer\lib\j2ee.jar;C:\Sun\AppServer\jdk\lib;C:\Tomcat\common\lib\xerces\xercesImpl.jar;..\classes C:\Sun\AppServer\jdk\bin\javac -d ..\classes Maple.java C:\Sun\AppServer\jdk\bin\javac -d ..\classes MaplePool.java C:\Sun\AppServer\jdk\bin\javac -d ..\classes tth\TtH.java C:\Sun\AppServer\jdk\bin\javac -d ..\classes Alice.java --- NEW FILE: compzog.bat --- SET CLASSPATH=C:\Sun\AppServer\lib\j2ee.jar;C:\Sun\AppServer\jdk\lib;C:\Tomcat\common\lib\xerces\xercesImpl.jar C:\Sun\AppServer\jdk\bin\javac Zog.java |
From: Neil S. <nps...@us...> - 2005-04-22 07:16:13
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27120/WEB-INF/classes Modified Files: Tag: aim-xml Alice.class AliceLog.class AliceLogEntry.class AliceRequest.class Maple.class Log Message: Index: AliceLog.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLog.class,v retrieving revision 1.6.4.4 retrieving revision 1.6.4.5 diff -C2 -d -r1.6.4.4 -r1.6.4.5 Binary files /tmp/cvsddMTYZ and /tmp/cvsRfHtsV differ Index: Maple.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Maple.class,v retrieving revision 1.4.4.5 retrieving revision 1.4.4.6 diff -C2 -d -r1.4.4.5 -r1.4.4.6 Binary files /tmp/cvseIoXp3 and /tmp/cvshY7NVY differ Index: AliceLogEntry.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLogEntry.class,v retrieving revision 1.5.4.4 retrieving revision 1.5.4.5 diff -C2 -d -r1.5.4.4 -r1.5.4.5 Binary files /tmp/cvsI6d7U8 and /tmp/cvs9da0s4 differ Index: AliceRequest.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceRequest.class,v retrieving revision 1.7.4.4 retrieving revision 1.7.4.5 diff -C2 -d -r1.7.4.4 -r1.7.4.5 Binary files /tmp/cvs1QzbDb and /tmp/cvsar3Uc7 differ Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.6.4.4 retrieving revision 1.6.4.5 diff -C2 -d -r1.6.4.4 -r1.6.4.5 Binary files /tmp/cvsXHfeSb and /tmp/cvsqQWRt7 differ |
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27120/WEB-INF/maple/aim Modified Files: Tag: aim-xml MRQuestion.mpl MatrixQuestion.mpl Question.mpl Quiz.mpl SOAP.mpl TextQuestion.mpl Log Message: Index: MRQuestion.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/MRQuestion.mpl,v retrieving revision 1.3.6.1 retrieving revision 1.3.6.2 diff -C2 -d -r1.3.6.1 -r1.3.6.2 *** MRQuestion.mpl 10 Mar 2005 21:13:54 -0000 1.3.6.1 --- MRQuestion.mpl 22 Apr 2005 07:15:43 -0000 1.3.6.2 *************** *** 10,75 **** `Package/Assign`( ! `aim/MRQuestion/Script`::string, ! "This is a script to be included in an HTML page header, defining ! JavaScript functions that are used to make checkboxes work ! properly. For example, clicking the 'None of the above' box ! should clear all the other boxes. ! <br/><br/> ! The functions assume that we have a group of checkboxes, all with ! the same name. One of them may have the value @'NoneOfTheAbove'@, ! one may have the value @''@, and all others are considered ! 'ordinary'. Ordinary checkboxes should have the @onclick@ attribute ! set to @'checkopt(form,name)'@; this means that when they are ! checked, the two special boxes will be cleared. The box with ! value @'NoneOfTheAbove'@ should use the handler ! @'checknone(form,name)'@, which clears all the other boxes. The box ! with value @''@ should use the handler @'checknull(form,name)'@, ! which behaves similarly. ! ", ! " function checkopt(f,n) { ! var optarray = f.elements[n]; ! var numopts = optarray.length; ! var raw,i; ! optarray[numopts-2].checked = false; ! optarray[numopts-1].checked = false; ! raw = '{'; ! for (i = 0; i < numopts-2; i++) { ! if (optarray[i].checked) { ! raw += '\\\"' + optarray[i].value + '\\\",'; ! } ! } ! if (raw.length > 1) { ! raw = raw.substring(0,raw.length-1) + '}'; ! } else { ! raw = '{}'; ! optarray[numopts-2].checked = true; ! } ! var base = n.substring(0,n.length-8); ! f.elements[base].value = raw; ! }; ! function checknone(f,n) { ! var optarray = f.elements[n]; ! var numopts = optarray.length; ! var i; ! for (i = 0; i < numopts-2; i++) { ! optarray[i].checked = false; ! } ! optarray[numopts-1].checked = false; ! var base = n.substring(0,n.length-8); ! f.elements[base].value = '{}'; ! }; ! function checknull(f,n) { ! var optarray = f.elements[n]; ! var numopts = optarray.length; ! var i; ! for (i = 0; i < numopts-1; i++) { ! optarray[i].checked = false; ! } ! var base = n.substring(0,n.length-8); ! f.elements[base].value = ''; ! }; ! " ): --- 10,64 ---- `Package/Assign`( ! `aim/MRQuestion/OnClickScript`, ! "", ! proc(base::string,optlabels::list(string)) ! local n,g,s,j; ! g := (t) -> sprintf("document.getElementById('%s%s')",base,t); ! n := nops(optlabels); ! s := sprintf("%s.checked=false;%s.checked=false;", ! g("_None"),g("_Null")); ! s := cat(s,g(""),".value='{'+"); ! for j from 1 to n do ! s := sprintf("%s+(document.getElementById('%s_%d').checked ? '"%s",' : '')", ! s,base,j,optlabels[j]) ! od; ! s := sprintf("%s+'NULL}';",s); ! return(s); ! end ! ): ! `Package/Assign`( ! `aim/MRQuestion/OnClickScript/None`, ! "", ! proc(base::string,optlabels::list(string)) ! local n,g,s,j; ! g := (t) -> sprintf("document.getElementById('%s%s')",base,t); ! n := nops(optlabels); ! s := sprintf("%s.checked=false;",g("_Null")); ! for j from 1 to n do ! s := sprintf("%s document.getElementById('%s_%d').checked=false;", ! s,base,j) ! od; ! s := sprintf("%s document.getElementById('%s').value='{}';",s); ! return(s); ! end ! ): ! ! `Package/Assign`( ! `aim/MRQuestion/OnClickScript/Null`, ! "", ! proc(base::string,optlabels::list(string)) ! local n,g,s,j; ! g := (t) -> sprintf("document.getElementById('%s%s')",base,t); ! n := nops(optlabels); ! s := sprintf("%s.checked=false;",g("_None")); ! for j from 1 to n do ! s := sprintf("%s document.getElementById('%s_%d').checked=false;", ! s,base,j) ! od; ! s := sprintf("%s document.getElementById('%s').value='';",s); ! return(s); ! end ): *************** *** 355,359 **** proc(this,allowinput_::boolean) local cgilabel,lastrawans,lastans,choices,labels,i,n,c,choicetable, ! allowinput,inputelement,rawelt,html; if nargs > 1 then --- 344,348 ---- proc(this,allowinput_::boolean) local cgilabel,lastrawans,lastans,choices,labels,i,n,c,choicetable, ! allowinput,inputelement,rawelt,html,onclick; if nargs > 1 then *************** *** 363,367 **** fi; ! cgilabel := cat(this['CGILabel'],"Multiple"); lastrawans := this['History']['LastRawAnswer']; lastans := this['History']['LastAnswer']; --- 352,356 ---- fi; ! cgilabel := this['CGILabel']; lastrawans := this['History']['LastRawAnswer']; lastans := this['History']['LastAnswer']; *************** *** 388,397 **** fi; if allowinput then inputelement := [["inputcheckbox", "name" = cgilabel, "value" = labels[i], ! "onclick" = "checkopt(form,name)", c]]; else --- 377,388 ---- fi; + onclick := `aim/MRQuestion/OnClick`(cgilabel,labels); if allowinput then inputelement := [["inputcheckbox", "name" = cgilabel, + "id" = sprintf("%s_%d",cgilabel,i), "value" = labels[i], ! "onclick" = onclick, c]]; else *************** *** 411,416 **** [["inputcheckbox", "name" = cgilabel, "value" = "NoneOfTheAbove", ! "onclick" = "checknone(form,name)", c]]; else --- 402,408 ---- [["inputcheckbox", "name" = cgilabel, + "id" = sprintf("%s_None",cgilabel), "value" = "NoneOfTheAbove", ! "onclick" = `aim/MRQuestion/OnClick/None`(cgilabel,labels), c]]; else *************** *** 428,433 **** [["inputcheckbox", "name" = cgilabel, "value" = "", ! "onclick" = "checknull(form,name)", c]]; --- 420,426 ---- [["inputcheckbox", "name" = cgilabel, + "id" = sprintf("%s_Null",cgilabel), "value" = "", ! "onclick" = `aim/MRQuestion/OnClick/Null`(cgilabel,labels), c]]; *************** *** 449,492 **** ], - ['Method','AnswerBoxXML'::`XML/Element`, - "", - proc(this,disabled_::boolean) - local cgilabel,lastans,choices,labels,i,n,c,choicetable, - allowinput,inputelement,disabled,b; - - if nargs > 1 then - disabled := args[2]; - else - disabled := false; - fi; - - lastans := this['History']['LastAnswer']; - choices := eval(this['Choices']); - choices := map(`aim/MCQuestion/ChoiceToString`,choices); - - n := nops(choices); - labels := eval(this['ChoiceLabels']); - - b := - `new/XML/Element`( - ["aim:AnswerBox", - "widget" = "multipleresponse", - `if`(disabled,"disabled" = "true", NULL) - ]); - - for i from 1 to n do - if member(labels[i],lastans) then - b['AddContents', - [["choice","label"=labels[i],"chosen"="true"],choices[i]]]; - else - b['AddContents', - [["choice","label"=labels[i]],choices[i]]]; - fi; - od; - - RETURN(eval(b)); - end - ], - ['Method','AnswerBoxSubstitute'::`HTML/String`,"", proc(this) --- 442,445 ---- *************** *** 515,544 **** ], - ['Method','LastAnswerXML'::`XML/Element`, - "", - proc(this) - local attempt,xml; - - attempt := eval(this['Attempt']); - - if attempt['RawAnswer'] = "" then - return(`new/XML/Element`("aim:LastAnswer")); - else - if attempt['Answer'] <> NULL then - ### Check the escapology - if type([attempt['Answer']],[list(string)]) then - return(`new/XML/Element`( - [["aim:LastAnswer", "raw"="true"], - map(x -> ["choice",x],attempt['Answer'])])); - else - error(__("Non-string answer to multiple response question")); - fi; - else - return(`new/XML/Element`("aim:LastAnswer")); - fi; - fi; - end - ], - ['Method','ReportRightAnswer'::`HTML/String`,"", proc(this) --- 468,471 ---- Index: Question.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Question.mpl,v retrieving revision 1.13.2.3 retrieving revision 1.13.2.4 diff -C2 -d -r1.13.2.3 -r1.13.2.4 *** Question.mpl 1 Apr 2005 01:42:55 -0000 1.13.2.3 --- Question.mpl 22 Apr 2005 07:15:43 -0000 1.13.2.4 *************** *** 2397,2401 **** if type([this],[`aim/MultiQuestion/Instance`]) then ! error(__("Multipart questions not supported in XML framework.")); fi; --- 2397,2401 ---- if type([this],[`aim/MultiQuestion/Instance`]) then ! error(__("Multipart questions not supported in the XML framework.")); fi; Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Quiz.mpl,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** Quiz.mpl 31 Mar 2005 12:38:12 -0000 1.8.2.2 --- Quiz.mpl 22 Apr 2005 07:15:43 -0000 1.8.2.3 *************** *** 1526,1530 **** `HTML/ToString`( `aim/HTMLPage`(__("AIM Quiz"), - ["javascript",`aim/MRQuestion/Script`], ["javascript",`aim/MatrixQuestion/Script`], ["javascript",`aim/SubmitScript`], --- 1526,1529 ---- Index: TextQuestion.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/TextQuestion.mpl,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** TextQuestion.mpl 10 Mar 2005 21:13:55 -0000 1.13.2.1 --- TextQuestion.mpl 22 Apr 2005 07:15:44 -0000 1.13.2.2 *************** *** 296,347 **** ], - ['Method','AnswerBoxXML'::`XML/Element`, - "Return an XML structure representing the answer box that - students can use to enter their answers. - ", - proc(this,disabled_::boolean) - local b,rawans; - - # Ken Monks set things up so that AnswerBoxWidth=0 gives no - # answer box. I'm not sure what that is for, but I have - # replicated it here anyway; this may be the wrong thing - # to do. - if this['AnswerBoxWidth'] = 0 then - return(NULL); - fi; - - b := - `new/XML/Element`( - ["aim:AnswerBox", - `if`(this['AnswerBoxHeight'] > 1, - op(["widget" = "textarea", - "height" = this['AnswerBoxHeight'], - "width" = this['AnswerBoxWidth']]), - op(["widget" = "inputbox", - "width" = this['AnswerBoxWidth']]) - ) - ]); - - if nargs > 1 and disabled_ = true then - b['SetAttribs',"disabled" = "true"]; - fi; - - if this['Prompt'] <> "" then - b['AddContents',["aim:Prompt",this['Prompt']]]; - fi; - - rawans := this['Attempt']['RawAnswer']; - if rawans <> "" then - b['AddContents',["aim:Answer",`XML/Escape`(rawans)]]; - fi; - - if this['PostPrompt'] <> "" then - b['AddContents',["aim:PostPrompt",this['PostPrompt']]]; - fi; - - return(eval(b)); - end - ], - ['Method','AnswerBoxSubstitute'::`HTML/String`, "Return the HTML string specifying a disabled text box with grey --- 296,299 ---- *************** *** 431,462 **** ], - ['Method','LastAnswerXML'::`XML/Element`, - "", - proc(this) - local attempt,xml; - - attempt := eval(this['Attempt']); - - if attempt['RawAnswer'] = "" then - return(`new/XML/Element`("aim:LastAnswer")); - else - if attempt['Answer'] <> NULL then - ### Check the escapology - if type([attempt['Answer']],[string]) then - return(`new/XML/Element`( - ["aim:LastAnswer", "raw"="true"], - `XML/Escape`(attempt['Answer']))); - else - return(`new/XML/Element`( - ["aim:LastAnswer", "raw"="false"], - `XML/Escape`(`aim/LaTeX`(attempt['Answer'])))); - fi; - else - return(`new/XML/Element`("aim:LastAnswer")); - fi; - fi; - end - ], - ['Method','ReportRightAnswer'::`HTML/String`, "Return the HTML representation of the right answer to this --- 383,386 ---- *************** *** 471,482 **** __("The teacher's answer was: "), "\n<latex>\\[", ! # KM We don't need to surround the teacher's answer # with quotes in this situation because the students # don't type them anyway - # WAS: `aim/LaTeX`(rightans), `if`(type(rightans,string), cat("\\mbox{",TeX(rightans),"}"), `aim/LaTeX`(rightans)), - # END KM "\\]</latex>\n<br/>\n"); --- 395,404 ---- __("The teacher's answer was: "), "\n<latex>\\[", ! # We don't need to surround the teacher's answer # with quotes in this situation because the students # don't type them anyway `if`(type(rightans,string), cat("\\mbox{",TeX(rightans),"}"), `aim/LaTeX`(rightans)), "\\]</latex>\n<br/>\n"); *************** *** 523,531 **** rawans := attempt['RawAnswer']; - # KM - # WAS: if reqtype = string then - # WAS: if subtype(reqtype,string) then if subtype(reqtype,string) or type(reqtype,specfunc(type,'String')) then - # END # don't allow the empty string to be valid or it will cause # a penalty to be given if the student answers it correctly --- 445,449 ---- *************** *** 533,537 **** # request for the quiz to be marked if rawans = "" then attempt['IsValid']:=false; RETURN(false) fi; - # KM # check that the string matches the required type in the case # where the user has specified a subtype of type string --- 451,454 ---- *************** *** 554,558 **** RETURN(false); fi; - # END KM attempt['Answer'] := rawans; RETURN(true); --- 471,474 ---- Index: SOAP.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Attic/SOAP.mpl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** SOAP.mpl 1 Apr 2005 01:42:55 -0000 1.1.2.2 --- SOAP.mpl 22 Apr 2005 07:15:44 -0000 1.1.2.3 *************** *** 97,101 **** ['Output',"hintAvailable"::`XML/boolean` = false], ['Output',"validationPossible"::`XML/boolean` = true], ! ['Output',"maxScore"::`XML/unsignedInt` = 100], ['Output',"length"::`XML/unsignedInt` = 1], --- 97,101 ---- ['Output',"hintAvailable"::`XML/boolean` = false], ['Output',"validationPossible"::`XML/boolean` = true], ! ['Output',"maxScore"::`XML/unsignedInt` = 1], ['Output',"length"::`XML/unsignedInt` = 1], *************** *** 130,141 **** ['Input',"source"::`XML/string`], ['Input',"format"::`XML/anyURI`], - ['Input',"seed"::`XML/unsignedInt`], - ['Output',"seed"::`XML/unsignedInt`], ['Output',"templateVars"::`RQP/ArrayOfvariable` = []], ['Process', proc(inp,out) ! out["seed"] = `if`(inp["seed"] = 0,rand(),inp["seed"]); end ] --- 130,139 ---- ['Input',"source"::`XML/string`], ['Input',"format"::`XML/anyURI`], ['Output',"templateVars"::`RQP/ArrayOfvariable` = []], ['Process', proc(inp,out) ! out["templateVars"] = ["seed" = [sprintf("%d",rand())]]; end ] *************** *** 152,161 **** ['Input',"format"::`XML/anyURI`], ['Input',"index"::`XML/unsignedInt` = 0], - ['Input',"seed"::`XML/unsignedInt` = 0], ['Input',"templateVars"::`RQP/ArrayOfvariable` = []], ['Input',"persistentData"::`XML/MapleExpression`], - ['Input',"embedPrefix"::`XML/QName`], - ['Output',"seed"::`XML/unsignedInt`], ['Output',"templateVars"::`RQP/ArrayOfvariable` = []], ['Output',"correctResponses"::`RQP/ArrayOfinput` = []], --- 150,156 ---- *************** *** 165,172 **** local vrsion,f; vrsion := `aim/SOAP/GetItemVersion`(inp); ! out["seed"] := inp["seed"]; ! f := proc(x,p) [cat(p,x[1]),x[2]]; end; ! out["correctResponses"] := ! map(f,vrsion['RightRawAnswerList'],inp["embedPrefix"]); end ] --- 160,165 ---- local vrsion,f; vrsion := `aim/SOAP/GetItemVersion`(inp); ! out["templateVars"] := ["seed" = [sprintf("%d",vrsion['Seed'])]]; ! out["correctResponses"] := vrsion['RightRawAnswerList']; end ] *************** *** 184,193 **** ['Input',"format"::`XML/anyURI`], ['Input',"index"::`XML/unsignedInt` = 0], - ['Input',"seed"::`XML/unsignedInt` = 0], ['Input',"templateVars"::`RQP/ArrayOfvariable`], ['Input',"persistentData"::`XML/MapleExpression`], ['Input',"responses"::`RQP/ArrayOfinput`], ['Input',"advanceState"::`XML/boolean`], ! ['Input',"embedPrefix"::`XML/QName`], ['Input',"appletBase"::`XML/anyURI`], ['Input',"mediaBase"::`XML/anyURI`], --- 177,185 ---- ['Input',"format"::`XML/anyURI`], ['Input',"index"::`XML/unsignedInt` = 0], ['Input',"templateVars"::`RQP/ArrayOfvariable`], ['Input',"persistentData"::`XML/MapleExpression`], ['Input',"responses"::`RQP/ArrayOfinput`], ['Input',"advanceState"::`XML/boolean`], ! ['Input',"namePrefix"::`XML/QName`], ['Input',"appletBase"::`XML/anyURI`], ['Input',"mediaBase"::`XML/anyURI`], *************** *** 195,199 **** ['Input',"modalFormat"::`XML/anyURI`], - ['Output',"seed"::`XML/unsignedInt` = 0], ['Output',"templateVars"::`RQP/ArrayOfvariable` = []], ['Output',"persistentData"::`XML/MapleExpression` = ""], --- 187,190 ---- *************** *** 236,240 **** attempt := inst['Attempt']; ! out["seed"] := vrsion['Seed']; out["persistentData"] := eval(history); t := [ --- 227,231 ---- attempt := inst['Attempt']; ! out["templateVars"] := ["seed" = [sprintf("%d",vrsion['Seed'])]]; out["persistentData"] := eval(history); t := [ *************** *** 309,319 **** "", proc(inp::table) ! local item,seed,vrsion,bits,subj,quiz; item := `aim/SOAP/GetItem`(inp); ! seed := inp["seed"]; ! if seed = 0 then seed := rand(); - inp["seed"] := seed; fi; --- 300,312 ---- "", proc(inp::table) ! local item,seeds,seed,vrsion,bits,subj,quiz; item := `aim/SOAP/GetItem`(inp); ! seed := subs(inp["templateVars"],"seed"); ! if type([seed],[[string]]) then ! seed := op(sscanf(op(seed),"%d")); ! fi; ! if not(type([seed],[integer])) then seed := rand(); fi; *************** *** 342,347 **** ###################################################################### - - `RPC/DeclareOperation`( `aim/RPC/DefaultOperation`, --- 335,338 ---- Index: MatrixQuestion.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/MatrixQuestion.mpl,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -C2 -d -r1.4.2.2 -r1.4.2.3 *** MatrixQuestion.mpl 31 Mar 2005 12:37:54 -0000 1.4.2.2 --- MatrixQuestion.mpl 22 Apr 2005 07:15:43 -0000 1.4.2.3 *************** *** 139,152 **** local attempt,err,rawans,rawlines,rawcells, isempty,warmans,cookedans,e,f,tlimit; - # KM global Config; - # END KM tlimit := this['TimeLimit']; if not(type([tlimit],[numeric])) then - # KM - # DIST tlimit := 2.0; tlimit := Config['TimeLimit']; - # END KM fi; --- 139,147 ---- *************** *** 230,236 **** local savedframe,attempt,mapletype,err,msg,ans,rightans, ok,rawmark,tlimit; - # KM global Config; - # END KM attempt := eval(`aim/Question/MakeAttempt`(x)); --- 225,229 ---- *************** *** 265,272 **** tlimit := this['TimeLimit']; if not(type([tlimit],[numeric])) then - # KM - # DIST tlimit := 2.0; tlimit := Config['TimeLimit']; - # END KM fi; --- 258,262 ---- *************** *** 380,384 **** ", proc(this) ! local html,i,j,label,cgilabel,rows,cols,boxsize,rawans,rawmat; label := this['Label']; --- 370,374 ---- ", proc(this) ! local html,i,j,label,cgilabel,rows,cols,boxsize,rawans,rawmat,onchange; label := this['Label']; *************** *** 399,402 **** --- 389,410 ---- "<table>\n"; + onchange := + sprintf("document.getElementById('%s').value=''",cgilabel); + for i to rows do + for j to cols do + onchange := + sprintf("%s+'"'+document.getElementById('%s_Row%d_Col%d').value+'"'", + onchange,i,j); + if j < cols then + onchange := cat(onchange,"+'|'"); + else + if i < rows then + onchange := cat(onchange,"+'\\n'"); + fi; + fi; + od; + od; + onchange := cat(onchange,";"); + for i to rows do html := html," <tr>\n"; *************** *** 407,416 **** sprintf( "<input type='text' ! name='%sRow%dCol%d' size='%d' value='%s' ! onchange=\"squashmatrix('%s');\"/> ", ! cgilabel,i,j,boxsize,rawmat[i,j],cgilabel), "</td>\n"; od; --- 415,425 ---- sprintf( "<input type='text' ! name='%s_Row%d_Col%d' ! id='%s_Row%d_Col%d' size='%d' value='%s' ! onchange=\"%s\"/> ", ! cgilabel,i,j,boxsize,rawmat[i,j],onchange), "</td>\n"; od; |