aimmath-commit Mailing List for AiM Assessment in Mathematics (Page 19)
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: <gus...@us...> - 2003-08-27 14:21:31
|
Update of /cvsroot/aimmath/moodle/mod/aim_quiz In directory sc8-pr-cvs1:/tmp/cvs-serv19295 Modified Files: aimpage.php deleteserver.php depends.php editgrade.php index.php lib.php servers.php subjects.php version.php view.php Log Message: minor fixes supplied by Alex Index: aimpage.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/aimpage.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** aimpage.php 25 Aug 2003 16:24:04 -0000 1.1.1.1 --- aimpage.php 27 Aug 2003 14:21:24 -0000 1.2 *************** *** 118,121 **** --- 118,123 ---- $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; } + else + $navigation = ""; $straim_quizzes = get_string("modulenameplural", "aim_quiz"); Index: deleteserver.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/deleteserver.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Index: depends.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/depends.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Index: editgrade.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/editgrade.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** editgrade.php 25 Aug 2003 16:24:04 -0000 1.1.1.1 --- editgrade.php 27 Aug 2003 14:21:24 -0000 1.2 *************** *** 44,47 **** --- 44,49 ---- unset($err); if (isset($grade) && isset($comment)) { + if (get_magic_quotes_gpc()) + $comment= stripslashes($comment); $grade = trim($grade); if ($grade == "-") { // reset override (clear grade) *************** *** 76,79 **** --- 78,83 ---- $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; } + else + $navigation = ""; $straim_quizzes = get_string("modulenameplural", "aim_quiz"); Index: index.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/index.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.php 25 Aug 2003 16:24:04 -0000 1.1.1.1 --- index.php 27 Aug 2003 14:21:24 -0000 1.2 *************** *** 28,31 **** --- 28,33 ---- $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; } + else + $navigation = ""; print_header("$course->shortname: $straim_quizzes", "$course->fullname", "$navigation $straim_quizzes"); Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/lib.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Index: servers.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/servers.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Index: subjects.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/subjects.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Index: version.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/version.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Index: view.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/view.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** view.php 25 Aug 2003 16:24:13 -0000 1.1.1.1 --- view.php 27 Aug 2003 14:21:24 -0000 1.2 *************** *** 48,62 **** $strgrades = get_string("grades"); if (isteacher($course->id)) { // Get a list of all students if (!$students = get_course_students($course->id, "u.lastname ASC")) { - if ($course->category) { - $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; - } - - $straim_quizzes = get_string("modulenameplural", "aim_quiz"); - $straim_quiz = get_string("modulename", "aim_quiz"); - print_header("$course->shortname: $aim_quiz->name", "$course->fullname", "$navigation <A HREF=\"index.php?id=$course->id\">$straim_quizzes</A> -> $aim_quiz->name", --- 48,64 ---- $strgrades = get_string("grades"); + if ($course->category) { + $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; + } + else + $navigation = ""; + + $straim_quizzes = get_string("modulenameplural", "aim_quiz"); + $straim_quiz = get_string("modulename", "aim_quiz"); + if (isteacher($course->id)) { // Get a list of all students if (!$students = get_course_students($course->id, "u.lastname ASC")) { print_header("$course->shortname: $aim_quiz->name", "$course->fullname", "$navigation <A HREF=\"index.php?id=$course->id\">$straim_quizzes</A> -> $aim_quiz->name", *************** *** 155,165 **** } else { // Just print the web page - - if ($course->category) { - $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; - } - - $straim_quizzes = get_string("modulenameplural", "aim_quiz"); - $straim_quiz = get_string("modulename", "aim_quiz"); print_header("$course->shortname: $aim_quiz->name", "$course->fullname", --- 157,160 ---- |
From: <gus...@us...> - 2003-08-27 14:21:28
|
Update of /cvsroot/aimmath/moodle/mod/aim_quiz/db In directory sc8-pr-cvs1:/tmp/cvs-serv19295/db Modified Files: mysql.php Log Message: minor fixes supplied by Alex Index: mysql.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/db/mysql.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 |
From: <gus...@us...> - 2003-08-27 10:11:47
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv10148/doc Modified Files: installwin.html Log Message: we need the process.exe even though we don't need it because some code requiring it was committed to CVS in the past. Index: installwin.html =================================================================== RCS file: /cvsroot/aimmath/AIM/doc/installwin.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** installwin.html 27 Aug 2003 07:53:58 -0000 1.4 --- installwin.html 27 Aug 2003 10:11:43 -0000 1.5 *************** *** 68,76 **** <h2><a name="jre">Java</a></h2> ! You need to have a java runtime environment (JRE) installed on your machine. ! If you don't have it already, you can install it by downloading and running the <a href="http://aimmath.sourceforge.net/j2re-1_4_2_01-windows-i586.exe">installer for JRE 1.4.2</a> (14MB) from <a href="http://java.sun.com">java.sun.com</a>. Just follow the default installation procedure. It will ! install the JRE into the folder <font color='green'>C:/Program Files/Java/j2re1.4.2</font>. <h2><a name="tomcat">Tomcat</a></h2> --- 68,75 ---- <h2><a name="jre">Java</a></h2> ! If you don't have a java runtime environment already, you can install it by downloading and running the <a href="http://aimmath.sourceforge.net/j2re-1_4_2_01-windows-i586.exe">installer for JRE 1.4.2</a> (14MB) from <a href="http://java.sun.com">java.sun.com</a>. Just follow the default installation procedure. It will ! install the JRE into the folder <font color='green'>C:/Program Files/Java/j2re1.4.2_01/bin</font>. Restart your computer to complete the installation. <h2><a name="tomcat">Tomcat</a></h2> *************** *** 80,88 **** the automatic installer for <a href="http://aimmath.sourceforge.net/tomcat-4.1.27.exe"> ! tomcat 4.1.27</a>. When the installer offers you to change the default installation location, I recommend you choose <font color='green'>C:\Tomcat</font> because it will be easier to find than the default location deep inside the <font color='green'>C:\Program Files</font> folder. Towards the end of the installation you will also be asked for the port number, you can simply ! leave it at the default <font color='green'>8080</font>. You will be able to create an admin account on the Tomcat manager. --- 79,87 ---- the automatic installer for <a href="http://aimmath.sourceforge.net/tomcat-4.1.27.exe"> ! tomcat 4.1.27</a> (8.73 MB). When the installer offers you to change the default installation location, I recommend you choose <font color='green'>C:\Tomcat</font> because it will be easier to find than the default location deep inside the <font color='green'>C:\Program Files</font> folder. Towards the end of the installation you will also be asked for the port number, you can simply ! leave it at the default <font color='green'>8080</font>. Finally you will be asked to choose a password for admin account on the Tomcat manager. *************** *** 113,118 **** <p/> </li> ! <li>Open the <a href="..\WEB-INF\maple\" target="new">maple folder</a> of your new AiM installation. (Just clicking the link ! should do it.) In the folder you will find a Maple worksheet <font color='green'>AutoConfWin.mws</font>. Open it in Maple (for example by double-clicking on it). In this worksheet you can first make changes to the default configuration, as explained there. Then execute the worksheet. The worksheet will find out most of the necessary configuration information automatically. --- 112,117 ---- <p/> </li> ! <li>Open the maple subfolder of your new AiM installation. (If you installed AiM in the default location then the folder is <a href="file://c:\Tomcat\webapps\AiM\WEB-INF\maple" target="new">c:\Tomcat\webapps\AiM\WEB-INF\maple</a>. Just clicking the link ! should open the folder in an Explorer window.) In the folder you will find a Maple worksheet <font color='green'>AutoConfWin.mws</font>. Open it in Maple (for example by double-clicking on it). In this worksheet you can first make changes to the default configuration, as explained there. Then execute the worksheet. The worksheet will find out most of the necessary configuration information automatically. |
From: <gus...@us...> - 2003-08-27 10:11:47
|
Update of /cvsroot/aimmath/AIM/bin/process In directory sc8-pr-cvs1:/tmp/cvs-serv10148/bin/process Added Files: Process.exe Readme.txt Log Message: we need the process.exe even though we don't need it because some code requiring it was committed to CVS in the past. |
From: <gus...@us...> - 2003-08-27 10:11:47
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv10148/WEB-INF/maple Modified Files: AutoConfWin.mws Log Message: we need the process.exe even though we don't need it because some code requiring it was committed to CVS in the past. Index: AutoConfWin.mws =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConfWin.mws,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AutoConfWin.mws 27 Aug 2003 09:29:57 -0000 1.1 --- AutoConfWin.mws 27 Aug 2003 10:11:43 -0000 1.2 *************** *** 428,431 **** oblems = false then read(\"Servlet.mpl\"): \n p(\"AIM was successfully configured. \\n\"):\nfi:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT ! 1 0 0 "" }}}}{MARK "2 0 0" 27026 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 } --- 428,431 ---- oblems = false then read(\"Servlet.mpl\"): \n p(\"AIM was successfully configured. \\n\"):\nfi:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT ! 1 0 0 "" }}}}{MARK "2 0 0" 441 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 } |
From: <gus...@us...> - 2003-08-27 09:30:02
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv4038/WEB-INF/maple Added Files: AutoConfWin.mws Log Message: installation worksheet for windows --- NEW FILE: AutoConfWin.mws --- {VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Title " -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 } 3 1 0 0 12 12 1 0 1 0 2 2 19 1 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 42 "Automatic Configuration o f 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" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27026 "Config := table([]):\n\n# This worksheet will configure your Ai M system. Mostly this will be\n# done automatically. However you will \+ want to \n# change are the first three lines starting with Config['... , \n# following the explanations given.\n\n########################### ###########################################\n# The SMTP server that Ai M should use for sending mail.\n# You will certainly want to change th is setting.\nConfig['SMTPServer'] := \"smtp.york.ac.uk\":\n\n######### #############################################################\n# The f ully qualified host name of the server (eg aim.shef.ac.uk).\n# For ini tial testing purposes, you can set this to \"localhost\". This\n# wil l allow you to access AiM that it is running on, but not from any\n# o ther machine. \nConfig['HostName'] := \"localhost\":\n\n############# #########################################################\n# The name \+ of the subdirectory of the Tomcat\\webapps directory into \n# which yo u have copied the AiM files\nConfig['TomcatContext'] := \"AiM\":\n\n# \+ You probably won't need to make any changes below, unless you get an\n # error message after executing the worksheet.\n\n# Now simply press E nter to execute the worksheet.\n\n#################################### ##################################\n# The absolute path to the BLAT pr ogram, used for sending email\n# Config['BLATProgram'] := \"C:\\\\Tomc at\\\\webapps\\\\AiM\\\\bin\\\\blat\\\\blat.exe\":\n\n################ ######################################################\n# The absolute path to the kill program (used to kill processes on this OS).\n# Conf ig['KillProgram'] := \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\Proces s\\\\Process.exe\":\n\n############################################### #######################\n# The number of 'Recent Requests' to show on \+ the Alice Monitor page\n# Config['AliceHistorySize'] := 20:\n\n####### ###############################################################\n# The time limits placed on Maple processes by the Alice servlet. \n# Proce sses which take longer than the time limit are terminated.\n# The Admi nTimeLimit restricts the time allowed for Administrative\n# commands. \+ The StudentTimeLimit is the restriction on all other \n# commands. Gen erally the StudentTimeLimit should be shorter than\n# the admisitrativ e time limit. Both values are integers which specify \n# the time limi t in milliseconds.\n# Config['StudentTimeLimit'] := 60000: # one minu te\n# Config['AdminTimeLimit'] := 1200000: # twenty minutes\n\n###### ################################################################\n# Th e 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 top directory for the Java distribution. \n# Config['JavaHome'] := \" C:\\\\Program Files\\\\Java\\\\j2re1.4.2\":\n\n\n##################### #################################################\n# The top directory for the Tomcat distribution. \n# Config['CatalinaHome'] := \"C:\\\\To mcat\":\n\n\n######################################################### #############\n# The absolute path to the maple program. \n# Config['M apleProgram'] := \"C:\\\\Program Files\\\\Maple 8\\\\bin.win\\\\cma ple8.exe\":\n\n\n##################################################### #################\n# The absolute path to the tth program (used to con vert LaTeX to HTML).\n# Config['TtHProgram'] := \"C:\\\\Tomcat\\\\weba pps\\\\AiM\\\\bin\\\\tth\\\\tth.exe\":\n\n\n########################## ############################################\n# The directory where th e servlet should put temporary copies of uploaded\n# files. (The Mapl e part of the system will delete them or move them to\n# a more perman ent home moments later.) \n# Config['TempDir'] := \"C:\\\\WINDOWS\\\\ Temp\":\n\n\n######################################################### #############\n# The maximum allowed size for uploaded files, in bytes . The default is\n# ten megabytes.\n# Config['MaxPostSize'] := 104857 60:\n\n\n############################################################# #########\n# The number of the port on which Tomcat should listen. By default\n# this is 8080. For any port other than 80, the\n# number mu st be included explicitly in URL's (for example, \n# http://allserv.ru g.ac.be:8080). \n# Config['TomcatPort'] := 8080:\n\n\n\n############## ########################################################\n# In princip le this allows you to choose the language in which AiM's\n# messages a re presented. The required mechanisms are in place but \n# as yet the re are no tables of translated messages.\n# Config['Locale'] := \"en\" :\n\n\n############################################################### #######\n# Config['ShowToolBars'] := true:\n# true if the administrato r's browser windows should have a full set of\n# toolbars; false if th ey should be omitted to save space.\n\n\n############################# #########################################\n# The name of the time zone , and the number of SECONDS ahead of GMT.\n# Note that these are separ ate variables, not fields in the Config\n# table.\n#\n# The handling o f summer time may not be correct in Europe, and is\n# certainly incorr ect 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############################### #######################################\n# You can change the followin g fields if you dare, but you should\n# read the source code first and probably ask for advice.\n# Config['AimDir']\n# Config['LastRequestFi le']\n# Config['Locale']\n# Config['LogDir']\n# Config['MapleInitOptio ns']\n# Config['MapleVersion']\n# Config['OperatingSystem']\n# Config[ 'RootDir']\n# Config['ServletLogFile']\n# Config['DocumentURL']\n# Con fig['ServletURL']\n# Config['WEBINFDir']\n# Config['WebAppDir']\n# Con fig['WebDir']\n\n\n################################################### ###################\n\n\nprintf(\"AIM will now try to configure your s ystem automatically.\\n\"):\n\nread(\"Util0.mpl\"):\nread(\"OS0.mpl\") :\n\nif (os_os = \"DOS\") then\n setcase := util_tolowercase:\nelse\n \+ setcase := proc(s) s; end:\nfi:\n\nosname1 := proc()\n if (nargs = 0) \+ then\n NULL;\n else\n os_osname(args)\n fi;\nend:\n\nunassign('`Date /LocalTimeZoneName`'):\nunassign('`Date/LocalTimeZoneOffset`'):\n\np : = proc() printf(args); end:\n\nif (waffle = true) then\n q := eval(p): \nelse\n q := proc() 1; end:\nfi:\n\nsetconfig :=\n# KM\n# DIST proc(k ::name,v::\{integer,string,boolean\})\n proc(k::name,v::\{numeric,stri ng,boolean\})\n# END KM\n # Set Config[k] to v unless Config[k] is al ready defined and\n # has the same type as v or is NULL.\n global Co nfig;\n\n if member([k],[indices(Config)]) then\n if not(type([Conf ig[k]],[whattype(v)])) and Config[k] <> NULL then\n q(\"Config[%A] \+ was set manually to %A\\n\",k,Config[k]);\n q(\"This has the wrong \+ type and is being overridden by the default,\\n\"):\n q(\"which is \+ %A.\\n\\n\",v):\n Config[k] := v:\n fi:\n else\n Config[k] := \+ v:\n fi:\n end:\n\n################################################## ####################\n\n# Determine operating system and Maple version number\n\nprintf(\"%s%s\\n\",os_vnummsg,os_osmsg):\n\nif (os_vnum = 0 ) then stop; fi:\n\nConfig['MapleVersion'] := os_vnum:\nConfig['Ope ratingSystem'] := os_os:\n\n########################################## ############################\n\n# Define some functions to access the \+ file system\n\nstrip := proc(s::string,t::string)\n if length(s) >= le ngth(t) and\n substring(s,-length(t) .. -1) = t then\n RETURN(subs tring(s,1..(-length(t)-1)));\n else\n RETURN(NULL):\n fi:\nend:\n\n\n ###################################################################### \n\n\npath := getenv(\"PATH\"):\nif path = NULL then\n path := []: \n \+ q(\"Execution path is empty\\n\"):\nelse \n path := [os_pathsplit(path )]:\n q(\"Execution path is %A\\n\",path):\nfi:\n\nlook_for_dir :=\n p roc(target::string)\n local msg,checks,places,ans,newdirs,l,r,c,d,d1, \n place,x,y,m,prog,progdir,ok,found,location;\n global proble ms;\n\n p(\"\\nLooking for %s\\n\",target):\n\n found := false:\n l ocation := NULL:\n\n checks,places :=\n selectremove(e -> evalb(lhs (e) = \"Check\"),[args[2..-1]]):\n \n checks := map(rhs,checks):\n\n ans := NULL;\n newdirs := []:\n\n for place in places do\n l := \+ lhs(place):\n r := rhs(place):\n newdirs := NULL:\n if l = \"Con f\" then\n if member([r],[indices(Config)]) then\n d := Config[ r];\n if type([d],[string]) then\n newdirs := [setcase(d)];\n q(\"Config['%a'] was set manually to %a\\n\",r,d):\n else\n \+ q(\"Config['%a'] was set to %A,\\n which is not a string\\n\",\n \+ r,d):\n fi:\n else\n q(\"Config['%a'] is not set\\n \",r):\n fi:\n elif l = \"Env\" then\n newdirs := [getenv(r)]: \n if newdirs = [] then\n q(\"Environment variable %s is not se t\\n\",r):\n else\n q(\"Environment variable %s is set to %s\\n \",r,op(newdirs)):\n fi:\n elif l = \"Def\" then\n d := r[1]: \n q(\"Checking default location %s%s%s* ...\",d,os_pathsep,r[2]): \n if r[1] = \"\" or r[1] = \"c:\" or r[1] = \"C:\" then\n d1 : = cat(d,\"/\"):\n else\n d1 := d;\n fi:\n if (os_direxist s(d1)) then\n newdirs := map(setcase,os_listfiles(d1)):\n newd irs := select(util_startswith,newdirs,setcase(r[2])):\n newdirs := map((x,y) -> os_osname(cat(y,\"/\",x)),newdirs,d):\n newdirs := s elect(os_direxists,newdirs):\n if newdirs = [] then\n q(\"not found\\n\"):\n fi:\n else\n q(\"directory does not exist. \\n\"):\n fi:\n elif l = \"Path\" then\n q(\"Checking the path for executables like *%s%s ...\",os_pathsep,r):\n progdir,prog := \+ op(util_splitfilename(r)):\n if os_os = \"Linux\" then\n d := u til_striptrailspaces(os_system0(\"which %a\",prog)):\n if util_end swith(d,r) then\n d := substring(d,1..-length(r)-1):\n newdi rs := [d]:\n fi:\n else\n newdirs := map(setcase,select(uti l_endswith,path,progdir)):\n newdirs :=\n select((x,y) -> os_ fileexists(cat(x,\"/\",y)),newdirs,prog):\n newdirs := map((x,m) - > substring(x,1..-m-1),newdirs,length(r)):\n fi:\n if newdirs = \+ [] then\n q(\"not found\\n\"):\n fi:\n fi:\n\n for d in new dirs do\n q(\"trying %s ... \",d):\n if os_direxists(d) then\n \+ q(\"exists ... \"):\n ok := true:\n for c in checks do\n \+ if not(os_fileexists(cat(d,\"/\",c))) then\n ok := false:\n \+ break:\n fi:\n od:\n if ( ok ) then\n q(\" OK\\ n\"):\n p(\"%s found at %s\\n\",target,d):\n found := true: \n location := d:\n if (testmode <> true) then\n RETUR N(d):\n fi:\n else\n q(\" not OK (does not contain %s)\\ n\",c):\n fi:\n fi:\n od:\n od:\n if (found <> true) then\n p(\"Could not find %s\\n\",target):\n problems := true:\n fi:\n \+ RETURN(location):\n end:\n \n######################################## ##########\n\nlook_for_prog :=\n proc(target::string)\n local msg,che cks,places,ans,l,r,c,d,place,x,y,m,f,ok,e,cmd,location;\n global prob lems;\n\n p(\"\\nLooking for %s\\n\",target):\n location := NULL:\n \n checks,places :=\n selectremove(e -> evalb(lhs(e) = \"Check\"),[ args[2..-1]]):\n \n checks := map(rhs,checks):\n\n ans := NULL;\n\n for place in places do\n l := lhs(place):\n r := rhs(place):\n \+ f := NULL:\n if l = \"Conf\" then\n if member([r],[indices(Confi g)]) then\n d := Config[r];\n if type([d],[string]) then\n \+ f := d;\n q(\"Config['%a'] was set manually to %a\\n\",r,d):\n \+ else\n q(\"Config['%a'] was set to %A,\\n which is not a stri ng\\n\",\n r,d):\n fi:\n else\n q(\"Config['%a'] is \+ not set\\n\",r):\n fi:\n elif l = \"Def\" then\n f := r:\n \+ if os_fileexists(f) then\n q(\"Found at default location %s\\n\",f )\n else\n q(\"Nothing in default location %s\\n\",f):\n f \+ := NULL;\n fi:\n elif l = \"Path\" then\n q(\"Checking the pat h for executables like *%s%s ...\",os_pathsep,r):\n if os_os = \"Li nux\" then\n d := util_striptrailspaces(os_system0(\"which %a\",r) ):\n if os_fileexists(d) then\n f := d: \n q(\"found at \+ %s\\n\",f):\n else\n q(\"not found\\n\"):\n fi:\n else \n d := map((x,y) -> cat(x,\"/\",y),path,r): \n d := select(os _fileexists,d):\n if d <> [] then \n f := d[1]: \n q(\"f ound at %s\\n\",f):\n else\n q(\"not found\\n\"):\n f := NULL;\n fi:\n fi:\n fi:\n\n if f <> NULL then\n f := os _osname(f):\n q(\"Trying %s ... \",f):\n if os_fileexists(f) the n\n q(\"exists ... \"):\n ok := true:\n for c in checks do \n cmd := cat(\"\\\"\",f,\"\\\" \",c[1]);\n e := traperror(o s_system(cmd)):\n if e = lasterror then\n q(\"\\nNot OK : e rror while executing %a : %s\\n\",cmd,e):\n elif SearchText(c[2], e) = 0 then\n q(\"\\nNot OK : '%s %s' does not produce '%s' in t he output.\\n\",\n f,c[1],c[2]):\n if length(e) > 300 th en e := cat(substring(e,1..300),\"...\"): fi:\n q(\"Output was: \+ \\n%s\\n\\n\",e):\n ok := false;\n break:\n fi:\n \+ od:\n if ( ok ) then\n q(\" OK\\n\"):\n p(\"%s found at %s\\n\",target,f):\n location := f:\n if (testmode <> true) then RETURN(f): fi:\n else\n q(\"Not OK\\n\"):\n fi:\n \+ else\n q(\"does not exist.\\n\"):\n fi:\n fi:\n od:\n if \+ (location = NULL) then\n p(\"Could not find %s\\n\",target):\n pro blems := true:\n fi:\n RETURN(location):\n end:\n\nproblems := false ;\n\n################################################################# #####\n\n# Look for Java\n\n# Config['JavaHome']\n# JAVA_HOME in the e nvironment\n# Defaults: Linux: /usr/java/jdk*, /usr/local/jdk*\n# \+ DOS: c:\\java\\jdk*, c:\\jdk*\n# double parent of java executabl e (try 'where', or PATH)\n#\n# Check: should contain file bin/java\n\n if os_os = \"Linux\" then\n Config['JavaHome'] :=\n look_for_dir(\n \+ \"Java\",\n \"Conf\" = 'JavaHome',\n \"Env\" = \"JAVA_HOME\",\n \+ \"Def\" = [\"/usr/java\",\"jdk\"],\n \"Def\" = [\"/usr/local\",\" jdk\"],\n \"Path\" = \"bin/java\",\n \"Check\" = \"bin/java\"\n ): \nelse\n Config['JavaHome'] :=\n osname1(look_for_dir(\n \"Java\",\n \+ \"Conf\" = 'JavaHome',\n \"Env\" = \"JAVA_HOME\",\n \"Def\" = \+ [\"C:\\\\java\",\"jdk\"],\n \"Def\" = [\"C:\\\\java\",\"j2\"],\n \+ \"Def\" = [\"C:\",\"jdk\"],\n \"Def\" = [\"C:\",\"j2\"],\n \"Def \" = [\"C:\\\\Program Files\\\\java\",\"jdk\"],\n \"Def\" = [\"C: \\\\Program Files\\\\java\",\"j2\"],\n \"Def\" = [\"C:\\\\Program F iles\",\"jdk\"],\n \"Def\" = [\"C:\\\\Program Files\",\"j2\"],\n \+ \"Path\" = \"bin/java.exe\",\n \"Check\" = \"bin/java.exe\"\n )):\nf i:\n \n\n############################################################# #########\n\n# Look for Tomcat\n\ncd := [util_slashsplit(currentdir()) ]:\nif nops(cd) > 4 then\n cd := util_slashjoin(op(cd[1..-6])):\n cd : = (\"Def\" = [cd,\"tomcat\"], \"Def\" = [cd,\"jakarta-tomcat\"]):\nels e\n cd := NULL:\nfi:\n\nif os_os = \"Linux\" then\n Config['CatalinaHo me'] :=\n look_for_dir(\n \"Tomcat\",\n \"Conf\" = 'CatalinaHome',\n \"Env\" = \"CATALINA_HOME\",\n \"Def\" = [\"/usr/local\",\"tomcat \"],\n \"Def\" = [\"/usr/local\",\"jakarta-tomcat\"],\n cd,\n \"Ch eck\" = \"bin/catalina.sh\"\n ):\nelse\n Config['CatalinaHome'] :=\n o sname1(look_for_dir(\n \"Tomcat\",\n \"Conf\" = 'CatalinaHome',\n \+ \"Env\" = \"CATALINA_HOME\",\n \"Def\" = [\"C:\",\"tomcat\"],\n \" Def\" = [\"C:\",\"jakarta-tomcat\"],\n \"Def\" = [\"C:\\\\Program F iles\",\"tomcat\"],\n \"Def\" = [\"C:\\\\Program Files\",\"jakarta-t omcat\"],\n cd,\n \"Check\" = \"bin/catalina.bat\"\n )):\nfi:\n\n\n# ##################################################################### \n\n# Look for Maple\n\nif os_os = \"Linux\" then\n Config['MapleProgr am'] :=\n look_for_prog(\n \"Maple\",\n \"Conf\" = 'MapleProgram', \n \"Def\" = \"/bin/maple\",\n \"Def\" = \"/usr/bin/maple\",\n \+ \"Def\" = \"/usr/local/bin/maple\",\n \"Def\" = \"/usr/local/mapl e/bin/maple\",\n \"Def\" = \"/usr/local/maple_su/bin/maple\",\n \" Path\" = \"maple\",\n \"Check\" = [\"-c quit;\",\"Waterloo\"]\n ):\n else\n Config['MapleProgram'] :=\n osname1(look_for_prog(\n \"Maple\" ,\n \"Conf\" = 'MapleProgram',\n \"Def\" = \"C:\\\\Maple\\\\bin.w nt\\\\cmaple.exe\",\n \"Def\" = \"C:\\\\Program Files\\\\Maple\\\\b in.wnt\\\\cmaple.exe\",\n \"Def\" = \"C:\\\\Maple 8\\\\bin.win\\\\c maple8.exe\",\n \"Def\" = \"C:\\\\Program Files\\\\Maple 8\\\\bin.w in\\\\cmaple8.exe\",\n \"Def\" = \"C:\\\\Program Files\\\\Maple 9\\ \\bin.win\\\\cmaple9.exe\",\n \"Def\" = \"C:\\\\Maple 7\\\\bin.wnt \\\\cmaple.exe\",\n \"Def\" = \"C:\\\\Program Files\\\\Maple 7\\\\b in.wnt\\\\cmaple.exe\",\n \"Def\" = \"C:\\\\Maple 6\\\\bin.wnt\\\\c maple.exe\",\n \"Def\" = \"C:\\\\Program Files\\\\Maple 6\\\\bin.wn t\\\\cmaple.exe\",\n \"Path\" = \"cmaple8.exe\",\n \"Path\" = \"cm aple.exe\",\n \"Check\" = [\"-c quit;\",\"Waterloo\"]\n )):\nfi:\n\n \n#################################################################### ##\n\n# Look for upload directory\n\nif os_os = \"Linux\" then\n Confi g['TempDir'] :=\n look_for_dir(\n \"upload directory\",\n \"Conf\" \+ = 'TempDir',\n \"Env\" = \"TempDir\",\n \"Env\" = \"TMPDIR\",\n \+ \"Def\" = [\"\",\"tmp\"]\n ):\nelse\n Config['TempDir'] :=\n osname 1(look_for_dir(\n \"upload directory\",\n \"Conf\" = 'TempDir',\n \+ \"Env\" = \"TempDir\",\n \"Env\" = \"TMPDIR\",\n \"Env\" = \"T emp\",\n \"Env\" = \"TMP\",\n \"Def\" = [\"C:\",\"temp\"],\n \" Def\" = [\"C:\",\"tmp\"]\n )):\nfi:\n\nsetconfig('MaxPostSize',10 * \+ 1024 * 1024):\n\n##################################################### #################\n\np(\"\\nFinding the host name\\n\"):\n\nif type([ Config['HostName']],[string]) then\n q(\"The host name was set manuall y to %a\\n\",Config['HostName']):\nelse\n if os_os = \"Linux\" then\n \+ hostname := traperror(ssystem(\"hostname --fqdn\")):\n if hostname = lasterror then\n err := hostname:\n elif hostname[1] > 0 then\n \+ err := hostname[2]:\n else\n hostname := hostname[2]:\n err := NU LL:\n fi:\n if err = NULL then\n if length(hostname) > 0 and subst ring(hostname,-1..-1)= \"\\n\" then\n hostname := substring(hostnam e,1..-2):\n fi:\n q(\"'hostname --fqdn' returned %a\\n\",hostname) :\n if (hostname = \"localhost.localdomain\") then\n hostname := \+ \"localhost\":\n fi:\n else\n q(\"Error while running 'hostname - -fqdn' :\\n%s\\n\\n\",err):\n fi:\n else\n hostname := \"localhost\" :\n fi: \n\nConfig['HostName'] := hostname:\n\nfi:\n\np(\"Host name se t to %s\\n\\n\",Config['HostName']):\n\n############################## ########################################\n\nsetconfig('Locale',\"en\") :\n\n################################################################# #####\n\np(\"Setting time zone\\n\"):\n\n\ntimezone := NULL:\ntimeoffs et := NULL:\n\nzones :=\n table([\n \"ADT\" =-03,\n \"AHST\"=-10,\n \" AST\" =-04,\n \"AT\" =-02,\n \"BST\" =+01,\n \"BT\" =+03,\n \"CAT\" \+ =-10,\n \"CCT\" =+08,\n \"CDT\" =-05,\n \"CET\" =+01,\n \"CST\" =-06, \n \"EADT\"=+11,\n \"EAST\"=+10,\n \"EDT\" =-04,\n \"EET\" =+02,\n \"E ST\" =-05,\n \"FST\" =+02,\n \"FWT\" =+01,\n \"GMT\" = 0,\n \"GST\" = +10,\n \"HDT\" =-09,\n \"HST\" =-10,\n \"IDLE\"=+12,\n \"IDLW\"=-12,\n \"JST\" =+09,\n \"MDT\" =-06,\n \"MEST\"=+02,\n \"MET\" =+01,\n \"MEW T\"=+01,\n \"MST\" =-07,\n \"NT\" =-11,\n \"NZDT\"=+13,\n \"NZST\"=+1 2,\n \"PDT\" =-07,\n \"PST\" =-08,\n \"SST\" =+02,\n \"SWT\" =+01,\n \+ \"UTC\" = 0,\n \"WADT\"=+08,\n \"WAST\"=+07,\n \"WAT\" =-01,\n \"WET \" = 0,\n \"YDT\" =-08,\n \"YST\" =-09\n]):\n\n\nif os_os = \"Linux\" then\n timezone := traperror(util_striptrailspaces(os_system(\"date + %%Z\")));\n if timezone = lasterror then timezone := NULL: fi:\n t0 := traperror(parse(os_system(\"date +\\\"(%%H*60+%%M)\\\"\"))):\n t0 := \+ traperror(parse(os_system(\"date -u +\\\"(%%H*60+%%M)\\\"\"))):\n if t ype([t0,t1],[integer,integer]) then\n if t0 > t1 + 13 * 60 then\n t 0 := t0 - 24 * 60:\n fi:\n timeoffset := round((t0 - t1)/15) * 15 * \+ 60: \n fi:\nfi:\n\nif type([`Date/LocalTimeZoneName`],[string]) then\n timezone := `Date/LocalTimeZoneName`:\n q(\"Time zone was set manuall y to %a\\n\",timezone):\nelif timezone <> NULL then\n q(\"Time zone wa s determined automatically as %a\\n\",timezone):\nelse\n q(\"Could not determine time zone, assuming GMT\\n\"):\n timezone := \"GMT\":\nfi: \n\n\nif type([`Date/LocalTimeZoneOffset`],[integer]) then\n timeoffse t := `Date/LocalTimeZoneOffset`:\n q(\"The offset from UTC was set man ually to %d\\n\",timeoffset):\n if timeoffset <> 0 and abs(timeoffset) < 24 then\n q(\"This appears to be in hours, but it needs to be in s econds.\\n\"):\n q(\"It will be converted automatically.\\n\"):\n ti meoffset := timeoffset * 3600:\n else\n if not (type(integer,timeoffs et/900)) then\n timeoffset := round(timeoffset / 900) * 900:\n q( \"This was rounded to %d\\n\",timeoffset):\n fi:\n fi:\nelif type([zo nes[timezone]],[integer]) then\n timeoffset := zones[timezone] * 3600: \n q(\"The offset from UTC is %d hour(s)\\n\",zones[timezone]):\nelif \+ timeoffset <> NULL then\n timeoffset := round(timeoffset / 900) * 900: \n q(\"The offset from UTC was calculated as %A hour(s)\\n\",\n time offset/3600.):\nelse\n q(\"The offset from UTC could not be determined , and will be taken\\n\"):\n q(\"to be zero. \\n\"):\n timeoffset := 0 :\nfi:\n\n`Date/LocalTimeZoneName` := timezone:\n`Date/LocalTimeZoneOf fset` := timeoffset:\n\np(\"Time zone set to %s (= UTC +%A hours)\\n\" ,timezone,timeoffset/3600):\n\n####################################### ###############################\n\np(\"Setting other configuration opt ions\\n\"):\n\nif type([Config['TomcatPort']],[integer]) then\n Config ['TomcatPort'] := sprintf(\"%d\",Config['TomcatPort']):\nfi:\n\nsetcon fig('TomcatPort' , \"8080\"):\n\nif (Config['TomcatPort'] = \"80\") th en\n setconfig('HostPort' , Config['HostName']):\nelse\n setconfig('Ho stPort' , cat(Config['HostName'],\":\",Config['TomcatPort'])):\nfi:\n \nsetconfig('TomcatContext' , \"AiM\"):\n\nif Config['TomcatContext'] \+ = \"ROOT\" then\n setconfig('FullContext',Config['HostPort']):\n setco nfig('WebAppDir',\n os_maplename(cat(Config['CatalinaHome'],\"/webapp s/ROOT\"))):\nelse\n setconfig('FullContext',\n cat(Config['HostPort' ],\"/\",Config['TomcatContext'])):\n setconfig('WebAppDir' ,\n os_map lename(\n cat(Config['CatalinaHome'],\"/webapps/\",Config['TomcatCon text']))):\nfi:\n\nprintf(Config['WebAppDir']);\n\nsetconfig('WEBINFDi r' ,\n cat(Config['WebAppDir'],\"/WEB-INF\")):\n\nsetconfig('AimDir' \+ , Config['WEBINFDir']):\nsetconfig('LogDir' , cat(Config['AimDir'], \"/logs\")):\nsetconfig('RootDir' , cat(Config['AimDir'],\"/root\")): \n\nsetconfig('ServletLogFile',os_osname(cat(Config['LogDir'],\"/servl etlog\"))):\nsetconfig('LastRequestFile',os_osname(cat(Config['LogDir' ],\"/lastrequest\"))):\nsetconfig('EmailLogFile',os_osname(cat(Config[ 'LogDir'],\"/emaillog\"))):\n\nsetconfig('WebDir' , Config['WebAppDir' ]):\nsetconfig('DocDir' , cat(Config['WebAppDir'],\"/doc\")):\n\nsetco nfig('ServletURL', cat(\"http://\",Config['FullContext'],\"/Alice\")): \nsetconfig('DocumentURL' , cat(\"http://\",Config['FullContext'])):\n \nsetconfig('ShowToolBars' , true):\n\nsetconfig('MapleInitOptions',\" default\"):\n\n\n##################################################### #################\n\n# Look for TtH\n\nif os_os = \"Linux\" then\n Con fig['TtHProgram'] :=\n look_for_prog(\n \"TtH\",\n \"Conf\" = 'TtHP rogram',\n \"Path\" = \"tth\",\n \"Def\" = \"/usr/local/bin/tth\" ,\n \"Def\" = \"/usr/bin/tth\",\n \"Def\" = \"/bin/tth\",\n \"D ef\" = cat(Config['WebAppDir'],\"/bin/tth_exe/tth\"),\n \"Check\" = [\"-r < tthtest.tex\",\"TtH is OK\"]\n ):\nelse\n Config['TtHProgram' ] :=\n os_osname(look_for_prog(\n \"TtH\",\n \"Conf\" = 'TtHProgram ',\n \"Path\" = \"tth.exe\",\n \"Def\" = \"C:\\\\TtH\\\\tth.exe\" ,\n \"Def\" = \"C:\\\\Program Files\\\\tth.exe\",\n \"Def\" = \" C:\\\\Program Files\\\\TtH\\\\tth.exe\",\n \"Def\" = cat(Config['We bAppDir'],\"\\\\bin\\\\tth_exe\\\\tth.exe\"),\n \"Check\" = [\"-r < t thtest.tex\",\"TtH is OK\"]\n )):\nfi:\n\n\n########################## ############################################\n\n# Look for the Kill Pr ogram\n\nif os_os = \"Linux\" then\n Config['KillProgram'] :=\"/bin/ki ll\";\n os_osname(look_for_prog(\n \"Kill Process Utility\",\n \"C onf\" = 'KillProgram',\n \"Path\" = \"kill\",\n \"Def\" = \"/b in/kill\",\n \"Def\" = \"/usr/bin/kill\",\n \"Def\" = \"/usr/l ocal/bin/kill\",\n \"Check\" = [\"\",\"kill\"]\n )):\n Config['Kill ProgramArg'] :=\"-9\";\nelse\n Config['KillProgram'] :=\n os_osname(lo ok_for_prog(\n \"Kill Process Utility\",\n \"Conf\" = 'KillProgram' ,\n \"Path\" = \"Process.exe\",\n \"Def\" = \"C:\\\\AIM\\\\Proces s\",\n \"Def\" = \"C:\\\\Process\",\n \"Def\" = cat(Config['WebA ppDir'],\"\\\\bin\\\\process\\\\Process.exe\"),\n \"Check\" = [\"-v\" ,\"beyondlogic.org\"]\n )):\n setconfig('KillProgramArg',\"-k\");\nfi: \n\n\n################################################################ ######\n\n# Look for email program\n\nif os_os = \"Linux\" then\n Conf ig['SendmailProgram'] :=\n look_for_prog(\n \"sendmail\",\n \"Conf\" = 'SendmailProgram',\n \"Path\" = \"sendmail\",\n \"Def\" = \"/ usr/lib/sendmail\",\n \"Def\" = \"/usr/bin/sendmail\"\n ):\n setcon fig('BLATProgram',\"\"):\n setconfig('SMTPServer',\"\"):\nelse\n Confi g['BLATProgram'] := cat(Config['CatalinaHome'],\"\\\\bin\\\\blat\\\\bl at.exe\"):\n setconfig('SendmailProgram',\"\");\n setconfig('SMTPServe r',\"\"):\nfi:\n\np(\"\\n\"):\n\n\n\nsetconfig('AliceHistorySize',20): \nsetconfig('MaxMapleProcesses',8):\nsetconfig('StudentTimeLimit',6000 0): # one minute\nsetconfig('AdminTimeLimit',1200000): # twenty minu tes\n\nsetconfig('TimeLimit',2.0): # two seconds\n\n\np(\"\\n\"):\n\n# ##################################################################### \n\nread(\"ConfigFields.mpl\"):\n\np(\"Writing Config.mpl and ServletC onfig.mpl\\n\"):\n\nif os_fileexists(\"Config.mpl\") then\n p(\"Renami ng Config.mpl as Config.bak\\n\\n\"):\n err := traperror(os_rename(\"C onfig.mpl\",\"Config.bak\")):\n if (err = lasterror) then\n p(\"Faile d: %s\\n\",err):\n `quit`(1):\n fi:\nfi:\n\nm := proc() fprintf(fd,ar gs); q(args); end:\n\naddhash :=\n proc(s::string) \n convert(subs(10 = op([10,35,32]),convert(s,bytes))[2..-1],bytes):\n end:\n\npadeq := \n proc(k::name,l::integer)\n m(\"'%a'%s = %a,\\n\",k,\n cat(\" \" $ (15 - length(k))),\n `if`(Config[k] = NULL,\"NULL\",Config[k])): \n end:\n\nhdr := \"\nThis file is generated automatically by AutoConf .mpl. It is\nrecommended that you do not edit it directly. Instead, \+ you should\ncreate a separate file called ManualConfig.mpl and copy ov er any\ndefinitions (from either Config.mpl or ServletConfig.mpl) that you\nwish to override. You can then run AutoConf.mpl to fill in the \nremaining definitions and check that everything is consistent.\n\": \n\n\nfd := traperror(fopen(\"Config.mpl\",'WRITE')):\nif (fd = laster ror) then\n p(\"Could not open Config.mpl for writing:\\n%a\\n\\n\",fd ):\n `quit`(1):\nfi:\n\nfprintf(fd,addhash(hdr)):\nfprintf(fd,\"\\n\\n \"):\n\nm(\"Config := table([\\n\"):\n\nfor x in ConfigFields do\n pad eq(x[1],15):\n fprintf(fd,addhash(x[3])):\n fprintf(fd,\"\\n\\n\"):\no d:\n\nm(\"NULL]):\\n\\n\"):\n\nm(\"`Date/LocalTimeZoneName` := %a:\\ n\",`Date/LocalTimeZoneName`):\nm(\"`Date/LocalTimeZoneOffset` := %d: \\n\",`Date/LocalTimeZoneOffset`):\n\nm(\"\\n\\n\"):\n\nerr := traperr or(fclose(fd)):\nif err = lasterror then\n p(\"Could not close Config. mpl:\\n%a\\n\\n\",err):\n `quit`(1):\nfi:\n\nfd := traperror(fopen(\"S ervletConfig.mpl\",'WRITE')):\nif (fd = lasterror) then\n p(\"Could no t open ServletConfig.mpl for writing:\\n%a\\n\\n\",fd):\n `quit`(1):\n fi:\n\nfprintf(fd,addhash(hdr)):\nfprintf(fd,\"\\n\\n\"):\n\nm(\"Servl etConfig := table([\\n\"):\n\nfor x in ServletConfigFields do\n padeq( x[1],18):\n fprintf(fd,addhash(x[3])):\n fprintf(fd,\"\\n\\n\"):\nod: \n\nm(\"NULL]):\\n\\n\"):\n\nerr := traperror(fclose(fd)):\nif err = l asterror then\n p(\"Could not close ServletConfig.mpl:\\n%a\\n\\n\",er r):\n `quit`(1):\nfi:\n\n\n########################################### ###########################\n\nif problems = true then\n p(\"There wer e configuration problems.\\n\"):\n p(\"Please read the messages above. \\n\"):\n if (waffle <> true) then\n p (\"You can get more detailed messages by setting waffle := true \\n\") :\n p(\"before executing the worksheet again. \+ \\n\"):\n fi:\n p(\"To fix the problems, edit the relevant entries \+ at the top of \\n\"):\n p(\"the worksheet and then execute it again. \+ \\n\"):\n if (dontquit <> true) then `quit`(1): fi:\nfi:\n\nif pr oblems = false then read(\"Servlet.mpl\"): \n p(\"AIM was successfully configured. \\n\"):\nfi:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "2 0 0" 27026 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 } |
From: <gus...@us...> - 2003-08-27 07:54:02
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv20253/doc Modified Files: installwin.html Log Message: there are now separate installation instructions for windows and linux (still to be written). Index: installwin.html =================================================================== RCS file: /cvsroot/aimmath/AIM/doc/installwin.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** installwin.html 27 Aug 2003 07:50:20 -0000 1.3 --- installwin.html 27 Aug 2003 07:53:58 -0000 1.4 *************** *** 94,98 **** <li> Download the latest file release (with a name starting with <font color='green'>complete</font>) from ! <a href="http://sourceforge.net/projects/aimmath/">SourceForge</a> or directly <a href="http://aimmath.sourceforge.net/aimwin.zip">from here</a> and unzip it into a subdirectory of the <font color='green'>C:\Tomcat\webapps\</font> --- 94,98 ---- <li> Download the latest file release (with a name starting with <font color='green'>complete</font>) from ! <a href="http://sourceforge.net/projects/aimmath/">SourceForge</a> or directly <a href="http://aimmath.sourceforge.net/aim.zip">from here</a> and unzip it into a subdirectory of the <font color='green'>C:\Tomcat\webapps\</font> |
From: <gus...@us...> - 2003-08-27 06:55:25
|
Update of /cvsroot/aimmath/AIM/images In directory sc8-pr-cvs1:/tmp/cvs-serv10431/images Added Files: Tag: windows aim.gif favicon.ico Log Message: merged from head --- NEW FILE: aim.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: favicon.ico --- (This appears to be a binary file; contents omitted.) |
From: <gus...@us...> - 2003-08-27 06:55:24
|
Update of /cvsroot/aimmath/AIM In directory sc8-pr-cvs1:/tmp/cvs-serv10431 Added Files: Tag: windows install.html Log Message: merged from head --- NEW FILE: install.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE>Installation Instructions</TITLE> <META http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <meta http-equiv="refresh" content="0; URL=doc/install.html"> </HEAD> <BODY> You will be forwarded automatically to the <a href="doc/install.html">installation instructions</a>. </BODY> </HTML> |
From: <gus...@us...> - 2003-08-27 06:55:24
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/locales In directory sc8-pr-cvs1:/tmp/cvs-serv10431/WEB-INF/maple/locales Modified Files: Tag: windows en.mpl Log Message: merged from head Index: en.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/locales/en.mpl,v retrieving revision 1.2.6.1 retrieving revision 1.2.6.2 diff -C2 -d -r1.2.6.1 -r1.2.6.2 |
From: <gus...@us...> - 2003-08-27 06:55:24
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv10431/WEB-INF/maple/aim Modified Files: Tag: windows Compile.mpl MultiQuestion.mpl Student.mpl Util.mpl Zone.mpl Log Message: merged from head Index: Compile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Compile.mpl,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Compile.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Compile.mpl 27 Aug 2003 06:55:16 -0000 1.3.2.1 *************** *** 171,175 **** then instead the procedure returns an error report in the format described under #`aim/Compile/ErrorReport`#. If supplied, ! the optional argument @nam_@ is used to set the question name. ", proc(lines::list(list(string)), --- 171,177 ---- then instead the procedure returns an error report in the format described under #`aim/Compile/ErrorReport`#. If supplied, ! the optional arguments @nam_@, @level_@ and @partlabel_@ are used to set ! the name, level (in terms of nesting of subquestions) and part label ! of the question. ", proc(lines::list(list(string)), *************** *** 346,349 **** --- 348,354 ---- ########## elif `Util/StartsWith`(flag,"<") then + # lines like <foo> bar are parameter assignments rather + # than ordinary flags. + # any assignment to a parameter after the first is ignored if not assigned(params[flag]) then *************** *** 630,691 **** fi; ! mproc := eval(x[1]); ! ! # At this point, mproc is a function like f(ans). The following block ! # of code converts it to the function g(attempt,ans) = f(ans). Later ! # blocks will modify g so that it no longer ignores the first argument. ! err := ! traperror( ! codegen[swapargs]( ! codegen[makeparam](attempt,mproc), 1 = 2)); ! if err = lasterror then ! RETURN([ ! cat( ! __("Error while manipulating marking procedure:"), ! "\n<br/>\n",`HTML/Escape`(lasterr),"\n<br/>\n", ! "mproc = \n", ! "<pre>\n",`HTML/Escape`(sprintf("%a",mproc)),"\n</pre>\n"), ! nam,0,lines]); ! else ! mproc := eval(err); ! fi; ! ! # The mproc function will typically contain calls to printf(), ! # `aim/t` and so on, to 'print' feedback strings to be shown to ! # the student. The next block of code modifies mproc so that the ! # strings are captured in attempt['Feedback'] or ! # attempt['AnswerNote'] rather than being printed immediately. ! mproctext := sprintf("%a",eval(mproc)); ! mproctext := ! `aim/Compile/RedirectOutput`("attempt['Feedback']",mproctext); ! mproctext := ! `aim/Compile/Replace`( ! "`aim/SetAnswerNote`(" = "`aim/SetAnswerNote`(attempt,", ! "`aim/SetInvalid`(" = "`aim/SetInvalid`(attempt,", ! mproctext); ! ! y := traperror(`Util/Parse`(mproctext,err,0)); ! ! if err <> NULL then ! RETURN([ ! cat( ! __("Problem while reparsing marking procedure:"), ! "\n<br/>\n",err[1], ! "\n<pre>\n",err[3],"\n</pre>\n"), ! nam,0,lines]); ! else ! mproc := eval(y); ! fi; ! ! # At this point, the function mproc expects two arguments (attempt ! # and ans) and returns the appropriate raw mark. We next modify it ! # so that it only needs one argument (called attempt), it takes ans ! # to be attempt['Answer'], and it inserts the raw mark in the ! # attempt['RawAnswer'] field. ! question['MProc'] := ! subs(MPROC_ = eval(mproc), ! proc(attempt::`aim/Question/Attempt`) ! attempt['RawMark'] := MPROC_(attempt,attempt['Answer']); ! end); setans := --- 635,639 ---- fi; ! mproc := `aim/Compile/ModifyMPROC`(eval(x[1])); setans := *************** *** 795,800 **** # global Maple variables. This is necessary so that the values set # up by iproc are available when mproc is called. ! err := ! traperror(codegen[makeglobal](map((s) -> convert(s,name),aimlocals),iproc)); if err = lasterror then --- 743,747 ---- # global Maple variables. This is necessary so that the values set # up by iproc are available when mproc is called. ! err := `aim/Compile/MakeGlobal`(aimlocals,iproc); if err = lasterror then *************** *** 810,815 **** fi; ! err := ! traperror(codegen[makeglobal](map((s) -> convert(s,name),aimlocals),sproc)); if err = lasterror then --- 757,761 ---- fi; ! err := `aim/Compile/MakeGlobal`(aimlocals,sproc); if err = lasterror then *************** *** 1185,1190 **** # global Maple variables. This is necessary so that the values set # up by iproc are available when mproc is called. ! err := ! traperror(codegen[makeglobal](map((s) -> convert(s,name),aimlocals),iproc)); if err = lasterror then --- 1131,1135 ---- # global Maple variables. This is necessary so that the values set # up by iproc are available when mproc is called. ! err := `aim/Compile/MakeGlobal`(aimlocals,iproc); if err = lasterror then *************** *** 1273,1276 **** --- 1218,1225 ---- done for the functions @print@, @lprint@, @`aim/t`@ and @`aim/p`@ as well as @printf@. + + Note that this function operates on strings. The function + @`aim/Compile/ConvertMPROC/Aux1`@ contains code that performs a + similar function, but operates on inert procedures. ", proc(var::string,s::string) *************** *** 1572,1575 **** --- 1521,1891 ---- od; od; + end + ): + + `Package/Assign`( + `aim/Compile/VarName`::string, + "The argument @x@ is expected to be of the form + @_Inert_NAME(s)@ or @_Inert_ASSIGNEDNAME(s,...)@ or + @_Inert_DCOLON(_Inert_NAME(s),...)@ or + @_Inert_DCOLON(_Inert_ASSIGNEDNAME(s),...)@. The function + returns the string @s@. + ", + proc(x) + local y; + if type(x,function) then + if op(0,x) = _Inert_NAME then + return(op(1,x)); + elif op(0,x) = _Inert_ASSIGNEDNAME then + return(op(1,x)); + elif op(0,x) = _Inert_DCOLON then + y := op(1,x); + if op(0,y) = _Inert_NAME then + return(op(1,y)); + elif op(0,y) = _Inert_ASSIGNEDNAME then + return(op(1,y)); + fi; + fi; + fi; + error("Argument of unexpected form"); + end + ): + + `Package/Assign`( + `aim/Compile/ConvertMPROC`, + "This function accepts a marking procedure @f@ supplied + in an @s>/answertest>@ flag, and applies the + following transformations: + <ul> + <li>The procedure @f@ originally accepts a single argument, + containing the student's parsed and evaluated answer. + It is converted to accept a single argument (called + @attempt@) of type @`aim/Question/[Short]Attempt`@, + and to extract the answer from the field + @attempt['Answer']@. + </li> + <li>Any calls to printing functions (@print@, @lprint@, + @printf@, @`aim/t`@ and @`aim/p`@) are converted to + append their output to @attempt['Feedback']@ rather + than sending it to standard output. + </li> + <li>Any calls to @`aim/SetAnswerNote`@ or @`aim/SetInvalid`@ + are converted by inserting @attempt@ as the first argument. + </li> + <li>Whatever would previously have been the return value of + @f@ is assigned to @attempt['RawMark']@. The modified + function returns @NULL@ instead. + </li> + </ul> + ", + proc(f) + local f_inert,params,locals,optseq,remtab, + stats,desc,globals,lexseq,param; + + f_inert := ToInert(eval(f)); + + if not(type(f_inert,function) and + op(0,f_inert) = _Inert_PROC) then + error("Argument is not a procedure"); + fi; + + params := op(1,f_inert); + locals := op(2,f_inert); + optseq := op(3,f_inert); + remtab := op(4,f_inert); + stats := op(5,f_inert); + desc := op(6,f_inert); + globals := op(7,f_inert); + lexseq := op(8,f_inert); + + if nops(params) = 0 then + error("Argument is a procedure with no parameters"); + elif nops(params) > 1 then + error("Argument is a procedure with more than one parameter"); + fi; + + # Now change the parameter to a local variable. + # (It should not be possible for this to cause a name conflict, + # as it is already forbidden for parameters to have the same + # names as local variables.) + param := `aim/Compile/VarName`(op(1,params)); + locals := + _Inert_LOCALSEQ(op(locals),op(params)); + stats := `aim/Compile/ConvertMPROC/Aux0`(stats,nops(locals)); + stats := `aim/Compile/ConvertMPROC/Aux1`(stats); + + params := + _Inert_PARAMSEQ(_Inert_NAME("attempt")); + + stats := + _Inert_STATSEQ( + _Inert_ASSIGN( + _Inert_LOCAL(nops(locals)), + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL( + _Inert_NAME("Answer"))))), + op(stats), + _Inert_ASSIGN( + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL(_Inert_NAME("RawMark")))), + _Inert_NAME("%")), + _Inert_NAME("NULL")); + + FromInert( + _Inert_PROC( + params,locals,optseq,_Inert_EXPSEQ(),stats,desc,globals,lexseq)); + end + ): + + `Package/Assign`( + `aim/Compile/ConvertMPROC/Aux0`, + "", + proc(x,p) + if x = _Inert_PARAM(1) then + return(_Inert_LOCAL(p)); + elif type(x,function) then + if op(0,x) = _Inert_PROC then + return(x); + else + return(map(`aim/Compile/ConvertMPROC/Aux0`,x,p)); + fi; + else + return(x); + fi; + end + ): + + `Package/Assign`( + `aim/Compile/ConvertMPROC/Aux1`, + "", + proc(x) + local y,z; + global printfunctions; + if type(x,function) then + if op(0,x) = _Inert_FUNCTION then + y := op(1,x); + if type(y,function) and + member(op(0,y),{_Inert_NAME,_Inert_ASSIGNEDNAME}) then + z := op(1,y); + if type([printfunctions[z]],[string]) then + return( + _Inert_FUNCTION( + _Inert_ASSIGNEDNAME(printfunctions[z],"PROC"), + _Inert_EXPSEQ( + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL(_Inert_NAME("Feedback")))), + op(op(2,x))))); + elif member(z,["aim/SetAnswerNote","aim/SetInvalid"]) then + return( + _Inert_FUNCTION( + _Inert_ASSIGNEDNAME(z,"PROC"), + _Inert_EXPSEQ( + _Inert_PARAM(1), + op(op(2,x))))); + elif z = "RETURN" then + return( + _Inert_ASSIGN( + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL(_Inert_NAME("RawMark")))), + op(op(2,x))), + _Inert_RETURN(_Inert_NAME("NULL"))); + fi; + fi; + elif op(0,x) = _Inert_RETURN then + return( + _Inert_ASSIGN( + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL(_Inert_NAME("RawMark")))), + op(x)), + _Inert_RETURN(_Inert_NAME("NULL"))); + fi; + return(map(`aim/Compile/ConvertMPROC/Aux1`,x)); + fi; + return(x); + end + ): + + `Package/Assign`( + `aim/Compile/PrintFunctions`, + "This table lists some functions that print to standard output, + and corresponding functions that append to a string instead. + ", + table([ + "print" = "aim/printTo", + "lprint" = "aim/lprintTo", + "printf" = "aim/printfTo", + "aim/t" = "aim/tTo", + "aim/p" = "aim/pTo" + ]) + ): + + `Package/Assign`( + `aim/Compile/MakeGlobal`, + "This is a replacement for the buggy @codegen[makeglobal]@ function, + based on @ToInert@ rather than the deprecated @maple2intrep@ function. + The syntax is slightly different, in that the first argument must + be a list of strings, whereas @codegen[makeglobal]@ accepts a name or + a list of names. + + The effect is to return a version of the procedure @f@ in which the + local variables named in @vars@ have been replaced by global variables + of the same name. + ", + proc(vars::list(string),f) + local f_inert,params,locals,optseq,remtab,stats,desc, + globals,lexseq,globalnames,newglobals,newlocals, + transtable,i,j,loc,nam; + + f_inert := ToInert(eval(f)); + + if not(type(f_inert,function) and + op(0,f_inert) = _Inert_PROC) then + error("Second argument is not a procedure"); + fi; + + params := op(1,f_inert); + locals := op(2,f_inert); + optseq := op(3,f_inert); + remtab := op(4,f_inert); + stats := op(5,f_inert); + desc := op(6,f_inert); + globals := op(7,f_inert); + lexseq := op(8,f_inert); + + globalnames := map(`aim/Compile/VarName`,[op(globals)]); + + newglobals := + _Inert_GLOBALSEQ( + op(globals), + op(map(_Inert_NAME,remove(member,vars,globalnames))) + ); + + transtable := table([]); + for i to nops(params) do + transtable[_Inert_PARAM(i)] := _Inert_PARAM(i); + od; + + newlocals := NULL; + + j := 0; + for i to nops(locals) do + loc := op(i,locals); + nam := `aim/Compile/VarName`(loc); + if member(nam,vars) then + transtable[_Inert_LOCAL(i)] := _Inert_NAME(nam); + else + j := j+1; + newlocals := newlocals,loc; + transtable[_Inert_LOCAL(i)] := _Inert_LOCAL(j); + fi; + od; + + newlocals := _Inert_LOCALSEQ(newlocals); + + stats := map(`aim/Compile/MakeGlobal/Aux`,stats,eval(transtable)); + + FromInert(_Inert_PROC( + params,newlocals,optseq,remtab,stats,desc,newglobals,lexseq)); + end + ): + + `Package/Assign`( + `aim/Compile/MakeGlobal/Aux`, + "This is an auxiliary function, designed for recursive invocation, + and called by @`aim/Compile/MakeGlobal`@. + ", + proc(x,t) + local params,locals,optseq,remtab,stats,desc,globals,lexseq, + transtable,i,j,a,b,c,newlexseq,lexpair,globalnames; + + if type(x,function) then + if member(op(0,x), {_Inert_LOCAL,_Inert_PARAM, + _Inert_LEXICAL_LOCAL,_Inert_LEXICAL_PARAM}) then + return(t[x]); + elif op(0,x) = _Inert_PROC then + # This is the most complex case; a typical example comes from + # something like this: + # + # f := proc(x) local b,c; map((t) -> t+b+c,x); end; + # `aim/Compile/MakeGlobal`(["b"],f); + # + # The statement sequence for f contains a representation of + # the function (t) -> t+b; The lexical table for the inner + # function contains the information that b and c refer to + # local variables in the outer function. The main problem + # is to reconstruct this lexical table when we convert b + # to a global variable. + + params := op(1,x); + locals := op(2,x); + optseq := op(3,x); + remtab := op(4,x); + stats := op(5,x); + desc := op(6,x); + globals := op(7,x); + lexseq := op(8,x); + + transtable := table([]); + for i to nops(params) do + transtable[_Inert_PARAM(i)] := _Inert_PARAM(i); + od; + for i to nops(locals) do + transtable[_Inert_LOCAL(i)] := _Inert_LOCAL(i); + od; + + globalnames := op(map(`aim/Compile/VarName`,globals)); + + newlexseq := NULL; + i := 0; + j := 0; + for lexpair in lexseq do + i := i+1; + a,b := op(lexpair); + c := t[b]; + if type(c,function) and op(0,c) = _Inert_NAME then + # Here a variable in the inner function referred to one + # of the local variables in the outer function that are + # being globalized. The new lexical table should no longer + # mention this variable. + + # In any given case, one of the next two assignments is needed, + # and the other is harmless. It would be a lot of work to decide + # which is which. + transtable[_Inert_LEXICAL_LOCAL(i)] := c; + transtable[_Inert_LEXICAL_PARAM(i)] := c; + globalnames := globalnames,op(1,c); + else + j := j+1; + transtable[_Inert_LEXICAL_LOCAL(i)] := _Inert_LEXICAL_LOCAL(j); + transtable[_Inert_LEXICAL_PARAM(i)] := _Inert_LEXICAL_PARAM(j); + newlexseq := newlexseq,_Inert_LEXICALPAIR(a,c); + fi; + od; + + globalnames := op({globalnames}); + globals := map(_Inert_NAME,_Inert_GLOBALSEQ(globalnames)); + stats := map(`aim/Compile/MakeGlobal/Aux`,stats,eval(transtable)); + + return( + _Inert_PROC( + params,locals,optseq,remtab,stats,desc,globals, + _Inert_LEXICALSEQ(newlexseq) + )); + else + return(map(`aim/Compile/MakeGlobal/Aux`,x,eval(t))); + fi; + else + return(x); + fi; end ): Index: MultiQuestion.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/MultiQuestion.mpl,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** MultiQuestion.mpl 25 Aug 2003 21:47:19 -0000 1.2 --- MultiQuestion.mpl 27 Aug 2003 06:55:16 -0000 1.2.2.1 *************** *** 44,48 **** ['Method','GetPart'::`aim/Question`, ! "", proc(partlabel::string) local l,m,n,subquestion; --- 44,48 ---- ['Method','GetPart'::`aim/Question`, ! "Return the subquestion with a given part label.", proc(partlabel::string) local l,m,n,subquestion; *************** *** 69,73 **** ], ! ['Method','BadTrialPenalty'::numeric,"", proc() ERROR(__("The BadTrialPenalty field is not valid for multipart questions")); --- 69,74 ---- ], ! ['Method','BadTrialPenalty'::numeric, ! "The @BadTrialPenalty@ field is not valid for multipart questions", proc() ERROR(__("The BadTrialPenalty field is not valid for multipart questions")); *************** *** 75,79 **** ], ! ['Method','VProc',"The VProc field is not valid for multipart questions", proc() ERROR(__("The VProc field is not valid for multipart questions")); --- 76,80 ---- ], ! ['Method','VProc',"The @VProc@ field is not valid for multipart questions", proc() ERROR(__("The VProc field is not valid for multipart questions")); *************** *** 81,85 **** ], ! ['Method','MProc',"The MProc field is not valid for multipart questions", proc() ERROR(__("The MProc field is not valid for multipart questions")); --- 82,86 ---- ], ! ['Method','MProc',"The @MProc@ field is not valid for multipart questions", proc() ERROR(__("The MProc field is not valid for multipart questions")); *************** *** 87,91 **** ], ! ['Method','AProc',"The AProc field is not valid for multipart questions", proc() ERROR(__("The AProc field is not valid for multipart questions")); --- 88,92 ---- ], ! ['Method','AProc',"The @AProc@ field is not valid for multipart questions", proc() ERROR(__("The AProc field is not valid for multipart questions")); *************** *** 122,126 **** proc(this, #optional ! seed_::integer,toplabel_::string) local vrsion; --- 123,128 ---- proc(this, #optional ! seed_::integer, ! toplabel_::string) local vrsion; *************** *** 281,285 **** ['Method','Validate', ! "The Validate method should not be invoked for a multipart question", proc() ERROR(__("The Validate method should not be invoked for a multipart question.")); --- 283,287 ---- ['Method','Validate', ! "The @Validate@ method should not be invoked for a multipart question", proc() ERROR(__("The Validate method should not be invoked for a multipart question.")); *************** *** 288,292 **** ['Method','Mark', ! "The Mark method should not be invoked for a multipart question", proc() ERROR(__("The Mark method should not be invoked for a multipart question.")); --- 290,294 ---- ['Method','Mark', ! "The @Mark@ method should not be invoked for a multipart question", proc() ERROR(__("The Mark method should not be invoked for a multipart question.")); *************** *** 295,299 **** ['Method','AdjustMark', ! "The AdjustMark method should not be invoked for a multipart question", proc() ERROR(__("The AdjustMark method should not be invoked for a multipart question.")); --- 297,301 ---- ['Method','AdjustMark', ! "The @AdjustMark@ method should not be invoked for a multipart question", proc() ERROR(__("The AdjustMark method should not be invoked for a multipart question.")); Index: Student.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Student.mpl,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Student.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Student.mpl 27 Aug 2003 06:55:16 -0000 1.3.2.1 *************** *** 187,191 **** `if`(nargs > 1, preamble_, ! __("Your ID and password for the Alice Interactive Mathematics system are as follows:")); postamble := --- 187,191 ---- `if`(nargs > 1, preamble_, ! __("Your ID and password for the AiM system are as follows:")); postamble := Index: Util.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Util.mpl,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Util.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Util.mpl 27 Aug 2003 06:55:16 -0000 1.3.2.1 *************** *** 25,29 **** if nargs > 1 then url := cat(url,"#",target_); fi; ! cat("<a href='",url,"'>",linktext,"</a>"); end ): --- 25,29 ---- if nargs > 1 then url := cat(url,"#",target_); fi; ! cat("<a href='",url,"' target='aim_help_window'>",linktext,"</a>"); end ): Index: Zone.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Zone.mpl,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** Zone.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Zone.mpl 27 Aug 2003 06:55:16 -0000 1.3.2.1 *************** *** 339,343 **** if not(`OS/FileExists`(zonehead)) then fd := `OS/Fopen`(zonehead,'WRITE'); ! fprintf(fd,"<h1>Alice Interactive Mathematics</h1>\n<br/>\n"); fclose(fd); fi; --- 339,344 ---- if not(`OS/FileExists`(zonehead)) then fd := `OS/Fopen`(zonehead,'WRITE'); ! fprintf(fd,"<img src=\"images/aim.gif\" align=\"absbottom\"> ! <font size=\"+3\"><b> Assessment in Mathematics</b></font>\n<br/>\n"); fclose(fd); fi; *************** *** 354,361 **** fd := `OS/Fopen`(adminhead,'WRITE'); fprintf(fd, ! "<h1>Alice Interactive Mathematics ! <br/> ! Administrator login page ! <h1>"); fclose(fd); fi; --- 355,362 ---- fd := `OS/Fopen`(adminhead,'WRITE'); fprintf(fd, ! "<img src=\"images/aim.gif\" align=\"absbottom\"> ! <font size=\"+3\"><b> Assessment in Mathematics</b></font>\n ! <h1>Administrator login page</h1> ! "); fclose(fd); fi; *************** *** 385,388 **** EndPackage(): - - --- 386,387 ---- |
From: <gus...@us...> - 2003-08-27 06:55:24
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1:/tmp/cvs-serv10431/WEB-INF/maple/aim/admin Modified Files: Tag: windows ZoneAdminHome.mpl Log Message: merged from head Index: ZoneAdminHome.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/ZoneAdminHome.mpl,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** ZoneAdminHome.mpl 25 Aug 2003 21:47:19 -0000 1.2 --- ZoneAdminHome.mpl 27 Aug 2003 06:55:16 -0000 1.2.2.1 *************** *** 122,126 **** foottext := traperror(`Util/TextFileContents`(footfile)); ! if foottext = lasterror then foottext := ""; fi; else --- 122,126 ---- 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 |
From: <gus...@us...> - 2003-08-27 06:55:24
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv10431/doc Modified Files: Tag: windows install.html Log Message: merged from head Index: install.html =================================================================== RCS file: /cvsroot/aimmath/AIM/doc/install.html,v retrieving revision 1.2.2.5 retrieving revision 1.2.2.6 diff -C2 -d -r1.2.2.5 -r1.2.2.6 *** install.html 26 Aug 2003 21:59:53 -0000 1.2.2.5 --- install.html 27 Aug 2003 06:55:16 -0000 1.2.2.6 *************** *** 70,74 **** You need to have a java runtime environment (JRE) installed on your machine. If you don't have it already, you can install it by downloading and running ! the <a href="http://aimmath.sourceforge.net/j2re-1_4_2-windows-i586.exe">installer for JRE 1.4.2</a> (14MB) from <a href="http://java.sun.com">java.sun.com</a>. Just follow the default installation procedure. It will install the JRE into the folder <font color='green'>C:/Program Files/Java/j2re1.4.2</font>. --- 70,74 ---- You need to have a java runtime environment (JRE) installed on your machine. If you don't have it already, you can install it by downloading and running ! the <a href="http://aimmath.sourceforge.net/j2re-1_4_2_01-windows-i586.exe">installer for JRE 1.4.2</a> (14MB) from <a href="http://java.sun.com">java.sun.com</a>. Just follow the default installation procedure. It will install the JRE into the folder <font color='green'>C:/Program Files/Java/j2re1.4.2</font>. |
From: <gus...@us...> - 2003-08-27 06:55:24
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv10431/WEB-INF/maple Modified Files: Tag: windows Servlet.mpl Log Message: merged from head Index: Servlet.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Servlet.mpl,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** Servlet.mpl 26 Aug 2003 18:04:23 -0000 1.3.2.2 --- Servlet.mpl 27 Aug 2003 06:55:15 -0000 1.3.2.3 *************** *** 88,92 **** <web-app> ! <display-name>Alice Interactive Mathematics</display-name> <description> AIM is a system for computer-aided learning and assessment --- 88,92 ---- <web-app> ! <display-name>AiM</display-name> <description> AIM is a system for computer-aided learning and assessment |
From: <gus...@us...> - 2003-08-26 21:59:59
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv12227/doc Modified Files: Tag: windows install.html Log Message: changed instructions so that AutoConf.mws is opened in the correct folder. Index: install.html =================================================================== RCS file: /cvsroot/aimmath/AIM/doc/install.html,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -C2 -d -r1.2.2.4 -r1.2.2.5 *** install.html 26 Aug 2003 20:37:53 -0000 1.2.2.4 --- install.html 26 Aug 2003 21:59:53 -0000 1.2.2.5 *************** *** 113,118 **** <p/> </li> ! <li>Open the Maple worksheet <a href="..\WEB-INF\maple\AutoConf.mws">AutoConf.mws</a>. Just clicking the link ! should do it. In this worksheet you can first make changes to the default configuration, as explained there. Then execute the worksheet. The worksheet will find out most of the necessary configuration information automatically. --- 113,118 ---- <p/> </li> ! <li>Open the <a href="..\WEB-INF\maple\" target="new">maple folder</a> of your new AiM installation. (Just clicking the link ! should do it.) In the folder you will find a Maple worksheet <font color='green'>AutoConf.mws</font>. Open it in Maple (for example by double-clicking on it). In this worksheet you can first make changes to the default configuration, as explained there. Then execute the worksheet. The worksheet will find out most of the necessary configuration information automatically. |
From: <gus...@us...> - 2003-08-26 21:39:45
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv8766/WEB-INF/maple/aim Modified Files: Question.mpl Log Message: removed conflict markers Index: Question.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Question.mpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Question.mpl 26 Aug 2003 18:38:49 -0000 1.4 --- Question.mpl 26 Aug 2003 21:39:39 -0000 1.5 *************** *** 2209,2213 **** [["a", "href" = sprintf("javascript:EditSource('%s');", ! this['SourceFile'])], __("Edit source file")])]]); --- 2209,2213 ---- [["a", "href" = sprintf("javascript:EditSource('%s');", ! this['SourceFile'])], __("Edit source file")])]]); *************** *** 2247,2251 **** [["a", "href" = sprintf("javascript:EditSource('%s');", ! this['SourceFile'])], __("Edit source file")])]]); --- 2247,2251 ---- [["a", "href" = sprintf("javascript:EditSource('%s');", ! this['SourceFile'])], __("Edit source file")])]]); *************** *** 2253,2257 **** this['Description'] <> "" then control['AddContents', - <<<<<<< Question.mpl ["tr", [["td", "align" = "left"], --- 2253,2256 ---- *************** *** 2259,2275 **** [["td", "align" = "left", "colspan" = "3"], ["latex", this['Description']]]]]; - ======= - # KM - # DIST "tr", - ["tr", - # END KM - [["td", "align" = "left"], - ["b", __("Description"), ":"]], - [["td", "align" = "left", "colspan" = "3"], - # KM - # DIST ["latex", this['Description']]]]; - ["latex", this['Description']]]]]; - # END KM - >>>>>>> 1.2.2.2 fi; --- 2258,2261 ---- *************** *** 2956,2960 **** ['Field','Contents'::{list(`aim/Question/Analysis/Entry`), ! list(`aim/Question/Analysis/Summary/Layer`)}, "" ], --- 2942,2946 ---- ['Field','Contents'::{list(`aim/Question/Analysis/Entry`), ! list(`aim/Question/Analysis/Summary/Layer`)}, "" ], |
From: <gus...@us...> - 2003-08-26 21:31:52
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv6882/WEB-INF/maple/aim Modified Files: Zone.mpl Log Message: I forgot to escape " in previous version Index: Zone.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Zone.mpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Zone.mpl 26 Aug 2003 20:34:59 -0000 1.4 --- Zone.mpl 26 Aug 2003 21:31:48 -0000 1.5 *************** *** 339,344 **** if not(`OS/FileExists`(zonehead)) then fd := `OS/Fopen`(zonehead,'WRITE'); ! fprintf(fd,"<img src="images/aim.gif" align="absbottom"> ! <font size="+3"><b> Assessment in Mathematics</b></font>\n<br/>\n"); fclose(fd); fi; --- 339,344 ---- if not(`OS/FileExists`(zonehead)) then fd := `OS/Fopen`(zonehead,'WRITE'); ! fprintf(fd,"<img src=\"images/aim.gif\" align=\"absbottom\"> ! <font size=\"+3\"><b> Assessment in Mathematics</b></font>\n<br/>\n"); fclose(fd); fi; *************** *** 355,360 **** fd := `OS/Fopen`(adminhead,'WRITE'); fprintf(fd, ! "<img src="images/aim.gif" align="absbottom"> ! <font size="+3"><b> Assessment in Mathematics</b></font>\n <h1>Administrator login page</h1> "); --- 355,360 ---- fd := `OS/Fopen`(adminhead,'WRITE'); fprintf(fd, ! "<img src=\"images/aim.gif\" align=\"absbottom\"> ! <font size=\"+3\"><b> Assessment in Mathematics</b></font>\n <h1>Administrator login page</h1> "); *************** *** 386,389 **** EndPackage(): - - --- 386,387 ---- |
From: <gus...@us...> - 2003-08-26 20:57:20
|
Update of /cvsroot/aimmath/AIM/images In directory sc8-pr-cvs1:/tmp/cvs-serv32462/images Added Files: aim.gif favicon.ico Log Message: AiM logo --- NEW FILE: aim.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: favicon.ico --- (This appears to be a binary file; contents omitted.) |
From: <gus...@us...> - 2003-08-26 20:37:59
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv29373/doc Modified Files: Tag: windows install.html Log Message: complete installation instructions for Windows Index: install.html =================================================================== RCS file: /cvsroot/aimmath/AIM/doc/install.html,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -C2 -d -r1.2.2.3 -r1.2.2.4 *** install.html 26 Aug 2003 14:58:30 -0000 1.2.2.3 --- install.html 26 Aug 2003 20:37:53 -0000 1.2.2.4 *************** *** 5,12 **** </head> <body> ! <h1>Installing AiM under Windows</h1> These are instructions for installing and configuring AiM. Installation has been tested with Windows 2000 and Windows XP. --- 5,22 ---- </head> <body> ! <h1><a name="install">Installing AiM under Windows</a></h1> These are instructions for installing and configuring AiM. Installation has been tested with Windows 2000 and Windows XP. + <p/> + The installation consists of 4 steps: + <ol> + <li><a href="#maple">Install Maple</a></li> + <li><a href="#jre">Install the Java runtime environment</a></li> + <li><a href="#tomcat">Install the Tomcat web server</a></li> + <li><a href="#aim">Install AiM itself</a></li> + </ol> + It is likely that you already have both Maple and a Java runtime environment on your computer, in which case you can skip those steps. + If you already have a working of installation of AiM then you will also already have a Tomcat server installed and you can jump directly to <a href="#aim">step 4</a>. *************** *** 35,39 **** ! <h2>Maple</h2> You will need Maple version 7, 8, or 9. Simply follow Maple's default installation --- 45,49 ---- ! <h2><a name="maple">Maple</a></h2> You will need Maple version 7, 8, or 9. Simply follow Maple's default installation *************** *** 56,60 **** ! <h2>Java</h2> You need to have a java runtime environment (JRE) installed on your machine. --- 66,70 ---- ! <h2><a name="jre">Java</a></h2> You need to have a java runtime environment (JRE) installed on your machine. *************** *** 64,68 **** install the JRE into the folder <font color='green'>C:/Program Files/Java/j2re1.4.2</font>. ! <h2>Tomcat</h2> You will need the Jakarta Tomcat 4 server from <a --- 74,78 ---- install the JRE into the folder <font color='green'>C:/Program Files/Java/j2re1.4.2</font>. ! <h2><a name="tomcat">Tomcat</a></h2> You will need the Jakarta Tomcat 4 server from <a *************** *** 78,82 **** ! <h2>AiM</h2> You are now finally ready to install AiM itself by following the following steps. --- 88,92 ---- ! <h2><a name="aim">AiM</a></h2> You are now finally ready to install AiM itself by following the following steps. *************** *** 91,98 **** you chose the name "<font color='green'>AiM</font>". If you chose something different, simply replace "<font color='green'>AiM</font>" by ! your choice in all filenames and URLs below. You might for example want to change a ! different name if you already have an AiM server installed in the folder ! <font color='green'>AiM</font> and want ! to run the new installation in parallel.<p/> </li> <li>Open the Maple worksheet <a href="..\WEB-INF\maple\AutoConf.mws">AutoConf.mws</a>. Just clicking the link --- 101,115 ---- you chose the name "<font color='green'>AiM</font>". If you chose something different, simply replace "<font color='green'>AiM</font>" by ! your choice in all filenames and URLs below. ! <p/> ! If you already have a working AiM installation then you have to make an important choice. Do you want to ! <ol> ! <li>keep the old installation ! and install AiM 3.0 in a different subdirectory of the webapps directory. You will then have two completely independent installations. The new AiM server will not know about the students and quizzes on the old installation unless you copy the data ! over as explained in <a href="#copy">step 5</a> below.</li> ! <li>update by overwriting your old installation with AiM 3.0. In this case you should unzip the new AiM into the ! <font color='green'>C:/Tomcat/webapps/ROOT/</font> directory (or to wherever you chose to install the old AiM). The old subjects, quizzes and student data will then still be available in the updated AiM installation.</li> ! </ol> ! <p/> </li> <li>Open the Maple worksheet <a href="..\WEB-INF\maple\AutoConf.mws">AutoConf.mws</a>. Just clicking the link *************** *** 121,124 **** --- 138,142 ---- subjects and so on.<p/> </li> + <li>(Optional) You can copy data from an old AiM installation to your new installation. All the data is contained in the directory <font color='green'>root</font> inside the <font color='green'>WEB-INF</font> subdirectory of your old AiM installation. You can copy the entire contents into the corresponding <font color='green'>root</font> directory of your new installation. However you also need to make a global search and replace in all files in that directory. If your old installation for example was in <font color='green'>C:/Tomcat/webapps/ROOT/</font> and your new one is in <font color='green'>C:/Tomcat/webapps/AiM/</font> then you want to replace every occurrence of <font color='green'>ROOT</font> by <font color='green'>AiM</font> in all the files.</li> </ol> *************** *** 130,134 **** error report when you try to log in as the administrator; this will hopefully be self-explanatory. If necessary, you can ask for help in the ! <a href="http://aimmath.sourceforge.net/forum/index.php?id=2">AiM Forum</a>. <p/> Some other kinds of errors may give you a Java stacktrace in your --- 148,152 ---- error report when you try to log in as the administrator; this will hopefully be self-explanatory. If necessary, you can ask for help in the ! <a href="http://maths-physics.org.uk/aiminfo/mod/forum/view.php?id=14">AiM Forum</a>. <p/> Some other kinds of errors may give you a Java stacktrace in your *************** *** 175,180 **** server, or change the port that Tomcat is listening and also set <font color='green'>Config['TomcatPort']</font> ! in <font color='green'>ManualConfig.mpl</font> to specify a ! different port. </li> <li>The message <font color='red'>Catalina.stop: --- 193,198 ---- server, or change the port that Tomcat is listening and also set <font color='green'>Config['TomcatPort']</font> ! in <font color='green'>AutoConfig.mws</font> to specify a ! different port and reexecute that worksheet. </li> <li>The message <font color='red'>Catalina.stop: *************** *** 184,188 **** </li> </ul> - --- 202,205 ---- |
From: <gus...@us...> - 2003-08-26 20:37:13
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1:/tmp/cvs-serv29312/WEB-INF/maple/aim/admin Modified Files: ZoneAdminHome.mpl Log Message: added license footnote Index: ZoneAdminHome.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/ZoneAdminHome.mpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ZoneAdminHome.mpl 25 Aug 2003 21:47:19 -0000 1.2 --- ZoneAdminHome.mpl 26 Aug 2003 20:37:08 -0000 1.3 *************** *** 122,126 **** foottext := traperror(`Util/TextFileContents`(footfile)); ! if foottext = lasterror then foottext := ""; fi; else --- 122,126 ---- 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 |
From: <gus...@us...> - 2003-08-26 20:35:04
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv28689/WEB-INF/maple/aim Modified Files: Student.mpl Zone.mpl Log Message: rebranding from AIM to AiM Index: Student.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Student.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Student.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Student.mpl 26 Aug 2003 20:34:59 -0000 1.4 *************** *** 187,191 **** `if`(nargs > 1, preamble_, ! __("Your ID and password for the Alice Interactive Mathematics system are as follows:")); postamble := --- 187,191 ---- `if`(nargs > 1, preamble_, ! __("Your ID and password for the AiM system are as follows:")); postamble := Index: Zone.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Zone.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Zone.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Zone.mpl 26 Aug 2003 20:34:59 -0000 1.4 *************** *** 339,343 **** if not(`OS/FileExists`(zonehead)) then fd := `OS/Fopen`(zonehead,'WRITE'); ! fprintf(fd,"<h1>Alice Interactive Mathematics</h1>\n<br/>\n"); fclose(fd); fi; --- 339,344 ---- if not(`OS/FileExists`(zonehead)) then fd := `OS/Fopen`(zonehead,'WRITE'); ! fprintf(fd,"<img src="images/aim.gif" align="absbottom"> ! <font size="+3"><b> Assessment in Mathematics</b></font>\n<br/>\n"); fclose(fd); fi; *************** *** 354,361 **** fd := `OS/Fopen`(adminhead,'WRITE'); fprintf(fd, ! "<h1>Alice Interactive Mathematics ! <br/> ! Administrator login page ! <h1>"); fclose(fd); fi; --- 355,362 ---- fd := `OS/Fopen`(adminhead,'WRITE'); fprintf(fd, ! "<img src="images/aim.gif" align="absbottom"> ! <font size="+3"><b> Assessment in Mathematics</b></font>\n ! <h1>Administrator login page</h1> ! "); fclose(fd); fi; |
From: <gus...@us...> - 2003-08-26 20:35:04
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv28689/WEB-INF/maple Modified Files: Servlet.mpl Log Message: rebranding from AIM to AiM Index: Servlet.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Servlet.mpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Servlet.mpl 26 Aug 2003 18:06:06 -0000 1.4 --- Servlet.mpl 26 Aug 2003 20:34:59 -0000 1.5 *************** *** 87,91 **** <web-app> ! <display-name>Alice Interactive Mathematics</display-name> <description> AIM is a system for computer-aided learning and assessment --- 87,91 ---- <web-app> ! <display-name>AiM</display-name> <description> AIM is a system for computer-aided learning and assessment |
From: <gus...@us...> - 2003-08-26 19:57:30
|
Update of /cvsroot/aimmath/AIM/WEB-INF/root In directory sc8-pr-cvs1:/tmp/cvs-serv20814/WEB-INF/root Added Files: Tag: windows Readme.txt Removed Files: Tag: windows adminfoot.html adminhead.html zonefoot.html zonehead.html Log Message: removed auto-generated files and replaced them by a readme file. --- NEW FILE: Readme.txt --- This root directory holds all data about the subjects, quizzes, and students. --- adminfoot.html DELETED --- --- adminhead.html DELETED --- --- zonefoot.html DELETED --- --- zonehead.html DELETED --- |
From: <gus...@us...> - 2003-08-26 19:55:57
|
Update of /cvsroot/aimmath/AIM/WEB-INF/root In directory sc8-pr-cvs1:/tmp/cvs-serv20367/WEB-INF/root Added Files: Readme.txt Removed Files: adminfoot.html adminhead.html zonefoot.html zonehead.html Log Message: removed auto-generated files and replaced them by a readme file. --- NEW FILE: Readme.txt --- This root directory holds all data about the subjects, quizzes, and students. --- adminfoot.html DELETED --- --- adminhead.html DELETED --- --- zonefoot.html DELETED --- --- zonehead.html DELETED --- |
From: <nps...@us...> - 2003-08-26 18:39:32
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv9312/WEB-INF/maple/aim Modified Files: Compile.mpl MultiQuestion.mpl Question.mpl Util.mpl Log Message: I have modified Compile.mpl so as not to use the codegen package. All other changes are trivial. Index: Compile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Compile.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Compile.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Compile.mpl 26 Aug 2003 18:38:48 -0000 1.4 *************** *** 171,175 **** then instead the procedure returns an error report in the format described under #`aim/Compile/ErrorReport`#. If supplied, ! the optional argument @nam_@ is used to set the question name. ", proc(lines::list(list(string)), --- 171,177 ---- then instead the procedure returns an error report in the format described under #`aim/Compile/ErrorReport`#. If supplied, ! the optional arguments @nam_@, @level_@ and @partlabel_@ are used to set ! the name, level (in terms of nesting of subquestions) and part label ! of the question. ", proc(lines::list(list(string)), *************** *** 346,349 **** --- 348,354 ---- ########## elif `Util/StartsWith`(flag,"<") then + # lines like <foo> bar are parameter assignments rather + # than ordinary flags. + # any assignment to a parameter after the first is ignored if not assigned(params[flag]) then *************** *** 630,691 **** fi; ! mproc := eval(x[1]); ! ! # At this point, mproc is a function like f(ans). The following block ! # of code converts it to the function g(attempt,ans) = f(ans). Later ! # blocks will modify g so that it no longer ignores the first argument. ! err := ! traperror( ! codegen[swapargs]( ! codegen[makeparam](attempt,mproc), 1 = 2)); ! if err = lasterror then ! RETURN([ ! cat( ! __("Error while manipulating marking procedure:"), ! "\n<br/>\n",`HTML/Escape`(lasterr),"\n<br/>\n", ! "mproc = \n", ! "<pre>\n",`HTML/Escape`(sprintf("%a",mproc)),"\n</pre>\n"), ! nam,0,lines]); ! else ! mproc := eval(err); ! fi; ! ! # The mproc function will typically contain calls to printf(), ! # `aim/t` and so on, to 'print' feedback strings to be shown to ! # the student. The next block of code modifies mproc so that the ! # strings are captured in attempt['Feedback'] or ! # attempt['AnswerNote'] rather than being printed immediately. ! mproctext := sprintf("%a",eval(mproc)); ! mproctext := ! `aim/Compile/RedirectOutput`("attempt['Feedback']",mproctext); ! mproctext := ! `aim/Compile/Replace`( ! "`aim/SetAnswerNote`(" = "`aim/SetAnswerNote`(attempt,", ! "`aim/SetInvalid`(" = "`aim/SetInvalid`(attempt,", ! mproctext); ! ! y := traperror(`Util/Parse`(mproctext,err,0)); ! ! if err <> NULL then ! RETURN([ ! cat( ! __("Problem while reparsing marking procedure:"), ! "\n<br/>\n",err[1], ! "\n<pre>\n",err[3],"\n</pre>\n"), ! nam,0,lines]); ! else ! mproc := eval(y); ! fi; ! ! # At this point, the function mproc expects two arguments (attempt ! # and ans) and returns the appropriate raw mark. We next modify it ! # so that it only needs one argument (called attempt), it takes ans ! # to be attempt['Answer'], and it inserts the raw mark in the ! # attempt['RawAnswer'] field. ! question['MProc'] := ! subs(MPROC_ = eval(mproc), ! proc(attempt::`aim/Question/Attempt`) ! attempt['RawMark'] := MPROC_(attempt,attempt['Answer']); ! end); setans := --- 635,639 ---- fi; ! mproc := `aim/Compile/ModifyMPROC`(eval(x[1])); setans := *************** *** 795,800 **** # global Maple variables. This is necessary so that the values set # up by iproc are available when mproc is called. ! err := ! traperror(codegen[makeglobal](map((s) -> convert(s,name),aimlocals),iproc)); if err = lasterror then --- 743,747 ---- # global Maple variables. This is necessary so that the values set # up by iproc are available when mproc is called. ! err := `aim/Compile/MakeGlobal`(aimlocals,iproc); if err = lasterror then *************** *** 810,815 **** fi; ! err := ! traperror(codegen[makeglobal](map((s) -> convert(s,name),aimlocals),sproc)); if err = lasterror then --- 757,761 ---- fi; ! err := `aim/Compile/MakeGlobal`(aimlocals,sproc); if err = lasterror then *************** *** 1185,1190 **** # global Maple variables. This is necessary so that the values set # up by iproc are available when mproc is called. ! err := ! traperror(codegen[makeglobal](map((s) -> convert(s,name),aimlocals),iproc)); if err = lasterror then --- 1131,1135 ---- # global Maple variables. This is necessary so that the values set # up by iproc are available when mproc is called. ! err := `aim/Compile/MakeGlobal`(aimlocals,iproc); if err = lasterror then *************** *** 1273,1276 **** --- 1218,1225 ---- done for the functions @print@, @lprint@, @`aim/t`@ and @`aim/p`@ as well as @printf@. + + Note that this function operates on strings. The function + @`aim/Compile/ConvertMPROC/Aux1`@ contains code that performs a + similar function, but operates on inert procedures. ", proc(var::string,s::string) *************** *** 1572,1575 **** --- 1521,1891 ---- od; od; + end + ): + + `Package/Assign`( + `aim/Compile/VarName`::string, + "The argument @x@ is expected to be of the form + @_Inert_NAME(s)@ or @_Inert_ASSIGNEDNAME(s,...)@ or + @_Inert_DCOLON(_Inert_NAME(s),...)@ or + @_Inert_DCOLON(_Inert_ASSIGNEDNAME(s),...)@. The function + returns the string @s@. + ", + proc(x) + local y; + if type(x,function) then + if op(0,x) = _Inert_NAME then + return(op(1,x)); + elif op(0,x) = _Inert_ASSIGNEDNAME then + return(op(1,x)); + elif op(0,x) = _Inert_DCOLON then + y := op(1,x); + if op(0,y) = _Inert_NAME then + return(op(1,y)); + elif op(0,y) = _Inert_ASSIGNEDNAME then + return(op(1,y)); + fi; + fi; + fi; + error("Argument of unexpected form"); + end + ): + + `Package/Assign`( + `aim/Compile/ConvertMPROC`, + "This function accepts a marking procedure @f@ supplied + in an @s>/answertest>@ flag, and applies the + following transformations: + <ul> + <li>The procedure @f@ originally accepts a single argument, + containing the student's parsed and evaluated answer. + It is converted to accept a single argument (called + @attempt@) of type @`aim/Question/[Short]Attempt`@, + and to extract the answer from the field + @attempt['Answer']@. + </li> + <li>Any calls to printing functions (@print@, @lprint@, + @printf@, @`aim/t`@ and @`aim/p`@) are converted to + append their output to @attempt['Feedback']@ rather + than sending it to standard output. + </li> + <li>Any calls to @`aim/SetAnswerNote`@ or @`aim/SetInvalid`@ + are converted by inserting @attempt@ as the first argument. + </li> + <li>Whatever would previously have been the return value of + @f@ is assigned to @attempt['RawMark']@. The modified + function returns @NULL@ instead. + </li> + </ul> + ", + proc(f) + local f_inert,params,locals,optseq,remtab, + stats,desc,globals,lexseq,param; + + f_inert := ToInert(eval(f)); + + if not(type(f_inert,function) and + op(0,f_inert) = _Inert_PROC) then + error("Argument is not a procedure"); + fi; + + params := op(1,f_inert); + locals := op(2,f_inert); + optseq := op(3,f_inert); + remtab := op(4,f_inert); + stats := op(5,f_inert); + desc := op(6,f_inert); + globals := op(7,f_inert); + lexseq := op(8,f_inert); + + if nops(params) = 0 then + error("Argument is a procedure with no parameters"); + elif nops(params) > 1 then + error("Argument is a procedure with more than one parameter"); + fi; + + # Now change the parameter to a local variable. + # (It should not be possible for this to cause a name conflict, + # as it is already forbidden for parameters to have the same + # names as local variables.) + param := `aim/Compile/VarName`(op(1,params)); + locals := + _Inert_LOCALSEQ(op(locals),op(params)); + stats := `aim/Compile/ConvertMPROC/Aux0`(stats,nops(locals)); + stats := `aim/Compile/ConvertMPROC/Aux1`(stats); + + params := + _Inert_PARAMSEQ(_Inert_NAME("attempt")); + + stats := + _Inert_STATSEQ( + _Inert_ASSIGN( + _Inert_LOCAL(nops(locals)), + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL( + _Inert_NAME("Answer"))))), + op(stats), + _Inert_ASSIGN( + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL(_Inert_NAME("RawMark")))), + _Inert_NAME("%")), + _Inert_NAME("NULL")); + + FromInert( + _Inert_PROC( + params,locals,optseq,_Inert_EXPSEQ(),stats,desc,globals,lexseq)); + end + ): + + `Package/Assign`( + `aim/Compile/ConvertMPROC/Aux0`, + "", + proc(x,p) + if x = _Inert_PARAM(1) then + return(_Inert_LOCAL(p)); + elif type(x,function) then + if op(0,x) = _Inert_PROC then + return(x); + else + return(map(`aim/Compile/ConvertMPROC/Aux0`,x,p)); + fi; + else + return(x); + fi; + end + ): + + `Package/Assign`( + `aim/Compile/ConvertMPROC/Aux1`, + "", + proc(x) + local y,z; + global printfunctions; + if type(x,function) then + if op(0,x) = _Inert_FUNCTION then + y := op(1,x); + if type(y,function) and + member(op(0,y),{_Inert_NAME,_Inert_ASSIGNEDNAME}) then + z := op(1,y); + if type([printfunctions[z]],[string]) then + return( + _Inert_FUNCTION( + _Inert_ASSIGNEDNAME(printfunctions[z],"PROC"), + _Inert_EXPSEQ( + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL(_Inert_NAME("Feedback")))), + op(op(2,x))))); + elif member(z,["aim/SetAnswerNote","aim/SetInvalid"]) then + return( + _Inert_FUNCTION( + _Inert_ASSIGNEDNAME(z,"PROC"), + _Inert_EXPSEQ( + _Inert_PARAM(1), + op(op(2,x))))); + elif z = "RETURN" then + return( + _Inert_ASSIGN( + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL(_Inert_NAME("RawMark")))), + op(op(2,x))), + _Inert_RETURN(_Inert_NAME("NULL"))); + fi; + fi; + elif op(0,x) = _Inert_RETURN then + return( + _Inert_ASSIGN( + _Inert_TABLEREF( + _Inert_PARAM(1), + _Inert_EXPSEQ( + _Inert_UNEVAL(_Inert_NAME("RawMark")))), + op(x)), + _Inert_RETURN(_Inert_NAME("NULL"))); + fi; + return(map(`aim/Compile/ConvertMPROC/Aux1`,x)); + fi; + return(x); + end + ): + + `Package/Assign`( + `aim/Compile/PrintFunctions`, + "This table lists some functions that print to standard output, + and corresponding functions that append to a string instead. + ", + table([ + "print" = "aim/printTo", + "lprint" = "aim/lprintTo", + "printf" = "aim/printfTo", + "aim/t" = "aim/tTo", + "aim/p" = "aim/pTo" + ]) + ): + + `Package/Assign`( + `aim/Compile/MakeGlobal`, + "This is a replacement for the buggy @codegen[makeglobal]@ function, + based on @ToInert@ rather than the deprecated @maple2intrep@ function. + The syntax is slightly different, in that the first argument must + be a list of strings, whereas @codegen[makeglobal]@ accepts a name or + a list of names. + + The effect is to return a version of the procedure @f@ in which the + local variables named in @vars@ have been replaced by global variables + of the same name. + ", + proc(vars::list(string),f) + local f_inert,params,locals,optseq,remtab,stats,desc, + globals,lexseq,globalnames,newglobals,newlocals, + transtable,i,j,loc,nam; + + f_inert := ToInert(eval(f)); + + if not(type(f_inert,function) and + op(0,f_inert) = _Inert_PROC) then + error("Second argument is not a procedure"); + fi; + + params := op(1,f_inert); + locals := op(2,f_inert); + optseq := op(3,f_inert); + remtab := op(4,f_inert); + stats := op(5,f_inert); + desc := op(6,f_inert); + globals := op(7,f_inert); + lexseq := op(8,f_inert); + + globalnames := map(`aim/Compile/VarName`,[op(globals)]); + + newglobals := + _Inert_GLOBALSEQ( + op(globals), + op(map(_Inert_NAME,remove(member,vars,globalnames))) + ); + + transtable := table([]); + for i to nops(params) do + transtable[_Inert_PARAM(i)] := _Inert_PARAM(i); + od; + + newlocals := NULL; + + j := 0; + for i to nops(locals) do + loc := op(i,locals); + nam := `aim/Compile/VarName`(loc); + if member(nam,vars) then + transtable[_Inert_LOCAL(i)] := _Inert_NAME(nam); + else + j := j+1; + newlocals := newlocals,loc; + transtable[_Inert_LOCAL(i)] := _Inert_LOCAL(j); + fi; + od; + + newlocals := _Inert_LOCALSEQ(newlocals); + + stats := map(`aim/Compile/MakeGlobal/Aux`,stats,eval(transtable)); + + FromInert(_Inert_PROC( + params,newlocals,optseq,remtab,stats,desc,newglobals,lexseq)); + end + ): + + `Package/Assign`( + `aim/Compile/MakeGlobal/Aux`, + "This is an auxiliary function, designed for recursive invocation, + and called by @`aim/Compile/MakeGlobal`@. + ", + proc(x,t) + local params,locals,optseq,remtab,stats,desc,globals,lexseq, + transtable,i,j,a,b,c,newlexseq,lexpair,globalnames; + + if type(x,function) then + if member(op(0,x), {_Inert_LOCAL,_Inert_PARAM, + _Inert_LEXICAL_LOCAL,_Inert_LEXICAL_PARAM}) then + return(t[x]); + elif op(0,x) = _Inert_PROC then + # This is the most complex case; a typical example comes from + # something like this: + # + # f := proc(x) local b,c; map((t) -> t+b+c,x); end; + # `aim/Compile/MakeGlobal`(["b"],f); + # + # The statement sequence for f contains a representation of + # the function (t) -> t+b; The lexical table for the inner + # function contains the information that b and c refer to + # local variables in the outer function. The main problem + # is to reconstruct this lexical table when we convert b + # to a global variable. + + params := op(1,x); + locals := op(2,x); + optseq := op(3,x); + remtab := op(4,x); + stats := op(5,x); + desc := op(6,x); + globals := op(7,x); + lexseq := op(8,x); + + transtable := table([]); + for i to nops(params) do + transtable[_Inert_PARAM(i)] := _Inert_PARAM(i); + od; + for i to nops(locals) do + transtable[_Inert_LOCAL(i)] := _Inert_LOCAL(i); + od; + + globalnames := op(map(`aim/Compile/VarName`,globals)); + + newlexseq := NULL; + i := 0; + j := 0; + for lexpair in lexseq do + i := i+1; + a,b := op(lexpair); + c := t[b]; + if type(c,function) and op(0,c) = _Inert_NAME then + # Here a variable in the inner function referred to one + # of the local variables in the outer function that are + # being globalized. The new lexical table should no longer + # mention this variable. + + # In any given case, one of the next two assignments is needed, + # and the other is harmless. It would be a lot of work to decide + # which is which. + transtable[_Inert_LEXICAL_LOCAL(i)] := c; + transtable[_Inert_LEXICAL_PARAM(i)] := c; + globalnames := globalnames,op(1,c); + else + j := j+1; + transtable[_Inert_LEXICAL_LOCAL(i)] := _Inert_LEXICAL_LOCAL(j); + transtable[_Inert_LEXICAL_PARAM(i)] := _Inert_LEXICAL_PARAM(j); + newlexseq := newlexseq,_Inert_LEXICALPAIR(a,c); + fi; + od; + + globalnames := op({globalnames}); + globals := map(_Inert_NAME,_Inert_GLOBALSEQ(globalnames)); + stats := map(`aim/Compile/MakeGlobal/Aux`,stats,eval(transtable)); + + return( + _Inert_PROC( + params,locals,optseq,remtab,stats,desc,globals, + _Inert_LEXICALSEQ(newlexseq) + )); + else + return(map(`aim/Compile/MakeGlobal/Aux`,x,eval(t))); + fi; + else + return(x); + fi; end ): Index: MultiQuestion.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/MultiQuestion.mpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MultiQuestion.mpl 25 Aug 2003 21:47:19 -0000 1.2 --- MultiQuestion.mpl 26 Aug 2003 18:38:49 -0000 1.3 *************** *** 44,48 **** ['Method','GetPart'::`aim/Question`, ! "", proc(partlabel::string) local l,m,n,subquestion; --- 44,48 ---- ['Method','GetPart'::`aim/Question`, ! "Return the subquestion with a given part label.", proc(partlabel::string) local l,m,n,subquestion; *************** *** 69,73 **** ], ! ['Method','BadTrialPenalty'::numeric,"", proc() ERROR(__("The BadTrialPenalty field is not valid for multipart questions")); --- 69,74 ---- ], ! ['Method','BadTrialPenalty'::numeric, ! "The @BadTrialPenalty@ field is not valid for multipart questions", proc() ERROR(__("The BadTrialPenalty field is not valid for multipart questions")); *************** *** 75,79 **** ], ! ['Method','VProc',"The VProc field is not valid for multipart questions", proc() ERROR(__("The VProc field is not valid for multipart questions")); --- 76,80 ---- ], ! ['Method','VProc',"The @VProc@ field is not valid for multipart questions", proc() ERROR(__("The VProc field is not valid for multipart questions")); *************** *** 81,85 **** ], ! ['Method','MProc',"The MProc field is not valid for multipart questions", proc() ERROR(__("The MProc field is not valid for multipart questions")); --- 82,86 ---- ], ! ['Method','MProc',"The @MProc@ field is not valid for multipart questions", proc() ERROR(__("The MProc field is not valid for multipart questions")); *************** *** 87,91 **** ], ! ['Method','AProc',"The AProc field is not valid for multipart questions", proc() ERROR(__("The AProc field is not valid for multipart questions")); --- 88,92 ---- ], ! ['Method','AProc',"The @AProc@ field is not valid for multipart questions", proc() ERROR(__("The AProc field is not valid for multipart questions")); *************** *** 122,126 **** proc(this, #optional ! seed_::integer,toplabel_::string) local vrsion; --- 123,128 ---- proc(this, #optional ! seed_::integer, ! toplabel_::string) local vrsion; *************** *** 281,285 **** ['Method','Validate', ! "The Validate method should not be invoked for a multipart question", proc() ERROR(__("The Validate method should not be invoked for a multipart question.")); --- 283,287 ---- ['Method','Validate', ! "The @Validate@ method should not be invoked for a multipart question", proc() ERROR(__("The Validate method should not be invoked for a multipart question.")); *************** *** 288,292 **** ['Method','Mark', ! "The Mark method should not be invoked for a multipart question", proc() ERROR(__("The Mark method should not be invoked for a multipart question.")); --- 290,294 ---- ['Method','Mark', ! "The @Mark@ method should not be invoked for a multipart question", proc() ERROR(__("The Mark method should not be invoked for a multipart question.")); *************** *** 295,299 **** ['Method','AdjustMark', ! "The AdjustMark method should not be invoked for a multipart question", proc() ERROR(__("The AdjustMark method should not be invoked for a multipart question.")); --- 297,301 ---- ['Method','AdjustMark', ! "The @AdjustMark@ method should not be invoked for a multipart question", proc() ERROR(__("The AdjustMark method should not be invoked for a multipart question.")); Index: Question.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Question.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Question.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Question.mpl 26 Aug 2003 18:38:49 -0000 1.4 *************** *** 2169,2186 **** fi; ! # KM ! if not trymode then ! # END KM ! # DIST href := sprintf(,"javascript:Focus('%s');", ! # DIST this['Label']); ! jscript := "javascript:Focus('%s');"; ! href := sprintf(jscript,this['Label']); ! # END KM nav['AddContents', ! ["td", ! [["a","href" = href],__("Focus")]]]; ! # KM fi; - # END KM nav['AddContents',["td",`aim/HelpLink`(__("Help"))]]; --- 2169,2179 ---- fi; ! if not(trymode or reviewmode) then ! href := sprintf("javascript:Focus('%s');", ! this['Label']); nav['AddContents', ! ["td", ! [["a","href" = href],__("Focus")]]]; fi; nav['AddContents',["td",`aim/HelpLink`(__("Help"))]]; *************** *** 2260,2263 **** --- 2253,2263 ---- this['Description'] <> "" then control['AddContents', + <<<<<<< Question.mpl + ["tr", + [["td", "align" = "left"], + ["b", __("Description"), ":"]], + [["td", "align" = "left", "colspan" = "3"], + ["latex", this['Description']]]]]; + ======= # KM # DIST "tr", *************** *** 2271,2274 **** --- 2271,2275 ---- ["latex", this['Description']]]]]; # END KM + >>>>>>> 1.2.2.2 fi; Index: Util.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Util.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Util.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Util.mpl 26 Aug 2003 18:38:49 -0000 1.4 *************** *** 25,29 **** if nargs > 1 then url := cat(url,"#",target_); fi; ! cat("<a href='",url,"'>",linktext,"</a>"); end ): --- 25,29 ---- if nargs > 1 then url := cat(url,"#",target_); fi; ! cat("<a href='",url,"' target='aim_help_window'>",linktext,"</a>"); end ): |