aimmath-commit Mailing List for AiM Assessment in Mathematics (Page 2)
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-22 07:15:53
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27120/WEB-INF/maple Modified Files: Tag: aim-xml RQP.mpl Log Message: Index: RQP.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/RQP.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 *** RQP.mpl 1 Apr 2005 01:42:55 -0000 1.1.2.3 --- RQP.mpl 22 Apr 2005 07:15:43 -0000 1.1.2.4 *************** *** 181,185 **** are permitted to have multiple values or no value. They are represented in Maple as an equation of the form ! @[identifier,[first value,...,last value]]@. ", `new/XML/Type`( --- 181,185 ---- are permitted to have multiple values or no value. They are represented in Maple as an equation of the form ! @identifier=[first value,...,last value]@. ", `new/XML/Type`( |
From: Neil S. <nps...@us...> - 2005-04-22 07:15:51
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27120/WEB-INF/java Modified Files: Tag: aim-xml Maple.java Log Message: Index: Maple.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Maple.java,v retrieving revision 1.5.4.3 retrieving revision 1.5.4.4 diff -C2 -d -r1.5.4.3 -r1.5.4.4 *** Maple.java 10 Mar 2005 21:16:00 -0000 1.5.4.3 --- Maple.java 22 Apr 2005 07:15:34 -0000 1.5.4.4 *************** *** 95,99 **** public static void main(String[] args) throws Exception { ! Maple m = new Maple("C:/Program Files/Maple 9/bin.win/cmaple9"); System.out.println("Trying 2+2:"); System.out.println(m.exec("2+2")); --- 95,99 ---- public static void main(String[] args) throws Exception { ! Maple m = new Maple("C:/Program Files/Maple 9.5/bin.win/cmaple9.5"); System.out.println("Trying 2+2:"); System.out.println(m.exec("2+2")); *************** *** 109,114 **** private void startProcess() throws IOException { lastUseTime = new Date(); ! process = Runtime.getRuntime().exec(program + " -q"); mapleInput = process.getOutputStream(); processGobbler = new ProcessGobbler(process); --- 109,117 ---- private void startProcess() throws IOException { + String[] cmd = new String[2]; + cmd[0] = program; + cmd[1] = "-q"; lastUseTime = new Date(); ! process = Runtime.getRuntime().exec(cmd); mapleInput = process.getOutputStream(); processGobbler = new ProcessGobbler(process); |
From: Neil S. <nps...@us...> - 2005-04-21 10:09:23
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2016/maple Modified Files: Tag: aim-xml Console.mpl PackageList rqp.wsdl Log Message: Index: PackageList =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/PackageList,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -C2 -d -r1.8.2.3 -r1.8.2.4 *** PackageList 1 Apr 2005 19:55:32 -0000 1.8.2.3 --- PackageList 21 Apr 2005 10:09:09 -0000 1.8.2.4 *************** *** 1,6 **** ! AiM OS Util - I18n Class Pot --- 1,5 ---- ! I18n OS Util Class Pot *************** *** 72,74 **** --- 71,74 ---- aim/try/Quiz RandArgs + AiM Site Index: Console.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Console.mpl,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -C2 -d -r1.6.2.2 -r1.6.2.3 *** Console.mpl 31 Mar 2005 12:37:53 -0000 1.6.2.2 --- Console.mpl 21 Apr 2005 10:09:09 -0000 1.6.2.3 *************** *** 187,190 **** --- 187,198 ---- ###################################################################### + vread := proc(f::string) + interface(echo = 4): + read(f): + interface(echo = 1): + end: + + ###################################################################### + # The show() function prints a string in a nicely formatted way, # and deals with problems arising from the different ways that Unix Index: rqp.wsdl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/rqp.wsdl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** rqp.wsdl 1 Apr 2005 19:55:32 -0000 1.1.2.2 --- rqp.wsdl 21 Apr 2005 10:09:09 -0000 1.1.2.3 *************** *** 156,163 **** <part name="source" type="xs:string" /> <part name="format" type="xs:anyURI" /> - <part name="seed" type="xs:unsignedInt" /> </message> <message name="ProcessTemplateResponse"> - <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> </message> --- 156,161 ---- *************** *** 167,175 **** <part name="source" type="xs:string" /> <part name="format" type="xs:anyURI" /> - <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> </message> <message name="CloneResponse"> - <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="clone" type="xs:string" /> --- 165,171 ---- *************** *** 181,191 **** <part name="format" type="xs:anyURI" /> <part name="index" type="xs:unsignedInt" /> - <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="persistentData" type="xs:string" /> - <part name="embedPrefix" type="xs:QName" /> </message> <message name="SessionInformationResponse"> - <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="correctResponses" type="tns:ArrayOfinput" /> --- 177,184 ---- *************** *** 197,206 **** <part name="format" type="xs:anyURI" /> <part name="index" type="xs:unsignedInt" /> - <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="persistentData" type="xs:string" /> <part name="responses" type="tns:ArrayOfinput" /> <part name="advanceState" type="xs:boolean" /> ! <part name="embedPrefix" type="xs:QName" /> <part name="appletBase" type="xs:anyURI" /> <part name="mediaBase" type="xs:anyURI" /> --- 190,198 ---- <part name="format" type="xs:anyURI" /> <part name="index" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="persistentData" type="xs:string" /> <part name="responses" type="tns:ArrayOfinput" /> <part name="advanceState" type="xs:boolean" /> ! <part name="namePrefix" type="xs:QName" /> <part name="appletBase" type="xs:anyURI" /> <part name="mediaBase" type="xs:anyURI" /> *************** *** 209,213 **** </message> <message name="RenderResponse"> - <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="persistentData" type="xs:string" /> --- 201,204 ---- *************** *** 341,348 **** <service name="rqp"> <port name="rqp" binding="tns:rqp"> ! <soap:address location="http://alice.shef.ac.uk/AiM3/Alice" /> </port> </service> </definitions> - --- 332,338 ---- <service name="rqp"> <port name="rqp" binding="tns:rqp"> ! <soap:address location="###SERVER_ADDRESS###" /> </port> </service> </definitions> |
From: Neil S. <nps...@us...> - 2005-04-21 10:09:23
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2016/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.3 retrieving revision 1.8.4.4 diff -C2 -d -r1.8.4.3 -r1.8.4.4 *** Alice.java 10 Mar 2005 21:15:59 -0000 1.8.4.3 --- Alice.java 21 Apr 2005 10:09:09 -0000 1.8.4.4 *************** *** 703,707 **** if (alicereq.isWSDL) { ! sendWSDL(response); return; } --- 703,707 ---- if (alicereq.isWSDL) { ! sendWSDL(response,alicereq.getServletPath()); return; } *************** *** 803,807 **** } ! private void sendWSDL(HttpServletResponse response) throws ServletException { try { --- 803,807 ---- } ! private void sendWSDL(HttpServletResponse response,String uri) throws ServletException { try { *************** *** 811,814 **** --- 811,815 ---- String line; while ((line = r.readLine()) != null) { + line = line.replaceFirst("###SERVER_ADDRESS###",uri); w.println(line); } |
From: Neil S. <nps...@us...> - 2005-04-21 10:09:21
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2016/classes Modified Files: Tag: aim-xml Maple.class Log Message: Index: Maple.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Maple.class,v retrieving revision 1.4.4.4 retrieving revision 1.4.4.5 diff -C2 -d -r1.4.4.4 -r1.4.4.5 Binary files /tmp/cvsyVUSCh and /tmp/cvs7lbHdC differ |
From: Neil S. <nps...@us...> - 2005-04-01 19:55:41
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12717/maple Modified Files: Tag: aim-xml AliceServer.mpl PackageList rqp.wsdl Log Message: Index: AliceServer.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AliceServer.mpl,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -C2 -d -r1.6.2.2 -r1.6.2.3 *** AliceServer.mpl 31 Mar 2005 12:37:52 -0000 1.6.2.2 --- AliceServer.mpl 1 Apr 2005 19:55:31 -0000 1.6.2.3 *************** *** 45,48 **** --- 45,49 ---- line := util_unixify(line): if line <> "" then + # printf("With(%s)\n",line); With(line): fi: Index: PackageList =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/PackageList,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** PackageList 10 Mar 2005 21:13:53 -0000 1.8.2.2 --- PackageList 1 Apr 2005 19:55:32 -0000 1.8.2.3 *************** *** 1,2 **** --- 1,3 ---- + AiM OS Util Index: rqp.wsdl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/rqp.wsdl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** rqp.wsdl 31 Mar 2005 14:16:00 -0000 1.1.2.1 --- rqp.wsdl 1 Apr 2005 19:55:32 -0000 1.1.2.2 *************** *** 346,347 **** --- 346,348 ---- </definitions> + |
From: Neil S. <nps...@us...> - 2005-04-01 01:43:07
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5478/WEB-INF/maple Modified Files: Tag: aim-xml AutoConfWin.mpl AutoConfWin.mws RPC.mpl RQP.mpl XML.mpl Log Message: Index: RPC.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/RPC.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 *** RPC.mpl 31 Mar 2005 14:20:13 -0000 1.1.2.2 --- RPC.mpl 1 Apr 2005 01:42:55 -0000 1.1.2.3 *************** *** 186,190 **** for x in this['Inputs'] do if i > n then ! error(sprintf(__("Input parameter (%s) is missing"),x['Name'])); fi; y := c[i]; --- 186,190 ---- for x in this['Inputs'] do if i > n then ! error(sprintf(__("Input parameter (%s) is missing"),x['LocalName'])); fi; y := c[i]; *************** *** 439,460 **** d := this['DefaultNamespace']; fi; ! try ! return(p['Process',eval(c),d]); ! catch: ! ex := [lastexception]; ! if nops(ex) > 1 and ex[2] = "SOAP Fault" then ! faultcode := `if`(nops(ex)>2, ex[3], "Client"); ! faultstring := `if`(nops(ex)>3, ex[4], "Unknown error"); ! faultdetail := `if`(nops(ex)>4, ex[5], op([])); ! return( ! `SOAP/Fault`(faultcode,faultstring,faultdetail) ! ); ! else ! return( ! `SOAP/Fault`( ! "Server", ! cat("Processing error: ",StringTools:-FormatMessage(lasterror)))); ! fi; ! end try; end ] --- 439,461 ---- d := this['DefaultNamespace']; fi; ! return(p['Process',eval(c),d]); ! # try ! # return(p['Process',eval(c),d]); ! # catch: ! # ex := [lastexception]; ! # if nops(ex) > 1 and ex[2] = "SOAP Fault" then ! # faultcode := `if`(nops(ex)>2, ex[3], "Client"); ! # faultstring := `if`(nops(ex)>3, ex[4], "Unknown error"); ! # faultdetail := `if`(nops(ex)>4, ex[5], op([])); ! # return( ! # `SOAP/Fault`(faultcode,faultstring,faultdetail) ! # ); ! # else ! # return( ! # `SOAP/Fault`( ! # "Server", ! # cat("Processing error: ",StringTools:-FormatMessage(lasterror)))); ! # fi; ! # end try; end ] Index: XML.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/XML.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 *** XML.mpl 31 Mar 2005 12:37:53 -0000 1.1.2.4 --- XML.mpl 1 Apr 2005 01:42:55 -0000 1.1.2.5 *************** *** 1407,1410 **** --- 1407,1444 ---- `Package/Assign`( + `XML/MapleExpression`, + "", + `new/XML/Type`( + "xs:string", + "xs:string", + anything, + proc(a,h) + local s; + if a = NULL then + `new/XML/Element`(h,""); + else + s := sprintf("%m",a); + `new/XML/Element`(h,s); + fi; + end, + proc(x) + ### TODO: check this for safety + local s,a; + s := `XML/ContentString`(x); + if s = FAIL then + error(__("Not a string")); + elif s = "" then + return(NULL); + fi; + a := sscanf(s,"%m"); + if nops(a) <> 1 then + error(__("Cannot parse .m string")); + fi; + return(eval(a)); + end + ) + ): + + `Package/Assign`( `XML/string`, "", Index: RQP.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/RQP.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 *** RQP.mpl 31 Mar 2005 14:20:41 -0000 1.1.2.2 --- RQP.mpl 1 Apr 2005 01:42:55 -0000 1.1.2.3 *************** *** 180,184 **** certain parts of QTI, these variables are string-valued, and are permitted to have multiple values or no value. They are ! represented in Maple as a list of the form @[identifier,[first value,...,last value]]@. ", --- 180,184 ---- certain parts of QTI, these variables are string-valued, and are permitted to have multiple values or no value. They are ! represented in Maple as an equation of the form @[identifier,[first value,...,last value]]@. ", *************** *** 191,202 **** </xs:sequence> </xs:complexType>", ! [string,list(string)], proc(a,h) local v; ! v := ("soap-enc:ArrayType" = sprintf("xs:string[%d]",nops(a[2]))); `new/XML/Element`( ! h,[["identifier", "xsi:type" = "xs:NCName"],a[1]], [["values","xsi:type" = "soap-enc:Array", v], ! op(map(s -> [["item","xsi:type" = "xs:string"],s],a[2]))]); end, proc(x) --- 191,202 ---- </xs:sequence> </xs:complexType>", ! string = list(string), proc(a,h) local v; ! v := ("soap-enc:ArrayType" = sprintf("xs:string[%d]",nops(rhs(a)))); `new/XML/Element`( ! h,[["identifier", "xsi:type" = "xs:NCName"],lhs(a)], [["values","xsi:type" = "soap-enc:Array", v], ! op(map(s -> [["item","xsi:type" = "xs:string"],s],rhs(a)))]); end, proc(x) *************** *** 206,216 **** error(__("Invalid RQP variable structure")); fi; - id := `XML/ContentString`(c[1]); vals := `XML/ToMaple`(`RQP/ArrayOfstring`,c[2]); ! return([id,vals]); ! end, ! "soap-enc:Array" ) ): --- 206,214 ---- error(__("Invalid RQP variable structure")); fi; id := `XML/ContentString`(c[1]); vals := `XML/ToMaple`(`RQP/ArrayOfstring`,c[2]); ! return(id = vals); ! end ) ): *************** *** 231,235 **** </xs:complexContent> </xs:complexType>", ! list([string,list(string)]), proc(a,h) local t,hh; --- 229,233 ---- </xs:complexContent> </xs:complexType>", ! list(string = list(string)), proc(a,h) local t,hh; *************** *** 262,266 **** </xs:complexType> ", ! [string,string], proc(a,h) local v; --- 260,264 ---- </xs:complexType> ", ! string = string, proc(a,h) local v; *************** *** 268,273 **** `new/XML/Element`( h, ! [["name", "xsi:type" = "xs:NCName"],a[1]], ! [["value","xsi:type" = "xs:string"], a[2]] ); end, --- 266,271 ---- `new/XML/Element`( h, ! [["name", "xsi:type" = "xs:NCName"],lhs(a)], ! [["value","xsi:type" = "xs:string"],rhs(a)] ); end, *************** *** 282,286 **** val := `XML/ContentString`(c[2]); ! return([nam,val]); end ) --- 280,284 ---- val := `XML/ContentString`(c[2]); ! return(nam = val); end ) *************** *** 303,307 **** </xs:complexType> ", ! list([string,list(string)]), proc(a,h) local t,hh; --- 301,305 ---- </xs:complexType> ", ! list(string = string), proc(a,h) local t,hh; *************** *** 313,320 **** fi; `new/XML/Element`(hh, ! op(map2(`XML/FromMaple`,`RQP/variable`,a,"item",true))); end, proc(x) ! map2(`XML/ToMaple`,`RQP/variable`,x['NonWhiteChildren']); end, "soap-enc:Array" --- 311,318 ---- fi; `new/XML/Element`(hh, ! op(map2(`XML/FromMaple`,`RQP/input`,a,"item",true))); end, proc(x) ! map2(`XML/ToMaple`,`RQP/input`,x['NonWhiteChildren']); end, "soap-enc:Array" Index: AutoConfWin.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConfWin.mpl,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -C2 -d -r1.5.2.2 -r1.5.2.3 *** AutoConfWin.mpl 31 Mar 2005 12:37:52 -0000 1.5.2.2 --- AutoConfWin.mpl 1 Apr 2005 01:42:54 -0000 1.5.2.3 *************** *** 355,360 **** "Def" = ["C:\\Program Files","tomcat"], "Def" = ["C:\\Program Files","jakarta-tomcat"], ! cd, ! "Check" = "bin/catalina.bat" )): --- 355,359 ---- "Def" = ["C:\\Program Files","tomcat"], "Def" = ["C:\\Program Files","jakarta-tomcat"], ! cd )): Index: AutoConfWin.mws =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConfWin.mws,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -C2 -d -r1.6.2.2 -r1.6.2.3 *** AutoConfWin.mws 31 Mar 2005 12:37:52 -0000 1.6.2.2 --- AutoConfWin.mws 1 Apr 2005 01:42:55 -0000 1.6.2.3 *************** *** 17,180 **** 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 }1 1 0 0 12 12 1 0 1 0 2 2 19 1 }} ! {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 42 "Automatic Configuration \+ ! of AiM for Windows" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 102 "Copyright \+ ! (C) 2003 Neil Strickland\nDistributed without warranty under the GPL - ! see README for details" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" ! 0 "" {TEXT -1 96 "This worksheet will configure your AiM system. Mostl ! y this will be done automatically. However, " }}{PARA 0 "" 0 "" {TEXT ! -1 51 "there are three things that you should set by hand:" }}{PARA 0 ! "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 3 "+ " }{TEXT 256 ! 58 "The host name of the machine on which you are running AiM." } ! {TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 98 " For initial testing ! , you can leave this set as \"localhost\"; this will allow you to acce ! ss AiM " }}{PARA 0 "" 0 "" {TEXT -1 95 " from the server on which i ! t is running, but not from any other machine. For real teaching " }} ! {PARA 0 "" 0 "" {TEXT -1 89 " use, you need to enter the fully qual ! ified domain name of the server (something like " }}{PARA 0 "" 0 "" ! {TEXT -1 63 " \"aim.shef.ac.uk\"). This should be entered as the v ! alue of " }{TEXT 257 18 "Config['HostName']" }{TEXT -1 7 " below." }}} ! {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "Config['HostName'] := \"alic ! e.shef.ac.uk\":" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" ! 0 "" {TEXT -1 2 "+ " }{TEXT 258 53 "The address of the server that you ! use to send email." }}{PARA 0 "" 0 "" {TEXT -1 94 " This should ag ! ain be a fully qualified domain name (eg \"smtp.york.ac.uk\"). If you ! are not" }}{PARA 0 "" 0 "" {TEXT -1 95 " sure what to enter, try l ! ooking at the options used by your email client. For example, in " }} ! {PARA 0 "" 0 "" {TEXT -1 42 " Microsoft Outlook, use the menu items ! " }}{PARA 0 "" 0 "" {TEXT -1 168 " Tools > Options > Mail Delivery ! > Accounts > Mail > Properties > Servers\n and look under \"Outgoi ! ng mail (SMTP)\". You can get started with AiM without filling in" }} ! {PARA 0 "" 0 "" {TEXT -1 86 " this field, but your students will no ! t be able to get password reminders by email." }}{PARA 0 "" 0 "" ! {TEXT -1 50 " The address should be entered as the value of " } ! {TEXT 259 21 "Config['SMTPServer'] " }{TEXT -1 6 "below." }}}{EXCHG ! {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "Config['SMTPServer'] := \"mailhost. ! shef.ac.uk\":" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ! "" {TEXT -1 2 "+ " }{TEXT 260 33 "The name of the top AiM directory" } ! }{PARA 0 "" 0 "" {TEXT -1 76 " This is just the last component of th ! e name. If you installed AiM under " }}{PARA 0 "" 0 "" {TEXT -1 3 " \+ ! " }{TEXT 261 22 "C:/Tomcat/webapps/ROOT" }{TEXT -1 20 ", for example, ! then " }{TEXT 262 23 "Config['TomcatContext']" }{TEXT -1 12 " should \+ ! just" }}{PARA 0 "" 0 "" {TEXT -1 20 " be set to \"ROOT\"." }}} ! {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "Config['TomcatContext'] := \+ ! \"AiM3\":" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" ! {TEXT -1 41 "Once you have set these values, click on " }{TEXT 263 5 " ! Edit " }{TEXT -1 38 "on the Maple toolbar, then select the " }}{PARA ! 0 "" 0 "" {TEXT 264 7 "Execute" }{TEXT -1 24 " submenu, then click on \+ ! " }{TEXT 265 9 "Worksheet" }{TEXT -1 41 ". This will execute the work ! sheet, which" }}{PARA 0 "" 0 "" {TEXT -1 90 "will attempt to determine ! all other configuration information automatically. If there are" }} ! {PARA 0 "" 0 "" {TEXT -1 61 "any error messages, you should check your ! entries above. You" }}{PARA 0 "" 0 "" {TEXT -1 27 "may also need to \+ ! click the " }{TEXT 266 1 "+" }{TEXT 267 1 " " }{TEXT -1 58 "signs next ! to \"Things that should be found automatically\" " }}{PARA 0 "" 0 "" ! {TEXT -1 86 "and/or \"Additional Configuration\", which will reveal a ! number of other configuration " }}{PARA 0 "" 0 "" {TEXT -1 86 "option ! s that you may need to set manually. You can then execute the workshe ! et again, " }}{PARA 0 "" 0 "" {TEXT -1 90 "and repeat until there are \+ ! no error messages. (Some of the additional options are useful " }} ! {PARA 0 "" 0 "" {TEXT -1 86 "even if you have no errors, but you may w ! ish to ignore this possibility at your first " }}{PARA 0 "" 0 "" ! {TEXT -1 9 "attempt.)" }}{PARA 0 "" 0 "" {TEXT -1 82 "Uncomment the li ! ne below (by removing the initial # character) to get more verbose" }} ! {PARA 0 "" 0 "" {TEXT -1 41 "messages about the configuration process. ! " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "waffle := true:" }}} ! {SECT 0 {PARA 3 "" 0 "" {TEXT -1 41 "Things that should be found autom ! atically" }}{PARA 0 "" 0 "" {TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT ! -1 91 "AiM needs to use a variety of files (eg the Maple executable) a ! nd directories (eg the main " }}{PARA 0 "" 0 "" {TEXT -1 98 "directory ! for the Java Runtime Environment). Often, it can find these for itse ! lf. If it fails to" }}{PARA 0 "" 0 "" {TEXT -1 96 "do so, or if it fi ! nds the wrong versions, then you can help it by filling in some of the ! options" }}{PARA 0 "" 0 "" {TEXT -1 84 "below. If you need to change ! anything, remember to remove the comment character (#)" }}{PARA 0 "" ! 0 "" {TEXT -1 29 "at the beginning of the line." }}{PARA 0 "" 0 "" ! {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1570 "########## ! ############################################################\n# The ab ! solute path to the BLAT program, used for sending email\n# Example:\n# ! Config['BLATProgram'] := \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\b ! lat\\\\blat.exe\":\n\n################################################ ! ######################\n# The absolute path to the kill program (used \+ ! to kill processes on this OS).\n# Example:\n# Config['KillProgram'] := ! \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\Process\\\\Process.exe\": ! \n\n################################################################## ! ####\n# The top directory for the Tomcat distribution. \n# Example:\n# ! Config['CatalinaHome'] := \"C:\\\\Tomcat\":\n\n###################### ! ################################################\n# The absolute path \+ ! to the maple program. \n# Example:\nConfig['MapleProgram'] := \"C:\\\\ ! Program Files\\\\Maple 9\\\\bin.win\\\\cmaple9.exe\":\n\n############# ! #########################################################\n# The absol ! ute path to the tth program (used to convert LaTeX to HTML).\n# Exampl ! e:\n# Config['TtHProgram'] := \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin ! \\\\tth_exe\\\\tth.exe\":\n\n######################################### ! #############################\n# The top directory for the Java distri ! bution. \n# Example:\nConfig['JavaHome'] := \"C:\\\\Sun\\\\AppServer\\ ! \\jdk\":\n\n########################################################## ! ############\n# The directory where the servlet should put temporary c ! opies of uploaded\n# files. (The Maple part of the system will delete ! them or move them to\n# a more permanent home moments later.) \n# Ex ! ample:\n# Config['TempDir'] := \"C:\\\\WINDOWS\\\\Temp\":" }}}}{SECT ! 1 {PARA 3 "" 0 "" {TEXT -1 24 "Additional Configuration" }}{PARA 0 "" ! 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 85 "This section lists s ! ome additional options that you may wish to change. If you alter" }} ! {PARA 0 "" 0 "" {TEXT -1 84 "anything, remember to remove the comment \+ ! character (#) at the beginning of the line." }}{PARA 0 "" 0 "" {TEXT ! -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3767 "################ ! ######################################################\n# The number o ! f 'Recent Requests' to show on the Alice Monitor page\n# Config['Alice ! HistorySize'] := 20:\n\n############################################## ! ########################\n# The time limits placed on Maple processes \+ ! by the Alice servlet. \n# Processes which take longer than the time li ! mit are terminated.\n# The AdminTimeLimit restricts the time allowed f ! or Administrative\n# commands. The StudentTimeLimit is the restriction ! on all other \n# commands. Generally the StudentTimeLimit should be s ! horter than\n# the admisitrative time limit. Both values are integers \+ ! which specify \n# the time limit in milliseconds.\n# Config['StudentTi ! meLimit'] := 60000: # one minute\n# Config['AdminTimeLimit'] := 12000 ! 00: # twenty minutes\n\n############################################# ! #########################\n# The maximum number of maple processes tha ! t can be running at the same\n# time on this machine.\n# Config['MaxMa ! pleProcesses'] := 8:\n\n############################################## ! ########################\n# The maximum allowed size for uploaded file ! s, in bytes. The default is\n# ten megabytes.\n# Config['MaxPostSize' ! ] := 10485760:\n\n#################################################### ! ##################\n# The number of the port on which Tomcat should li ! sten. By default\n# this is 8080. For any port other than 80, the\n# \+ ! number must be included explicitly in URL's (for example, \n# http://a ! llserv.rug.ac.be:8080). \n# Config['TomcatPort'] := 8080:\n\n######### ! #############################################################\n# In pr ! inciple this allows you to choose the language in which AiM's\n# messa ! ges are presented. The required mechanisms are in place but \n# as ye ! t there are no tables of translated messages.\n# Config['Locale'] := \+ ! \"en\":\n\n########################################################### ! ###########\n# Config['ShowToolBars'] := true:\n# true if the administ ! rator's browser windows should have a full set of\n# toolbars; false i ! f they should be omitted to save space.\n\n########################### ! ###########################################\n# Config['SourceEditBoxWi ! dth'] := 100:\n# Config['SourceEditBoxHeight'] := 50:\n# This determin ! es the width of the textarea used for editing the\n# question source f ! iles\n\n############################################################## ! ########\n# Config['ImageFormat'] := \"jpg\":\n# This determines the i ! mage format used for Maple plots.\n# Possible options are gif and jpg \n\n################################################################## ! ####\n# Config['ImageWidth'] := 480:\n# Config['ImageHeight'] := 280: ! \n# This determines the image format used for Maple plots.\n# Possible ! options are gif and jpg\n\n########################################## ! ############################\n# The name of the time zone, and the num ! ber of SECONDS ahead of GMT.\n# Note that these are separate variables ! , not fields in the Config\n# table.\n#\n# The handling of summer time ! may not be correct in Europe, and is\n# certainly incorrect in the so ! uthern hemisphere. It is recommended\n# that you adjust manually for \+ ! this. \n#\n# `Date/LocalTimeZoneName` := \"GMT\":\n# `Date/LocalTim ! eZoneOffset` := 0:\n\n################################################ ! ######################\n############################################## ! ########################\n# You can change the following fields if you ! dare, but you should\n# read the source code first and probably ask f ! or advice.\n# Config['AimDir']\n# Config['LastRequestFile']\n# Config[ ! 'Locale']\n# Config['LogDir']\n# Config['MapleInitOptions']\n# Config[ ! 'MapleVersion']\n# Config['OperatingSystem']\n# Config['RootDir']\n# C ! onfig['ServletLogFile']\n# Config['DocumentURL']\n# Config['ServletURL ! ']\n# Config['WEBINFDir']\n# Config['WebAppDir']\n# Config['WebDir']\n ! " }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "read(\"AutoConfWin.mpl ! \"):" }}}}{MARK "9 8 0 0" 1206 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } ! {PAGENUMBERS 0 1 2 33 1 1 } --- 17,181 ---- 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 }1 1 0 0 12 12 1 0 1 0 2 2 19 1 }} ! {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG ! {PARA 256 "" 0 "" {TEXT -1 42 "Automatic Configuration of AiM for Wind ! ows" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 102 "Copyright (C) 2003 Neil S ! trickland\nDistributed without warranty under the GPL - see README for ! details" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 ! 96 "This worksheet will configure your AiM system. Mostly this will be ! done automatically. However, " }}{PARA 0 "" 0 "" {TEXT -1 51 "there a ! re three things that you should set by hand:" }}{PARA 0 "" 0 "" {TEXT ! -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 3 "+ " }{TEXT 256 58 "The host nam ! e of the machine on which you are running AiM." }{TEXT -1 2 " " }} ! {PARA 0 "" 0 "" {TEXT -1 98 " For initial testing, you can leave th ! is set as \"localhost\"; this will allow you to access AiM " }}{PARA ! 0 "" 0 "" {TEXT -1 95 " from the server on which it is running, but ! not from any other machine. For real teaching " }}{PARA 0 "" 0 "" ! {TEXT -1 89 " use, you need to enter the fully qualified domain nam ! e of the server (something like " }}{PARA 0 "" 0 "" {TEXT -1 63 " \+ ! \"aim.shef.ac.uk\"). This should be entered as the value of " }{TEXT ! 257 18 "Config['HostName']" }{TEXT -1 7 " below." }}}{EXCHG {PARA 0 "> ! " 0 "" {MPLTEXT 1 0 34 "Config['HostName'] := \"localhost\":" }}} ! {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 2 "+ \+ ! " }{TEXT 258 53 "The address of the server that you use to send email. ! " }}{PARA 0 "" 0 "" {TEXT -1 94 " This should again be a fully qual ! ified domain name (eg \"smtp.york.ac.uk\"). If you are not" }}{PARA ! 0 "" 0 "" {TEXT -1 95 " sure what to enter, try looking at the opti ! ons used by your email client. For example, in " }}{PARA 0 "" 0 "" ! {TEXT -1 42 " Microsoft Outlook, use the menu items " }}{PARA 0 "" ! 0 "" {TEXT -1 168 " Tools > Options > Mail Delivery > Accounts > Ma ! il > Properties > Servers\n and look under \"Outgoing mail (SMTP)\" ! . You can get started with AiM without filling in" }}{PARA 0 "" 0 "" ! {TEXT -1 86 " this field, but your students will not be able to get ! password reminders by email." }}{PARA 0 "" 0 "" {TEXT -1 50 " The \+ ! address should be entered as the value of " }{TEXT 259 21 "Config['SMT ! PServer'] " }{TEXT -1 6 "below." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT ! 1 0 46 "Config['SMTPServer'] := \"mailhost.shef.ac.uk\":" }}}{EXCHG ! {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 2 "+ " } ! {TEXT 260 33 "The name of the top AiM directory" }}{PARA 0 "" 0 "" ! {TEXT -1 76 " This is just the last component of the name. If you i ! nstalled AiM under " }}{PARA 0 "" 0 "" {TEXT -1 3 " " }{TEXT 261 22 ! "C:/Tomcat/webapps/ROOT" }{TEXT -1 20 ", for example, then " }{TEXT ! 262 23 "Config['TomcatContext']" }{TEXT -1 12 " should just" }}{PARA ! 0 "" 0 "" {TEXT -1 20 " be set to \"ROOT\"." }}}{EXCHG {PARA 0 "> " ! 0 "" {MPLTEXT 1 0 33 "Config['TomcatContext'] := \"AIM\":" }}}{EXCHG ! {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "Once you \+ ! have set these values, click on " }{TEXT 263 5 "Edit " }{TEXT -1 38 "o ! n the Maple toolbar, then select the " }}{PARA 0 "" 0 "" {TEXT 264 7 " ! Execute" }{TEXT -1 24 " submenu, then click on " }{TEXT 265 9 "Workshe ! et" }{TEXT -1 41 ". This will execute the worksheet, which" }}{PARA ! 0 "" 0 "" {TEXT -1 90 "will attempt to determine all other configurati ! on information automatically. If there are" }}{PARA 0 "" 0 "" {TEXT ! -1 61 "any error messages, you should check your entries above. You" ! }}{PARA 0 "" 0 "" {TEXT -1 27 "may also need to click the " }{TEXT ! 266 1 "+" }{TEXT 267 1 " " }{TEXT -1 58 "signs next to \"Things that s ! hould be found automatically\" " }}{PARA 0 "" 0 "" {TEXT -1 86 "and/or ! \"Additional Configuration\", which will reveal a number of other co ! nfiguration " }}{PARA 0 "" 0 "" {TEXT -1 86 "options that you may need ! to set manually. You can then execute the worksheet again, " }} ! {PARA 0 "" 0 "" {TEXT -1 90 "and repeat until there are no error messa ! ges. (Some of the additional options are useful " }}{PARA 0 "" 0 "" ! {TEXT -1 86 "even if you have no errors, but you may wish to ignore th ! is possibility at your first " }}{PARA 0 "" 0 "" {TEXT -1 9 "attempt.) ! " }}{PARA 0 "" 0 "" {TEXT -1 82 "Uncomment the line below (by removing ! the initial # character) to get more verbose" }}{PARA 0 "" 0 "" ! {TEXT -1 41 "messages about the configuration process." }}}{EXCHG ! {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "waffle := false:" }}}{SECT 0 {PARA ! 3 "" 0 "" {TEXT -1 41 "Things that should be found automatically" }} ! {PARA 0 "" 0 "" {TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 91 "AiM nee ! ds to use a variety of files (eg the Maple executable) and directories ! (eg the main " }}{PARA 0 "" 0 "" {TEXT -1 98 "directory for the Java \+ ! Runtime Environment). Often, it can find these for itself. If it fai ! ls to" }}{PARA 0 "" 0 "" {TEXT -1 96 "do so, or if it finds the wrong \+ ! versions, then you can help it by filling in some of the options" }} ! {PARA 0 "" 0 "" {TEXT -1 84 "below. If you need to change anything, r ! emember to remove the comment character (#)" }}{PARA 0 "" 0 "" {TEXT ! -1 29 "at the beginning of the line." }}{PARA 0 "" 0 "" {TEXT -1 0 "" ! }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1570 "######################## ! ##############################################\n# The absolute path to ! the BLAT program, used for sending email\n# Example:\n# Config['BLATP ! rogram'] := \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\blat\\\\blat.ex ! e\":\n\n############################################################## ! ########\n# The absolute path to the kill program (used to kill proces ! ses on this OS).\n# Example:\n# Config['KillProgram'] := \"C:\\\\Tomca ! t\\\\webapps\\\\AiM\\\\bin\\\\Process\\\\Process.exe\":\n\n########### ! ###########################################################\n# The top ! directory for the Tomcat distribution. \n# Example:\n# Config['Catali ! naHome'] := \"C:\\\\Tomcat\":\n\n##################################### ! #################################\n# The absolute path to the maple pr ! ogram. \n# Example:\nConfig['MapleProgram'] := \"C:\\\\Program Files\\ ! \\Maple 9\\\\bin.win\\\\cmaple9.exe\":\n\n############################ ! ##########################################\n# The absolute path to the ! tth program (used to convert LaTeX to HTML).\n# Example:\n# Config['T ! tHProgram'] := \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\tth_exe\\\\t ! th.exe\":\n\n######################################################### ! #############\n# The top directory for the Java distribution. \n# Exam ! ple:\nConfig['JavaHome'] := \"C:\\\\Sun\\\\AppServer\\\\jdk\":\n\n#### ! ##################################################################\n# \+ ! The directory where the servlet should put temporary copies of uploade ! d\n# files. (The Maple part of the system will delete them or move th ! em to\n# a more permanent home moments later.) \n# Example:\n# Config ! ['TempDir'] := \"C:\\\\WINDOWS\\\\Temp\":" }}}}{SECT 1 {PARA 3 "" 0 " ! " {TEXT -1 24 "Additional Configuration" }}{PARA 0 "" 0 "" {TEXT -1 0 ! "" }}{PARA 0 "" 0 "" {TEXT -1 85 "This section lists some additional o ! ptions that you may wish to change. If you alter" }}{PARA 0 "" 0 "" ! {TEXT -1 84 "anything, remember to remove the comment character (#) at ! the beginning of the line." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG ! {PARA 0 "> " 0 "" {MPLTEXT 1 0 3767 "################################# ! #####################################\n# The number of 'Recent Request ! s' to show on the Alice Monitor page\n# Config['AliceHistorySize'] := \+ ! 20:\n\n############################################################### ! #######\n# The time limits placed on Maple processes by the Alice serv ! let. \n# Processes which take longer than the time limit are terminate ! d.\n# The AdminTimeLimit restricts the time allowed for Administrative ! \n# commands. The StudentTimeLimit is the restriction on all other \n# ! commands. Generally the StudentTimeLimit should be shorter than\n# th ! e admisitrative time limit. Both values are integers which specify \n# ! the time limit in milliseconds.\n# Config['StudentTimeLimit'] := 6000 ! 0: # one minute\n# Config['AdminTimeLimit'] := 1200000: # twenty min ! utes\n\n############################################################## ! ########\n# The maximum number of maple processes that can be running \+ ! at the same\n# time on this machine.\n# Config['MaxMapleProcesses'] := ! 8:\n\n############################################################### ! #######\n# The maximum allowed size for uploaded files, in bytes. The ! default is\n# ten megabytes.\n# Config['MaxPostSize'] := 10485760:\n ! \n#################################################################### ! ##\n# The number of the port on which Tomcat should listen. By defaul ! t\n# this is 8080. For any port other than 80, the\n# number must be i ! ncluded explicitly in URL's (for example, \n# http://allserv.rug.ac.be ! :8080). \n# Config['TomcatPort'] := 8080:\n\n######################### ! #############################################\n# In principle this all ! ows you to choose the language in which AiM's\n# messages are presente ! d. The required mechanisms are in place but \n# as yet there are no t ! ables of translated messages.\n# Config['Locale'] := \"en\":\n\n###### ! ################################################################\n# Co ! nfig['ShowToolBars'] := true:\n# true if the administrator's browser w ! indows should have a full set of\n# toolbars; false if they should be \+ ! omitted to save space.\n\n############################################ ! ##########################\n# Config['SourceEditBoxWidth'] := 100:\n# \+ ! Config['SourceEditBoxHeight'] := 50:\n# This determines the width of t ! he textarea used for editing the\n# question source files\n\n######### ! #############################################################\n# Confi ! g['ImageFormat'] := \"jpg\":\n# This determines the image format used \+ ! for Maple plots.\n# Possible options are gif and jpg\n\n############## ! ########################################################\n# Config['Im ! ageWidth'] := 480:\n# Config['ImageHeight'] := 280:\n# This determines ! the image format used for Maple plots.\n# Possible options are gif an ! d jpg\n\n############################################################# ! #########\n# The name of the time zone, and the number of SECONDS ahea ! d of GMT.\n# Note that these are separate variables, not fields in the ! Config\n# table.\n#\n# The handling of summer time may not be correct ! in Europe, and is\n# certainly incorrect in the southern hemisphere. \+ ! It is recommended\n# that you adjust manually for this. \n#\n# `Date ! /LocalTimeZoneName` := \"GMT\":\n# `Date/LocalTimeZoneOffset` := 0: \n\n################################################################## ! ####\n################################################################ ! ######\n# You can change the following fields if you dare, but you sho ! uld\n# read the source code first and probably ask for advice.\n# Conf ! ig['AimDir']\n# Config['LastRequestFile']\n# Config['Locale']\n# Confi ! g['LogDir']\n# Config['MapleInitOptions']\n# Config['MapleVersion']\n# ! Config['OperatingSystem']\n# Config['RootDir']\n# Config['ServletLogF ! ile']\n# Config['DocumentURL']\n# Config['ServletURL']\n# Config['WEBI ! NFDir']\n# Config['WebAppDir']\n# Config['WebDir']\n" }}}}{EXCHG ! {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "read(\"AutoConfWin.mpl\"):" }}}} ! {MARK "0 0 0" 8 }{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-01 01:43:07
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5478/WEB-INF/maple/aim Modified Files: Tag: aim-xml MultiQuestion.mpl Question.mpl SOAP.mpl Log Message: Index: MultiQuestion.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/MultiQuestion.mpl,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** MultiQuestion.mpl 17 Sep 2004 14:02:05 -0000 1.7 --- MultiQuestion.mpl 1 Apr 2005 01:42:55 -0000 1.7.2.1 *************** *** 251,254 **** --- 251,262 ---- ], + ['Method','RightRawAnswerList'::list(string=string), + "", + proc(this) + [map((q) -> op(q['RightRawAnswerList']), + this['TopSubQuestions'])] + end + ], + ['Method','Initialize'::'void', "Initialize the question version. This basically just invokes the Index: Question.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Question.mpl,v retrieving revision 1.13.2.2 retrieving revision 1.13.2.3 diff -C2 -d -r1.13.2.2 -r1.13.2.3 *** Question.mpl 31 Mar 2005 12:37:54 -0000 1.13.2.2 --- Question.mpl 1 Apr 2005 01:42:55 -0000 1.13.2.3 *************** *** 252,258 **** if partlabel = "" then ! RETURN(eval(this)) else ! ERROR(sprintf(__("Question %s%s has no parts."),this['FullName'])); fi; end --- 252,258 ---- if partlabel = "" then [...1075 lines suppressed...] --- 3605,3609 ---- recordsdir := cat(dir,"/records"); if not(`OS/FileExists`(recordsdir)) then ! error(__("No records directory")); fi; *************** *** 3606,3610 **** analysis['Save']; ! RETURN(eval(analysis)); end ): --- 3625,3629 ---- analysis['Save']; ! return(eval(analysis)); end ): Index: SOAP.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Attic/SOAP.mpl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** SOAP.mpl 31 Mar 2005 14:50:01 -0000 1.1.2.1 --- SOAP.mpl 1 Apr 2005 01:42:55 -0000 1.1.2.2 *************** *** 23,85 **** ): - `Class/Declare`( - `aim/RQP/ItemCache/Entry`, - "", - ['Field','Content'], - ['Field','LastAccessTime'::`Date/RawDate` = 0], - ['Constructor', - "", - proc(this,x_,date_::`Date/RawDate`) - if nargs > 1 then - this['Content'] := eval(x_); - if nargs > 2 then - this['LastAccessTime'] := date_; - else - this['LastAccessTime'] := `Date/CurrentRawDate`(); - fi; - fi; - end - ] - ): - - `Class/Declare`( - `aim/RQP/ItemCache`, - "", - ['Constructor', - "", - proc(this) - this['Entries'] := table([]); - end - ], - - ['Field','Entries'::table], - - ['Method','GetEntry', - "", - proc(this,guid::string,seed_::integer) - local i,x,e; - e := eval(this['Entries']); - i := args[2..-1]; - if assigned(e[i]) then - x := e[i]; - x['LastAccessTime'] := `Date/CurrentRawDate`(); - return(eval(x['Content'])); - else - return(NULL); - fi; - end - ], - - ['Method','AddEntry'::'void', - "", - proc(this,x,guid::string,seed_::integer) - local i,a; - this['Entries'][args[3..-1]] := - eval(`new/aim/RQP/ItemCache/Entry`(x)); - NULL; - end - ] - ): - `aim/RPC/Service`['AddOperation', `aim/RPC/Hello`, --- 23,26 ---- *************** *** 115,140 **** ['OutputMessageName',"ServerInformationResponse"], ! ['Output',"description"::`XML/string` = "AiM server. See http://www.aiminfo.net"], ['Output',"cloning"::`XML/boolean` = false], ['Output',"implicitCloning"::`XML/boolean` = true], ['Output',"rendering"::`XML/boolean` = true], ! ['Output',"templateCaching"::`XML/boolean` = false], ! ['Output',"itemCaching"::`XML/boolean` = true], ! ['Output',"inputFormats"::`RQP/ArrayOfanyURI` = ! ["http://formats.aiminfo.net/aim"]], ! ['Output',"outputFormats"::`RQP/ArrayOfoutputFormat` = ! [ ! ["http://rqp.org/content-types/text", ! ["http://rqp.org/content-types/text/xhtml-1.0"]], ! ["http://rqp.org/content-types/image", ! ["http://rqp.org/content-types/image/gif"]], ! ["http://rqp.org/content-types/graph", ! ["http://rqp.org/content-types/graph/gif"]] ! ] ! ], - ['Output',"outputTemplates"::`RQP/ArrayOfanyURI` = []], - ['Process', proc(inp,out) --- 56,74 ---- ['OutputMessageName',"ServerInformationResponse"], ! ['Output',"identifier"::`XML/anyURI` = ! "http://www.aiminfo.net/aimid#20050330"], ! ['Output',"name"::`XML/string` = "AiM"], ! ['Output',"description"::`XML/string` = "AiM server. See http://www.aiminfo.net"], ['Output',"cloning"::`XML/boolean` = false], ['Output',"implicitCloning"::`XML/boolean` = true], ['Output',"rendering"::`XML/boolean` = true], ! ['Output',"itemFormats"::`RQP/ArrayOfanyURI` = ! ["http://www.aiminfo.net/itemFormats/aimsource", ! "http://www.aiminfo.net/itemFormats/location" ! ]], ! ['Output',"renderFormats"::`RQP/ArrayOfanyURI` = ! ["http://rqp.org/formats/xhtml-1.0-web"]], ['Process', proc(inp,out) *************** *** 150,169 **** ['OutputMessageName',"ItemInformationResponse"], - ['Input',"guid"::`RQP/guid`], ['Input',"source"::`XML/string`], ['Input',"format"::`XML/anyURI`], ! ['Input',"cache"::`XML/boolean`], - ['Output',"warnings"::`RQP/ArrayOfwarning`=[]], - ['Output',"sourceCached"::`XML/boolean` = true], ['Output',"format"::`XML/anyURI`=""], ['Output',"sourceErrors"::`RQP/ArrayOferror`=[]], ! ['Output',"template"::`XML/boolean` = false], ['Output',"adaptive"::`XML/boolean` = true], ['Output',"timeDependent"::`XML/boolean` = false], ['Output',"canComputerScore"::`XML/boolean` = true], ['Output',"solutionAvailable"::`XML/boolean` = true], ! ['Output',"hintsAvailable"::`XML/boolean` = false], ['Output',"maxScore"::`XML/unsignedInt` = 100], ['Process', --- 84,102 ---- ['OutputMessageName',"ItemInformationResponse"], ['Input',"source"::`XML/string`], ['Input',"format"::`XML/anyURI`], ! ['Input',"index"::`XML/unsignedInt` = 0], ['Output',"format"::`XML/anyURI`=""], ['Output',"sourceErrors"::`RQP/ArrayOferror`=[]], ! ['Output',"template"::`XML/boolean` = true], ['Output',"adaptive"::`XML/boolean` = true], ['Output',"timeDependent"::`XML/boolean` = false], ['Output',"canComputerScore"::`XML/boolean` = true], ['Output',"solutionAvailable"::`XML/boolean` = true], ! ['Output',"hintAvailable"::`XML/boolean` = false], ! ['Output',"validationPossible"::`XML/boolean` = true], ['Output',"maxScore"::`XML/unsignedInt` = 100], + ['Output',"length"::`XML/unsignedInt` = 1], ['Process', *************** *** 189,192 **** --- 122,178 ---- `aim/RPC/Service`['AddOperation', + `aim/RPC/ProcessTemplate`, + "", + ['Name',"RQP_ProcessTemplate"], + ['InputMessageName',"ProcessTemplate"], + ['OutputMessageName',"ProcessTemplateResponse"], + + ['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 + ] + ]: + + `aim/RPC/Service`['AddOperation', + `aim/RPC/SessionInformation`, + "", + ['Name',"RQP_SessionInformation"], + ['InputMessageName',"SessionInformation"], + ['OutputMessageName',"SessionInformationResponse"], + + ['Input',"source"::`XML/string`], + ['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` = []], + + ['Process', + proc(inp,out) + 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 + ] + ]: + + + `aim/RPC/Service`['AddOperation', `aim/RPC/Render`, "", *************** *** 195,255 **** ['OutputMessageName',"RenderResponse"], - ['Input',"guid"::`RQP/guid`], ['Input',"source"::`XML/string`], ['Input',"format"::`XML/anyURI`], ! ['Input',"cache"::`XML/boolean`], ! ['Input',"seed"::`XML/unsignedInt`], ['Input',"templateVars"::`RQP/ArrayOfvariable`], ! ['Input',"persistentData"::`XML/string`], ! ['Input',"inputData"::`XML/string`], ['Input',"embedPrefix"::`XML/QName`], - ['Input',"state"::`XML/anyURI`], - ['Input',"interactive"::`XML/boolean`], - ['Input',"renderFormatTemplate"::`XML/anyURI`], - ['Input',"renderFormat"::`RQP/ArrayOfoutputFormat`], - ['Input',"modalFormatTemplate"::`XML/anyURI`], - ['Input',"modalFormat"::`RQP/ArrayOfoutputFormat`], ['Input',"appletBase"::`XML/anyURI`], ['Input',"mediaBase"::`XML/anyURI`], - ['Output',"warnings"::`RQP/ArrayOfwarning` = []], - ['Output',"sourceCached"::`XML/boolean` = true], ['Output',"seed"::`XML/unsignedInt` = 0], ['Output',"templateVars"::`RQP/ArrayOfvariable` = []], ! ['Output',"persistentData"::`XML/string` = ""], ['Output',"outcomeVars"::`RQP/ArrayOfvariable` = []], ! ['Output',"bodyParts"::`RQP/ArrayOfoutputSection` = []], ! ['Output',"modalParts"::`RQP/ArrayOfoutputSection` = []], ['Process', proc(inp,out) ! local cache,vrsion,inputdata,label,history,historytable,pdata, ! context,inst,attempt; ! cache := evalb(inp["cache"] = true); ! vrsion := eval(`aim/SOAP/GetItemVersion`(inp,cache)); ! vrsion['CGIPrefix'] := inp["embedPrefix"]; ! inputdata := ! `Util/HTTPPostParse`(inp["inputData"],inp["embedPrefix"]); ! pdata := inp["persistentData"]; ! if pdata = "" or pdata = NULL then history := `new/aim/Question/History`(vrsion); - else - try - history := sscanf(pdata,"%m")[1]; - catch: - error(__("Cannot parse persistent data.")); - end try; - if not(type([history],[`aim/Question/History`])) then - error(__("Cannot parse persistent data.")); - fi; fi; historytable := table([vrsion['Label'] = eval(history)]); context := `aim/SOAP/MakeQuizContext`( ! inp["interactive"], ! evalb(inputdata["MarkRequested"] <> "false"), true, # show feedback true, # show marks --- 181,229 ---- ['OutputMessageName',"RenderResponse"], ['Input',"source"::`XML/string`], ['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`], + ['Input',"renderFormat"::`XML/anyURI`], + ['Input',"modalFormat"::`XML/anyURI`], ['Output',"seed"::`XML/unsignedInt` = 0], ['Output',"templateVars"::`RQP/ArrayOfvariable` = []], ! ['Output',"persistentData"::`XML/MapleExpression` = ""], ['Output',"outcomeVars"::`RQP/ArrayOfvariable` = []], ! ['Output',"output"::`RQP/ArrayOfoutput` = []], ['Process', proc(inp,out) ! local vrsion,responses,history,historytable,context, ! attempt,inst,t; ! vrsion := eval(`aim/SOAP/GetItemVersion`(inp)); ! vrsion['CGIPrefix'] := ! cat(inp["embedPrefix"],"RawAnswer"); ! responses := table(inp["responses"]); ! ! history := eval(inp["persistentData"]); ! if history = "" or history = NULL then history := `new/aim/Question/History`(vrsion); fi; + if not(type([history],[`aim/Question/History`])) then + error(__("Cannot parse persistent data.")); + fi; + historytable := table([vrsion['Label'] = eval(history)]); context := `aim/SOAP/MakeQuizContext`( ! true, # invite answers ! inp["advanceState"], # marking requested true, # show feedback true, # show marks *************** *** 259,274 **** inst := `aim/Question/MakeInstance/Recursive`( ! vrsion,inputdata,historytable,context); attempt := inst['Attempt']; out["seed"] := vrsion['Seed']; ! out["persistentData"] := sprintf("%m",eval(history)); ! out["outcomeVars"] := ! [["SCORE", [sprintf("%d",round(100*history['Mark']))]], ! ["RAW_SCORE", [sprintf("%d",round(100*attempt['RawMark']))]], ! ["IsValid", [sprintf("%A",attempt['IsValid'])]], ! ["ValidationNote", [attempt['ValidationNote']]], ! ["AnswerNote", [attempt['AnswerNote']]]]; ! out["bodyParts"] := inst['ShowParts',context]; NULL; end --- 233,256 ---- inst := `aim/Question/MakeInstance/Recursive`( ! vrsion,responses,historytable,context); attempt := inst['Attempt']; out["seed"] := vrsion['Seed']; ! out["persistentData"] := eval(history); ! t := [ ! "completion" = history['CompletionStatus'], ! "grade" = sprintf("%A",history['Mark']), ! "rawScore" = sprintf("%A",history['RawMark']), ! "valid" = sprintf("%A",attempt['IsValid']), ! "validation" = "true", ! "hint" = "false", ! "solution" = "true" ! ]; ! t := ! map((x) -> ! cat("http://rqp.org/outcomes/",lhs(x)) = [rhs(x)], ! t); ! out["outcomeVars"] := eval(t); ! out["outputs"] := inst['ShowParts',context]; NULL; end *************** *** 279,337 **** `aim/SOAP/GetItem`, "", ! proc(inp::table,cache_::boolean) ! local cache,itemGUID,itemFormat,itemSource,item,vrsion,bits,subj,quiz; ! global AimRQPCache; ! ! cache := `if`(nargs > 1,cache_,true); - itemGUID := inp["guid"]; itemFormat := inp["format"]; itemSource := inp["source"]; ! if itemGUID <> "" then ! item := AimRQPCache['GetEntry',itemGUID]; ! if item <> NULL then ! return(eval(item)); ! fi; ! ###TODO: in production mode, remove or protect the following: ! if `Util/StartsWith`(itemGUID,"AIMFILE") then ! try ! bits := [`Util/ColonSplit`(itemGUID)]; ! subj := eval(DefaultZone['GetSubject',bits[2]]); ! quiz := eval(subj['GetQuiz',bits[3]]); ! item := eval(quiz['GetQuestion',bits[4]]); ! if not(type([item],[`aim/Question`])) then ! error( ! "SOAP Fault", ! "Client", ! cat("RQP Error: ",__("Malformed question")), ! "http://rqp.org/errors/itemNotCached"); ! fi; ! catch: ! error( ! "SOAP Fault:", ! "Client", ! cat("RQP Error: ",__("Could not load specified question")), ! "http://rqp.org/errors/invalidSource"); ! end try; ! if not(type([item],[`aim/Question`])) then ! error( ! "SOAP Fault:", ! "Client", ! cat("RQP Error: ",__("Could not load specified question")), ! "http://rqp.org/errors/invalidSource"); ! fi; ! return(eval(item)); ! fi; ! fi; ! ! if itemGUID = "" then ! itemGUID := `Util/MakeGUID`(); ! fi; ! ! if `Util/StripEndSpaces`(itemSource) = "" then ! error(__("Item is not in the cache, and no source provided")); ! fi; ! if itemFormat = "http://aiminfo.net/formats/location" then try bits := [`Util/ColonSplit`(itemSource)]; --- 261,271 ---- `aim/SOAP/GetItem`, "", ! proc(inp::table) ! local itemFormat,itemSource,item,vrsion,bits,subj,quiz; itemFormat := inp["format"]; itemSource := inp["source"]; ! if itemFormat = "http://aiminfo.net/itemFormats/location" then try bits := [`Util/ColonSplit`(itemSource)]; *************** *** 366,376 **** error("Compilation failure: %0",item) fi; - item['ItemGUID'] := itemGUID; fi; - - if cache then - AimRQPCache['AddEntry',eval(item),itemGUID]; - fi; - return(eval(item)); end --- 300,304 ---- *************** *** 380,424 **** `aim/SOAP/GetItemVersion`, "", ! proc(inp::table,cache_::boolean) ! local cache,itemGUID,versionSeed,question,vrsion; ! global AimRQPCache; ! ! cache := `if`(nargs > 1,cache_,true); ! itemGUID := inp["guid"]; ! versionSeed := inp["seed"]; ! if not(type([versionSeed],[integer])) then ! versionSeed := 1; ! fi; ! if versionSeed = 0 then ! versionSeed := rand(); fi; ! vrsion := AimRQPCache['GetEntry',itemGUID,versionSeed]; ! ! if vrsion <> NULL then ! return(eval(vrsion)); ! else ! question := `aim/SOAP/GetItem`(inp); ! vrsion := question['MakeVersion',versionSeed]; ! ! if not(type([vrsion],[`aim/Question/Version`])) then ! error( ! "SOAP Fault:", ! "Client", ! cat("RQP Error: ",__("Could not make version of question")), ! "http://rqp.org/errors/templateProcessingFailed"); ! fi; ! ! if cache then ! AimRQPCache['AddEntry', ! eval(vrsion),itemGUID,versionSeed]; ! fi; ! ! return(eval(vrsion)); ! fi; end ): `Package/Assign`( `aim/SOAP/MakeQuizContext`::`aim/Quiz/Context`, --- 308,326 ---- `aim/SOAP/GetItemVersion`, "", ! 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; ! return(item['MakeVersion',seed]); end ): + `Package/Assign`( `aim/SOAP/MakeQuizContext`::`aim/Quiz/Context`, *************** *** 441,484 **** - # `RPC/DeclareOperation`( - # `aim/RPC/ProcessTemplate`, - # "", - # ['Name',"RQP_ProcessTemplate"], - # ['InputMessageName',"ProcessTemplate"], - # ['OutputMessageName',"ProcessTemplateResponse"], - # - # - # ['Input',"guid"::`RQP/guid`], - # ['Input',"source"::`XML/string`], - # ['Input',"format"::`XML/anyURI`], - # ['Input',"cache"::`XML/boolean`], - # ['Input',"seed"::`XML/unsignedInt`], - # - # ['Output',"warnings"::`RQP/ArrayOfwarning`], - # ['Output',"sourceCached"::`XML/boolean` = true], - # ['Output',"cloneCached"::`XML/boolean` = true], - # ['Output',"seed"::`XML/unsignedInt`=0], - # ['Output',"templateVars"::`RQP/ArrayOfvariable`] - # ): - # - # `RPC/DeclareOperation`( - # `aim/RPC/Clone`, - # "", - # ['Name',"Clone"], - # - # ['Input',"guid"::`RQP/guid`], - # ['Input',"source"::`XML/string`], - # ['Input',"format"::`XML/anyURI`], - # ['Input',"cache"::`XML/boolean`], - # ['Input',"seed"::`XML/unsignedInt`], - # ['Input',"templateVars"::`RQP/ArrayOfvariable`], - # - # ['Output',"warnings"::`RQP/ArrayOfwarning`], - # ['Output',"sourceCached"::`XML/boolean` = true], - # ['Output',"cloneCached"::`XML/boolean` = true], - # ['Output',"seed"::`XML/unsignedInt`], - # ['Output',"templateVars"::`RQP/ArrayOfvariable`], - # ['Output',"clone"::`XML/string`=""] - # ): `RPC/DeclareOperation`( --- 343,346 ---- |
From: Neil S. <nps...@us...> - 2005-03-31 14:50:13
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27982/maple/aim Added Files: Tag: aim-xml SOAP.mpl Log Message: --- NEW FILE: SOAP.mpl --- # Copyright (C) 2004 Neil Strickland # Distributed without warranty under the GPL - see README for details read("Package.mpl"): Package("aim/SOAP"," This package defines functions that handle various SOAP requests "): `Package/Assign`( `aim/RPC/CommandNamespace`, "", "http://aim.shef.ac.uk/AiMInfo" ): `Package/Assign`( `aim/RPC/Service`, "", `new/RPC/Service`( `aim/RPC/CommandNamespace`, "http://schemas.rqp.org/rqp" ) ): `Class/Declare`( `aim/RQP/ItemCache/Entry`, "", ['Field','Content'], ['Field','LastAccessTime'::`Date/RawDate` = 0], ['Constructor', "", proc(this,x_,date_::`Date/RawDate`) if nargs > 1 then this['Content'] := eval(x_); if nargs > 2 then this['LastAccessTime'] := date_; else this['LastAccessTime'] := `Date/CurrentRawDate`(); fi; fi; end ] ): `Class/Declare`( `aim/RQP/ItemCache`, "", ['Constructor', "", proc(this) this['Entries'] := table([]); end ], ['Field','Entries'::table], ['Method','GetEntry', "", proc(this,guid::string,seed_::integer) local i,x,e; e := eval(this['Entries']); i := args[2..-1]; if assigned(e[i]) then x := e[i]; x['LastAccessTime'] := `Date/CurrentRawDate`(); return(eval(x['Content'])); else return(NULL); fi; end ], ['Method','AddEntry'::'void', "", proc(this,x,guid::string,seed_::integer) local i,a; this['Entries'][args[3..-1]] := eval(`new/aim/RQP/ItemCache/Entry`(x)); NULL; end ] ): `aim/RPC/Service`['AddOperation', `aim/RPC/Hello`, "", ['Name',"Hello"], ['Output',"hello"::`XML/string`], ['Process', proc(inp,out) out["hello"] := "Hello, this is the AiM server"; end ] ]: `aim/RPC/Service`['AddOperation', `aim/RPC/Echo`, "", ['Name',"Echo"], ['Input',"echo"::`XML/string` = "Hello"], ['Output',"echo"::`XML/string`], ['Process', proc(inp,out) out["echo"] := inp["echo"]; end ] ]: `aim/RPC/Service`['AddOperation', `aim/RPC/ServerInformation`, "", ['Name',"RQP_ServerInformation"], ['InputMessageName',"ServerInformation"], ['OutputMessageName',"ServerInformationResponse"], ['Output',"description"::`XML/string` = "AiM server. See http://www.aiminfo.net"], ['Output',"cloning"::`XML/boolean` = false], ['Output',"implicitCloning"::`XML/boolean` = true], ['Output',"rendering"::`XML/boolean` = true], ['Output',"templateCaching"::`XML/boolean` = false], ['Output',"itemCaching"::`XML/boolean` = true], ['Output',"inputFormats"::`RQP/ArrayOfanyURI` = ["http://formats.aiminfo.net/aim"]], ['Output',"outputFormats"::`RQP/ArrayOfoutputFormat` = [ ["http://rqp.org/content-types/text", ["http://rqp.org/content-types/text/xhtml-1.0"]], ["http://rqp.org/content-types/image", ["http://rqp.org/content-types/image/gif"]], ["http://rqp.org/content-types/graph", ["http://rqp.org/content-types/graph/gif"]] ] ], ['Output',"outputTemplates"::`RQP/ArrayOfanyURI` = []], ['Process', proc(inp,out) end ] ]: `aim/RPC/Service`['AddOperation', `aim/RPC/ItemInformation`, "", ['Name',"RQP_ItemInformation"], ['InputMessageName',"ItemInformation"], ['OutputMessageName',"ItemInformationResponse"], ['Input',"guid"::`RQP/guid`], ['Input',"source"::`XML/string`], ['Input',"format"::`XML/anyURI`], ['Input',"cache"::`XML/boolean`], ['Output',"warnings"::`RQP/ArrayOfwarning`=[]], ['Output',"sourceCached"::`XML/boolean` = true], ['Output',"format"::`XML/anyURI`=""], ['Output',"sourceErrors"::`RQP/ArrayOferror`=[]], ['Output',"template"::`XML/boolean` = false], ['Output',"adaptive"::`XML/boolean` = true], ['Output',"timeDependent"::`XML/boolean` = false], ['Output',"canComputerScore"::`XML/boolean` = true], ['Output',"solutionAvailable"::`XML/boolean` = true], ['Output',"hintsAvailable"::`XML/boolean` = false], ['Output',"maxScore"::`XML/unsignedInt` = 100], ['Process', proc(inp,out) local item,errs; try item := `aim/SOAP/GetItem`(inp); catch "Compilation failure": errs := lastexception[3]; out["sourceCached"] := false; out["sourceErrors"] := [["http://errors.aiminfo.net/CompilationFailed", __("Compilation failed"), sprintf("%A",errs)]]; return(); end try; out["format"] := inp["format"]; out["maxScore"] := round(100 * item['Value']); return(); end ] ]: `aim/RPC/Service`['AddOperation', `aim/RPC/Render`, "", ['Name',"RQP_Render"], ['InputMessageName',"Render"], ['OutputMessageName',"RenderResponse"], ['Input',"guid"::`RQP/guid`], ['Input',"source"::`XML/string`], ['Input',"format"::`XML/anyURI`], ['Input',"cache"::`XML/boolean`], ['Input',"seed"::`XML/unsignedInt`], ['Input',"templateVars"::`RQP/ArrayOfvariable`], ['Input',"persistentData"::`XML/string`], ['Input',"inputData"::`XML/string`], ['Input',"embedPrefix"::`XML/QName`], ['Input',"state"::`XML/anyURI`], ['Input',"interactive"::`XML/boolean`], ['Input',"renderFormatTemplate"::`XML/anyURI`], ['Input',"renderFormat"::`RQP/ArrayOfoutputFormat`], ['Input',"modalFormatTemplate"::`XML/anyURI`], ['Input',"modalFormat"::`RQP/ArrayOfoutputFormat`], ['Input',"appletBase"::`XML/anyURI`], ['Input',"mediaBase"::`XML/anyURI`], ['Output',"warnings"::`RQP/ArrayOfwarning` = []], ['Output',"sourceCached"::`XML/boolean` = true], ['Output',"seed"::`XML/unsignedInt` = 0], ['Output',"templateVars"::`RQP/ArrayOfvariable` = []], ['Output',"persistentData"::`XML/string` = ""], ['Output',"outcomeVars"::`RQP/ArrayOfvariable` = []], ['Output',"bodyParts"::`RQP/ArrayOfoutputSection` = []], ['Output',"modalParts"::`RQP/ArrayOfoutputSection` = []], ['Process', proc(inp,out) local cache,vrsion,inputdata,label,history,historytable,pdata, context,inst,attempt; cache := evalb(inp["cache"] = true); vrsion := eval(`aim/SOAP/GetItemVersion`(inp,cache)); vrsion['CGIPrefix'] := inp["embedPrefix"]; inputdata := `Util/HTTPPostParse`(inp["inputData"],inp["embedPrefix"]); pdata := inp["persistentData"]; if pdata = "" or pdata = NULL then history := `new/aim/Question/History`(vrsion); else try history := sscanf(pdata,"%m")[1]; catch: error(__("Cannot parse persistent data.")); end try; if not(type([history],[`aim/Question/History`])) then error(__("Cannot parse persistent data.")); fi; fi; historytable := table([vrsion['Label'] = eval(history)]); context := `aim/SOAP/MakeQuizContext`( inp["interactive"], evalb(inputdata["MarkRequested"] <> "false"), true, # show feedback true, # show marks false # do not show solution ); inst := `aim/Question/MakeInstance/Recursive`( vrsion,inputdata,historytable,context); attempt := inst['Attempt']; out["seed"] := vrsion['Seed']; out["persistentData"] := sprintf("%m",eval(history)); out["outcomeVars"] := [["SCORE", [sprintf("%d",round(100*history['Mark']))]], ["RAW_SCORE", [sprintf("%d",round(100*attempt['RawMark']))]], ["IsValid", [sprintf("%A",attempt['IsValid'])]], ["ValidationNote", [attempt['ValidationNote']]], ["AnswerNote", [attempt['AnswerNote']]]]; out["bodyParts"] := inst['ShowParts',context]; NULL; end ] ]: `Package/Assign`( `aim/SOAP/GetItem`, "", proc(inp::table,cache_::boolean) local cache,itemGUID,itemFormat,itemSource,item,vrsion,bits,subj,quiz; global AimRQPCache; cache := `if`(nargs > 1,cache_,true); itemGUID := inp["guid"]; itemFormat := inp["format"]; itemSource := inp["source"]; if itemGUID <> "" then item := AimRQPCache['GetEntry',itemGUID]; if item <> NULL then return(eval(item)); fi; ###TODO: in production mode, remove or protect the following: if `Util/StartsWith`(itemGUID,"AIMFILE") then try bits := [`Util/ColonSplit`(itemGUID)]; subj := eval(DefaultZone['GetSubject',bits[2]]); quiz := eval(subj['GetQuiz',bits[3]]); item := eval(quiz['GetQuestion',bits[4]]); if not(type([item],[`aim/Question`])) then error( "SOAP Fault", "Client", cat("RQP Error: ",__("Malformed question")), "http://rqp.org/errors/itemNotCached"); fi; catch: error( "SOAP Fault:", "Client", cat("RQP Error: ",__("Could not load specified question")), "http://rqp.org/errors/invalidSource"); end try; if not(type([item],[`aim/Question`])) then error( "SOAP Fault:", "Client", cat("RQP Error: ",__("Could not load specified question")), "http://rqp.org/errors/invalidSource"); fi; return(eval(item)); fi; fi; if itemGUID = "" then itemGUID := `Util/MakeGUID`(); fi; if `Util/StripEndSpaces`(itemSource) = "" then error(__("Item is not in the cache, and no source provided")); fi; if itemFormat = "http://aiminfo.net/formats/location" then try bits := [`Util/ColonSplit`(itemSource)]; subj := eval(DefaultZone['GetSubject',bits[1]]); quiz := eval(subj['GetQuiz',bits[2]]); item := eval(quiz['GetQuestion',bits[3]]); if not(type([item],[`aim/Question`])) then error( "SOAP Fault", "Client", cat("RQP Error: ",__("Malformed question")), "http://rqp.org/errors/itemNotCached"); fi; catch: error( "SOAP Fault:", "Client", cat("RQP Error: ",__("Could not load specified question")), "http://rqp.org/errors/invalidSource"); end try; if not(type([item],[`aim/Question`])) then error( "SOAP Fault:", "Client", cat("RQP Error: ",__("Could not load specified question")), "http://rqp.org/errors/invalidSource"); fi; else item := `aim/CompileString`(itemSource); if not(type([item],[`aim/Question`])) then error("Compilation failure: %0",item) fi; item['ItemGUID'] := itemGUID; fi; if cache then AimRQPCache['AddEntry',eval(item),itemGUID]; fi; return(eval(item)); end ): `Package/Assign`( `aim/SOAP/GetItemVersion`, "", proc(inp::table,cache_::boolean) local cache,itemGUID,versionSeed,question,vrsion; global AimRQPCache; cache := `if`(nargs > 1,cache_,true); itemGUID := inp["guid"]; versionSeed := inp["seed"]; if not(type([versionSeed],[integer])) then versionSeed := 1; fi; if versionSeed = 0 then versionSeed := rand(); fi; vrsion := AimRQPCache['GetEntry',itemGUID,versionSeed]; if vrsion <> NULL then return(eval(vrsion)); else question := `aim/SOAP/GetItem`(inp); vrsion := question['MakeVersion',versionSeed]; if not(type([vrsion],[`aim/Question/Version`])) then error( "SOAP Fault:", "Client", cat("RQP Error: ",__("Could not make version of question")), "http://rqp.org/errors/templateProcessingFailed"); fi; if cache then AimRQPCache['AddEntry', eval(vrsion),itemGUID,versionSeed]; fi; return(eval(vrsion)); fi; end ): `Package/Assign`( `aim/SOAP/MakeQuizContext`::`aim/Quiz/Context`, "", proc(interact,markreq,feedback,showmark,showsol) local c; c := `new/aim/Quiz/Context`(); c['StartTime'] := `Date/CurrentDate`(); c['InviteAnswers'] := interact; c['MarkRequested'] := markreq; c['ShowFeedback'] := feedback; c['ShowFeedbackMC'] := feedback; c['ShowRightAnswer'] := showsol; c['ShowSolution'] := showsol; return(eval(c)); end ): ###################################################################### # `RPC/DeclareOperation`( # `aim/RPC/ProcessTemplate`, # "", # ['Name',"RQP_ProcessTemplate"], # ['InputMessageName',"ProcessTemplate"], # ['OutputMessageName',"ProcessTemplateResponse"], # # # ['Input',"guid"::`RQP/guid`], # ['Input',"source"::`XML/string`], # ['Input',"format"::`XML/anyURI`], # ['Input',"cache"::`XML/boolean`], # ['Input',"seed"::`XML/unsignedInt`], # # ['Output',"warnings"::`RQP/ArrayOfwarning`], # ['Output',"sourceCached"::`XML/boolean` = true], # ['Output',"cloneCached"::`XML/boolean` = true], # ['Output',"seed"::`XML/unsignedInt`=0], # ['Output',"templateVars"::`RQP/ArrayOfvariable`] # ): # # `RPC/DeclareOperation`( # `aim/RPC/Clone`, # "", # ['Name',"Clone"], # # ['Input',"guid"::`RQP/guid`], # ['Input',"source"::`XML/string`], # ['Input',"format"::`XML/anyURI`], # ['Input',"cache"::`XML/boolean`], # ['Input',"seed"::`XML/unsignedInt`], # ['Input',"templateVars"::`RQP/ArrayOfvariable`], # # ['Output',"warnings"::`RQP/ArrayOfwarning`], # ['Output',"sourceCached"::`XML/boolean` = true], # ['Output',"cloneCached"::`XML/boolean` = true], # ['Output',"seed"::`XML/unsignedInt`], # ['Output',"templateVars"::`RQP/ArrayOfvariable`], # ['Output',"clone"::`XML/string`=""] # ): `RPC/DeclareOperation`( `aim/RPC/DefaultOperation`, "", ['Name',"DefaultOperation"], ['Process', proc(inp,out) error("SOAP Fault", "Client", "RQP Error: Not implemented", "http://rqp.org/errors/notImplemented") end ] ): EndPackage(): |
From: Neil S. <nps...@us...> - 2005-03-31 14:21:05
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8669/maple Modified Files: Tag: aim-xml RQP.mpl Log Message: Index: RQP.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/RQP.mpl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** RQP.mpl 31 Mar 2005 14:16:00 -0000 1.1.2.1 --- RQP.mpl 31 Mar 2005 14:20:41 -0000 1.1.2.2 *************** *** 396,397 **** --- 396,398 ---- EndPackage(): + |
From: Neil S. <nps...@us...> - 2005-03-31 14:20:29
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8123/maple Modified Files: Tag: aim-xml RPC.mpl Log Message: Index: RPC.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/RPC.mpl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** RPC.mpl 31 Mar 2005 14:16:00 -0000 1.1.2.1 --- RPC.mpl 31 Mar 2005 14:20:13 -0000 1.1.2.2 *************** *** 462,463 **** --- 462,464 ---- EndPackage(): + |
From: Neil S. <nps...@us...> - 2005-03-31 14:16:15
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5897/maple Added Files: Tag: aim-xml RPC.mpl RQP.mpl rqp.wsdl Log Message: --- NEW FILE: RPC.mpl --- # Copyright (C) 2004 Neil Strickland # Distributed without warranty under the GPL - see README for details read("Package.mpl"): Package("RPC"," This package defines a number of convenient methods for working with SOAP remote procedure calls. "): ###################################################################### `Class/Declare`( `RPC/Operation`, "An instance of this class encapsulates information about a SOAP RPC operation. ", ['Field','Documentation'::string, "A human-readable description of the operation." ], ['Field','LocalName'::string, "The name of the operation (eg @RQP_ServerInformation@)." ], ['Field','NamespaceName'::string, "The namespace for the operation name (eg @http://aim.shef.ac.uk/AiMInfo@)." ], ['Field','Prefix'::string, "The prefix to be attached to the namespace name (eg @rqp@)" ], ['Field','InputMessageName'::string, "The name of the input message for this operation. In general it defaults to the local name of the operation. However, in the Remote Question Protocol, the convention is that operation names start with @RQP_@, and this is stripped off to give the name of the input message. " ], ['Field','Inputs'::list(`RPC/Parameter`), "This field contains a list of the input parameters for the operation, as objects of the class #`RPC/Parameter`#. " ], ['Field','OutputMessageName'::string, "The name of the input message for this operation. In general it defaults to the local name of the operation, followed by @Response@. However, in the Remote Question Protocol, the convention is that operation names start with @RQP_@, and this is stripped off before generating the output message name. " ], ['Field','Outputs'::list(`RPC/Parameter`), "This field contains a list of the output parameters for the operation, as objects of the class #`RPC/Parameter`#." ], ['Field','PProc'::procedure, "This field contains the procedure that actually does the work of the RPC call. It should accept two arguments, say @inp@ and @out@. The @inp@ argument should be a table, whose indices are the input parameter names as specified in the @Inputs@ field. The @out@ argment should also be a table, whose indices are the output parameter names as specified in the @Outputs@ field. The processing procedure may assume that the @inp@ table has been filled with the appropriate input parameters, that the types of these parameters have been checked, and that default values have been inserted where appropriate. It should fill in the @out@ table and return @NULL@. " ], ['Constructor', "This constructor accepts arguments as follows. <ul> <li>The first two arguments are the Maple name of the operation (which can be different from the contents of the @LocalName@ field) and a documentation string. </li> <li> An argument of the form @['Name',...]@ can be used to specify the local name of the operation. This also sets the @InputMessageName@ and @OutputMessageName@ fields if they have not already been set. </li> <li> An argument of the form @['InputMessageName',...]@ can be used to set the @InputMessageName@ field. </li> <li> An argument of the form @['Input',...]@ can be used to specify an input parameter. The second entry in the list will be passed to #`RPC/ParseParameterSpecification`#, so it must be of the form accepted by that function. </li> <li> An argument of the form @['OutputMessageName',...]@ can be used to set the @OuputMessageName@ field. </li> <li> An argument of the form @['Output',...]@ can be used to specify an output parameter. The second entry in the list will be passed to #`RPC/ParseParameterSpecification`#, so it must be of the form accepted by that function. </li> <li> An argument of the form @['Process',...]@ can be used to specify the processing procedure (ie the value of the @PProc@ field). </li> </ul> ", proc(this,nam::name,doc::string) global `Package/SaveNames`; local y,inp,out,namstring; this['Documentation'] := doc; inp := []; out := []; for y in args[4..-1] do if not(type(y,list)) then error(__("Invalid argument")); fi; if y[1] = 'Name' then this['LocalName'] := y[2]; if this['InputMessageName'] = "" then this['InputMessageName'] := y[2]; fi; if this['OutputMessageName'] = "" then this['OutputMessageName'] := cat(y[2],"Response"); fi; elif y[1] = 'InputMessageName' then this['InputMessageName'] := y[2]; elif y[1] = 'Input' then inp := [op(inp),`RPC/ParseParameterSpecification`(y[2])]; elif y[1] = 'OutputMessageName' then this['OutputMessageName'] := y[2]; elif y[1] = 'Output' then out := [op(out),`RPC/ParseParameterSpecification`(y[2])]; elif y[1] = 'Process' then namstring := cat(this['LocalName'],"!!Process"); assign(convert(namstring,name) = eval(y[2])); this['PProc'] := eval(convert(namstring,name)); `Package/SaveNames` := [op(`Package/SaveNames`),namstring]; else error(sprintf(__("Invalid argument: %A"),y)); fi; od; this['Inputs'] := inp; this['Outputs'] := out; NULL end ], ['Method','Process'::`SOAP/Envelope`, "The argument @b@ should be the XML element containing the SOAP input message to be processed. Thus @b@ should be a child of the @Body@ element of a SOAP @Envelope@ element, the local name of @b@ should be the value of the @InputMessageName@ field, and the local names of the children of @b@ should be the names of the input parameters listed in the @Inputs@ field. The method processes the input message and returns a corresponding output message packaged in a SOAP envelope. ", proc(this,b::`XML/Element`,defaultnamespace_::string) ### TODO: Error handling local inp,out,c,n,i,x,y,u,msg,env; inp := table([]); out := table([]); c := b['NonWhiteChildren']; n := nops(c); i := 1; for x in this['Inputs'] do if i > n then error(sprintf(__("Input parameter (%s) is missing"),x['Name'])); fi; y := c[i]; if not(type(y,`XML/Element`) and y['LocalName'] = x['LocalName'] and (x['NamespaceName'] = NULL or y['NamespaceName'] = x['NamespaceName'])) then error(sprintf(__("Problem with parameter (%s)"),x['LocalName'])); fi; inp[x['LocalName']] := `XML/ToMaple`(eval(x['Type']),eval(y)); i := i+1; od; for x in this['Outputs'] do out[x['LocalName']] := x['DefaultValue']; od; eval(this['PProc'])(inp,out); u := []; for x in this['Outputs'] do y := `XML/FromMaple`( eval(x['Type']), out[x['LocalName']], x['LocalName'], true); u := [op(u),eval(y)]; od; ### The use of 'rqp' here is an ugly hack if nargs > 2 then msg := `new/XML/Element`( [cat("rqp:",this['LocalName'],"Response"), "xmlns:rqp" = defaultnamespace_], op(u) ); else msg := `new/XML/Element`( cat(this['LocalName'],"Response"), op(u) ); fi; env := `new/SOAP/Envelope`(); env['AddBody',eval(msg)]; eval(env); end ] ): ###################################################################### `Class/Declare`( `RPC/Parameter`, "An instance of this class represents an input or output parameter for a SOAP RPC operation. ", ['Field','Prefix'::string, "The prefix to be used for the XML namespace for this parameter." ], ['Field','LocalName'::string, "The XML local name for this parameter" ], ['Field','NamespaceName'::string, "The XML namespace name for this parameter" ], ['Field','Type'::`XML/Type`, "The type of the parameter" ], ['Field','DefaultValue', "The default value for the parameter" ] ): ###################################################################### `Package/Assign`( `type/RPC/ParameterSpecification`::boolean, "Return @true@ if @x@ is a valid argument for the function #`RPC/GetParameter`#. In more detail, @x@ should be of the form @n@ or @n::t@ or @n=d@ or @n::t=d@, where <ul> <li>@n@ is a string (the XML name of the parameter, which may or may not include a namespace prefix). </li> <li>@t@ is an instance of #`XML/Type`#, specifying the type of the parameter. </li> <li>@d@ is a default value for the parameter (given as a Maple expression, not as an XML element). </li> </ul> If @t@ and @d@ are both given, then they must be compatible (or this procedure will return @false@). ", proc(x::anything) local y,default,typespec,t; y := `Util/SplitDeclaration`(x); if not(type(y[1],[string])) or nops(y[2]) <> 1 then return(false); fi; typespec := op(y[2]); default := op(y[3]); if not(type(typespec,`XML/Type`)) then return(false); fi; if default = NULL then return(true); fi; return(type(default,typespec['MapleDefinition'])); end ): `Package/Assign`( `RPC/ParseParameterSpecification`::`RPC/Parameter`, "This converts an expression of type #`type/RPC/ParameterSpecification`#, and converts it to an instance of #`RPC/Parameter`#. ", proc(x::anything) local y,z,default,typespec,t,p; p := `new/RPC/Parameter`(); y := `Util/SplitDeclaration`(x); if not(type(y[1],[string])) or nops(y[2]) <> 1 then error(sprintf(__("Invalid argument: %A"),y)); fi; z := `XML/SplitName`(op(y[1])); p['Prefix'] := z[1]; p['LocalName'] := z[2]; typespec := op(y[2]); default := op(y[3]); p['Type'] := op(y[2]); p['DefaultValue'] := op(y[3]); return(eval(p)); end ): ###################################################################### `Class/Declare`( `RPC/Service`, "An instance of ths class represents a SOAP RPC service.", ['Constructor', "The two optional arguments to this constructor specify the values of the @CommandNamespace@ and @DefaultNamespace@ fields. ", proc(this,cnamespace_::string,dnamespace_::string) this['Operations'] := table([]); if nargs > 1 then this['CommandNamespace'] := cnamespace_; fi; if nargs > 2 then this['DefaultNamespace'] := dnamespace_; fi; end ], ['Field','Operations'::table, "This field holds a table of #`RPC/Operation`# objects, indexed by their XML local names. " ], ['Field','CommandNamespace'::string, "This field holds the default value of the @NamespaceName@ field for operations in this service. " ], ['Field','DefaultNamespace'::string, "<b>Clarify the use of this field</b>" ], ['Method','AddOperation', "Add an operation to this service. The method arguments are passed to the constructor #`new/RPC/Operation`# to produce the operation to be added. ", proc(this) local x; x := `new/RPC/Operation`(args[2..-1]); x['NamespaceName'] := this['CommandNamespace']; this['Operations'][x['LocalName']] := eval(x); end ], ['Method','Process', "The argument of this method should be the string representation of a SOAP envelope containing an RPC call. The method parses this string representation, extracts the operation name and input message, and sends the input message to the @Process@ method of the appropriate @`RPC/Operation`@ instance taken from the @Operations@ field of this service. It is assumed that the input message is the first child of the @Body@ element of the envelope. Any other elements should be multi-reference definitions. The SOAP 1.1 specification does not insist that these must go after the input message, but that seems to be a <it>de facto</it> standard. ", proc(this,rpccall::string) local t,cc,c,p,d,ex, faultcode,faultstring,faultdetail; try t := `new/SOAP/Envelope`(rpccall); catch: return(`SOAP/Fault`("Server","Could not parse RPC call")); end try; cc := eval(t['Body'])['NonWhiteChildren']; # cc := select(c -> (c['LocalName'] = "Body"),cc); if nops(cc) = 0 then return(`SOAP/Fault`("Client","No RPC command")); # elif nops(cc) > 1 then # return(`SOAP/Fault`("Client","RPC body has more than one body")); fi; c := cc[1]; # if this['CommandNamespace'] <> "" and # c['NamespaceName'] <> this['CommandNamespace'] then # return(`SOAP/Fault`("Client","Bad command namespace")); # fi; p := eval(this['Operations'][c['LocalName']]); if not(type(p,`RPC/Operation`)) then p := eval(this['Operations']["DefaultOperation"]); if not(type(p,`RPC/Operation`)) then return(`SOAP/Fault`("Client","Operation not implemented")); fi; fi; if this['DefaultNamespace'] = "" then d := NULL; else d := this['DefaultNamespace']; fi; try return(p['Process',eval(c),d]); catch: ex := [lastexception]; if nops(ex) > 1 and ex[2] = "SOAP Fault" then faultcode := `if`(nops(ex)>2, ex[3], "Client"); faultstring := `if`(nops(ex)>3, ex[4], "Unknown error"); faultdetail := `if`(nops(ex)>4, ex[5], op([])); return( `SOAP/Fault`(faultcode,faultstring,faultdetail) ); else return( `SOAP/Fault`( "Server", cat("Processing error: ",StringTools:-FormatMessage(lasterror)))); fi; end try; end ] ): EndPackage(): --- NEW FILE: RQP.mpl --- # Copyright (C) 2005 Neil Strickland # Distributed without warranty under the GPL - see README for details read("Package.mpl"): Package("RQP"," This package defines classes corresponding to the complex types used in the Remote Question Protocol (RQP). "): `Package/Assign`( `RQP/ArrayOfstring`, "The #`XML/Type`# for arrays of strings.", `new/XML/Type`( "rqp:ArrayOfstring", "<xs:complexType name=\"ArrayOfstring\"> <xs:complexContent> <xs:restriction base=\"soap-enc:Array\"> <xs:sequence> <xs:element name=\"item\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"unbounded\" /> </xs:sequence> <xs:attribute ref=\"soap-enc:arrayType\" wsdl:arrayType=\"xs:string[]\" /> </xs:restriction> </xs:complexContent> </xs:complexType>", list(string), proc(a,h) local t,hh; t := sprintf("xs:string[%d]",nops(a)); if type([h],[string]) then hh := [h,"soap-enc:ArrayType" = t]; else hh := [op(h),"soap-enc:ArrayType" = t]; fi; `new/XML/Element`(hh,op(map(s -> [["item","xsi:type" = "xs:string"],s],a))); end, proc(x) local c; c := map(`XML/ContentString`,x['NonWhiteChildren']); if not(type(c,list(string))) then error(__("Invalid contents in ArrayOfstring")); fi; return(c); end, "soap-enc:Array" ) ): `Package/Assign`( `RQP/ArrayOfanyURI`, "The #`XML/Type`# for arrays of URIs.", `new/XML/Type`( "rqp:ArrayOfanyURI", "<xs:complexType name=\"ArrayOfanyURI\"> <xs:complexContent> <xs:restriction base=\"soap-enc:Array\"> <xs:sequence> <xs:element name=\"item\" type=\"xs:anyURI\" minOccurs=\"0\" maxOccurs=\"unbounded\" /> </xs:sequence> <xs:attribute ref=\"soap-enc:arrayType\" wsdl:arrayType=\"xs:anyURI[]\" /> </xs:restriction> </xs:complexContent> </xs:complexType>", list(string), proc(a,h) local t,hh; t := sprintf("xs:anyURI[%d]",nops(a)); if type([h],[string]) then hh := [h,"soap-enc:ArrayType" = t]; else hh := [op(h),"soap-enc:ArrayType" = t]; fi; `new/XML/Element`(hh,op(map(s -> [["item","xsi:type" = "xs:anyURI"],s],a))); end, proc(x) local c; c := map(`XML/ContentString`,x['NonWhiteChildren']); if not(type(c,list(string))) then error(__("Invalid contents in ArrayOfanyURI")); fi; return(c); end, "soap-enc:Array" ) ): `Package/Assign`( `RQP/error`, "The #`XML/Type`# for errors in RQP. An error is represented as a list of the form @[identifier,message,detail]@. or @[identifier,message,detail,detailtype]@. ", `new/XML/Type`( "rqp:error", "<xs:complexType name=\"error\"> <xs:sequence> <xs:element name=\"identifier\" type=\"xs:anyURI\" /> <xs:element name=\"message\" type=\"xs:string\" /> <xs:element name=\"detail\" type=\"xs:anyType\" /> </xs:sequence> </xs:complexType>", {[string,string,anything],[string,string,anything,string]}, proc(a,h) local t,d; if nops(a) = 3 then t := "xs:string"; d := sprintf("%A",a[3]); else t := a[4]; d := a[3]; fi; `new/XML/Element`( h, ["identifier",a[1]], ["message",a[2]], [["detail", "xsi:type" = t],d] ); end, proc(x) local c,d,dc,id,msg,detail; c := x['NonWhiteChildren']; if nops(c) <> 3 then error(__("Invalid RQP error structure")); fi; d := eval(c[3]); if not(type(d,`XML/Element`)) then error(__("Invalid RQP error structure")); fi; dc := d['NonWhiteChildren']; if nops(dc) <> 1 then error(__("Invalid RQP error structure")); fi; id := `XML/ContentString`(c[1]); msg := `XML/ContentString`(c[2]); detail := eval(dc[1]); return([id,msg,eval(detail)]); end ) ): `Package/Assign`( `RQP/ArrayOferror`, "", `new/XML/Type`( "rqp:ArrayOferror", "<xs:complexType name=\"ArrayOferror\"> <xs:complexContent> <xs:restriction base=\"soap-enc:Array\"> <xs:sequence> <xs:element name=\"item\" type=\"rqp:error\" minOccurs=\"0\" maxOccurs=\"unbounded\" /> </xs:sequence> <xs:attribute ref=\"soap-enc:arrayType\" wsdl:arrayType=\"rqp:error[]\" /> </xs:restriction> </xs:complexContent> </xs:complexType>", list([string,string,anything]), proc(a,h) local t,hh; t := sprintf("rqp:error[%d]",nops(a)); if type([h],[string]) then hh := [h,"soap-enc:ArrayType" = t]; else hh := [op(h),"soap-enc:ArrayType" = t]; fi; `new/XML/Element`(hh, op(map2(`XML/FromMaple`,`RQP/error`,a,"item",true))); end, proc(x) map2(`XML/ToMaple`,`RQP/error`,x['NonWhiteChildren']); end, "soap-enc:Array" ) ): `Package/Assign`( `RQP/variable`, "The #`XML/Type`# for variables in RQP. For compatibility with certain parts of QTI, these variables are string-valued, and are permitted to have multiple values or no value. They are represented in Maple as a list of the form @[identifier,[first value,...,last value]]@. ", `new/XML/Type`( "rqp:variable", "<xs:complexType name=\"variable\"> <xs:sequence> <xs:element name=\"identifier\" type=\"xs:NCName\" /> <xs:element name=\"values\" type=\"rqp:ArrayOfstring\" /> </xs:sequence> </xs:complexType>", [string,list(string)], proc(a,h) local v; v := ("soap-enc:ArrayType" = sprintf("xs:string[%d]",nops(a[2]))); `new/XML/Element`( h,[["identifier", "xsi:type" = "xs:NCName"],a[1]], [["values","xsi:type" = "soap-enc:Array", v], op(map(s -> [["item","xsi:type" = "xs:string"],s],a[2]))]); end, proc(x) local c,id,vals; c := x['NonWhiteChildren']; if nops(c) <> 2 then error(__("Invalid RQP variable structure")); fi; id := `XML/ContentString`(c[1]); vals := `XML/ToMaple`(`RQP/ArrayOfstring`,c[2]); return([id,vals]); end, "soap-enc:Array" ) ): `Package/Assign`( `RQP/ArrayOfvariable`, "", `new/XML/Type`( "rqp:ArrayOfvariable", "<xs:complexType name=\"ArrayOfvariable\"> <xs:complexContent> <xs:restriction base=\"soap-enc:Array\"> <xs:sequence> <xs:element name=\"item\" type=\"rqp:variable\" minOccurs=\"0\" maxOccurs=\"unbounded\" /> </xs:sequence> <xs:attribute ref=\"soap-enc:arrayType\" wsdl:arrayType=\"rqp:variable[]\" /> </xs:restriction> </xs:complexContent> </xs:complexType>", list([string,list(string)]), proc(a,h) local t,hh; t := sprintf("rqp:variable[%d]",nops(a)); if type([h],[string]) then hh := [h,"soap-enc:ArrayType" = t]; else hh := [op(h),"soap-enc:ArrayType" = t]; fi; `new/XML/Element`(hh, op(map2(`XML/FromMaple`,`RQP/variable`,a,"item",true))); end, proc(x) map2(`XML/ToMaple`,`RQP/variable`,x['NonWhiteChildren']); end, "soap-enc:Array" ) ): `Package/Assign`( `RQP/input`, "", `new/XML/Type`( "rqp:input", "<xs:complexType name=\"input\"> <xs:sequence> <xs:element name=\"name\" type=\"xs:NCName\" /> <xs:element name=\"value\" type=\"xs:string\" /> </xs:sequence> </xs:complexType> ", [string,string], proc(a,h) local v; v := ("soap-enc:ArrayType" = sprintf("xs:string[%d]",nops(a[2]))); `new/XML/Element`( h, [["name", "xsi:type" = "xs:NCName"],a[1]], [["value","xsi:type" = "xs:string"], a[2]] ); end, proc(x) local c,nam,val; c := x['NonWhiteChildren']; if nops(c) <> 2 then error(__("Invalid RQP input structure")); fi; nam := `XML/ContentString`(c[1]); val := `XML/ContentString`(c[2]); return([nam,val]); end ) ): `Package/Assign`( `RQP/ArrayOfinput`, "", `new/XML/Type`( "rqp:ArrayOfinput", "<xs:complexType name=\"ArrayOfinput\"> <xs:complexContent> <xs:restriction base=\"soap-enc:Array\"> <xs:sequence> <xs:element name=\"item\" type=\"tns:input\" minOccurs=\"0\" maxOccurs=\"unbounded\" /> </xs:sequence> <xs:attribute ref=\"soap-enc:arrayType\" wsdl:arrayType=\"tns:input[]\" /> </xs:restriction> </xs:complexContent> </xs:complexType> ", list([string,list(string)]), proc(a,h) local t,hh; t := sprintf("rqp:variable[%d]",nops(a)); if type([h],[string]) then hh := [h,"soap-enc:ArrayType" = t]; else hh := [op(h),"soap-enc:ArrayType" = t]; fi; `new/XML/Element`(hh, op(map2(`XML/FromMaple`,`RQP/variable`,a,"item",true))); end, proc(x) map2(`XML/ToMaple`,`RQP/variable`,x['NonWhiteChildren']); end, "soap-enc:Array" ) ): `Package/Assign`( `RQP/output`, "The #`XML/Type`# for RQP outputs.", `new/XML/Type`( "rqp:output", "<xs:complexType name=\"output\"> <xs:sequence> <xs:element name=\"identifier\" type=\"xs:anyURI\" /> <xs:element name=\"encoding\" type=\"xs:string\" /> <xs:element name=\"output\" type=\"xs:string\" /> </xs:sequence> </xs:complexType>", [string$3], proc(a,h) local x; x := `new/XML/Element`( h, [["identifier","xsi:type" = "xs:anyURI"],a[1]], [["encoding","xsi:type" = "xs:string"],a[2]], [["output","xsi:type" = "xs:string","convertLaTeX" = "true"],a[3]] ); return(eval(x)); end, proc(x) local c,id,enc,out; c := x['NonWhiteChildren']; if nops(c) <> 3 then error(__("Invalid RQP outputSection structure")); fi; id := `XML/ContentString`(c[1]); enc := `XML/ContentString`(c[2]); out := `XML/ContentString`(c[3]); return([id,enc,out]); end ) ): `Package/Assign`( `RQP/ArrayOfoutput`, "", `new/XML/Type`( "rqp:ArrayOfoutput", "<xs:complexType name=\"ArrayOfoutput\"> <xs:complexContent> <xs:restriction base=\"soap-enc:Array\"> <xs:sequence> <xs:element name=\"item\" type=\"rqp:output\" minOccurs=\"0\" maxOccurs=\"unbounded\" /> </xs:sequence> <xs:attribute ref=\"soap-enc:arrayType\" wsdl:arrayType=\"rqp:output[]\" /> </xs:restriction> </xs:complexContent> </xs:complexType>", list([string$3]), proc(a,h) local t,hh; t := sprintf("rqp:output[%d]",nops(a)); if type([h],[string]) then hh := [h,"soap-enc:ArrayType" = t]; else hh := [op(h),"soap-enc:ArrayType" = t]; fi; `new/XML/Element`(hh, op(map2(`XML/FromMaple`,`RQP/output`,a,"item",true))); end, proc(x) map2(`XML/ToMaple`,`RQP/output`,x['NonWhiteChildren']); end, "soap-enc:Array" ) ): EndPackage(): --- NEW FILE: rqp.wsdl --- <?xml version="1.0" encoding="ISO-8859-1"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://schemas.rqp.org/rqp" xmlns:tns="http://schemas.rqp.org/rqp" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"> <types> <xs:schema targetNamespace="http://schemas.rqp.org/rqp"> <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" /> <xs:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <!-- Arrays of Base and Simple Types --> <xs:complexType name="ArrayOfstring"> <xs:complexContent> <xs:restriction base="soap-enc:Array"> <xs:sequence> <xs:element name="item" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute ref="soap-enc:arrayType" wsdl:arrayType="xs:string[]" /> </xs:restriction> </xs:complexContent> </xs:complexType> <xs:complexType name="ArrayOfanyURI"> <xs:complexContent> <xs:restriction base="soap-enc:Array"> <xs:sequence> <xs:element name="item" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute ref="soap-enc:arrayType" wsdl:arrayType="xs:anyURI[]" /> </xs:restriction> </xs:complexContent> </xs:complexType> <!-- Complex Types and Arrays of Complex Types --> <!-- error object --> <xs:complexType name="error"> <xs:sequence> <xs:element name="identifier" type="xs:anyURI" /> <xs:element name="message" type="xs:string" /> <xs:element name="detail" type="xs:anyType" /> </xs:sequence> </xs:complexType> <xs:complexType name="ArrayOferror"> <xs:complexContent> <xs:restriction base="soap-enc:Array"> <xs:sequence> <xs:element name="item" type="tns:error" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:error[]" /> </xs:restriction> </xs:complexContent> </xs:complexType> <!-- variable object --> <xs:complexType name="variable"> <xs:sequence> <xs:element name="identifier" type="xs:NCName" /> <xs:element name="values" type="tns:ArrayOfstring" /> </xs:sequence> </xs:complexType> <xs:complexType name="ArrayOfvariable"> <xs:complexContent> <xs:restriction base="soap-enc:Array"> <xs:sequence> <xs:element name="item" type="tns:variable" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:variable[]" /> </xs:restriction> </xs:complexContent> </xs:complexType> <!-- input object --> <xs:complexType name="input"> <xs:sequence> <xs:element name="name" type="xs:NCName" /> <xs:element name="value" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="ArrayOfinput"> <xs:complexContent> <xs:restriction base="soap-enc:Array"> <xs:sequence> <xs:element name="item" type="tns:input" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:input[]" /> </xs:restriction> </xs:complexContent> </xs:complexType> <!-- output object --> <xs:complexType name="output"> <xs:sequence> <xs:element name="identifier" type="xs:anyURI" /> <xs:element name="encoding" type="xs:string" /> <xs:element name="output" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="ArrayOfoutput"> <xs:complexContent> <xs:restriction base="soap-enc:Array"> <xs:sequence> <xs:element name="item" type="tns:output" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:output[]" /> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> </types> <!-- Faults --> <message name="Fault"> <part name="detail" type="tns:error" /> </message> <!-- ServerInformation operation --> <message name="ServerInformation" /> <message name="ServerInformationResponse"> <part name="identifier" type="xs:anyURI" /> <part name="name" type="xs:NCName" /> <part name="description" type="xs:string" /> <part name="cloning" type="xs:boolean" /> <part name="implicitCloning" type="xs:boolean" /> <part name="rendering" type="xs:boolean" /> <part name="itemFormats" type="tns:ArrayOfanyURI" /> <part name="renderFormats" type="tns:ArrayOfanyURI" /> </message> <!-- ItemInformation operation --> <message name="ItemInformation"> <part name="source" type="xs:string" /> <part name="format" type="xs:anyURI" /> <part name="index" type="xs:unsignedInt" /> </message> <message name="ItemInformationResponse"> <part name="format" type="xs:anyURI" /> <part name="sourceErrors" type="tns:ArrayOferror" /> <part name="template" type="xs:boolean" /> <part name="adaptive" type="xs:boolean" /> <part name="timeDependent" type="xs:boolean" /> <part name="canComputerScore" type="xs:boolean" /> <part name="solutionAvailable" type="xs:boolean" /> <part name="hintAvailable" type="xs:boolean" /> <part name="validationPossible" type="xs:boolean" /> <part name="maxScore" type="xs:unsignedInt" /> <part name="length" type="xs:unsignedInt" /> </message> <!-- ProcessTemplate operation --> <message name="ProcessTemplate"> <part name="source" type="xs:string" /> <part name="format" type="xs:anyURI" /> <part name="seed" type="xs:unsignedInt" /> </message> <message name="ProcessTemplateResponse"> <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> </message> <!-- Clone operation --> <message name="Clone"> <part name="source" type="xs:string" /> <part name="format" type="xs:anyURI" /> <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> </message> <message name="CloneResponse"> <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="clone" type="xs:string" /> </message> <!-- SessionInformation operation --> <message name="SessionInformation"> <part name="source" type="xs:string" /> <part name="format" type="xs:anyURI" /> <part name="index" type="xs:unsignedInt" /> <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="persistentData" type="xs:string" /> <part name="embedPrefix" type="xs:QName" /> </message> <message name="SessionInformationResponse"> <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="correctResponses" type="tns:ArrayOfinput" /> </message> <!-- Render operation --> <message name="Render"> <part name="source" type="xs:string" /> <part name="format" type="xs:anyURI" /> <part name="index" type="xs:unsignedInt" /> <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="persistentData" type="xs:string" /> <part name="responses" type="tns:ArrayOfinput" /> <part name="advanceState" type="xs:boolean" /> <part name="embedPrefix" type="xs:QName" /> <part name="appletBase" type="xs:anyURI" /> <part name="mediaBase" type="xs:anyURI" /> <part name="renderFormat" type="xs:anyURI" /> <part name="modalFormat" type="xs:anyURI" /> </message> <message name="RenderResponse"> <part name="seed" type="xs:unsignedInt" /> <part name="templateVars" type="tns:ArrayOfvariable" /> <part name="persistentData" type="xs:string" /> <part name="outcomeVars" type="tns:ArrayOfvariable" /> <part name="output" type="tns:ArrayOfoutput" /> </message> <portType name="rqp"> <operation name="RQP_ServerInformation"> <input message="tns:ServerInformation" /> <output message="tns:ServerInformationResponse" /> <fault name="RQP_Fault" message="tns:Fault" /> </operation> <operation name="RQP_ItemInformation"> <input message="tns:ItemInformation" /> <output message="tns:ItemInformationResponse" /> <fault name="RQP_Fault" message="tns:Fault" /> </operation> <operation name="RQP_ProcessTemplate"> <input message="tns:ProcessTemplate" /> <output message="tns:ProcessTemplateResponse" /> <fault name="RQP_Fault" message="tns:Fault" /> </operation> <operation name="RQP_Clone"> <input message="tns:Clone" /> <output message="tns:CloneResponse" /> <fault name="RQP_Fault" message="tns:Fault" /> </operation> <operation name="RQP_SessionInformation"> <input message="tns:SessionInformation" /> <output message="tns:SessionInformationResponse" /> <fault name="RQP_Fault" message="tns:Fault" /> </operation> <operation name="RQP_Render"> <input message="tns:Render" /> <output message="tns:RenderResponse" /> <fault name="RQP_Fault" message="tns:Fault" /> </operation> </portType> <binding name="rqp" type="tns:rqp"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> <operation name="RQP_ServerInformation"> <soap:operation soapAction="RQP_ServerInformation" /> <input> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> <fault> <soap:fault name="tns:RQP_Fault" use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStye="http://schemas.xmlsoap.org/soap/encoding/" /> </fault> </operation> <operation name="RQP_ItemInformation"> <soap:operation soapAction="RQP_ItemInformation" /> <input> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> <fault> <soap:fault name="tns:RQP_Fault" use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStye="http://schemas.xmlsoap.org/soap/encoding/" /> </fault> </operation> <operation name="RQP_ProcessTemplate"> <soap:operation soapAction="RQP_ProcessTemplate" /> <input> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> <fault> <soap:fault name="tns:RQP_Fault" use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStye="http://schemas.xmlsoap.org/soap/encoding/" /> </fault> </operation> <operation name="RQP_Clone"> <soap:operation soapAction="RQP_Clone" /> <input> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> <fault> <soap:fault name="tns:RQP_Fault" use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStye="http://schemas.xmlsoap.org/soap/encoding/" /> </fault> </operation> <operation name="RQP_SessionInformation"> <soap:operation soapAction="RQP_SessionInformation" /> <input> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> <fault> <soap:fault name="tns:RQP_Fault" use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStye="http://schemas.xmlsoap.org/soap/encoding/" /> </fault> </operation> <operation name="RQP_Render"> <soap:operation soapAction="RQP_Render" /> <input> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> <output> <soap:body use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> <fault> <soap:fault name="tns:RQP_Fault" use="encoded" namespace="http://schemas.rqp.org/rqp" encodingStye="http://schemas.xmlsoap.org/soap/encoding/" /> </fault> </operation> </binding> <service name="rqp"> <port name="rqp" binding="tns:rqp"> <soap:address location="http://alice.shef.ac.uk/AiM3/Alice" /> </port> </service> </definitions> |
From: Neil S. <nps...@us...> - 2005-03-31 12:38:59
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16947/maple/aim/admin Modified Files: Tag: aim-xml Generate.mpl Quiz.mpl Register.mpl SourceDir.mpl SourceFile.mpl Subject.mpl SubjectHome.mpl Zone.mpl ZoneAdminHome.mpl ZoneStudentHome.mpl Log Message: Many small changes, especially to error handling Index: Subject.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Subject.mpl,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** Subject.mpl 10 Mar 2005 21:13:55 -0000 1.5.4.2 --- Subject.mpl 31 Mar 2005 12:38:13 -0000 1.5.4.3 *************** *** 332,341 **** if `OS/FileExists`(subjectdir) then subjectfile := cat(subjectdir,"/",subjectname,".m"); ! subject := traperror(eval(AimCache['Load',subjectfile])); ! if type(subject,`aim/Subject`) then page['SetAlert',__("Subject %s exists already."),subjectname]; action := "LoadSubjectOptions"; else - subject := NULL; page['SetAlert',__("Using preexisting directory.")]; fi; --- 332,345 ---- if `OS/FileExists`(subjectdir) then subjectfile := cat(subjectdir,"/",subjectname,".m"); ! subject := NULL; ! try ! subject := eval(AimCache['Load',subjectfile]); ! catch: ! end try; ! ! if type([subject],[`aim/Subject`]) then page['SetAlert',__("Subject %s exists already."),subjectname]; action := "LoadSubjectOptions"; else page['SetAlert',__("Using preexisting directory.")]; fi; *************** *** 352,368 **** # get here if that file was not successfully read. No # other information will be destroyed. ! err := traperror(subject['CreateRoot']); ! if err = lasterror then page['SetError', cat(__("Error while creating subject %s:"),"\n<br/>\n%s<br/>\n"), ! subjectname,err]; ! RETURN(); ! fi; fi; else # action <> CreateSubject subjectname := p["SubjectName"]; ! subject := traperror(eval(DefaultZone['GetSubject',subjectname])); ! if subject = lasterror or not(type(subject,`aim/Subject`)) then page['SetError', __("Could not load subject %A."), --- 356,378 ---- # get here if that file was not successfully read. No # other information will be destroyed. ! try ! subject['CreateRoot']; ! catch: page['SetError', cat(__("Error while creating subject %s:"),"\n<br/>\n%s<br/>\n"), ! subjectname, ! StringTools[FormatMessage](lastexception[2..-1])]; ! return(); ! end try; fi; else # action <> CreateSubject subjectname := p["SubjectName"]; ! subject := NULL; ! try ! subject := eval(DefaultZone['GetSubject',subjectname]); ! catch: ! end try; ! if not(type([subject],[`aim/Subject`])) then page['SetError', __("Could not load subject %A."), *************** *** 371,375 **** fi; fi; - if action = "ToggleQuiz" then --- 381,384 ---- *************** *** 382,390 **** elif action = "DeleteQuiz" then nam := p["QuizName"]; ! err := traperror( ! `OS/RemoveDirectory`(cat(subject['RootDir'],"/quizzes/",nam))); ! if err = lasterror then page['SetAlert',__("Could not remove directory:\n%s\n"),nam]; ! fi; excludedquiz := nam; fi; --- 391,399 ---- elif action = "DeleteQuiz" then nam := p["QuizName"]; ! try ! `OS/RemoveDirectory`(cat(subject['RootDir'],"/quizzes/",nam)); ! catch: page['SetAlert',__("Could not remove directory:\n%s\n"),nam]; ! end try; excludedquiz := nam; fi; *************** *** 439,447 **** subject['QuizNames'] := quizlist; ! err := traperror(subject['Save']); ! if err = lasterror then page['SetAlert',"%s %s\n\n%s", ! __("Could not save subject:"),subject['Name'],lasterr]; ! fi; fi; --- 448,459 ---- subject['QuizNames'] := quizlist; ! try ! subject['Save']; ! catch: page['SetAlert',"%s %s\n\n%s", ! __("Could not save subject:"),subject['Name'], ! StringTools[FormatMessage](lastexception[2..-1]) ! ]; ! end try; fi; Index: SourceFile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/SourceFile.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 *** SourceFile.mpl 10 Mar 2005 21:13:55 -0000 1.5.2.1 --- SourceFile.mpl 31 Mar 2005 12:38:13 -0000 1.5.2.2 *************** *** 12,17 **** ): - #`Package/Dependencies` := []; - ###################################################################### --- 12,15 ---- *************** *** 161,169 **** quiz := NULL; if quizname <> "" then ! quiz := traperror(eval(subject['GetQuiz',quizname])); if type([quiz],[`aim/Quiz`]) then quiztitle := quiz['Title']; else - quiz := NULL; quiztitle := quizname; fi; --- 159,170 ---- quiz := NULL; if quizname <> "" then ! quiz := NULL; ! try ! quiz := eval(subject['GetQuiz',quizname]); ! catch: ! end try; if type([quiz],[`aim/Quiz`]) then quiztitle := quiz['Title']; else quiztitle := quizname; fi; *************** *** 198,202 **** fi; question := traperror(eval(quiz['GetQuestion',questionname])); ! if not(type(question,`aim/Question`)) then page['SetError',__("Could not load question: %s"),questionname]; RETURN(); --- 199,203 ---- fi; question := traperror(eval(quiz['GetQuestion',questionname])); ! if not(type([question],[`aim/Question`])) then page['SetError',__("Could not load question: %s"),questionname]; RETURN(); *************** *** 255,284 **** if srcdir <> "" and not(`OS/FileExists`(srcdir)) then ! err := traperror(`OS/MakeDirectory`(srcdir)); ! if err = lasterror then page['SetError', __("Source directory %s does not exist and cannot be created"), srcdir]; ! RETURN(); ! fi; fi; ! traperror(fclose(fullsrcfile)); ! err := traperror(fprintf(fullsrcfile,"%s",sourcetext)); ! if err = lasterror then page['SetError', __("Could not save source file: %s"),fullsrcfile]; ! RETURN(); ! fi; else if (`OS/FileExists`(fullsrcfile)) then ! sourcetext := ! traperror(`Util/TextFileContents`(fullsrcfile)); ! if sourcetext = lasterror then page['SetError', __("Source file %s exists but could not be read."), fullsrcfile]; ! RETURN(); ! fi; p["SourceText"] := sourcetext; else --- 256,288 ---- if srcdir <> "" and not(`OS/FileExists`(srcdir)) then ! try ! `OS/MakeDirectory`(srcdir); ! catch: page['SetError', __("Source directory %s does not exist and cannot be created"), srcdir]; ! return(); ! end try; fi; ! try fclose(fullsrcfile); catch: end try; ! ! try ! fprintf(fullsrcfile,"%s",sourcetext); ! catch: page['SetError', __("Could not save source file: %s"),fullsrcfile]; ! return(); ! end try; else if (`OS/FileExists`(fullsrcfile)) then ! try ! sourcetext := `Util/TextFileContents`(fullsrcfile); ! catch: page['SetError', __("Source file %s exists but could not be read."), fullsrcfile]; ! return(); ! end try; p["SourceText"] := sourcetext; else *************** *** 296,301 **** fi; - questions := traperror(`aim/CompileFile`(fulldir,srcfile)); - if quiz <> NULL then # Saving the quiz automatically updates its modification time. --- 300,303 ---- *************** *** 304,315 **** fi; ! if questions = lasterror or not type(questions,list) then compreport := cat(__("Compilation error:"),"\n<pre>\n", ! `HTML/Escape/String`(questions),"\n</pre>\n"); ! questions := []; ! else ! compreport := ""; ! fi; if nops(questions) = 0 then --- 306,319 ---- fi; ! try ! questions := `aim/CompileFile`(fulldir,srcfile); ! compreport := ""; ! catch: ! questions := []; compreport := cat(__("Compilation error:"),"\n<pre>\n", ! `HTML/Escape/String`(StringTools[FormatMessage](lastexception[2..-1])), ! "\n</pre>\n"); ! end try; if nops(questions) = 0 then Index: ZoneStudentHome.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/ZoneStudentHome.mpl,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -C2 -d -r1.2 -r1.2.6.1 *** ZoneStudentHome.mpl 25 Aug 2003 21:47:19 -0000 1.2 --- ZoneStudentHome.mpl 31 Mar 2005 12:38:13 -0000 1.2.6.1 *************** *** 9,15 **** `aim/admin/Command/Declare`('`admin/ZoneStudentHome`', - # KM ['AuthLevel',"zone"], - # END KM ['Parameter', "Action" :: --- 9,13 ---- *************** *** 122,131 **** ['Process', proc(page::`aim/admin/Page`,p::table) - # KM - # DIST local headtext,foottext,headfile,footfile,action; local headtext,foottext,IDtext,headfile,footfile,action; global DefaultZone; - # END KM headfile := cat(DefaultZone['RootDir'],"/studenthead.html"); --- 120,126 ---- *************** *** 135,166 **** if action = "LoadZoneStudentHome" then ! headtext := traperror(`Util/TextFileContents`(headfile)); ! ! if headtext = lasterror then ! # KM ! # DIST headtext := "<h1>Administrator login page</h1>\n<br/>\n"; headtext := "<h1>Student login page</h1>\n<br/>\n"; ! # END KM ! fi; ! foottext := traperror(`Util/TextFileContents`(footfile)); ! ! if foottext = lasterror then foottext := ""; fi; else # SaveZoneStudentHome - # KM page['SetTable', DefaultZone, 'IDNote' ]; - # END KM headtext := p["HeadText"]; if headtext = "" then - # KM - # DIST headtext := "<h1>Administrator login page</h1>\n<br/>\n"; headtext := "<h1>Student login page</h1>\n<br/>\n"; - # END KM fi; --- 130,155 ---- if action = "LoadZoneStudentHome" then ! try ! headtext := `Util/TextFileContents`(headfile); ! catch: headtext := "<h1>Student login page</h1>\n<br/>\n"; ! end try; ! try ! foottext := `Util/TextFileContents`(footfile); ! catch: ! foottext := ""; ! end try; else # SaveZoneStudentHome page['SetTable', DefaultZone, 'IDNote' ]; headtext := p["HeadText"]; if headtext = "" then headtext := "<h1>Student login page</h1>\n<br/>\n"; fi; *************** *** 172,176 **** traperror(fclose(footfile)); - # KM try DefaultZone['MakeLoginPage']; catch : --- 161,164 ---- *************** *** 178,191 **** __("Could not create login pages"),lasterr]; end: - # END KM - fi; IDtext := DefaultZone['IDNote']; - # KM - # DIST page['Title'] :=__("Administrator login page edit:"); page['Title'] :=__("Student login page editor:"); - # END page['FillTemplate', --- 166,174 ---- *************** *** 193,199 **** "headtext" = headtext, "foottext" = foottext, - # KM "IDNote" = IDtext - # END KM ]; end --- 176,180 ---- Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Quiz.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 *** Quiz.mpl 7 Oct 2004 11:22:17 -0000 1.6.2.1 --- Quiz.mpl 31 Mar 2005 12:38:13 -0000 1.6.2.2 *************** *** 237,242 **** if `OS/FileExists`(quizdir) then quizfile := cat(quizdir,"/",quizname,".m"); ! quiz := traperror(eval(AimCache['Load',quizfile])); ! if type(quiz,`aim/Quiz`) then page['SetAlert',__("Quiz %s exists already."),quizname]; action := "LoadQuizOptions"; --- 237,245 ---- if `OS/FileExists`(quizdir) then quizfile := cat(quizdir,"/",quizname,".m"); ! quiz := NULL; ! try ! quiz := eval(AimCache['Load',quizfile]); ! end try; ! if type([quiz],[`aim/Quiz`]) then page['SetAlert',__("Quiz %s exists already."),quizname]; action := "LoadQuizOptions"; *************** *** 257,272 **** # get here if that file was not successfully read. No # other information will be destroyed. ! err := traperror(quiz['CreateRoot']); ! if err = lasterror then page['SetError', cat(__("Error while creating quiz %s:"),"\n<br/>\n%s<br/>\n"), ! quizname,err]; ! RETURN(); ! fi; fi; else ! quiz := traperror(eval(subject['GetQuiz',quizname])); ! if quiz = lasterror or not(type(quiz,`aim/Quiz`)) then page['SetError', __("Could not load quiz %A in subject %A."), --- 260,279 ---- # get here if that file was not successfully read. No # other information will be destroyed. ! try ! quiz['CreateRoot']; ! catch: page['SetError', cat(__("Error while creating quiz %s:"),"\n<br/>\n%s<br/>\n"), ! quizname,StringTools[FormatMessage](lastexception[2..-1])]; ! return(); ! end try; fi; else ! quiz := NULL; ! try ! quiz := eval(subject['GetQuiz',quizname]); ! end try; ! if not(type([quiz],[`aim/Quiz`])) then page['SetError', __("Could not load quiz %A in subject %A."), *************** *** 292,300 **** nam := p["QuestionName"]; file := cat(quiz['RootDir'],"/questions/",nam,".m"); ! err := traperror(fremove(file)); ! if err = lasterror then page['SetAlert',"%s %s\n\n%s", ! __("Could not remove file:"),file,lasterr]; ! fi; excludedquestion := nam; fi; --- 299,310 ---- nam := p["QuestionName"]; file := cat(quiz['RootDir'],"/questions/",nam,".m"); ! try ! fremove(file); ! catch: page['SetAlert',"%s %s\n\n%s", ! __("Could not remove file:"),file, ! StringTools[FormatMessage](lastexception[2..-1]) ! ]; ! end try; excludedquestion := nam; fi; *************** *** 329,340 **** quiz['Selector'] := NULL; else parsedtext:=`new/ParsedText`(); ! err := traperror(parsedtext['SetText',selectortext]); ! if err = lasterror then ! parseerr := err; ! else ! parseerr := ""; quiz['Selector'] := eval(parsedtext); ! fi; fi; --- 339,350 ---- quiz['Selector'] := NULL; else + parseerr := ""; parsedtext:=`new/ParsedText`(); ! try ! parsedtext['SetText',selectortext]; quiz['Selector'] := eval(parsedtext); ! catch: ! parseerr := StringTools[FormatMessage](lastexception[2..-1]); ! end try; fi; *************** *** 369,377 **** fi; ! err := traperror(quiz['Save']); ! if err = lasterror then page['SetAlert',"%s %s\n\n%s", ! __("Could not save quiz:"),quiz['Name'],lasterr]; ! fi; fi; --- 379,389 ---- fi; ! try ! quiz['Save']; ! catch: page['SetAlert',"%s %s\n\n%s", ! __("Could not save quiz:"),quiz['Name'], ! StringTools[FormatMessage](lastexception[2..-1])]; ! end try; fi; Index: Register.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Register.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 *** Register.mpl 10 Mar 2005 21:13:55 -0000 1.3.6.1 --- Register.mpl 31 Mar 2005 12:38:13 -0000 1.3.6.2 *************** *** 420,429 **** "DeleteStudents"}) then backup := cat(regfile,".bak"); ! err := traperror(`OS/Copy`(regfile,backup)); ! if err = lasterror then page['SetAlert', __("Could not make backup:\n%s\nProceeding anyway."), ! err]; ! fi; fi; --- 420,430 ---- "DeleteStudents"}) then backup := cat(regfile,".bak"); ! try ! `OS/Copy`(regfile,backup); ! catch: page['SetAlert', __("Could not make backup:\n%s\nProceeding anyway."), ! StringTools[FormatMessage](lastexception[2..-1])]; ! end try; fi; *************** *** 440,455 **** if action = "UploadRegister" then ! err := traperror(register['LoadText',p["FileToUpload"]]); ! if err = lasterror then ! page['SetError',__("Error uploading register:<br/>%s<br/>"),err]; ! RETURN(); ! fi; register['Save']; elif action = "UpMergeRegister" then ! err := traperror(register['MergeText',textfile]); ! if err = lasterror then ! page['SetError',__("Error uploading register:<br/>%s<br/>"),err]; ! RETURN(); ! fi; register['Save']; elif action = "RemoveStudent" then --- 441,460 ---- if action = "UploadRegister" then ! try ! register['LoadText',p["FileToUpload"]]; ! catch: ! page['SetError',__("Error uploading register:<br/>%s<br/>"), ! StringTools[FormatMessage](lastexception[2..-1])]; ! return(); ! end try; register['Save']; elif action = "UpMergeRegister" then ! try ! register['MergeText',textfile]; ! catch: ! page['SetError',__("Error uploading register:<br/>%s<br/>"), ! StringTools[FormatMessage](lastexception[2..-1])]; ! return(); ! end try; register['Save']; elif action = "RemoveStudent" then Index: ZoneAdminHome.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/ZoneAdminHome.mpl,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** ZoneAdminHome.mpl 26 Aug 2003 20:37:08 -0000 1.3 --- ZoneAdminHome.mpl 31 Mar 2005 12:38:13 -0000 1.3.4.1 *************** *** 104,110 **** local headtext,foottext,headfile,footfile,action; - # KM global DefaultZone; - # END KM headfile := cat(DefaultZone['RootDir'],"/adminhead.html"); --- 104,108 ---- *************** *** 114,126 **** if action = "LoadZoneAdminHome" then ! headtext := traperror(`Util/TextFileContents`(headfile)); ! ! if headtext = lasterror then headtext := "<h1>Administrator login page</h1>\n<br/>\n"; ! fi; ! foottext := traperror(`Util/TextFileContents`(footfile)); ! ! if foottext = lasterror then foottext := "AIM comes with ABSOLUTELY NO WARRANTY. It is free software, and you are welcome to redistribute it under certain conditions. See the README file and the GNU General Public License for more details. "; fi; else --- 112,126 ---- if action = "LoadZoneAdminHome" then ! try ! headtext := `Util/TextFileContents`(headfile); ! catch: headtext := "<h1>Administrator login page</h1>\n<br/>\n"; ! end try; ! try ! foottext := `Util/TextFileContents`(footfile); ! catch: ! foottext := "AiM comes with ABSOLUTELY NO WARRANTY. It is free software, and you are welcome to redistribute it under certain conditions. See the README file and the GNU General Public License for more details. "; ! end try; else *************** *** 134,147 **** fprintf(headfile,"%s",headtext); fprintf(footfile,"%s",foottext); ! traperror(fclose(headfile)); ! traperror(fclose(footfile)); ! # KM ! try traperror(DefaultZone['MakeLoginPage']); catch : page['SetAlert',"%s\n\n%s", __("Could not create login pages"),lasterr]; end; - # END KM - fi; --- 134,146 ---- fprintf(headfile,"%s",headtext); fprintf(footfile,"%s",foottext); ! try fclose(headfile) catch: end try; ! try fclose(footfile) catch: end try; ! ! try ! DefaultZone['MakeLoginPage']; catch : page['SetAlert',"%s\n\n%s", __("Could not create login pages"),lasterr]; end; fi; Index: Zone.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Zone.mpl,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** Zone.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Zone.mpl 31 Mar 2005 12:38:13 -0000 1.3.6.1 *************** *** 14,21 **** ['Parameter',"SubjectName"], - # KM - # DIST ['Parameter',"ShowHiddenSubjects"::boolean = false], ['Parameter',"ShowHiddenSubjects"::boolean = true], ! # END KM ['Parameter', "Action" :: --- 14,19 ---- ['Parameter',"SubjectName"], ['Parameter',"ShowHiddenSubjects"::boolean = true], ! ['Parameter', "Action" :: *************** *** 304,319 **** DefaultZone['SubjectNames'] := subjectlist; ! err := traperror(DefaultZone['Save']); ! if err = lasterror then page['SetAlert',"%s\n\n%s", ! __("Could not save options for default zone"),lasterr]; ! else ! err := traperror(DefaultZone['MakeLoginPage']); ! if err = lasterror then ! page['SetAlert',"%s\n\n%s", ! __("Could not create login pages"),lasterr]; ! fi; ! fi; ! fi; --- 302,322 ---- DefaultZone['SubjectNames'] := subjectlist; ! try ! DefaultZone['Save']; ! catch: page['SetAlert',"%s\n\n%s", ! __("Could not save options for default zone"), ! StringTools[FormatMessage](lastexception[2..-1]) ! ]; ! end try; ! ! try ! DefaultZone['MakeLoginPage']; ! catch: ! page['SetAlert',"%s\n\n%s", ! __("Could not create login pages"), ! StringTools[FormatMessage](lastexception[2..-1]) ! ]; ! end try; fi; Index: SourceDir.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/SourceDir.mpl,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** SourceDir.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- SourceDir.mpl 31 Mar 2005 12:38:13 -0000 1.3.6.1 *************** *** 12,17 **** ): - #`Package/Dependencies` := []; - ###################################################################### --- 12,15 ---- *************** *** 153,161 **** if quizname <> "" then dir := cat(subject['RootDir'],"/quizzes/",quizname,"/source"); ! quiz := traperror(eval(subject['GetQuiz',quizname])); if type([quiz],[`aim/Quiz`]) then quiztitle := quiz['Title']; else - quiz := NULL; quiztitle := quizname; fi; --- 151,161 ---- if quizname <> "" then dir := cat(subject['RootDir'],"/quizzes/",quizname,"/source"); ! quiz := NULL; ! try ! quiz := eval(subject['GetQuiz',quizname]); ! end try; if type([quiz],[`aim/Quiz`]) then quiztitle := quiz['Title']; else quiztitle := quizname; fi; *************** *** 234,246 **** file := `Util/Basename`(file); fullfile := cat(dir,"/",file); ! err := ! traperror(`OS/Rename`(p["FileToUpload"],fullfile)); ! if err = lasterror then ! page['SetAlert', ! sprintf(__("Problem uploading %s: \n%s\n"),file,lasterr)]; ! else page['SetAlert', sprintf(__("File %s uploaded"),file)]; ! fi; fi; else --- 234,246 ---- file := `Util/Basename`(file); fullfile := cat(dir,"/",file); ! try ! `OS/Rename`(p["FileToUpload"],fullfile); page['SetAlert', sprintf(__("File %s uploaded"),file)]; ! catch: ! page['SetAlert', ! sprintf(__("Problem uploading %s: \n%s\n"),file, ! StringTools[FormatMessage](lastexception[2..-1]))]; ! end try; fi; else *************** *** 248,274 **** fullfile := cat(dir,"/",p["SourceFile"]); if action = "DeleteSource" then ! err := traperror(fremove(fullfile)); ! if err = lasterror then ! page['SetAlert'] := sprintf(__("Error: Could not delete file: \n%s\n%s\n"), ! fullfile,lasterr); ! fi; else # Rename or Copy if assigned(p["NewSourceName"]) then newname := cat(dir,"/",p["NewSourceName"]); if action = "RenameSource" then ! err := traperror(`OS/Rename`(fullfile,newname)); ! if err = lasterror then ! page['SetAlert'] := sprintf(__("Error: Could not rename %s to %s\n%s\n"), ! fullfile,newname,lasterr); ! fi; else ! err := traperror(`OS/Copy`(fullfile,newname)); ! if err = lasterror then page['SetAlert', __("Error: Could not copy %s to %s\n%s\n"), ! fullfile,newname,lasterr]; ! fi; fi; else --- 248,279 ---- fullfile := cat(dir,"/",p["SourceFile"]); if action = "DeleteSource" then ! try ! fremove(fullfile); ! catch: ! page['SetAlert', sprintf(__("Error: Could not delete file: \n%s\n%s\n"), ! fullfile,StringTools[FormatMessage](lastexception[2..-1]))]; ! end try; else # Rename or Copy if assigned(p["NewSourceName"]) then newname := cat(dir,"/",p["NewSourceName"]); if action = "RenameSource" then ! try ! `OS/Rename`(fullfile,newname); ! catch: ! page['SetAlert', sprintf(__("Error: Could not rename %s to %s\n%s\n"), ! fullfile,newname, ! StringTools[FormatMessage](lastexception[2..-1]))]; ! end try; else ! try ! `OS/Copy`(fullfile,newname); ! catch: page['SetAlert', __("Error: Could not copy %s to %s\n%s\n"), ! fullfile,newname, ! StringTools[FormatMessage](lastexception[2..-1])]; ! end try; fi; else Index: SubjectHome.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/SubjectHome.mpl,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** SubjectHome.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- SubjectHome.mpl 31 Mar 2005 12:38:13 -0000 1.3.6.1 *************** *** 105,115 **** subjectname := p["SubjectName"]; ! subject := traperror(eval(DefaultZone['GetSubject',subjectname])); ! if subject = lasterror or not(type(subject,`aim/Subject`)) then page['SetError', __("Could not load subject %A."), subjectname]; ! RETURN(); fi; --- 105,120 ---- subjectname := p["SubjectName"]; ! subject := NULL; ! try ! subject := eval(DefaultZone['GetSubject',subjectname]); ! catch: ! end try; ! ! if not(type([subject],[`aim/Subject`])) then page['SetError', __("Could not load subject %A."), subjectname]; ! return(); fi; *************** *** 120,132 **** if action = "LoadSubjectHome" then ! headtext := traperror(`Util/TextFileContents`(headfile)); ! ! if headtext = lasterror then headtext := sprintf("<h1>%s</h1>\n<br/>\n",subject['Title']); ! fi; ! foottext := traperror(`Util/TextFileContents`(footfile)); ! ! if foottext = lasterror then foottext := ""; fi; else --- 125,139 ---- if action = "LoadSubjectHome" then ! try ! headtext := `Util/TextFileContents`(headfile); ! catch: headtext := sprintf("<h1>%s</h1>\n<br/>\n",subject['Title']); ! end try; ! try ! foottext := `Util/TextFileContents`(footfile); ! catch: ! foottext := ""; ! end try; else *************** *** 140,146 **** fprintf(headfile,"%s",headtext); fprintf(footfile,"%s",foottext); ! traperror(fclose(headfile)); ! traperror(fclose(footfile)); ! fi; --- 147,152 ---- fprintf(headfile,"%s",headtext); fprintf(footfile,"%s",foottext); ! try fclose(headfile); catch: end try; ! try fclose(footfile); catch: end try; fi; Index: Generate.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Generate.mpl,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** Generate.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Generate.mpl 31 Mar 2005 12:38:13 -0000 1.3.6.1 *************** *** 62,79 **** err := ""; ! generated := traperror(register['GenerateMissingPasswords']); ! if generated = lasterror then ! err := generated; generated := NULL; ! elif not(type([generated],[list(`aim/Student`)])) then err := cat(__("Wrong type"),sprintf(": %A",[generated])); generated := NULL; else ! err := traperror(register['Save']); ! if err = lasterror then generated := NULL; ! else ! err := ""; ! fi; fi; --- 62,83 ---- err := ""; ! try ! generated := register['GenerateMissingPasswords']; ! catch: ! err := StringTools[FormatMessage](lastexception[2..-1]); generated := NULL; ! end try; ! ! if not(type([generated],[list(`aim/Student`)])) then err := cat(__("Wrong type"),sprintf(": %A",[generated])); generated := NULL; else ! err := ""; ! try ! register['Save']; ! catch: ! err := StringTools[FormatMessage](lastexception[2..-1]); generated := NULL; ! end try; fi; |
From: Neil S. <nps...@us...> - 2005-03-31 12:38:25
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/analyze In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16947/maple/aim/analyze Modified Files: Tag: aim-xml Question.mpl Quiz.mpl Subject.mpl Log Message: Many small changes, especially to error handling Index: Subject.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/analyze/Subject.mpl,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -C2 -d -r1.2 -r1.2.10.1 *** Subject.mpl 5 May 2003 03:25:46 -0000 1.2 --- Subject.mpl 31 Mar 2005 12:38:14 -0000 1.2.10.1 *************** *** 137,141 **** analysis := NULL; if p["Action"] = "AnalyzeSubject" then ! analysis := traperror(eval(subject['GetAnalysis'])); fi; --- 137,144 ---- analysis := NULL; if p["Action"] = "AnalyzeSubject" then ! try ! analysis := eval(subject['GetAnalysis']); ! catch: ! end try; fi; *************** *** 143,147 **** register := subject['GetRegister']; ids := map(op,[indices(eval(register['IDTable']))]); ! analysis := traperror(eval(subject['Analyze'])); if not(type([analysis],[`aim/Subject/Analysis`])) then page['SetError', --- 146,153 ---- register := subject['GetRegister']; ids := map(op,[indices(eval(register['IDTable']))]); ! try ! analysis := eval(subject['Analyze']); ! catch: ! end try; if not(type([analysis],[`aim/Subject/Analysis`])) then page['SetError', Index: Question.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/analyze/Question.mpl,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** Question.mpl 11 Mar 2004 13:39:43 -0000 1.4 --- Question.mpl 31 Mar 2005 12:38:13 -0000 1.4.2.1 *************** *** 228,234 **** quizname := p["QuizName"]; ! quiz := traperror(eval(subject['GetQuiz',quizname])); ! ! if not(type(quiz,`aim/Quiz`)) then page['SetError', __("Could not load quiz: %s"), --- 228,238 ---- quizname := p["QuizName"]; ! quiz := NULL; ! try ! quiz := eval(subject['GetQuiz',quizname]); ! catch: ! end try; ! ! if not(type([quiz],[`aim/Quiz`])) then page['SetError', __("Could not load quiz: %s"), *************** *** 239,255 **** questionname := p["QuestionName"]; partlabel := p["PartLabel"]; ! question := traperror(quiz['GetQuestion',questionname,partlabel]); ! ! if not(type(question,`aim/Question`)) then page['SetError', __("Could not load question: %s"), quizname]; ! RETURN(); fi; analysis := NULL; if p["Action"] = "AnalyzeQuestion" then ! analysis := ! traperror(eval(quiz['GetQuestionAnalysis',questionname,partlabel])); fi; --- 243,266 ---- questionname := p["QuestionName"]; partlabel := p["PartLabel"]; ! question := NULL; ! try ! question := quiz['GetQuestion',questionname,partlabel]; ! catch: ! end try; ! ! if not(type([question],[`aim/Question`])) then page['SetError', __("Could not load question: %s"), quizname]; ! return(); fi; analysis := NULL; if p["Action"] = "AnalyzeQuestion" then ! try ! analysis := ! eval(quiz['GetQuestionAnalysis',questionname,partlabel]); ! catch: ! end try; fi; Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/analyze/Quiz.mpl,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** Quiz.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Quiz.mpl 31 Mar 2005 12:38:14 -0000 1.3.6.1 *************** *** 132,137 **** subject := eval(page['Subject']); quizname := p["QuizName"]; ! quiz := traperror(eval(subject['GetQuiz',quizname])); ! if not(type([quiz],[`aim/Quiz`])) then page['SetError', --- 132,141 ---- subject := eval(page['Subject']); quizname := p["QuizName"]; ! quiz := NULL; ! try ! quiz := eval(subject['GetQuiz',quizname]); ! catch: ! end try; ! if not(type([quiz],[`aim/Quiz`])) then page['SetError', *************** *** 143,147 **** analysis := NULL; if p["Action"] = "AnalyzeQuiz" then ! analysis := traperror(eval(quiz['GetAnalysis'])); fi; --- 147,154 ---- analysis := NULL; if p["Action"] = "AnalyzeQuiz" then ! try ! analysis := eval(quiz['GetAnalysis']); ! catch: ! end try; fi; *************** *** 149,153 **** register := eval(subject['GetRegister']); ids := map(op,[indices(eval(register['IDTable']))]); ! analysis := traperror(eval(quiz['Analyze',ids,eval(register)])); if not(type([analysis],[`aim/Quiz/Analysis`])) then page['SetError', --- 156,163 ---- register := eval(subject['GetRegister']); ids := map(op,[indices(eval(register['IDTable']))]); ! try ! analysis := eval(quiz['Analyze',ids,eval(register)]); ! catch: ! end try; if not(type([analysis],[`aim/Quiz/Analysis`])) then page['SetError', |
From: Neil S. <nps...@us...> - 2005-03-31 12:38:25
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/try In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16947/maple/aim/try Modified Files: Tag: aim-xml Question.mpl Quiz.mpl Log Message: Many small changes, especially to error handling Index: Question.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/try/Question.mpl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** Question.mpl 16 Sep 2003 20:22:01 -0000 1.5 --- Question.mpl 31 Mar 2005 12:38:15 -0000 1.5.2.1 *************** *** 12,17 **** ): - `Package/Dependencies` := []; - ###################################################################### --- 12,15 ---- *************** *** 162,170 **** quiz := NULL; if quizname <> "" then ! quiz := traperror(eval(subject['GetQuiz',quizname])); if type([quiz],[`aim/Quiz`]) then quiztitle := quiz['Title']; else - quiz := NULL; quiztitle := quizname; fi; --- 160,170 ---- quiz := NULL; if quizname <> "" then ! try ! quiz := eval(subject['GetQuiz',quizname]); ! catch: ! end try; if type([quiz],[`aim/Quiz`]) then quiztitle := quiz['Title']; else quiztitle := quizname; fi; *************** *** 197,204 **** fullqfile := cat(fulldir,"/questions/",qname,".m"); ! question := traperror(eval(AimCache['Load',fullqfile])); ! ! if question = lasterror then ! err := lasterr; err := cat( --- 197,204 ---- fullqfile := cat(fulldir,"/questions/",qname,".m"); ! try ! question := eval(AimCache['Load',fullqfile]); ! catch: ! err := StringTools[FormatMessage](lastexception[2..-1]); err := cat( *************** *** 210,217 **** page['ActionLink',"Mark",[],__("Retry")]); page['FillTemplate',"editsource" = editsource,"show" = err]; ! RETURN(); ! fi; ! if not(type(question,`aim/Question`)) then err := cat( --- 210,217 ---- page['ActionLink',"Mark",[],__("Retry")]); page['FillTemplate',"editsource" = editsource,"show" = err]; ! return(); ! end try; ! if not(type([question],[`aim/Question`])) then err := cat( *************** *** 224,228 **** "\n</pre><br/>\n"); page['FillTemplate',"editsource" = editsource,"show" = err]; ! RETURN(); fi; --- 224,228 ---- "\n</pre><br/>\n"); page['FillTemplate',"editsource" = editsource,"show" = err]; ! return(); fi; *************** *** 245,252 **** p["QuestionSeed"] := sprintf("%d",seed); ! vrsion := traperror(eval(question['MakeVersion',seed,"",0])); ! ! if vrsion = lasterror then ! err := lasterr; err := cat( --- 245,252 ---- p["QuestionSeed"] := sprintf("%d",seed); ! try ! vrsion := eval(question['MakeVersion',seed,"",0]); ! catch: ! err := StringTools[FormatMessage](lastexception[2..-1]); err := cat( *************** *** 263,269 **** "</pre><br/>\n"; page['FillTemplate',"editsource" = editsource,"show" = err]; ! RETURN(); ! elif not(type(vrsion,`aim/Question/Version`)) then err := --- 263,270 ---- "</pre><br/>\n"; page['FillTemplate',"editsource" = editsource,"show" = err]; ! return(); ! end try; ! if not(type([vrsion],[`aim/Question/Version`])) then err := *************** *** 334,344 **** (p["Action"] = "TryRightAnswer")); ! instance := ! traperror(eval( ! `aim/Question/MakeInstance/Recursive`( ! vrsion,rawtable,table([]),`try/Question/Context`,userightans))); ! ! if instance = lasterror then ! err := lasterr; err := cat( --- 335,345 ---- (p["Action"] = "TryRightAnswer")); ! try ! instance := ! eval( ! `aim/Question/MakeInstance/Recursive`( ! vrsion,rawtable,table([]),`try/Question/Context`,userightans)); ! catch: ! err := StringTools[FormatMessage](lastexception[2..-1]); err := cat( *************** *** 355,361 **** "\n</pre>\n"; page['FillTemplate',"editsource" = editsource,"show" = err]; ! RETURN(); ! ! elif not(type(instance,`aim/Question/Instance`)) then err := --- 356,363 ---- "\n</pre>\n"; page['FillTemplate',"editsource" = editsource,"show" = err]; ! return(); ! end try; ! ! if not(type(instance,`aim/Question/Instance`)) then err := Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/try/Quiz.mpl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** Quiz.mpl 28 Sep 2003 09:08:21 -0000 1.5 --- Quiz.mpl 31 Mar 2005 12:38:15 -0000 1.5.2.1 *************** *** 12,17 **** ): - `Package/Dependencies` := []; - ###################################################################### --- 12,15 ---- *************** *** 190,200 **** quizname := p["QuizName"]; - quiz := traperror(eval(subject['GetQuiz',quizname])); ! if quiz = lasterror or not(type(quiz,`aim/Quiz`)) then page['SetError', __("Could not load quiz %A in subject %A."), quizname,p["SubjectName"]]; ! RETURN(); fi; --- 188,203 ---- quizname := p["QuizName"]; ! quiz := NULL; ! try ! quiz := eval(subject['GetQuiz',quizname]); ! catch: ! end try; ! ! if not(type([quiz],[`aim/Quiz`])) then page['SetError', __("Could not load quiz %A in subject %A."), quizname,p["SubjectName"]]; ! return(); fi; *************** *** 221,226 **** for i to numrows do for j to numcols do ! cell := traperror(`aim/EntryHint`(rightans[i,j])); ! if cell = lasterror then cell := ""; fi; rawans := rawans,cell; if j < numcols then rawans := rawans,"|"; fi; --- 224,232 ---- for i to numrows do for j to numcols do ! try ! cell := `aim/EntryHint`(rightans[i,j]); ! catch: ! cell := ""; ! end try; rawans := rawans,cell; if j < numcols then rawans := rawans,"|"; fi; |
From: Neil S. <nps...@us...> - 2005-03-31 12:38:24
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/review In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16947/maple/aim/review Modified Files: Tag: aim-xml Question.mpl Quiz.mpl Subject.mpl Log Message: Many small changes, especially to error handling Index: Subject.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/review/Subject.mpl,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -C2 -d -r1.2 -r1.2.10.1 *** Subject.mpl 5 May 2003 03:25:46 -0000 1.2 --- Subject.mpl 31 Mar 2005 12:38:15 -0000 1.2.10.1 *************** *** 122,128 **** qname := quiz['Name']; qtitle := quiz['Title']; ! histories := traperror(quiz['GetHistories',id]); ! if histories = lasterror then ! err := lasterr; if length(err) > 70 then err := cat(substring(err,1..67),"..."); --- 122,129 ---- qname := quiz['Name']; qtitle := quiz['Title']; ! try ! histories := quiz['GetHistories',id]; ! catch: ! err := StringTools[FormatMessage](lastexception[2..-1]); if length(err) > 70 then err := cat(substring(err,1..67),"..."); *************** *** 138,143 **** "</td>\n", "<td colspan='3'><font color='red'>",err,"</font></td>\n", ! "</tr>\n"; ! elif histories = [] then quizmarks := quizmarks, --- 139,147 ---- "</td>\n", "<td colspan='3'><font color='red'>",err,"</font></td>\n", ! "</tr>\n"; ! next; ! end try; ! ! if histories = [] then quizmarks := quizmarks, Index: Question.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/review/Question.mpl,v retrieving revision 1.2 retrieving revision 1.2.6.1 diff -C2 -d -r1.2 -r1.2.6.1 *** Question.mpl 25 Aug 2003 21:47:19 -0000 1.2 --- Question.mpl 31 Mar 2005 12:38:14 -0000 1.2.6.1 *************** *** 240,247 **** fi; ! quiz := traperror(eval(subject['GetQuiz',p["QuizName"]])); ! if not(type(quiz,`aim/Quiz`)) then page['SetError',"%s: %s",__("Could not load quiz"),p["QuizName"]]; ! RETURN(); fi; --- 240,252 ---- fi; ! quiz := NULL; ! try ! quiz := eval(subject['GetQuiz',p["QuizName"]]); ! catch: ! end try; ! ! if not(type([quiz],[`aim/Quiz`])) then page['SetError',"%s: %s",__("Could not load quiz"),p["QuizName"]]; ! return(); fi; *************** *** 268,278 **** eval(quizversion['LabelTable'][p["QuestionLabel"]]); ! history := traperror(eval(quiz['GetHistory',id,seed])); ! if not(type(history,`aim/Quiz/History`)) then page['SetError', __("Could not load history for quiz %s and student %s"), quiz['Name'], id]; ! RETURN(); fi; --- 273,288 ---- eval(quizversion['LabelTable'][p["QuestionLabel"]]); ! history := NULL; ! try ! history := eval(quiz['GetHistory',id,seed]); ! catch: ! end try; ! ! if not(type([history],[`aim/Quiz/History`])) then page['SetError', __("Could not load history for quiz %s and student %s"), quiz['Name'], id]; ! return(); fi; *************** *** 303,307 **** numattempts := [op(numattempts),subqhistory['Count']]; ! attempt := traperror(eval(subqhistory['Attempt',attemptnum])); if not(type([attempt],[`aim/Question/ShortAttempt`])) then page['SetError', --- 313,321 ---- numattempts := [op(numattempts),subqhistory['Count']]; ! attempt := NULL; ! try ! attempt := eval(subqhistory['Attempt',attemptnum]); ! catch: ! end try; if not(type([attempt],[`aim/Question/ShortAttempt`])) then page['SetError', Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/review/Quiz.mpl,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** Quiz.mpl 10 Mar 2004 02:06:54 -0000 1.4 --- Quiz.mpl 31 Mar 2005 12:38:15 -0000 1.4.2.1 *************** *** 208,212 **** subject := eval(page['Subject']); register := eval(subject['GetRegister']); ! quiz := traperror(eval(subject['GetQuiz',p["QuizName"]])); id := p["StudentID"]; student := register['GetStudent',id]; --- 208,218 ---- subject := eval(page['Subject']); register := eval(subject['GetRegister']); ! ! quiz := NULL; ! try ! quiz := eval(subject['GetQuiz',p["QuizName"]]); ! catch: ! end try; ! id := p["StudentID"]; student := register['GetStudent',id]; *************** *** 248,258 **** quizversion := eval(quiz['MakeVersion',seed]); ! history := traperror(quiz['GetHistory',id,seed]); ! if not(type(history,`aim/Quiz/History`)) then page['SetError', __("Could not load quiz history for quiz %s and student %s"), quiz['Name'], id]; ! RETURN(); fi; --- 254,269 ---- quizversion := eval(quiz['MakeVersion',seed]); ! history := NULL; ! try ! history := quiz['GetHistory',id,seed]; ! catch: ! end try; ! ! if not(type([history],[`aim/Quiz/History`])) then page['SetError', __("Could not load quiz history for quiz %s and student %s"), quiz['Name'], id]; ! return(); fi; |
From: Greg G. <gr...@us...> - 2005-03-31 10:00:34
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24541 Modified Files: Trig.mpl Log Message: Added an is(...) construct to fix a bug in `aim/TrigSLN`. - GG Index: Trig.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Trig.mpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Trig.mpl 9 Jan 2004 07:57:32 -0000 1.4 --- Trig.mpl 31 Mar 2005 10:00:25 -0000 1.5 *************** *** 330,334 **** partright := NULL; for i to nops(ans) do ! while j < 2 and op(j, rightans) < op(i, ans) and not `aim/TestNumeric`(op(j, rightans), op(i, ans), 'margin' = 0.02) do j := j + 1; --- 330,334 ---- partright := NULL; for i to nops(ans) do ! while j < 2 and is(op(j, rightans) < op(i, ans)) and not `aim/TestNumeric`(op(j, rightans), op(i, ans), 'margin' = 0.02) do j := j + 1; |
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4987/classes Modified Files: Tag: aim-xml 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.4.2 retrieving revision 1.2.4.3 diff -C2 -d -r1.2.4.2 -r1.2.4.3 Binary files /tmp/cvsCy0q9u and /tmp/cvsmKzCps differ Index: AliceLog.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLog.class,v retrieving revision 1.6.4.3 retrieving revision 1.6.4.4 diff -C2 -d -r1.6.4.3 -r1.6.4.4 Binary files /tmp/cvsuucmVM and /tmp/cvs2Q1zlK differ Index: Maple.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Maple.class,v retrieving revision 1.4.4.3 retrieving revision 1.4.4.4 diff -C2 -d -r1.4.4.3 -r1.4.4.4 Binary files /tmp/cvsSBTq5V and /tmp/cvsOCHEHT differ Index: AliceLogEntry.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLogEntry.class,v retrieving revision 1.5.4.3 retrieving revision 1.5.4.4 diff -C2 -d -r1.5.4.3 -r1.5.4.4 Binary files /tmp/cvsDaUzYa and /tmp/cvsnmbhM8 differ Index: AliceRequest.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceRequest.class,v retrieving revision 1.7.4.3 retrieving revision 1.7.4.4 diff -C2 -d -r1.7.4.3 -r1.7.4.4 Binary files /tmp/cvsNF6xeg and /tmp/cvs5CCg4d differ Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.6.4.3 retrieving revision 1.6.4.4 diff -C2 -d -r1.6.4.3 -r1.6.4.4 Binary files /tmp/cvsvDwAij and /tmp/cvs0N2wah differ |
From: Neil S. <nps...@us...> - 2005-03-10 21:17:37
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes/tth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4987/classes/tth Modified Files: Tag: aim-xml 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.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 Binary files /tmp/cvsijJMd8 and /tmp/cvsJxDCZ5 differ Index: TtH.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/tth/TtH.class,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 Binary files /tmp/cvsKQpqcB and /tmp/cvsNU4jhz differ |
From: Neil S. <nps...@us...> - 2005-03-10 21:16:16
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java/tth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4631/java/tth Modified Files: Tag: aim-xml TtH.java Log Message: Index: TtH.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/tth/TtH.java,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** TtH.java 1 Sep 2003 20:22:23 -0000 1.4 --- TtH.java 10 Mar 2005 21:16:00 -0000 1.4.4.1 *************** *** 16,19 **** --- 16,27 ---- import java.io.*; import java.util.*; + import org.w3c.dom.Attr; + import org.w3c.dom.Document; + import org.w3c.dom.NamedNodeMap; + import org.w3c.dom.Node; + import org.w3c.dom.NodeList; + import org.apache.xerces.parsers.DOMParser; + import org.xml.sax.InputSource; + import org.xml.sax.SAXException; public class TtH { *************** *** 221,224 **** --- 229,267 ---- return(html); } + + public static void convertXML(Document doc,String opt) + throws Exception { + convertXML(doc,doc,opt); + } + + public static void convertXML(Document doc,Node node,String opt) + throws Exception { + int type = node.getNodeType(); + if (type == Node.ELEMENT_NODE) { + NamedNodeMap nnm = node.getAttributes(); + if (nnm != null && nnm.getNamedItem("convertLaTeX") != null) { + nnm.removeNamedItem("convertLaTeX"); + String s = ""; + while (node.hasChildNodes()) { + Node c = node.getFirstChild(); + node.removeChild(c); + if (c.getNodeType() == Node.TEXT_NODE) { + s += c.getNodeValue(); + } else { + throw new Exception("Non-text node"); + } + } + s = convert(s,opt); + node.appendChild(doc.createTextNode(s)); + } + } + + //recurse + for(Node child = node.getFirstChild(); + child != null; + child = child.getNextSibling()) { + convertXML(doc,child,opt); + } + } } |
From: Neil S. <nps...@us...> - 2005-03-10 21:14:06
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4024/maple/aim/admin Modified Files: Tag: aim-xml CompileSubject.mpl Register.mpl SourceFile.mpl Student.mpl Subject.mpl Log Message: Index: Subject.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Subject.mpl,v retrieving revision 1.5.4.1 retrieving revision 1.5.4.2 diff -C2 -d -r1.5.4.1 -r1.5.4.2 *** Subject.mpl 7 Oct 2004 11:50:27 -0000 1.5.4.1 --- Subject.mpl 10 Mar 2005 21:13:55 -0000 1.5.4.2 *************** *** 530,539 **** fi; - # The field 'GuestsAllowed' is new, so might not be set. - # TODO: a more systematic approach to this. - if not(type([subject['GuestsAllowed']],[string])) then - subject['GuestsAllowed'] := "no"; - fi; - page['Title'] := cat(__("Subject:"),subject['Name']); --- 530,533 ---- Index: SourceFile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/SourceFile.mpl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** SourceFile.mpl 25 Sep 2003 19:01:15 -0000 1.5 --- SourceFile.mpl 10 Mar 2005 21:13:55 -0000 1.5.2.1 *************** *** 296,300 **** fi; ! questions := traperror(`aim/Compile`(fulldir,srcfile)); if quiz <> NULL then --- 296,300 ---- fi; ! questions := traperror(`aim/CompileFile`(fulldir,srcfile)); if quiz <> NULL then Index: Register.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Register.mpl,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** Register.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Register.mpl 10 Mar 2005 21:13:55 -0000 1.3.6.1 *************** *** 31,36 **** --- 31,43 ---- ['Parameter',"EmailToAll"::boolean = false], + ['Parameter',"PhotoURLFormat" = ""], + ['Parameter',"PhotoWidth"::integer = 100], + ['Parameter',"PhotoHeight"::integer = 120], + ['Parameter',"RecordsURLFormat" = ""], + ['Parameter',"EmailFormat" = ""], + ['Parameter', "Action"::{"LoadRegister", + "SaveOptions", "UploadRegister", "UpMergeRegister", *************** *** 49,52 **** --- 56,63 ---- ['LinkText' = __("Reload")]], + ['Action',"SaveOptions", + "Save the register options to disk.", + ['LinkText' = __("Save options")]], + ['Action',"UploadRegister", "Load the register from a text file.", *************** *** 164,180 **** [["table","width" = "100%"], ["tr", ! [["td","width" = "16%"],`HTML/CloseButton`], ! [["td","width" = "16%"], [["a", "href" = "#bottom"],__("Bottom")]], ! [["td","width" = "17%"],{["LoadRegister"]}], ! [["td","width" = "16%"], [["a", "href" = "#AddStudent"],__("Add student")]], ! [["td","width" = "16%"], [["a", "href" = "#FindStudent"],__("Find student")]], ! [["td","width" = "16%"], [["a", "href" = "#StudentList"],__("Student list")]]]], [["hr", "noshade"]], ########## ["h2",__("Uploads and downloads")], --- 175,244 ---- [["table","width" = "100%"], ["tr", ! [["td","width" = "14%"],`HTML/CloseButton`], ! [["td","width" = "14%"], [["a", "href" = "#bottom"],__("Bottom")]], ! [["td","width" = "15%"],{["LoadRegister"]}], ! [["td","width" = "15%"],{["SaveOptions"]}], ! [["td","width" = "14%"], [["a", "href" = "#AddStudent"],__("Add student")]], ! [["td","width" = "14%"], [["a", "href" = "#FindStudent"],__("Find student")]], ! [["td","width" = "14%"], [["a", "href" = "#StudentList"],__("Student list")]]]], [["hr", "noshade"]], ########## + + [["a", "name" = "Options"],["h2",__("Options")]], + ["br"], + ["table", + ["tr", + [["td","colspan" = 3], + __("#Explain photos") + ]], + ["tr", + ["td", ["b",__("Photo URL format")]], + [["td","colspan"=2], + [["inputtext","name"="PhotoURLFormat", + "value"={"PhotoURLFormat"}, + "size" = 60]]]], + ["tr", + ["td", ["b",__("Photo size")]], + ["td", + __("Width = "), + [["inputtext","name"="PhotoWidth", + "value"={"PhotoWidth"}, + "size" = 10]], + " ", __("pixels")], + ["td", + __("Height = "), + [["inputtext","name"="PhotoHeight", + "value"={"PhotoHeight"}, + "size" = 10]], + " ", __("pixels")]], + ["tr", + [["td","colspan" = 3], + __("#Explain central records") + ]], + ["tr", + ["td", ["b",__("Records URL format")]], + [["td","colspan"=2], + [["inputtext","name"="RecordsURLFormat", + "value"={"RecordsURLFormat"}, + "size" = 60]]]], + ["tr", + [["td","colspan" = 3], + __("#Explain email format") + ]], + ["tr", + ["td", ["b",__("Email format")]], + [["td","colspan"=2], + [["inputtext","name"="EmailFormat", + "value"={"EmailFormat"}, + "size" = 50]]]] + ], + [["hr", "noshade"]], + + ########## ["h2",__("Uploads and downloads")], *************** *** 308,313 **** ['Process', proc(page::`aim/admin/Page`,p::table) ! local subject,pagetitle,regfile,register,action,textfile,err, ! selected,i,backup,id,s,studentline,studentlist,studenttable; global AimCache; --- 372,378 ---- ['Process', proc(page::`aim/admin/Page`,p::table) ! local subject,pagetitle,regfile,register,action,textfile,err,email, ! selected,i,backup,id,s,studentline,studentlist,studenttable, ! n,w; global AimCache; *************** *** 326,329 **** --- 391,405 ---- action := p["Action"]; + if action <> "LoadRegister" then + page['SetTable', + register, + 'PhotoURLFormat'::string, + 'PhotoWidth'::integer, + 'PhotoHeight'::integer, + 'RecordsURLFormat'::string, + 'EmailFormat'::string + ]; + fi; + # Extract the list of selected students. selected := NULL; *************** *** 404,407 **** --- 480,490 ---- s['EmailAddress'] := p["NewStudentEmailAddress"]; s['Password'] := p["NewStudentPassword"]; + if s['EmailAddress'] = "" and + register['EmailFormat'] <> "" then + try + s['EmailAddress'] := sprintf(register['EmailFormat'],s['ID']); + catch: + end try + fi; if s['ID'] = "" then page['SetError',__("ID for new student must not be empty.")]; *************** *** 432,436 **** studentline := ! proc(s,pg,sl) cat("<tr>\n", "<td><input type='checkbox' name='",s['ID'],"Selected'", --- 515,539 ---- studentline := ! proc(s,pg,sl,ruf,puf) ! local rct,pht; ! ! if (ruf <> "") then ! rct := ! sprintf("<td><a href=\"%s\" target=\"records\">%s</a></td>\n", ! sprintf(ruf,s['ID']), ! __("Records")); ! else ! rct := ""; ! fi; ! ! if (puf <> "") then ! pht := ! sprintf("<td><a href=\"%s\" target=\"records\">%s</a></td>\n", ! sprintf(puf,s['ID']), ! __("Photo")); ! else ! pht := ""; ! fi; ! cat("<tr>\n", "<td><input type='checkbox' name='",s['ID'],"Selected'", *************** *** 441,444 **** --- 544,548 ---- # "<td>",pg['ActionLink',"EmailStudent", [s['ID']]],"</td>\n", "<td>",s['EmailLink'],"</td>\n", + rct,pht, "<td>",pg['ActionLink',"EditStudent", [s['ID']]],"</td>\n", "<td>",pg['ActionLink',"ReviewStudent",[s['ID']]],"</td>\n", *************** *** 452,455 **** --- 556,564 ---- register['ListByName'], register['ListByID']); + + n := 5 + `if`(register['PhotoURLFormat'] = "",0,1) + + `if`(register['RecordsURLFormat'] = "",0,1); + + w := round(50/n); studenttable := *************** *** 460,475 **** "<th width='10%' align='left'>",__("ID"),"</th>", "<th width='35%' align='left'>",__("Name"),"</th>", ! "<th width='10%'> </th>", ! "<th width='10%'> </th>", ! "<th width='10%'> </th>", ! "<th width='10%'> </th>", ! "<th width='10%'> </th>", "</tr>\n", ! op(map(studentline,studentlist,page,selected)), ! "</table>\n<br/>\n"); page['Title'] := cat(__("Register:"),subject['Name']); page['FillTemplate', "Title" = pagetitle, --- 569,588 ---- "<th width='10%' align='left'>",__("ID"),"</th>", "<th width='35%' align='left'>",__("Name"),"</th>", ! sprintf("<th width='%d%%'> </th>",w)$n, "</tr>\n", ! op(map(studentline,studentlist,page,selected, ! register['RecordsURLFormat'], ! register['PhotoURLFormat'])), ! "</table>\n<br/>\n" ! ); page['Title'] := cat(__("Register:"),subject['Name']); + page['FillFromTable',register, + 'PhotoURLFormat','PhotoWidth','PhotoHeight', + 'RecordsURLFormat','EmailFormat' + ]; + page['FillTemplate', "Title" = pagetitle, Index: CompileSubject.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/CompileSubject.mpl,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** CompileSubject.mpl 7 Sep 2003 09:37:52 -0000 1.2 --- CompileSubject.mpl 10 Mar 2005 21:13:55 -0000 1.2.4.1 *************** *** 97,101 **** for srcfile in filelist do ! questions := traperror(`aim/Compile`(srcdir,srcfile)); if questions = lasterror or not type(questions,list) then --- 97,101 ---- for srcfile in filelist do ! questions := traperror(`aim/CompileFile`(srcdir,srcfile)); if questions = lasterror or not type(questions,list) then Index: Student.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Student.mpl,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** Student.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Student.mpl 10 Mar 2005 21:13:55 -0000 1.3.6.1 *************** *** 101,125 **** ["table", ["tr", - ["td", ["b",__("ID")]], - ["td", {"StudentID"}]], - ["tr", - ["td",["b",__("First name")]], - ["td", - [["inputtext","name" = "StudentFirstName", - "value" = {"StudentFirstName"}, - "size" = 50]]]], - ["tr", - ["td",["b",__("Surname")]], - ["td", - [["inputtext","name" = "StudentSurname", - "value" = {"StudentSurname"}, - "size" = 50]]]], - ["tr", - ["td",["b",__("Email address")]], ["td", ! [["inputtext","name" = "StudentEmailAddress", ! "value" = {"StudentEmailAddress"}, ! "size" = 50]]]], ! {"passwordrow"}], [["inputhidden", "name" = "StudentID", "value" = {"StudentID"}]], [["hr", "noshade"]], --- 101,129 ---- ["table", ["tr", ["td", ! ["table", ! ["tr", ! ["td", ["b",__("ID")]], ! ["td", {"StudentID"}]], ! ["tr", ! ["td",["b",__("First name")]], ! ["td", ! [["inputtext","name" = "StudentFirstName", ! "value" = {"StudentFirstName"}, ! "size" = 50]]]], ! ["tr", ! ["td",["b",__("Surname")]], ! ["td", ! [["inputtext","name" = "StudentSurname", ! "value" = {"StudentSurname"}, ! "size" = 50]]]], ! ["tr", ! ["td",["b",__("Email address")]], ! ["td", ! [["inputtext","name" = "StudentEmailAddress", ! "value" = {"StudentEmailAddress"}, ! "size" = 50]]]], ! {"passwordrow"}], ! ["td",{"image"}]]]], [["inputhidden", "name" = "StudentID", "value" = {"StudentID"}]], [["hr", "noshade"]], *************** *** 133,137 **** proc(page::`aim/admin/Page`,p::table) local action,subject,register,r,status,matches,student,w,id, ! passwordrow,passwordacts,sendemail; action := p["Action"]; --- 137,141 ---- proc(page::`aim/admin/Page`,p::table) local action,subject,register,r,status,matches,student,w,id, ! passwordrow,passwordacts,sendemail,image; action := p["Action"]; *************** *** 283,286 **** --- 287,302 ---- fi; + if register['PhotoURLFormat'] <> "" then + image := + sprintf( + "<img src='%s' width='%d' height='%d' alt='Photo of %s'/>\n", + sprintf(register['PhotoURLFormat'],student['ID']), + register['PhotoWidth'],register['PhotoHeight'], + student['Name'] + ); + else + image := ""; + fi; + page['Title'] := cat(__("Student:"),subject['Name'],":",student['Surname']); *************** *** 294,298 **** "sendemail" = student['EmailLink'], "passwordrow" = passwordrow, ! "passwordacts" = passwordacts ]; --- 310,315 ---- "sendemail" = student['EmailLink'], "passwordrow" = passwordrow, ! "passwordacts" = passwordacts, ! "image" = image ]; |
From: Neil S. <nps...@us...> - 2005-03-10 21:14:06
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/locales In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4024/maple/locales Modified Files: Tag: aim-xml en.mpl Log Message: Index: en.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/locales/en.mpl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** en.mpl 10 Oct 2003 09:49:31 -0000 1.5 --- en.mpl 10 Mar 2005 21:13:55 -0000 1.5.2.1 *************** *** 415,416 **** --- 415,440 ---- <b>Footer</b> box can be used for things appearing below the table. ": + + __("#Explain photos") := + "If photos of your students are available on the web, via a URL + depending only on the student ID, then you should enter the URL in + the box below. It should be entered with + <tt><font color='green'>%s</font></tt> in place of the student ID. + ": + + __("#Explain central records") := + "If your central university student records can be accessed over the + web, via a URL depending only on the student ID, then you should + enter the URL in the box below. It should be entered with + <tt><font color='green'>%s</font></tt> in place of the student ID. + ": + + __("#Explain email format") := + "If you have a setup where students use their email addresses as IDs, + you should fill in the box to specify this. For example, if things + are set up so that the student with ID + <tt><font color='green'>xyz123</font></tt> has email address + <tt><font color='green'>xy...@ai...</font></tt>, then you + should enter <tt><font color='green'>%s...@ai...</font></tt> + in the box. + ": |
From: Neil S. <nps...@us...> - 2004-10-20 19:27:23
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18197/WEB-INF/maple Modified Files: Tag: aim-xml PackageList Log Message: Added XML and SOAP packages Index: PackageList =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/PackageList,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** PackageList 12 Jan 2004 05:58:12 -0000 1.8 --- PackageList 20 Oct 2004 19:27:13 -0000 1.8.2.1 *************** *** 9,13 **** --- 9,15 ---- Cache ImageCache + XML HTML + SOAP aim/LaTeX Local |
From: Neil S. <nps...@us...> - 2004-10-20 19:26:00
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17648/WEB-INF/maple Modified Files: Tag: aim-xml FullPackage.mpl XML.mpl Added Files: Tag: aim-xml SOAP.mpl Log Message: Added 'AlwaysReload' option Index: FullPackage.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/FullPackage.mpl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** FullPackage.mpl 22 Oct 2003 13:50:24 -0000 1.5 --- FullPackage.mpl 20 Oct 2004 19:25:49 -0000 1.5.2.1 *************** *** 90,98 **** # With(<packagename>) loads the named package, if it has not been ! # loaded already. The second argument is used if With() calls # itself recursively to load packages on which the named package # depends. Its only effect is on the indentation of progress # messages. With := proc(packname::string,level_::integer) global `Package/Dependencies`; --- 90,102 ---- # With(<packagename>) loads the named package, if it has not been ! # loaded already. If the global variable AlwaysReload is true, ! # then the package is reloaded even if it has previously been loaded. ! # The second argument is used if With() calls # itself recursively to load packages on which the named package # depends. Its only effect is on the indentation of progress # messages. + AlwaysReload := false; + With := proc(packname::string,level_::integer) global `Package/Dependencies`; *************** *** 103,107 **** if level >= 0 then prefix := cat(" "$level); fi; ! if (eval(convert(cat(packname,"/IsLoaded"),name)) = true) then if level >= 0 then printf("%sPackage %s already loaded\n",prefix,packname); --- 107,112 ---- if level >= 0 then prefix := cat(" "$level); fi; ! if (eval(convert(cat(packname,"/IsLoaded"),name)) = true and ! AlwaysReload <> true) then if level >= 0 then printf("%sPackage %s already loaded\n",prefix,packname); Index: XML.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Attic/XML.mpl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** XML.mpl 14 Oct 2004 11:08:54 -0000 1.1.2.1 --- XML.mpl 20 Oct 2004 19:25:50 -0000 1.1.2.2 *************** *** 13,23 **** `Package/Assign`( `type/XML/Var`::type, "@type(x,`XML/Var`)@ is @true@ if @x@ is of the form `XML/Var`@(something)@ or `XML/ValueVar`@(something)@ ! or `XML/AttributeVar`@(something)@.", {specfunc(anything,`XML/Var`), specfunc(anything,`XML/ValueVar`), ! specfunc(anything,`XML/AttributeVar`)} ): --- 13,35 ---- `Package/Assign`( + `XML/SchemaURI`::string, + "", + "http://www.w3.org/1999/XMLSchema" + ): + + `Package/Assign`( + `XML/SchemaInstanceURI`::string, + "", + "http://www.w3.org/1999/XMLSchema-Instance" + ): + + `Package/Assign`( `type/XML/Var`::type, "@type(x,`XML/Var`)@ is @true@ if @x@ is of the form `XML/Var`@(something)@ or `XML/ValueVar`@(something)@ ! or `XML/AttribVar`@(something)@.", {specfunc(anything,`XML/Var`), specfunc(anything,`XML/ValueVar`), ! specfunc(anything,`XML/AttribVar`)} ): *************** *** 30,37 **** `Package/Assign`( ! `type/XML/AttributeVar`::type, ! "@type(x,`XML/AttributeVar`)@ is @true@ if @x@ is of the form ! `XML/AttributeVar`@(something)@.", ! {specfunc(anything,`XML/AttributeVar`)} ): --- 42,49 ---- `Package/Assign`( ! `type/XML/AttribVar`::type, ! "@type(x,`XML/AttribVar`)@ is @true@ if @x@ is of the form ! `XML/AttribVar`@(something)@.", ! {specfunc(anything,`XML/AttribVar`)} ): *************** *** 54,57 **** --- 66,73 ---- ###################################################################### + `Package/Assign`(`XML/AiMNamespaceURI`, + "", + "http://aiminfo.net/xml/aim.html" + ): ###################################################################### *************** *** 92,96 **** local msg,qn,i; ! this['Attributes'] := table([]); this['NamespaceTable'] := eval(`XML/NamespaceTable`); --- 108,112 ---- local msg,qn,i; ! this['Attribs'] := table([]); this['NamespaceTable'] := eval(`XML/NamespaceTable`); *************** *** 105,109 **** type(head[1],string) then qn := head[1]; ! this['SetAttributes',op(head[2..-1])]; else msg := --- 121,125 ---- type(head[1],string) then qn := head[1]; ! this['SetAttribs',op(head[2..-1])]; else msg := *************** *** 115,122 **** if i > 0 then this['Prefix'] := substring(qn,1..i-1); ! this['Name'] := substring(qn,i+1..-1); else this['Prefix'] := ""; ! this['Name'] := qn; fi; --- 131,138 ---- if i > 0 then this['Prefix'] := substring(qn,1..i-1); ! this['Type'] := substring(qn,i+1..-1); else this['Prefix'] := ""; ! this['Type'] := qn; fi; *************** *** 192,201 **** return(t[prefix]); else ! return(NULL); fi; end ], ! ['Field','Attributes'::table, "The table of attributes of the element, indexed by pairs @(attribute prefix,attribute name)@. --- 208,218 ---- return(t[prefix]); else ! error(sprintf( ! __("Prefix %a is not mapped to any namespace"),prefix)); fi; end ], ! ['Field','Attribs'::table, "The table of attributes of the element, indexed by pairs @(attribute prefix,attribute name)@. *************** *** 203,207 **** ], ! ['Method','SetAttributes'::'void', "The arguments should be attribute equations; they are added to the attributes of the element. Qualified names can be --- 220,224 ---- ], ! ['Method','SetAttribs'::'void', "The arguments should be attribute equations; they are added to the attributes of the element. Qualified names can be *************** *** 217,227 **** ", proc(this) ! local x,qn,v,a,msg,i; ! a := eval(this['Attributes']); for x in args[2..-1] do ! if type(x,`MapleXML/Attribute`) then ! qn := [op([1,2],x),op([1,1],x)]; v := op([2,1],x); else --- 234,251 ---- ", proc(this) ! local x,n,qn,v,a,msg,i; ! a := eval(this['Attribs']); for x in args[2..-1] do ! if type(x,`MapleXML/Attrib`) then ! n := op(1,x); ! if nops(n) = 1 then ! qn := ["",op(1,n)]; ! else ! qn := [op(2,n),op(1,n)]; ! fi; ! ### This is not correct when there are entity references in the ! ### attribute value. v := op([2,1],x); else *************** *** 297,306 **** ], ! ['Method','ClearAttributes'::'void', "Remove all attributes of the element. The namespace table is not changed, which could in principle lead to inconsistencies. ", ! proc(this) this['Attributes'] := table([]); NULL; end ], --- 321,330 ---- ], ! ['Method','ClearAttribs'::'void', "Remove all attributes of the element. The namespace table is not changed, which could in principle lead to inconsistencies. ", ! proc(this) this['Attribs'] := table([]); NULL; end ], *************** *** 317,321 **** local newcontents; ! newcontents := map(`XML/NewElementAux`,[args[2..-1]]); this['Contents'] := [op(this['Contents']), --- 341,346 ---- local newcontents; ! newcontents := ! map(`XML/NewElementAux`,[args[2..-1]],this['NamespaceTable']); this['Contents'] := [op(this['Contents']), *************** *** 365,368 **** --- 390,533 ---- ], + ['Method','GetChildrenByName', + "", + proc(this,n::string) + select( + x -> (traperror(evalb(x['Type'] = n)) = true), + this['Contents'] + ); + end + ], + + ['Method','GetChildrenByQName', + "", + proc(this,nam::{string,[string,string]}) + local pl; + pl := `XML/SplitName`(nam); + select( + x -> (traperror(evalb(x['Prefix'] = pl[1] and x['Type'] = pl[2])) = true), + this['Contents'] + ); + end + ], + + ['Method','GetChildrenByFQName', + "", + proc(this,uri::string,n::string) + select( + x -> (traperror(evalb(x['NamespaceURI'] = uri and x['Type'] = n)) = true), + this['Contents'] + ); + end + ], + + ['Method','GetChildByName', + "", + proc(this,n::string) + local c; + c := select( + x -> (traperror(evalb(x['Type'] = n)) = true), + this['Contents'] + ); + `if`(nops(c)=0,NULL,c[1]); + end + ], + + ['Method','GetChildByQName', + "", + proc(this,p_::string,n_::string) + local p,n,c,s,i; + p := ""; + n := ""; + if nargs = 2 then + s := args[2]; + i := searchtext(":",s); + if (i > 0) then + p := substring(s,1..i-1); + n := substring(s,i+1..-1); + else + p := ""; + n := s; + fi; + elif nargs = 3 then + p := args[2]; + n := args[3]; + fi; + c := select( + x -> (traperror(evalb(x['Prefix'] = p and x['Type'] = n)) = true), + this['Contents'] + ); + `if`(nops(c)=0,NULL,c[1]); + end + ], + + ['Method','GetChildByFQName', + "", + proc(this,uri::string,n::string) + local c; + c := select( + x -> (traperror(evalb(x['NamespaceURI'] = uri and x['Type'] = n)) = true), + this['Contents'] + ); + `if`(nops(c)=0,NULL,c[1]); + end + ], + + ['Method','GetAttribByName', + "", + proc(this,n::string) + local a,l,x; + a := eval(this['Attribs']); + l := select(x -> (x[2]=n),[indices(a)]); + if (l = []) then return(NULL); fi; + x := l[1]; + return(a[op(x)]); + end + ], + + ['Method','GetAttribByQName', + "", + proc(this,p_::string,n_::string) + local p,n,c,s,i,a; + p := ""; + n := ""; + if nargs = 2 then + s := args[2]; + i := searchtext(":",s); + if (i > 0) then + p := substring(s,1..i-1); + n := substring(s,i+1..-1); + else + p := ""; + n := s; + fi; + elif nargs = 3 then + p := args[2]; + n := args[3]; + fi; + a := eval(this['Attribs']); + if member([p,n],indices(a)) then + return(eval(a[p,n]),1); + else + return(NULL); + fi; + end + ], + + ['Method','GetAttribByFQName', + "", + proc(this,uri::string,n::string) + local a,t,l,x; + a := eval(this['Attribs']); + t := eval(this['NamespaceTable']); + l := select(x -> (x[2]=n),[indices(a)]); + if (l = []) then return(NULL); fi; + l := select(x -> (t[x[1]]=uri),l); + if (l = []) then return(NULL); fi; + x := l[1]; + return(a[op(x)]); + end + ], + ['Method','ToSeq', "", *************** *** 373,377 **** s := "<",this['QName']; ! attribtable := eval(this['Attributes']); for namix in indices(attribtable) do --- 538,542 ---- s := "<",this['QName']; ! attribtable := eval(this['Attribs']); for namix in indices(attribtable) do *************** *** 386,390 **** if type(val,`XML/ValueVar`) then ! s := s,`XML/AttributeVar`(nam,op(val)); elif val <> NULL then s := s," ",qn,"=",`XML/ValueEscape`(val); --- 551,555 ---- if type(val,`XML/ValueVar`) then ! s := s,`XML/AttribVar`(nam,op(val)); elif val <> NULL then s := s," ",qn,"=",`XML/ValueEscape`(val); *************** *** 627,631 **** elif type(x,`XML/ValueVar`) then s := s,sprintf("%a",{op(x)}); ! elif type(x,`XML/AttributeVar`) then s := s,sprintf(" %a={%a}",op(1,x),op(2,x)); elif type(x,`XML/Var`) then --- 792,796 ---- elif type(x,`XML/ValueVar`) then s := s,sprintf("%a",{op(x)}); ! elif type(x,`XML/AttribVar`) then s := s,sprintf(" %a={%a}",op(1,x),op(2,x)); elif type(x,`XML/Var`) then *************** *** 700,704 **** The return value is a copy of @x@ with all occurences of @`XML/Var`(n)@ replaced by @v@, and similarly for ! @`XML/ValueVar`@ and @`XML/AttributeVar`@ ", proc() --- 865,869 ---- The return value is a copy of @x@ with all occurences of @`XML/Var`(n)@ replaced by @v@, and similarly for ! @`XML/ValueVar`@ and @`XML/AttribVar`@ ", proc() *************** *** 734,738 **** if type(u,`XML/Var`) and assigned(v[op(u)]) then v[op(u)]; ! elif type(u,`XML/AttributeVar`) and assigned(v[op(2,u)]) then a := v[op(2,u)]; if a = NULL then --- 899,903 ---- if type(u,`XML/Var`) and assigned(v[op(u)]) then v[op(u)]; ! elif type(u,`XML/AttribVar`) and assigned(v[op(2,u)]) then a := v[op(2,u)]; if a = NULL then *************** *** 766,771 **** b := subs( 38 = (38, 97, 109, 112, 59), # & 60 = (38, 108, 116, 59), # < ! 62 = (38, 103, 116, 59), # > ! 34 = (38, 113, 117, 111, 116, 59), # " b); --- 931,936 ---- b := subs( 38 = (38, 97, 109, 112, 59), # & 60 = (38, 108, 116, 59), # < ! 62 = (38, 103, 116, 59), # > ! 34 = (38, 113, 117, 111, 116, 59), # " b); *************** *** 867,871 **** type(x,function) and op(0,x) = '_XML_ElementType' and ! type([op(x)],[string$3]) ); end --- 1032,1036 ---- type(x,function) and op(0,x) = '_XML_ElementType' and ! type([op(x)],{[string],[string$3]}) ); end *************** *** 873,877 **** `Package/Assign`( ! `type/MapleXML/Attribute`, "", proc(x) --- 1038,1042 ---- `Package/Assign`( ! `type/MapleXML/Attrib`, "", proc(x) *************** *** 891,895 **** type(x,function) and op(0,x) = '_XML_AttrName' and ! type([op(x)],[string$3]) ); end --- 1056,1060 ---- type(x,function) and op(0,x) = '_XML_AttrName' and ! type([op(x)],{[string],[string$3]}) ); end *************** *** 928,944 **** t := op(1,e); x := `new/XML/Element`(); ! x['Type'] := op(1,t); ! x['Prefix'] := op(2,t); if nargs > 1 then ! x['NamespaceTable'] := eval(p); x['NamespaceTableInherited'] := true; ! elif op(2,t) <> "" or op(3,t) <> "" then ! n := copy(`XML/NamespaceTable`); ! n[op(2,t)] := op(3,t); ! fi; ! x['SetAttributes',op(op(2,e))]; ! x['Contents'] := ! map(`XML/NewElementAux`,op(3,e)); RETURN(eval(x)); --- 1093,1108 ---- t := op(1,e); x := `new/XML/Element`(); ! x['Type'] := op(1,t); ! x['Prefix'] := `if`(nops(t)>1,op(2,t),""); ! if nargs > 1 then ! x['NamespaceTable'] := eval(p_); x['NamespaceTableInherited'] := true; ! fi; ! x['SetAttribs',op(op(2,e))]; ! x['Contents'] := ! map(`XML/NewElementAux`,op(3,e), ! eval(x['NamespaceTable'])); RETURN(eval(x)); *************** *** 946,949 **** --- 1110,1164 ---- ): + `Package/Assign`( + `XML/Parse`, + "", + proc(s::string) + global x; + x := XMLTools:-ParseString(s); + eval(`XML/Objectify`(op(1,x))); + end + ): + + `Package/Assign`( + `XML/SplitName`::[string,string], + "Given a name (which may include a colon), return a list + @[prefix,local name]@. + ", + proc(nam::{string,[string,string]}) + local i,localname,prefix; + if type(nam,list) then return(nam); fi; + + i := searchtext(":",nam); + if i > 0 then + prefix := substring(nam,1..i-1); + localname := substring(nam,i+1..-1); + return([prefix,localname]); + else + return(["",nam,""]); + fi; + end + ): + + `Package/Assign`( + `XML/QualifyName`::[string,string,string], + "Given a name (which may include a colon), and optionally a + table of prefix to URI translations, return a list + @[prefix,local name,URI]@. + ", + proc(nam::{string,[string,string]},namespacetable_::table) + local s,t,i,localname,prefix,uri; + + s := `XML/SplitName`(nam); + t := `if`(nargs > 1, + eval(namespacetable_), + eval(`XML/NamespaceTable`)); + uri := t[s[1]]; + if (not(type([uri],[string]))) then + error(sprintf(__("Unknown prefix: %a"),s[1])); + fi; + return([s[1],s[2],uri]); + end + ): + ###################################################################### --- NEW FILE: SOAP.mpl --- # Copyright (C) 2004 Neil Strickland # Distributed without warranty under the GPL - see README for details read("Package.mpl"): Package("SOAP"," This package defines a number of convenient methods for working with SOAP. "): `Package/Dependencies` := []: `Package/Assign`( `SOAP/EnvelopeURIs`::list(string), "", ["http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/2003/05/soap-envelope"] ): `Package/Assign`( `SOAP/SOAPEncodingURI`::string, "", "http://schemas.xmlsoap.org/soap/encoding/" ): `Class/Declare`( `SOAP/Message`, "", ['Constructor', "", proc(this) this['Header'] := NULL; this['Body'] := NULL; end ], ['Field','encodingStyle'::string], ['Field','Header'::`XML/Element`], ['Field','Body'::`XML/Element`], ['Field','RPCCommand'::string], ['Field','RPCCommandNamespace'::string], ['Field','RPCParameters'::table], ['Field','RPCParameterTypes'::table], ['Method','HeaderBlocks'::list(`XML/Element`), "", proc(this) eval(this['Header'])['Contents']; end ], ['Method','MandatoryHeaderBlocks'::list(`XML/Element`), "", proc(this) local b; b := eval(this['Header'])['Contents']; select(x -> member(x['GetHeaderByFQName', `SOAP/EnvelopeURIs`[1], "mustUnderstand"], {"1","true"}), b); end ], ['Method','AddHeader', "", proc(this) if this['Header'] = NULL then this['Header'] := `new/XML/Element`("soap:Header"); fi; eval(this['Header'])['AddContents',args[2..-1]]; end ], ['Method','AddBody'::void, "", proc(this) if this['Body'] = NULL then this['Body'] := `new/XML/Element`("soap:Body"); fi; eval(this['Body'])['AddContents',args[2..-1]]; end ], ['Method','AddFault'::void, "", proc(this, code::{string,[string,string]}, reason::{string,table}, detail_) local c,rt,r,f; if this['Body'] = NULL then this['Body'] := `new/XML/Element`("soap:Body"); fi; if type(code,string) then c := `new/XML/Element`( "soap:Code", ["soap:Value",code] ); else c := `new/XML/Element`( "soap:Code", ["soap:Value",code[1]], ["soap:Subcode",["soap:Value",code[2]]] ); fi; if type(reason,string) then rt := table("en" = reason); else rt := eval(reason); fi; r := `new/XML/Element`( "soap:Reason", op(map( i -> [["soap:Text","xml:lang"=op(i)],rt[op(i)]] , [indices(rt)])) ); f := `new/XML/Element`("soap:Fault",c,r); if nargs > 3 then f['AddContents',["soap:Detail",detail_]]; fi; eval(this['Body'])['AddContents',eval(f)]; end ], ['Method','ToXML'::`XML/Element`, "", proc(this) return( `new/XML/Element`( ["soap:Envelope", "xmlns:soap" = `SOAP/EnvelopeURIs`[1], "xmlns:xsd" = `XML/SchemaURI`, "xmlns:xsi" = `XML/SchemaInstanceURI`, "soap:encodingStyle" = this['encodingStyle'] ], eval(this['Header']), eval(this['Body']) ) ); end ], ['Method','ToString'::string, "", proc(this) eval(this['ToXML'])['ToString']; end ], ['Method','Print'::void, "", proc(this) printf("%s\n\n",eval(this['ToXML'])['ToString']): end ] ): `Package/Assign`( `SOAP/ParseXMLMessage`::`SOAP/Message`, "", proc(x::{string,`XML/Element`}) local t,y,z,c,h,b; t := `new/SOAP/Message`(); if type(x,string) then y := `XML/Parse`(x); else y := eval(x); fi; if not(y['Type'] = "Envelope" and member(y['NamespaceURI'],`SOAP/EnvelopeURIs`)) then error( sprintf( __("Element type is {%s}:%s, namespace not in %a"), y['NamespaceURI'],y['Type'], `SOAP/EnvelopeURIs`)); fi; t['encodingStyle'] := y['GetAttribByFQName',`SOAP/EnvelopeURI`,"encodingStyle"]; c := y['Contents']; c := remove(a -> type(a,string) and `Util/WhiteSpace`(a),c); if c = [] then return(NULL); fi; h := c[1]; if not(type(h,`XML/Element`)) then error(__("Malformed SOAP message: child is not an element")); fi; if not(member(h['NamespaceURI'],`SOAP/EnvelopeURIs`)) then error( sprintf( __("Malformed SOAP message: first child namespace is %a, not in %a"), h['NamespaceURI'],`SOAP/EnvelopeURIs`)); fi; if h['Type'] = "Header" then t['Header'] := eval(h); if nops(c) > 1 then if nops(c) > 2 then error(__("Malformed SOAP message: too many children")); else b := c[2]; if not(type(b,`XML/Element`)) then error(__("Malformed SOAP message: body is not an element")); fi; if not(member(b['NamespaceURI'],`SOAP/EnvelopeURIs`)) then error( sprintf( __("Malformed SOAP message: body namespace is %a, not in %a"), b['NamespaceURI'],`SOAP/EnvelopeURIs`)); fi; if b['Type'] <> "Body" then error(__("Malformed SOAP message: second child is not Body")); fi; t['Body'] := eval(b); fi; fi; return(eval(t)); elif h['Type'] = "Body" then t['Header'] := NULL; if not(type(h,`XML/Element`)) then error(__("Malformed SOAP message: body is not an element")); fi; if not(member(h['NamespaceURI'],`SOAP/EnvelopeURIs`)) then error( sprintf( __("Malformed SOAP message: body namespace is %a, not in %a"), h['NamespaceURI'],`SOAP/EnvelopeURIs`)); fi; if h['Type'] <> "Body" then error(__("Malformed SOAP message: first child is neither Header nor Body")); fi; t['Body'] := eval(h); if nops(c) > 1 then error(__("Malformed SOAP message: extra child(ren)")); fi; return(eval(t)); else error( sprintf(__("Malformed SOAP message: child of invalid type: %a\n"), h['Type'])); fi; end ): `Package/Assign`( `SOAP/ParseParameter`::(string=[string,anything]), "", proc(param::`XML/Element`) local pname,ptype,pvalue,qptype,t,c,cs,err,v; pname := param['Type']; ptype := param['GetAttribByFQName', `XML/SchemaInstanceURI`, "type"]; c := param['Children']; if ptype = NULL then return(pname = ["",op(c)]); fi; if type(c,list(string)) then cs := cat(op(s)); else cs := ""; fi; qptype := `XML/QualifyName`(ptype,param['NamespaceTable']); err := sprintf(__("Cannot parse parameter %s as string"),pname); if qptype[3] = `XML/SchemaInstanceURI` then t := qptype[2]; if member(t,{"string","anyURI","base64Binary","hexBinary"}) then if type(c,list(string)) then return(pname=[t,cat(op(c))]); else error(err); fi; elif member(t,{"decimal","double","float"}) then v := sscanf(cs,"%f"); if v = [] then error(err); else return(pname=[t,v[1]]); fi; elif t = "integer" then v := sscanf(cs,"%d"); if v = [] then error(err); else return(pname=[t,v[1]]); fi; elif t = "boolean" then v := sscanf(cs,"%a"); if v = [] then error(err); else return(pname=[t, evalb(member(v[1],{1,true}))]); fi; elif t = "date" then # dates are converted to `Date/ListDate` form, ie # a list [year,month,day,hour=0,minute=0,second=0] v := sscanf(cs,"%4d-%2d-%2d"); if nops(v)<3 then error(err); else return(pname=[t,[op(v),0,0,0]]); fi; elif t = "time" then # TODO: fractional seconds, time zones # http://www.w3.org/TR/xmlschema-2/#time v := sscanf(cs,"%2d:%2d:%2d"); if nops(v)<3 then error(err); else return(pname=[t,[op(v)]]); fi; elif t = "dateTime" then # TODO: fractional seconds, time zones # http://www.w3.org/TR/xmlschema-2/#dateTime v := sscanf(cs,"%4d-%2d-%2dT%2d:%2d:%2d"); if nops(v)<6 then error(err); else return(pname=[t,[op(v)]]); fi; fi; fi; end ): `Package/Assign`( `SOAP/ParseRPCCall`, "", proc(x::{string,`XML/Element`}) local t,cc,c,params,types,e; t := `SOAP/ParseXMLMessage`(x); cc := eval(t['Body'])['Children']; if nops(cc) = 0 then error(__("No RPC command")); elif nops(cc) > 1 then error(__("RPC body has more than one child")); fi; c := cc[1]; t['RPCCommand'] := c['Type']; t['RPCCommandNamespace'] := c['NamespaceURI']; e := map(`SOAP/ParseParameter`,c['Children']); t['RPCParameters'] := table(map(x -> (lhs(x) = rhs(x)[2]),e)); t['RPCParameterTypes'] := table(map(x -> (lhs(x) = rhs(x)[1]),e)); return(eval(t)); end ): |
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15704/WEB-INF/classes Modified Files: Tag: aim-xml 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.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 Binary files /tmp/cvsw4S7SX and /tmp/cvsjSw1pL differ Index: AliceLog.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLog.class,v retrieving revision 1.6.4.2 retrieving revision 1.6.4.3 diff -C2 -d -r1.6.4.2 -r1.6.4.3 Binary files /tmp/cvsAo4an8 and /tmp/cvst0nOZV differ Index: Maple.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Maple.class,v retrieving revision 1.4.4.2 retrieving revision 1.4.4.3 diff -C2 -d -r1.4.4.2 -r1.4.4.3 Binary files /tmp/cvsqNbucc and /tmp/cvsEIsQSZ differ Index: AliceLogEntry.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLogEntry.class,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 Binary files /tmp/cvsYfQDli and /tmp/cvsuEk535 differ Index: AliceRequest.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceRequest.class,v retrieving revision 1.7.4.2 retrieving revision 1.7.4.3 diff -C2 -d -r1.7.4.2 -r1.7.4.3 Binary files /tmp/cvsfyDH0Z and /tmp/cvsBxifdO differ Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.6.4.2 retrieving revision 1.6.4.3 diff -C2 -d -r1.6.4.2 -r1.6.4.3 Binary files /tmp/cvs5o66Z2 and /tmp/cvsxKtdkR differ |