aimmath-commit Mailing List for AiM Assessment in Mathematics (Page 18)
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-31 20:45:10
|
Update of /cvsroot/aimmath/moodle/mod/aim_quiz In directory sc8-pr-cvs1:/tmp/cvs-serv23535/mod/aim_quiz Modified Files: aimpage.php lib.php view.php Log Message: have started work towards pdf output for the quiz Index: aimpage.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/aimpage.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** aimpage.php 30 Aug 2003 15:21:31 -0000 1.3 --- aimpage.php 31 Aug 2003 20:44:57 -0000 1.4 *************** *** 14,17 **** --- 14,19 ---- optional_variable($q); // quiz ID optional_variable($aimaction); // action to get AiM to perform + optional_variable($pdf); // how to display the page + // displaystyle=pdf creates a pdf sheet if (! $site = get_site()) { *************** *** 142,150 **** // For testing purposes only: ! // $urlout = htmlspecialchars($server->address . "?" . $postdata); ! // if (!$_POST) ! // echo "<P>Default page : <A href=\"$urlout\">$urlout</A></P>"; ! // else ! // echo "<P>Requested page : <A href=\"$urlout\">$urlout</A></P>"; // load the AiM page and grab the result --- 144,152 ---- // For testing purposes only: ! $urlout = htmlspecialchars($server->address . "?" . $postdata); ! if (!$_POST) ! echo "<P>Default page : <A href=\"$urlout\">$urlout</A></P>"; ! else ! echo "<P>Requested page : <A href=\"$urlout\">$urlout</A></P>"; // load the AiM page and grab the result *************** *** 164,181 **** } - // write out relevant parts of it - $data = aim_quiz_convert_aim_output($aim_quiz, $subject, $data, $server->address, "aimpage.php?id=$cm->id", $grade, $max_grade); - if (!$data) { - error(get_string("nooutput", "aim_quiz"), "view.php?id=$cm->id"); - } - if (isteacher($course->id)) { // write admin links echo "<div align=right>"; echo "<font size=2>"; - helpbutton("analyze_quiz", get_string("analyze_quiz", "aim_quiz"), "aim_quiz"); - echo "<A href=\"aimpage.php?id=$cm->id\">" . get_string("analyze_quiz", "aim_quiz") . "</A><BR>"; helpbutton("try_quiz", get_string("try_quiz", "aim_quiz"), "aim_quiz"); echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try\">" . get_string("try_quiz", "aim_quiz") . "</A><BR />"; helpbutton("admin_quiz", get_string("admin_quiz", "aim_quiz"), "aim_quiz"); echo "<A href=\"aimpage.php?id=$cm->id&aimaction=edit\">" . get_string("admin_quiz", "aim_quiz") . "</A><BR />"; --- 166,177 ---- } if (isteacher($course->id)) { // write admin links echo "<div align=right>"; echo "<font size=2>"; helpbutton("try_quiz", get_string("try_quiz", "aim_quiz"), "aim_quiz"); echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try\">" . get_string("try_quiz", "aim_quiz") . "</A><BR />"; + helpbutton("analyze_quiz", get_string("analyze_quiz", "aim_quiz"), "aim_quiz"); + echo "<A href=\"aimpage.php?id=$cm->id\">" . get_string("analyze_quiz", "aim_quiz") . "</A><BR>"; helpbutton("admin_quiz", get_string("admin_quiz", "aim_quiz"), "aim_quiz"); echo "<A href=\"aimpage.php?id=$cm->id&aimaction=edit\">" . get_string("admin_quiz", "aim_quiz") . "</A><BR />"; *************** *** 184,191 **** echo "</font></div>"; } ! ! print_simple_box_start("center", "", "$THEME->cellcontent", "20"); ! echo $data; ! print_simple_box_end(); // update max grade --- 180,207 ---- echo "</font></div>"; } ! ! if ($pdf) { ! if (aim_quiz_pdf($aim_quiz, $course, $data)) { ! notice( get_string("pdf_ok", "aim_quiz")); ! } else { ! error( get_string("pdf_error", "aim_quiz")); ! } ! } else { ! echo "<div align=right>"; ! echo "<font size=2>"; ! helpbutton("try_quiz", get_string("pdf_quiz", "aim_quiz"), "aim_quiz"); ! echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try&pdf=true\">" . get_string("pdf_quiz", "aim_quiz") . "</A><BR />"; ! echo "</font></div>"; ! ! // write out relevant parts of it ! $data = aim_quiz_convert_aim_output($aim_quiz, $subject, $data, $server->address, "aimpage.php?id=$cm->id", $grade, $max_grade); ! if (!$data) { ! error(get_string("nooutput", "aim_quiz"), "view.php?id=$cm->id"); ! } ! ! print_simple_box_start("center", "", "$THEME->cellcontent", "20"); ! echo $data; ! print_simple_box_end(); ! } // update max grade Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/lib.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lib.php 30 Aug 2003 15:21:31 -0000 1.3 --- lib.php 31 Aug 2003 20:44:57 -0000 1.4 *************** *** 474,476 **** --- 474,506 ---- } + + function aim_quiz_pdf($aim_quiz, $course, $data) { + /// Function which extracts the latex from the AiM quiz page and converts it to pdf + /// This still has to be written, I am only experimenting at the moment. + + $latex = "\\documentclass[12pt]{article}\n + \\begin{document}\n + \\begin{center} + \\bf ".$course->fullname.": ".$aim_quiz->name." + \\end{center}"; + + $questions = explode("<div class=\"question\"",$data); + array_shift($questions); + foreach ($questions as $key => $question) { + $latex .= "\n\n{\\bf Question:}\n"; + $chunks = explode("</latex>",$question); + array_pop($chunks); + foreach ($chunks as $chunk) { + preg_match("|<latex>[\s\S]*$|","$chunk",$piece); + $latex .= substr($piece[0],7); + } + } + $latex .= "\n\n\\end{document}"; + $fp=fopen("temp.tex","w"); + fwrite($fp,$latex); + fclose($fp); + // $latexoutput = shell_exec("pdflatex temp.tex"); + return true; + } + ?> Index: view.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/view.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** view.php 30 Aug 2003 15:21:31 -0000 1.3 --- view.php 31 Aug 2003 20:44:57 -0000 1.4 *************** *** 167,174 **** echo "<div align=right>"; echo "<font size=2>"; - helpbutton("analyze_quiz", get_string("analyze_quiz", "aim_quiz"), "aim_quiz"); - echo "<A href=\"aimpage.php?id=$cm->id\">" . get_string("analyze_quiz", "aim_quiz") . "</A><BR>"; helpbutton("try_quiz", get_string("try_quiz", "aim_quiz"), "aim_quiz"); echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try\">" . get_string("try_quiz", "aim_quiz") . "</A><BR />"; helpbutton("admin_quiz", get_string("admin_quiz", "aim_quiz"), "aim_quiz"); echo "<A href=\"aimpage.php?id=$cm->id&aimaction=edit\">" . get_string("admin_quiz", "aim_quiz") . "</A><BR />"; --- 167,174 ---- echo "<div align=right>"; echo "<font size=2>"; helpbutton("try_quiz", get_string("try_quiz", "aim_quiz"), "aim_quiz"); echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try\">" . get_string("try_quiz", "aim_quiz") . "</A><BR />"; + helpbutton("analyze_quiz", get_string("analyze_quiz", "aim_quiz"), "aim_quiz"); + echo "<A href=\"aimpage.php?id=$cm->id\">" . get_string("analyze_quiz", "aim_quiz") . "</A><BR>"; helpbutton("admin_quiz", get_string("admin_quiz", "aim_quiz"), "aim_quiz"); echo "<A href=\"aimpage.php?id=$cm->id&aimaction=edit\">" . get_string("admin_quiz", "aim_quiz") . "</A><BR />"; *************** *** 243,247 **** } else ! echo "<P align=\"center\"><A href=\"aimpage.php?id=$cm->id\">" . get_string("attemptquiz", "aim_quiz") . "</A></P>"; echo "</TD></TR></TABLE>"; } --- 243,247 ---- } else ! echo "<P align=\"center\"><A href=\"aimpage.php?id=$cm->id\">" . get_string("viewquiz", "aim_quiz") . "</A></P>"; echo "</TD></TR></TABLE>"; } |
From: <mav...@us...> - 2003-08-31 12:08:08
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1:/tmp/cvs-serv26992 Modified Files: Alice.class Log Message: latest compiled classes (-u flag changes) Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsK6qyUw and /tmp/cvsgVOljT differ |
From: <mav...@us...> - 2003-08-31 11:44:43
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1:/tmp/cvs-serv22186 Modified Files: Alice.java Log Message: added -u flag for safari Index: Alice.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Alice.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Alice.java 30 Aug 2003 22:40:55 -0000 1.4 --- Alice.java 31 Aug 2003 11:44:33 -0000 1.5 *************** *** 598,607 **** //get user agent String browser = request.getHeader("User-Agent").toLowerCase(); ! //this captures real mozilla and netscape 6+ only //and not even Opera that will identify as Mozilla ! //add more if needed ! if ( ( (browser.indexOf("mozilla/5.0") >= 0) && ! (browser.indexOf("gecko") >= 0) ) ) { --- 598,611 ---- //get user agent String browser = request.getHeader("User-Agent").toLowerCase(); + //System.out.println("Browser: " + browser); ! //this captures safari and real mozilla and netscape 6+ only //and not even Opera that will identify as Mozilla ! //add more if needed ! if ( ! ((browser.indexOf("mozilla/5.0") >= 0) && ! (browser.indexOf("gecko") >= 0)) ! || ! (browser.indexOf("safari") >= 0) ) { |
From: <mav...@us...> - 2003-08-31 10:40:06
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1:/tmp/cvs-serv12723 Modified Files: Tag: develop_2_1 Alice.java Log Message: added -u flag for safari Index: Alice.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Alice.java,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -C2 -d -r1.2.2.3 -r1.2.2.4 *** Alice.java 30 Aug 2003 16:54:31 -0000 1.2.2.3 --- Alice.java 31 Aug 2003 10:40:02 -0000 1.2.2.4 *************** *** 598,607 **** //get user agent String browser = request.getHeader("User-Agent").toLowerCase(); ! //this captures real mozilla and netscape 6+ only //and not even Opera that will identify as Mozilla ! //add more if needed ! if ( ( (browser.indexOf("mozilla/5.0") >= 0) && ! (browser.indexOf("gecko") >= 0) ) ) { --- 598,611 ---- //get user agent String browser = request.getHeader("User-Agent").toLowerCase(); + //System.out.println("Browser: " + browser); ! //this captures safari and real mozilla and netscape 6+ only //and not even Opera that will identify as Mozilla ! //add more if needed ! if ( ! ((browser.indexOf("mozilla/5.0") >= 0) && ! (browser.indexOf("gecko") >= 0)) ! || ! (browser.indexOf("safari") >= 0) ) { |
From: <gus...@us...> - 2003-08-30 22:41:00
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes In directory sc8-pr-cvs1:/tmp/cvs-serv26415/WEB-INF/classes Modified Files: Alice.class AliceLog.class AliceLogEntry.class AliceRequest.class Maple.class Log Message: Manolis' implementation of the -u tag setting Index: Alice.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Alice.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsnz6iGW and /tmp/cvsIIcm4I differ Index: AliceLog.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLog.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsU2myJX and /tmp/cvsi438fL differ Index: AliceLogEntry.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceLogEntry.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvs7BCMWY and /tmp/cvsAMnVIN differ Index: AliceRequest.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/AliceRequest.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsqYOra0 and /tmp/cvsGkNS6P differ Index: Maple.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/Maple.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsf9N0k1 and /tmp/cvsONd7qS differ |
From: <gus...@us...> - 2003-08-30 22:41:00
|
Update of /cvsroot/aimmath/AIM/WEB-INF/classes/tth In directory sc8-pr-cvs1:/tmp/cvs-serv26415/WEB-INF/classes/tth Modified Files: TtH.class TtHReader.class Log Message: Manolis' implementation of the -u tag setting Index: TtH.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/tth/TtH.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Binary files /tmp/cvs9QOKD4 and /tmp/cvsebwX2Y differ Index: TtHReader.class =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/classes/tth/TtHReader.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Binary files /tmp/cvsQXiAO5 and /tmp/cvsy4QWq1 differ |
From: <gus...@us...> - 2003-08-30 22:40:59
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1:/tmp/cvs-serv26415/WEB-INF/java Modified Files: Alice.java Maple.java Log Message: Manolis' implementation of the -u tag setting Index: Alice.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Alice.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Alice.java 25 Aug 2003 21:47:18 -0000 1.3 --- Alice.java 30 Aug 2003 22:40:55 -0000 1.4 *************** *** 209,212 **** --- 209,213 ---- } + if (TtHProgram != null) { tth.TtH.program = TtHProgram; *************** *** 593,597 **** // execute command, sending output to the web page. try { ! maple.exec("`aim/Main`(" + commandargs + "):\n", webOutput, alicereq.mathdisplay); } catch(Exception e) { logentry.close("ERROR"); --- 594,613 ---- // execute command, sending output to the web page. try { ! ! String tthOpt = ""; ! //get user agent ! String browser = request.getHeader("User-Agent").toLowerCase(); ! ! //this captures real mozilla and netscape 6+ only ! //and not even Opera that will identify as Mozilla ! //add more if needed ! if ( ( (browser.indexOf("mozilla/5.0") >= 0) && ! (browser.indexOf("gecko") >= 0) ) ! ) ! { ! tthOpt = "-u"; ! } ! ! maple.exec("`aim/Main`(" + commandargs + "):\n", webOutput, alicereq.mathdisplay, tthOpt); } catch(Exception e) { logentry.close("ERROR"); Index: Maple.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Maple.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Maple.java 25 Aug 2003 21:47:18 -0000 1.3 --- Maple.java 30 Aug 2003 22:40:55 -0000 1.4 *************** *** 138,142 **** // The command need not have a semicolon or newline at the end public synchronized void exec(String cmd) throws Exception { ! exec(cmd, null, "html"); } --- 138,142 ---- // The command need not have a semicolon or newline at the end public synchronized void exec(String cmd) throws Exception { ! exec(cmd, null, "html", ""); } *************** *** 145,149 **** // Default to converting the latex output with tth public synchronized void exec(String cmd, PrintWriter out) throws Exception { ! exec(cmd, null, "html"); } --- 145,149 ---- // Default to converting the latex output with tth public synchronized void exec(String cmd, PrintWriter out) throws Exception { ! exec(cmd, null, "html", ""); } *************** *** 151,155 **** // The command need not have a semicolon or newline at the end // Convert latex using the option given ! public synchronized void exec(String cmd, PrintWriter out, String mathdisplay) throws Exception { --- 151,155 ---- // The command need not have a semicolon or newline at the end // Convert latex using the option given ! public synchronized void exec(String cmd, PrintWriter out, String mathdisplay, String tthOpt) throws Exception { *************** *** 179,187 **** if (out != null) { if (mathdisplay.toLowerCase().equals("html")) // this don't work! How do we do string comparisons? ! out.print(tth.TtH.convert(outstring.toString())); else if (mathdisplay.toLowerCase().equals("latex")) out.print(outstring.toString()); else // default to using tth ! out.print(tth.TtH.convert(outstring.toString())); } } --- 179,187 ---- if (out != null) { if (mathdisplay.toLowerCase().equals("html")) // this don't work! How do we do string comparisons? ! out.print(tth.TtH.convert(outstring.toString(), tthOpt)); else if (mathdisplay.toLowerCase().equals("latex")) out.print(outstring.toString()); else // default to using tth ! out.print(tth.TtH.convert(outstring.toString(), tthOpt)); } } |
From: <gus...@us...> - 2003-08-30 22:40:59
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java/tth In directory sc8-pr-cvs1:/tmp/cvs-serv26415/WEB-INF/java/tth Modified Files: TtH.java Log Message: Manolis' implementation of the -u tag setting Index: TtH.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/tth/TtH.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TtH.java 5 May 2003 05:12:52 -0000 1.2 --- TtH.java 30 Aug 2003 22:40:55 -0000 1.3 *************** *** 130,134 **** } ! public static String convertChunk(String s) throws Exception { --- 130,134 ---- } ! public static String convertChunk(String s, String opt) throws Exception { *************** *** 146,150 **** // start a TtH process ! p = Runtime.getRuntime().exec(program + " -r -L"); tthinput = p.getOutputStream(); outreader = new TtHReader(p.getInputStream()); --- 146,150 ---- // start a TtH process ! p = Runtime.getRuntime().exec(program + " " + opt + " -r -L"); tthinput = p.getOutputStream(); outreader = new TtHReader(p.getInputStream()); *************** *** 181,185 **** } ! public static String convert(String s) throws Exception { int i,j,k,l,m; --- 181,185 ---- } ! public static String convert(String s, String opt) throws Exception { int i,j,k,l,m; *************** *** 213,217 **** i = input.length(); } else { ! html += convertChunk(input.substring(k,l)); i = l + "</latex>".length(); } --- 213,217 ---- i = input.length(); } else { ! html += convertChunk(input.substring(k,l),opt); i = l + "</latex>".length(); } |
From: <nps...@us...> - 2003-08-30 21:08:08
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1:/tmp/cvs-serv14068/WEB-INF/maple/aim/admin Modified Files: Quiz.mpl SourceFile.mpl Log Message: Changed TryQuestion actions to TryRightAnswer, so we get the question trial page with the right answer filled in automatically. Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Quiz.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Quiz.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- Quiz.mpl 30 Aug 2003 21:08:04 -0000 1.4 *************** *** 68,72 **** 'Arguments' = ["QuestionName"]]], ! ['Action',"TryQuestion", "Try question @QuestionName@.", ['LinkText' = __("Try"), --- 68,72 ---- 'Arguments' = ["QuestionName"]]], ! ['Action',"TryRightAnswer", "Try question @QuestionName@.", ['LinkText' = __("Try"), *************** *** 414,418 **** page['ActionLink',"LoadSource",[nam]]], [["td","align" = "left"], ! page['ActionLink',"TryQuestion",[nam]]], [["td","align" = "left"], page['ActionLink',"AnalyzeQuestion",[nam]]], --- 414,418 ---- page['ActionLink',"LoadSource",[nam]]], [["td","align" = "left"], ! page['ActionLink',"TryRightAnswer",[nam]]], [["td","align" = "left"], page['ActionLink',"AnalyzeQuestion",[nam]]], *************** *** 448,452 **** [["td","align" = "left"],nam], [["td","align" = "left"], ! page['ActionLink',"TryQuestion",[nam]]], [["td","align" = "left"]," "], [["td","align" = "left"], --- 448,452 ---- [["td","align" = "left"],nam], [["td","align" = "left"], ! page['ActionLink',"TryRightAnswer",[nam]]], [["td","align" = "left"]," "], [["td","align" = "left"], Index: SourceFile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/SourceFile.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SourceFile.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- SourceFile.mpl 30 Aug 2003 21:08:04 -0000 1.4 *************** *** 77,81 **** 'ExtraScript' = "f.SourceText.value = '';"]], ! ['Action',"TryQuestion", "Try the compiled question.", ['Command' = "try/Question", --- 77,81 ---- 'ExtraScript' = "f.SourceText.value = '';"]], ! ['Action',"TryRightAnswer", "Try the compiled question.", ['Command' = "try/Question", *************** *** 329,333 **** "</tt></font>")), " ", ! page['ActionLink',"TryQuestion",[question['Name']]], ["br"])); --- 329,333 ---- "</tt></font>")), " ", ! page['ActionLink',"TryRightAnswer",[question['Name']]], ["br"])); |
From: <nps...@us...> - 2003-08-30 21:06:15
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv13705/WEB-INF/maple/aim Modified Files: LaTeX.mpl Log Message: Removed redefinitions of various latex functions, as the Maple 8 versions of these functions have been improved and no longer need to be overriden. Index: LaTeX.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/LaTeX.mpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LaTeX.mpl 25 Aug 2003 21:47:19 -0000 1.2 --- LaTeX.mpl 30 Aug 2003 21:06:11 -0000 1.3 *************** *** 48,149 **** ): - `Package/Assign`( - `latex/diff`, - "", - proc(a, b) - local `\\partial `,`\\frac `, `{`, `}`, - d, n, A, num,denom,ans, blist, x, y, i, c,short; - if nargs < 2 then ERROR(`invalid arguments`) fi; - - A := a; # the expression to differentiate - c := args[2 .. nargs]; # the list of variables wrt which to differentiate - - # It could happen that A is already a differential expression - # like Diff(B,x). If so, we want to remove the differential - # operator from A and absorb it into c. - blist := NULL; - while type(A, function) and member(op(0, A), {'diff', 'Diff'}) do - blist := op(2 .. nops(A), A), blist; A := op(1, A) - od; - - blist := [`latex/latex/reverse`(c, blist)]; - # blist is now the (possibly expanded) list of variables - # wrt which to differentiate. - - # denom is the denominator of the differential operator - # eg for Diff(f(x,y),x,x,y), denom would be a list of names - # that would concatenate to give {dx^2 dy}. - denom := `{`; - x := blist[1]; - n := 0; - for y in blist do - if y = x then n := n + 1; next fi; - denom := denom, d, `latex/print`(x^n); - x := y; - n := 1 - od; - denom := denom, d, `latex/print`(y^n), `}`; - - # If A is now a single character name (eg 'y') then - # we put short = true and format the derivative like - # \frac{dy}{dx}. If A is anything more complicated (eg 'f(x)') - # we put short = false and format the derivative like - # \frac{d}{dx} f(x). - short := - evalb(type([A],[symbol]) and length(convert(A,string)) = 1); - - num := `\\frac `, `{`, d; - if 1 < nops(blist) then - num := num, `^`, `{`, `latex/print`(nops(blist)), `}`; - fi; - if short then num := num, `latex/print`(A); fi; - num := num, `}`; - - ans := num,denom; - if not(short) then - ans := `{`,ans,`}`; - if type(A, {'function', 'name'}) then - ans := ans, `latex/print`(A) - else - ans := ans, `latex/latex/prinpar`(A) - fi; - fi; - - if 1 < nops(indets(A, name)) then - RETURN(op(subs(d = `\\partial `, [ans]))) - else RETURN(ans) - fi - end - ): - - `Package/Assign`( - `latex/latex/**`, - "This function overrides the default Maple routine for - LaTeX'ing powers, to prevent conversion of x^(1/n) to - \\sqrt[n]{x}. This is necessary because TtH cannot - render \\sqrt[n]{x} very well.", - proc (e::anything) - local texlist,`[`,`\\frac `,`\\sqrt `,`]`,`{`,`}`; - - texlist := NULL; - if type(op(2,e),'fraction') and abs(op([2, 1],e)) = 1 - and abs(op([2, 2],e)) < 10 and op(2,e) < 0 then - texlist:=texlist,`{`,`\\frac`,`{`,1,`}`,`{`,`latex/print`(1/e),`}`,`}` - elif type(op(1,e),{name,numeric}) and op(2,e) = 1/2 then - texlist := `\\sqrt `,`{`,`latex/print`(op(1,e)),`}`; - else - if - type(op(1,e),{'`+`','`*`','`^`','function','series','fraction','negative'}) - then - texlist:=texlist,`latex/latex/prinpar`(op(1,e)) - else - texlist:=texlist,`{`,`latex/print`(op(1,e)),`}` - fi; - texlist:=texlist,`^`,`{`,`latex/print`(op(2,e)),`}` - fi; - texlist - end - ): - `Package/Assign`( --- 48,51 ---- *************** *** 198,316 **** ): - `Package/Assign`( - `latex/latex/symbol`, - "", - proc(QQ) - local texlist, s,n,`{`, `}`, `\\_`; - option system, remember; - if assigned(`latex/special_names`[cat(``,QQ)]) then - texlist := `latex/special_names`[cat(``,QQ)] - elif member(QQ, eval(`latex/greek`, 1)) then - texlist := `latex/latex/copy`(cat(`\\`,QQ)) - else - texlist := `latex/latex/copy`(QQ); - s := convert(texlist,string); - if s <> "" and substring(s,1..1) = "&" then - s := substring(s,2..-1); - n := convert(s,name); - texlist := `latex/latex/copy`(n); - fi; - fi; - RETURN(texlist); - end - ): - - `Package/Assign`( - `latex/latex/*`, - "", - proc(e) - local subexp, den, ee, subee, i, num, texlist, lnum,lden, `\\,`, `\\frac `, `\\sqrt `, - `{`, `}`; - global _LatexSmallFractionConstant; - option - `Copyright (c) 1992 by the University of Waterloo. All rights reserved.`; - - if type(op(1, e), 'numeric') and op(1, e) < 0 then - RETURN(`latex/latex/copy`('`-`'), `latex/print`(-e)) - fi; - if type(op(1, e), 'numeric') then - i := _LatexSmallFractionConstant; - _LatexSmallFractionConstant := 50; - texlist := - `latex/print`(op(1, e)), `\\,`, `latex/print`(subsop(1 = 1, e)) - ; - _LatexSmallFractionConstant := i; - RETURN(texlist) - fi; - texlist := NULL; - num := 1; - den := 1; - ee := e; - for subee in [op(ee)] do - if type(subee, 'fraction') then - num := num*op(1, subee); den := den*op(2, subee) - elif type(subee, '`^`') and type(op(2, subee), 'rational') and - op(2, subee) < 0 then - if type(subee,table) then - den := den/op(subee) - else - den := den/subee - fi - else - if type(subee,table) then - num := num*op(subee) - else - num := num*subee - fi - fi - od; - if den <> 1 then - if type(num, '`latex/istall`') or type(den, '`latex/istall`') then - if num <> 1 then - texlist := `latex/print`(num); - if type(num, `+`) then - texlist := `\\left(`, texlist, `\\right)` - fi - else texlist := NULL - fi; - if type(den, '`*`') then den := [op(den)] else den := [den] fi; - for subexp in den do - texlist := texlist, `latex/print`(1/subexp) - od; - texlist - else - lnum := `if`(type(num,table), - `latex/print`(op(num)), - `latex/print`(num)); - lden := `if`(type(den,table), - `latex/print`(op(den)), - `latex/print`(den)); - texlist := texlist, `{`, '`\\frac `', '`{`', - lnum, '`}`', '`{`', lden, '`}`', `}`; - fi - else - i := 1; - for subee in ee do - if type(subee, {'series', '`+`'}) then - texlist := texlist, `latex/latex/prinpar`(subee) - elif i < nops(ee) and type(subee, 'function') and - member(op(0, subee), {diff, Diff}) then - texlist := texlist, `latex/latex/prinpar`(subee) - elif type(subee,table) then - texlist := texlist,`latex/print`(op(subee)); - else texlist := texlist, `latex/print`(subee) - fi; - if i < nops(ee) and ( - i = 1 and type(op(1, ee), 'integer') or type(subee, '`!`') or - type(subee, {'string', 'symbol'}) and 1 < length(subee) or - has([`latex/print`(subee)], '`\\sqrt `')) then - texlist := texlist, `\\,` - fi; - i := i + 1 - od - fi; - RETURN(texlist) - end - ): `Package/Assign`( --- 100,103 ---- *************** *** 511,514 **** --- 298,302 ---- `Package/Assign`(`LaTeX/Subs` ,"", `aim/LaTeX/Subs`): `Package/Assign`(`LaTeX/Wrap` ,"", `aim/LaTeX/Wrap`): + `Package/Assign`(`LaTeX/WrapSubs` ,"", `aim/LaTeX/WrapSubs`): `Package/Assign`(`LaTeX/Display` ,"", `aim/LaTeX/Display`): `Package/Assign`(`LaTeX/DisplayParse`,"", `aim/LaTeX/DisplayParse`): |
From: <nps...@us...> - 2003-08-30 21:04:10
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv13233/WEB-INF/maple/aim Modified Files: Compile.mpl Log Message: Corrected stupid mistakes in handling MProc Index: Compile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Compile.mpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Compile.mpl 29 Aug 2003 19:41:34 -0000 1.5 --- Compile.mpl 30 Aug 2003 21:04:04 -0000 1.6 *************** *** 635,697 **** 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; ! question['MProc'] := eval(`aim/Compile/ConvertMPROC`(eval(x[1]))); setans := *************** *** 1723,1727 **** proc(x) local y,z; ! global printfunctions; if type(x,function) then if op(0,x) = _Inert_FUNCTION then --- 1665,1669 ---- proc(x) local y,z; ! global `aim/Compile/PrintFunctions`; if type(x,function) then if op(0,x) = _Inert_FUNCTION then *************** *** 1730,1737 **** 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( --- 1672,1679 ---- member(op(0,y),{_Inert_NAME,_Inert_ASSIGNEDNAME}) then z := op(1,y); ! if type([`aim/Compile/PrintFunctions`[z]],[string]) then return( _Inert_FUNCTION( ! _Inert_ASSIGNEDNAME(`aim/Compile/PrintFunctions`[z],"PROC"), _Inert_EXPSEQ( _Inert_TABLEREF( *************** *** 1869,1873 **** 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 --- 1811,1815 ---- 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 |
From: <nps...@us...> - 2003-08-30 21:01:48
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv12745/WEB-INF/maple Modified Files: Console.mpl Log Message: Added compilequestion() function Index: Console.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Console.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Console.mpl 25 Aug 2003 21:47:18 -0000 1.3 --- Console.mpl 30 Aug 2003 21:01:45 -0000 1.4 *************** *** 311,314 **** --- 311,322 ---- ###################################################################### + compilequestion := + proc(subjname::string,quizname::string,filename::string) + setup(subjname,quizname); + `aim/Compile`(quiz['RootDir'],filename); + end: + + ###################################################################### + tracednames := NULL: |
From: <mav...@us...> - 2003-08-30 16:54:35
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1:/tmp/cvs-serv9939 Modified Files: Tag: develop_2_1 Alice.java Maple.java Log Message: changes to allow -u option depending on browser detection Index: Alice.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Alice.java,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** Alice.java 24 Aug 2003 14:44:42 -0000 1.2.2.2 --- Alice.java 30 Aug 2003 16:54:31 -0000 1.2.2.3 *************** *** 209,212 **** --- 209,213 ---- } + if (TtHProgram != null) { tth.TtH.program = TtHProgram; *************** *** 593,597 **** // execute command, sending output to the web page. try { ! maple.exec("`aim/Main`(" + commandargs + "):\n", webOutput, alicereq.mathdisplay); } catch(Exception e) { logentry.close("ERROR"); --- 594,613 ---- // execute command, sending output to the web page. try { ! ! String tthOpt = ""; ! //get user agent ! String browser = request.getHeader("User-Agent").toLowerCase(); ! ! //this captures real mozilla and netscape 6+ only ! //and not even Opera that will identify as Mozilla ! //add more if needed ! if ( ( (browser.indexOf("mozilla/5.0") >= 0) && ! (browser.indexOf("gecko") >= 0) ) ! ) ! { ! tthOpt = "-u"; ! } ! ! maple.exec("`aim/Main`(" + commandargs + "):\n", webOutput, alicereq.mathdisplay, tthOpt); } catch(Exception e) { logentry.close("ERROR"); Index: Maple.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Maple.java,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -C2 -d -r1.2.2.3 -r1.2.2.4 *** Maple.java 24 Aug 2003 14:44:42 -0000 1.2.2.3 --- Maple.java 30 Aug 2003 16:54:31 -0000 1.2.2.4 *************** *** 138,142 **** // The command need not have a semicolon or newline at the end public synchronized void exec(String cmd) throws Exception { ! exec(cmd, null, "html"); } --- 138,142 ---- // The command need not have a semicolon or newline at the end public synchronized void exec(String cmd) throws Exception { ! exec(cmd, null, "html", ""); } *************** *** 145,149 **** // Default to converting the latex output with tth public synchronized void exec(String cmd, PrintWriter out) throws Exception { ! exec(cmd, null, "html"); } --- 145,149 ---- // Default to converting the latex output with tth public synchronized void exec(String cmd, PrintWriter out) throws Exception { ! exec(cmd, null, "html", ""); } *************** *** 151,155 **** // The command need not have a semicolon or newline at the end // Convert latex using the option given ! public synchronized void exec(String cmd, PrintWriter out, String mathdisplay) throws Exception { --- 151,155 ---- // The command need not have a semicolon or newline at the end // Convert latex using the option given ! public synchronized void exec(String cmd, PrintWriter out, String mathdisplay, String tthOpt) throws Exception { *************** *** 179,187 **** if (out != null) { if (mathdisplay.toLowerCase().equals("html")) // this don't work! How do we do string comparisons? ! out.print(tth.TtH.convert(outstring.toString())); else if (mathdisplay.toLowerCase().equals("latex")) out.print(outstring.toString()); else // default to using tth ! out.print(tth.TtH.convert(outstring.toString())); } } --- 179,187 ---- if (out != null) { if (mathdisplay.toLowerCase().equals("html")) // this don't work! How do we do string comparisons? ! out.print(tth.TtH.convert(outstring.toString(), tthOpt)); else if (mathdisplay.toLowerCase().equals("latex")) out.print(outstring.toString()); else // default to using tth ! out.print(tth.TtH.convert(outstring.toString(), tthOpt)); } } |
From: <mav...@us...> - 2003-08-30 16:40:48
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java/tth In directory sc8-pr-cvs1:/tmp/cvs-serv7382 Modified Files: Tag: develop_2_1 TtH.java Log Message: changed ID of the file Index: TtH.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/tth/TtH.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** TtH.java 5 May 2003 05:12:52 -0000 1.2 --- TtH.java 30 Aug 2003 16:40:35 -0000 1.2.2.1 *************** *** 130,134 **** } ! public static String convertChunk(String s) throws Exception { --- 130,134 ---- } ! public static String convertChunk(String s, String opt) throws Exception { *************** *** 146,150 **** // start a TtH process ! p = Runtime.getRuntime().exec(program + " -r -L"); tthinput = p.getOutputStream(); outreader = new TtHReader(p.getInputStream()); --- 146,150 ---- // start a TtH process ! p = Runtime.getRuntime().exec(program + " " + opt + " -r -L"); tthinput = p.getOutputStream(); outreader = new TtHReader(p.getInputStream()); *************** *** 181,185 **** } ! public static String convert(String s) throws Exception { int i,j,k,l,m; --- 181,185 ---- } ! public static String convert(String s, String opt) throws Exception { int i,j,k,l,m; *************** *** 213,217 **** i = input.length(); } else { ! html += convertChunk(input.substring(k,l)); i = l + "</latex>".length(); } --- 213,217 ---- i = input.length(); } else { ! html += convertChunk(input.substring(k,l),opt); i = l + "</latex>".length(); } |
From: <gus...@us...> - 2003-08-30 15:21:43
|
Update of /cvsroot/aimmath/moodle/lang/en/help/aim_quiz In directory sc8-pr-cvs1:/tmp/cvs-serv27625/lang/en/help/aim_quiz Added Files: admin_quiz.html admin_sourcedir.html admin_sourcefile.html admin_subject.html analyze_question.html analyze_quiz.html analyze_subject.html review_quiz.html review_subject.html try_question.html try_quiz.html Log Message: I have made things more moodly by 1) putting the AiM pages into boxes with white background and 2) adding help icons to administrative links. The help files are copied from AiM's teacher.html and still need to be adapted. --- NEW FILE: admin_quiz.html --- <a name='admin_quiz'><h2>The quiz administration page</h2></a> <p> The quiz admin pages can be accessed from the <a href='#admin_subject'>subject admin page</a>. </p> <p> The toolbar at the top of the subject admin page has links allowing you to save or reload options for the quiz, to <a href='#try_quiz'>try it</a>, to <a href='#admin_sourcedir'>browse the source files</a> for the questions in the quiz, and to <a href='#analyze_quiz'>view the results</a>. The options that can be changed are as follows: <ul> <li><b>The title:</b> a descriptive title for the quiz. </li> <li><b>The due date:</b> the date after which students will be allowed to see the solutions, but will not be allowed to change their answers. You can set this to 'none' if desired. </li> <li><b>The weight:</b> if the subject has quizzes <tt><font color='green'>q<sub>1</sub>,...,q<sub>n</sub></font></tt> with weights <tt><font color='green'>w<sub>1</sub>,...,w<sub>n</sub></font></tt>, and a student's marks are <tt><font color='green'>m<sub>1</sub>,...,m<sub>n</sub></font></tt>, then the overall score is taken to be <tt><font color='green'>w<sub>1</sub>m<sub>1</sub>+...+w<sub>n</sub>m<sub>n</sub></font></tt>. </li> <li><b>The access level:</b> this can be 'all', 'registered' or 'none'. If it is 'registered', then guests cannot access the quiz; if it is 'none', then no students can access the quiz. The quiz selection page shown to students will not include quizzes that they do not have permission to access. </li> <li><b>The mode:</b> this can be 'practice', 'assessment' or 'strict'. In <em>practice mode</em>, students can try the questions repeatedly and the system will tell them whether their answers are right or wrong (except for multiple choice questions), and may give some additional feedback. At any stage, students can ask to see the solutions. After that, they can try the quiz again, but it will be randomized differently. The due date has no effect. In <em>assessment mode</em>, the system will again tell students whether their answers are correct, but it will not allow them to see the solutions until the due date has passed, at which point they will not be allowed to change their answers. <em>Strict mode</em> is similar except that before the due date, the system will give the students no feedback at all about the correctness of their answers (although it will still give feedback about syntax and type checking.) </li> </ul> <a name='quiz_table'><h3>The question table:</h3></a> After the quiz options form, there is a table of questions. <p> Some quizzes (for example, those under constructions) may be hidden from students. By default, these are also not shown in the subject administration page; however, you can include them by clicking 'Show unused questions'. Unless <a href='#selector'>selector functions</a> are in use, all visible questions will be included in the quiz, and hidden questions will be excluded. There is also a link at the top of the quiz marked 'Use all questions', which forces all available questions to be unhidden and included in the quiz. </p> <p> Unless the <a href='#selector'>random question order</a> flag is set, questions will appear in the quiz in the same order that they appear in the table. This order can be changed by editing the question numbers. For example, suppose that question 1 is called easy_sum, question 2 is called hard_sum, and question 3 is called FLT. If you change the 3 to 1.5 and then click 'Save Options', then the page will be regenerated with easy_sum as question 1, FLT as question 2, and hard_sum as quiz 3. </p> <p> Each question has various links attached to it. <ul> <li>The 'Edit' link leads to the <a href='#admin_sourcefile'>source file editing page</a>, which allows you to edit and recompile the source file in which the question was defined. This will only work if the compiled file contains information about its ancestry, and you still have the source file. </li> <li>The 'Try' link leads to the <a href='#try_question'>question trial</a> page, which has many convenient facilities for testing and editing. </li> <li>The 'Results' link leads to the <a href='#analyze_question'>question analysis page</a>, which has powerful facilities for analyzing how students performed and the kinds of errors that they made. </li> <li>The 'Hide' link ensures that the question is not included in the quiz, and the 'Delete' link deletes the compiled question file. The corresponding source file is not deleted, however. </li> </ul> <a name='selector'><h3>Selection and reordering:</h3></a> After the question table, there are some facilities for random selection and reordering of questions. Firstly, you can check the 'random question order' box to say that order of the questions should be randomly reshuffled before the quiz is sent to the student. Secondly, there is a text area in which you can enter arbitrary Maple text to define a selector function or a list of selector functions. If the box is empty, then all questions are used. If there is a single selector function <font color='green'><tt>p</tt></font>, then all questions <font color='green'><tt>Q</tt></font> for which <font color='green'><tt>p(Q)=true</tt></font> are used. If there is a list <font color='green'><tt>[p<sub>1</sub>,...,p<sub>n</sub>]</tt></font> of selector functions, then n questions <font color='green'><tt>Q<sub>1</sub>,...,Q<sub>n</sub></tt></font> are selected randomly, such that <font color='green'><tt>p<sub>i</sub>(Q<sub>i</sub>)</tt></font> holds for all i and all the <font color='green'><tt>Q<sub>i</sub></tt></font> are different. An error is returned if it is not possible to choose such a list. The list is then shuffled if random reordering is turned on. In all these functions, the argument <font color='green'><tt>Q</tt></font>, is an object of the class `aim/Question`. Most commonly, the function will just look at <font color='green'><tt>Q['Keywords']</tt></font>, which is the list of strings specified as keywords in the question file. --- NEW FILE: admin_sourcedir.html --- <a name='admin_sourcedir'><h2>The source directory page</h2></a> This can be accessed from the <a href='#admin_quiz'>quiz admin page</a>. It displays a list of <a href='format.html'>question source files</a>, which may define one or more questions. Each source file has links as follows: <ul> <li>The 'Edit' link leads to the <a href='#admin_sourcefile'>source file editing page</a>, which allows you to edit and recompile the file. In fact, the file is automatically recompiled every time you visit this page. Note that there is also a link in the toolbar allowing you to recompile all files simultaneously. A box will pop up to alert you if any files cause problems, and then you can edit and compile them individually. </li> <li>The 'Download' link allows you to download the source file to your own computer (and thus use a proper editor to change it). </li>The 'Copy', 'Rename' and 'Delete' links have the obvious function. </li> <li>At the bottom of the page there is a form that you can use to create a new source file, or to upload one from your own computer. (Even if you are logged on to the server, this is a convenient way to ensure that things get put in the right place.) </li> </ul> --- NEW FILE: admin_sourcefile.html --- <a name='admin_sourcefile'><h2>The source editing page</h2></a> <p> This can be accessed from various places, including the <a href='#admin_quiz'>quiz home page</a> and the <a href='#try_question'>question trial page</a>. </p> <p> The main part of the page is a text area in which you can edit the source code for a question or a list of questions. Every time you visit the page, AiM will attempt to recompile the file. Underneath the editing area, you will see the results. For each question that compiled successfully, there is a link to the <a href='#try_question'>question trial page</a> that you can use to check that the question is working properly. For each question that did not compile successfully, there is an error message, which may or may not be comprehensible. If AiM is able to determine the precise location of the error, it will be marked with a blinking red marker. </p> <p> After you have edited the file, you can click on 'Save and Recompile' to save the changes and compile the file again. Alternatively, you can discard your changes by clicking on 'Reload'. There is another use for this: if you are working on the server, you can edit the source file directly using a proper editor, save your changes, and then click 'Reload' to make AiM notice the changes and recompile the file. </p> <p> The toolbar also contains a 'Download' button allowing you to save the source file to your own hard disk. </p> --- NEW FILE: admin_subject.html --- <a name='admin_subject'><h2>The subject administration page</h2></a> <p> The toolbar at the top of the subject admin page has links allowing you to save or reload options for the subject and to <a href='help.php?module=aim_quiz&file=analyze_subject.html'>view the results</a>. The options that can be changed are as follows: <ul> <li><b>The title:</b> a descriptive title for the course. </li> <li><b>The admin email address:</b> for technical questions specific to this subject (including questions about registration and passwords). </li> <li><b>The teacher email address:</b> for mathematical questions about this subject. </li> <!-- <li><b>The total value:</b> AiM can automatically assign an overall numerical mark for all the quizzes in the subject. If you specify a total value, then overall marks will be scaled out of that value. If you leave the box blank, then the total value will just be the sum of the weighted values of the various quizzes. <font color='red'>(not currently implemented)</font> </li> --> <li><b>The security level:</b> If this is set to "high", you will need to reenter your password for every operation that you perform. If it is set to "low", then your password will be stored in the browser, in a form which is not at all difficult to extract. Thus, if you use a publicly accessible terminal, you will need to be very careful to close the browser when you have finished. </li> <!-- <li><b>The registration policy:</b> If this is set to "assigned", then the system will expect you to supply a list of student ID's, with names, email addresses and passwords. Guest access may or may not be allowed as well. The other possible value is "self", which should allow students to register themselves, but this is <font color='red'>not yet implemented</font>. </li> --> <li><b>The guest policy:</b> If this is set to "yes", then guests can access the subject anonymously. Answers that they supply will not be recorded on disc (although the hidden parameter mechanism means that they will be stored in the guest's browser until s/he closes it down). There is an option on the <a href='#admin_quiz'>quiz administration page</a> allowing you to disallow guests from accessing particular quizzes. </li> <li><b>The password</b> </li> </ul> <a name='quiz_table'><h3>The quiz table:</h3></a> After the subject options form, there is a table of quizzes. <p> Some quizzes (for example, those under constructions) may be hidden from students. By default, these are also not shown in the subject administration page; however, you can include them by clicking 'Show hidden quizzes'. </p> <p> Quizzes are listed on the <a href='#admin_subjecthome'>subject home page</a> in the same order as they appear in the table. This order can be changed by editing the quiz numbers. For example, suppose that Addition is quiz 1, Multiplication is quiz 2, and Division is quiz 3. If you change the 3 to 1.5 and then click 'Save Options', then the page will be regenerated with Addition as quiz 1, Division as quiz 2, and Multiplication as quiz 3. </p> <p> Each quiz has various links attached to it. <ul> <li>The 'Try' link leads to the <a href='#try_quiz'>quiz trial</a> page; this provides more information than you would get by simply logging on as a student, and it works even when the quiz is hidden from students. </li> <li>The 'Edit' link leads to the <a href='#admin_quiz'>quiz admin</a> page, which allows you to set options for the quiz and perform various operations on the questions. </li> <li>The 'Source' link leads to the <a href='#admin_sourcedir'>source directory page</a>, allowing you to browse the <a href='#format.html'>question source files</a> for the quiz. </li> <li>The 'Results' link leads to the <a href='#analyze_quiz'>quiz results page</a>. </li> <li>The 'Hide' link hides the quiz from students, whereas the 'Delete' link deletes everything associated with it: source files, question files, student records, the lot. </li> </ul> <p> You can create a new quiz by entering a name in the box at the bottom of the table, and clicking 'Create'. The name should be short and alphanumeric so that it can be used to construct file names. This will pop up a new <a href='#admin_quiz'>quiz admin page</a>, allowing you to set the quiz options (including a more verbose title if required) and so on. Note that newly created quizzes are hidden by default. You will need to reload the subject administration page and unhide the new quiz before it will be visible to students. </p> <a name='student_finder'><h3>The student finder:</h3></a> At the bottom of the subject admin page there is a form allowing you to find a student in the register. There are boxes for the ID, first name, surname and email address. Enter whatever information you know, and click the 'Find' link to pop up a <a href='#admin_student'>student admin page</a> (or possibly a list of choices, if there were multiple hits). Wildcards are not supported. --- NEW FILE: analyze_question.html --- <a name='analyze_question'><h2>The question results page</h2></a> <p> This can be accessed from various places, including the <a href='#admin_quiz'>quiz admin page</a> and the <a href='#analyze_quiz'>quiz results page</a>. </p> <p> The purpose of the page is to present summary information about attempts that students have made at a particular question. This is based on a table that, like the subject and quiz results tables, is not automatically updated when you visit the page. You can click the 'Reanalyze' link to update the table; a line near the top of the page will tell you when this was last done. The 'Resummarize' link allows you to change how the information in the table is summarized; for this, the table itself does not need to be updated. </p> <p> The results summary is shown at the bottom of the page. Initially, it will just say something like "x 123", meaning that there are 123 attempts at the question to consider. (Here, successive identical attempts by the same student are only counted once.) To get more interesting information, you need to use the 'Constraints' form and the 'Splitting keys' form. </p> <p> The constraints form allows you to restrict attention to a subset of the attempts that have been made. <ul> <li>By setting the 'Validity' selection box to 'valid', you can restrict attention to attempts that were syntactically valid. The other possibilities are 'invalid' or 'either'. </li> <li>Recall that students are allowed to submit answers to be checked for validity, without having them marked. In fact, AiM computes the mark anyway, but does not use it to determine the student's final score. By default, attempts are included in the analysis whether or not the student asked for them to be marked. You can restrict attention to attempts that received an official mark by setting the 'Marking' selection box to 'marked'. </li> <li>Using the 'Raw mark' selection box, you can restrict attention to attempts that received a mark of zero, or a nonzero mark, or less than the full mark, or the full mark. The word 'raw' means that these are the marks before applying penalties for previous incorrect attempts. </li> <li>Students will generally make many attempts at any given question, and by default, they are all included in the analysis. You can use the 'Finality' selection box to look only at final attempts. </li> </ul> </p> <p> The splitting keys form can be used to specify how the attempts should be divided up. <ul> <li>Suppose you set the left hand box to 'Validation note' and leave the others at 'none', and then click 'Resummarize'. The resulting page will list all the validation notes that occurred, with their frequencies. These will generally be AiM-generated notes, like "bad brackets" or "parse error", so you will get a feel for how much trouble the students are having with Maple syntax. </li> <li>Similarly, you could set the left hand box to 'Answer note' to count the number of answers in various different classes. These notes can be set using the function `aim/SetAnswerNote` in your marking procedure. Using facilities in the package `aim/Int`, for example, you can arrange for the note to be set to 'Naive substitution type 1' whenever a student says that the integral of f(x)<sup>n</sup> is f(x)<sup>n+1</sup>/(n+1); you would then be able to count the number of errors of this type. </li> <li>You can also split the attempts according to their question notes. These notes are generally set by a note> flag in a question file; they depend only on the question and on how it was randomized, not on the answer offered by the student. The note> flag will often be arranged so that the question note completely determines the question version. </li> <li>You can split attempts according to the students' answers, but it may not be helpful to compare answers to different versions of the question. In this case, you can set the first selection box to 'Question note' and the second box to 'Answer'. The resulting page will list all the question notes that occurred, and for each question note, will list all the corresponding answers and their frequencies. In some cases it may be informative to look at the 'Raw answer' (ie the string as typed by the student) rather than the 'Answer' (constructed by parsing the raw answer and doing some very mild simplification). </li> <li>The process can be iterated to split the attempts using up to four different keys. The possible keys are the question note, the validation note, the answer note, the raw answer, the answer and the raw mark. </li> </ul> </p> --- NEW FILE: analyze_quiz.html --- <a name='analyze_quiz'><h2>The quiz results page</h2></a> <p> The quiz results page can be accessed from the <a href='#admin_quiz'>quiz admin page</a> or the <a href='#admin_subject'>subject admin page</a> or the <a href='#analyze_subject'>subject results page</a>. </p> <p> This pages shows a table of students' results on this quiz. When there are hundreds of students, it takes some time to scan through all the results directories to prepare this table, so it is not automatically kept up to date. At the top of the page you can see the time at which the table was last updated, and you can refresh it by clicking the 'Reanalyze' link on the toolbar. The toolbar also has a link that you can click to download the results as a tab-separated-values file, which can be imported into most spreadsheet programs. </p> <p> The table mostly contains numbers, but for students with a mark of zero there are various special symbols to indicate whether they actually attempted the question, submitted any syntactically valid answers, and so on. The codes are explained at the bottom of the table. </p> <p> Along the left edge of the table, there are links allowing you to <a href='#review_quiz'>review</a> all the results for a particular student. Along the top edge, there are links to a table of questions at the bottom of the page. This table in turn contains descriptions of the questions, together with links to the <a href='#admin_sourcefile'>source editing pages</a>, the <a href='#try_question'>trial pages</a>, and the <a href='#analyze_question'>results pages</a> for the various questions. At the top of the results table, there are also links allowing you to re-sort the table in name order, in order of student ID's, or in descending mark order. </p> --- NEW FILE: analyze_subject.html --- <a name='analyze_subject'><h2>The subject results page</h2></a> <p> The subject results page can be accessed from the <a href='help.php?module=aim_quiz&file=admin_subject'>subject admin page</a>. </p> <p> This pages shows a table of students' results in this subject. When there are hundreds of students, it takes some time to scan through all the results directories to prepare this table, so it is not automatically kept up to date. At the top of the page you can see the time at which the table was last updated, and you can refresh it by clicking the 'Reanalyze' link on the toolbar. The toolbar also has a link that you can click to download the results as a tab-separated-values file, which can be imported into most spreadsheet programs. </p> <p> The table mostly contains numbers, but for students with a mark of zero there are various special symbols to indicate whether they actually accessed the quiz, submitted any nonempty answers, and so on. The codes are explained at the bottom of the table. </p> <p> Along the left edge of the table, there are links allowing you to <a href='help.php?module=aim_quiz&file=review_subject'>review</a> all the results for a particular student. Along the top edge, there are links to a table of quizzes at the bottom of the page. This table in turn contains links to the <a href='help.php?module=aim_quiz&file=admin_quiz'>admin pages</a>, the <a href='help.php?module=aim_quiz&file=try_quiz'>trial pages</a>, and the <a href='help.php?module=aim_quiz&file=analyze_quiz'>results pages</a> for the various quizzes. At the top of the results table, there are also links allowing you to re-sort the table in name order, in order of student ID's, or in descending mark order. </p> --- NEW FILE: review_quiz.html --- <a name='review_quiz'><h2>The quiz review page</h2></a> <p> This page can be used to review the answers and marks of a particular student on a particular version of a particular quiz. The details at the top include the seed that was used for randomization. The toolbar contains links to the <a href='#admin_subject'>quiz admin page</a> and the <a href='#admin_student'>student admin page</a>, as well as a link allowing you to send email to the student (if their address is in the register). There is also a link allowing you to include the quiz solutions. They are not shown by default, so that you can access this page with the student looking over your shoulder if you wish. </p> <p> The body of the page contains the quiz, essentially in the form that it was shown to the student. However, there are no boxes in which to enter answers. Instead, there is a table showing all the different raw answers that were entered by the student. For each answer, the table shows <ul> <li>The text of the answer</li> <li>Whether the answer was syntactically valid</li> <li>Whether the student asked for the answer to be marked, or merely validated </li> <li>The raw mark for this answer (ie the mark before subtraction of penalties for previous incorrect attempts) </li> <li>The number of successive times that this answer was submitted (presumably while the student was altering answers to other questions in the quiz). </li> <li>A link allowing you to try the question, with randomization set up so that you get the same version as the student, and the student's answer filled in </li> </ul> At present there is no facility to change the student's answers or marks. </p> --- NEW FILE: review_subject.html --- <a name='review_subject'><h2>The subject review page</h2></a> <p> This page can be used to review the results for a particular student on all the quizzes in the subject. The toolbar contains links to the <a href='#admin_subject'>subject admin page</a> and the <a href='#admin_student'>student admin page</a>, as well as a link allowing you to send email to the student (if their address is in the register). The body of the page is a table of quizzes that the student has attempted, showing the marks obtained, and a link you can follow to see the details of their answers. For quizzes in practice mode, there may be records for several different versions of the quiz. The record listed first is always for the most recent version, but the others are in no particular order. You can click on the quiz titles to go to the relevant <a href='#admin_quiz'>quiz admin pages</a>. </p> --- NEW FILE: try_question.html --- <a name='try_question'><h2>The question trial page</h2></a> <p> This can be accessed from various places, including the <a href='#admin_quiz'>quiz home page</a> and the <a href='#review_quiz'>quiz review page</a>. </p> <p> This page is broadly the same as what a student would see when attempting the question, with some modifications. Firstly, the seed used to randomize the question is displayed at the top, in an editable box. If you access the trial page from the quiz review page, then the seed will be set so that you see the same version of the question as the student whose results you were reviewing. In other cases, the seed will be chosen randomly. </p> <p> Next, when you first access the page, the answer box will be filled in automatically. If you come from the review page, you will see the answer provided by the student whose results you are reviewing. If you come from anywhere else, the answer box will initially contain the right answer. </p> <p> Below the answer box, you will see two links allowing you to mark the question, or to generate a new version with a different seed. If you change the seed by hand, then the value that you entered will be used; otherwise, a new value will be generated randomly. </p> <p> Below that, you will see the usual feedback about the correctness or otherwise of the answer. You may also see a question note, validation note or answer note, which may have been generated explicitly by code in the question source file, or by AiM's internal mechanisms. </p> <p> Finally, the right answer and solution are always displayed. </p> --- NEW FILE: try_quiz.html --- <a name='try_quiz'><h2>The quiz trial page</h2></a> This can be accessed from the <a href='#admin_subject'>subject admin page</a> or the <a href='#admin_quiz'>quiz admin page</a>. It is essentially just an amalgam of the <a href='#try_question'>question trial</a> pages for the various questions, so it will not be discussed in more detail. |
From: <gus...@us...> - 2003-08-30 15:21:42
|
Update of /cvsroot/aimmath/moodle/mod/aim_quiz In directory sc8-pr-cvs1:/tmp/cvs-serv27625/mod/aim_quiz Modified Files: aimpage.php lib.php view.php Log Message: I have made things more moodly by 1) putting the AiM pages into boxes with white background and 2) adding help icons to administrative links. The help files are copied from AiM's teacher.html and still need to be adapted. Index: aimpage.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/aimpage.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** aimpage.php 27 Aug 2003 14:21:24 -0000 1.2 --- aimpage.php 30 Aug 2003 15:21:31 -0000 1.3 *************** *** 100,104 **** foreach ($_POST as $key => $arg) { if (strcasecmp($key, "target")) { // ignore target arguments ! $postdata = aim_quiz_add_arg_to_url_data($postdata, $key, stripslashes($arg)); } } --- 100,104 ---- foreach ($_POST as $key => $arg) { if (strcasecmp($key, "target")) { // ignore target arguments ! $postdata = aim_quiz_add_arg_to_url_data($postdata, $key, stripslashes($arg)); } } *************** *** 107,111 **** foreach ($_POST as $key => $arg) { if (strcasecmp($key, "target")) { // ignore target arguments ! $postdata = aim_quiz_add_arg_to_url_data($postdata, $key, $arg); } } --- 107,111 ---- foreach ($_POST as $key => $arg) { if (strcasecmp($key, "target")) { // ignore target arguments ! $postdata = aim_quiz_add_arg_to_url_data($postdata, $key, $arg); } } *************** *** 141,149 **** aim_quiz_print_aim_output_script(); ! $urlout = htmlspecialchars($server->address . "?" . $postdata); ! if (!$_POST) ! echo "<P>Default page : <A href=\"$urlout\">$urlout</A></P>"; ! else ! echo "<P>Requested page : <A href=\"$urlout\">$urlout</A></P>"; // load the AiM page and grab the result --- 141,150 ---- aim_quiz_print_aim_output_script(); ! // For testing purposes only: ! // $urlout = htmlspecialchars($server->address . "?" . $postdata); ! // if (!$_POST) ! // echo "<P>Default page : <A href=\"$urlout\">$urlout</A></P>"; ! // else ! // echo "<P>Requested page : <A href=\"$urlout\">$urlout</A></P>"; // load the AiM page and grab the result *************** *** 171,183 **** if (isteacher($course->id)) { // write admin links ! echo "<P align=\"right\">"; ! echo "<A href=\"aimpage.php?id=$cm->id\">" . get_string("analyseresults", "aim_quiz") . "</A><BR>"; ! echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try\">" . get_string("tryquiz", "aim_quiz") . "</A><BR />"; ! echo "<A href=\"aimpage.php?id=$cm->id&aimaction=edit\">" . get_string("editquiz", "aim_quiz") . "</A><BR />"; ! echo "<A href=\"aimpage.php?id=$cm->id&aimaction=source\">" . get_string("browsesource", "aim_quiz") . "</A><BR />"; ! echo "<A href=\"aimpage.php?id=$cm->id&aimaction=subject\">" . get_string("editsubject", "aim_quiz") . "</A>"; ! echo "</P>"; } echo $data; // update max grade --- 172,191 ---- if (isteacher($course->id)) { // write admin links ! echo "<div align=right>"; ! echo "<font size=2>"; ! helpbutton("analyze_quiz", get_string("analyze_quiz", "aim_quiz"), "aim_quiz"); ! echo "<A href=\"aimpage.php?id=$cm->id\">" . get_string("analyze_quiz", "aim_quiz") . "</A><BR>"; ! helpbutton("try_quiz", get_string("try_quiz", "aim_quiz"), "aim_quiz"); ! echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try\">" . get_string("try_quiz", "aim_quiz") . "</A><BR />"; ! helpbutton("admin_quiz", get_string("admin_quiz", "aim_quiz"), "aim_quiz"); ! echo "<A href=\"aimpage.php?id=$cm->id&aimaction=edit\">" . get_string("admin_quiz", "aim_quiz") . "</A><BR />"; ! helpbutton("admin_subject", get_string("admin_subject", "aim_quiz"), "aim_quiz"); ! echo "<A href=\"aimpage.php?id=$cm->id&aimaction=subject\">" . get_string("admin_subject", "aim_quiz") . "</A>"; ! echo "</font></div>"; } + + print_simple_box_start("center", "", "$THEME->cellcontent", "20"); echo $data; + print_simple_box_end(); // update max grade *************** *** 199,201 **** print_footer($course); ! ?> \ No newline at end of file --- 207,209 ---- print_footer($course); ! ?> Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/lib.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lib.php 27 Aug 2003 14:21:24 -0000 1.2 --- lib.php 30 Aug 2003 15:21:31 -0000 1.3 *************** *** 195,199 **** // prepare curl session if (function_exists('curl_init')) { // use the POST method ! echo "<P>Using POST</P>"; $ch = curl_init($url); if (!$ch) --- 195,199 ---- // prepare curl session if (function_exists('curl_init')) { // use the POST method ! // echo "<P>Using POST</P>"; $ch = curl_init($url); if (!$ch) *************** *** 210,214 **** } // if CURL is not available, use GET method instead ! echo "<P>Using GET</P>"; return @file_get_contents("$url?$postdata"); } --- 210,214 ---- } // if CURL is not available, use GET method instead ! // echo "<P>Using GET</P>"; return @file_get_contents("$url?$postdata"); } *************** *** 334,341 **** // find the row which gives the totals if (preg_match("/<TD(?:\s[^<>]*?|)>Total<\/TD>(?:.(?!<TD\s|<TD>))*.?<TD(?:\s[^<>]*?|)>((?:.(?!<\/TD>))*?.?)<\/TD>(?:.(?!<TD\s|<TD>))*.?<TD(?:\s[^<>]*?|)>((?:.(?!<\/TD>))*?.?)<\/TD>/si", $data, $matches)) { ! if (empty($CFG->aim_quiz_grade_multiplier)) ! $CFG->aim_quiz_grade_multiplier = 1.0; ! $max_grade = (int) (((float) html_entity_decode($matches[1])) * ((float) $CFG->aim_quiz_grade_multiplier)); ! $grade = (int) (((float) html_entity_decode($matches[2])) * ((float) $CFG->aim_quiz_grade_multiplier)); } } --- 334,341 ---- // find the row which gives the totals if (preg_match("/<TD(?:\s[^<>]*?|)>Total<\/TD>(?:.(?!<TD\s|<TD>))*.?<TD(?:\s[^<>]*?|)>((?:.(?!<\/TD>))*?.?)<\/TD>(?:.(?!<TD\s|<TD>))*.?<TD(?:\s[^<>]*?|)>((?:.(?!<\/TD>))*?.?)<\/TD>/si", $data, $matches)) { ! if (empty($CFG->aim_quiz_grade_multiplier)) ! $CFG->aim_quiz_grade_multiplier = 1.0; ! $max_grade = (int) (((float) html_entity_decode($matches[1])) * ((float) $CFG->aim_quiz_grade_multiplier)); ! $grade = (int) (((float) html_entity_decode($matches[2])) * ((float) $CFG->aim_quiz_grade_multiplier)); } } *************** *** 401,407 **** // convert Latex to MathML ! if (function_exists('editer')) { ! $out = preg_replace_callback("/<LATEX>(.*?)<\/LATEX>/si", create_function('$matches', 'return editer($matches[1]);'), $out); ! } // remove all links from error pages --- 401,408 ---- // convert Latex to MathML ! // **** I have commented the following lines because I want to have a look at the raw latex. ! // if (function_exists('editer')) { ! // $out = preg_replace_callback("/<LATEX>(.*?)<\/LATEX>/si", create_function('$matches', 'return editer($matches[1]);'), $out); ! // } // remove all links from error pages *************** *** 473,475 **** } ! ?> \ No newline at end of file --- 474,476 ---- } ! ?> Index: view.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/view.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** view.php 27 Aug 2003 14:21:24 -0000 1.2 --- view.php 30 Aug 2003 15:21:31 -0000 1.3 *************** *** 161,164 **** --- 161,180 ---- "$navigation <A HREF=\"index.php?id=$course->id\">$straim_quizzes</A> -> $aim_quiz->name", "", "", true, update_module_button($cm->id, $course->id, $straim_quiz), navmenu($course, $cm)); + + /// Print administrative links + if (isteacher($course->id)) { + // write admin links + echo "<div align=right>"; + echo "<font size=2>"; + helpbutton("analyze_quiz", get_string("analyze_quiz", "aim_quiz"), "aim_quiz"); + echo "<A href=\"aimpage.php?id=$cm->id\">" . get_string("analyze_quiz", "aim_quiz") . "</A><BR>"; + helpbutton("try_quiz", get_string("try_quiz", "aim_quiz"), "aim_quiz"); + echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try\">" . get_string("try_quiz", "aim_quiz") . "</A><BR />"; + helpbutton("admin_quiz", get_string("admin_quiz", "aim_quiz"), "aim_quiz"); + echo "<A href=\"aimpage.php?id=$cm->id&aimaction=edit\">" . get_string("admin_quiz", "aim_quiz") . "</A><BR />"; + helpbutton("admin_subject", get_string("admin_subject", "aim_quiz"), "aim_quiz"); + echo "<A href=\"aimpage.php?id=$cm->id&aimaction=subject\">" . get_string("admin_subject", "aim_quiz") . "</A>"; + echo "</font></div>"; + } print_heading($strgrades); *************** *** 175,192 **** $picture = print_user_picture($student->id, $course->id, $student->picture, false, true); if ($grades[$student->id]->grade >= 0) ! $grade =& $grades[$student->id]->grade; else ! $grade = ""; if ($grades[$student->id]->override) { ! $edited = get_string("edited", "aim_quiz") . " ("; ! $editedclose = ")"; } else if ($grades[$student->id]->comment) { ! $edited = get_string("commented", "aim_quiz") . " ("; ! $editedclose = ")"; } else { ! $edited = ""; ! $editedclose = ""; } $table->data[] = array($picture, $student->firstname, $student->lastname, $grade, "$edited<A href=\"editgrade.php?id=$aim_quiz->id&userid=$student->id\">$streditgrade</A>$editedclose"); --- 191,208 ---- $picture = print_user_picture($student->id, $course->id, $student->picture, false, true); if ($grades[$student->id]->grade >= 0) ! $grade =& $grades[$student->id]->grade; else ! $grade = ""; if ($grades[$student->id]->override) { ! $edited = get_string("edited", "aim_quiz") . " ("; ! $editedclose = ")"; } else if ($grades[$student->id]->comment) { ! $edited = get_string("commented", "aim_quiz") . " ("; ! $editedclose = ")"; } else { ! $edited = ""; ! $editedclose = ""; } $table->data[] = array($picture, $student->firstname, $student->lastname, $grade, "$edited<A href=\"editgrade.php?id=$aim_quiz->id&userid=$student->id\">$streditgrade</A>$editedclose"); *************** *** 204,215 **** echo "</TD></TR></TABLE>"; - print_heading(get_string("actions", "aim_quiz")); - echo "<P align=\"center\">"; - echo "<A href=\"aimpage.php?id=$cm->id\">" . get_string("analyseresults", "aim_quiz") . "</A><BR>"; - echo "<A href=\"aimpage.php?id=$cm->id&aimaction=try\">" . get_string("tryquiz", "aim_quiz") . "</A><BR />"; - echo "<A href=\"aimpage.php?id=$cm->id&aimaction=edit\">" . get_string("editquiz", "aim_quiz") . "</A><BR />"; - echo "<A href=\"aimpage.php?id=$cm->id&aimaction=source\">" . get_string("browsesource", "aim_quiz") . "</A><BR />"; - echo "<A href=\"aimpage.php?id=$cm->id&aimaction=subject\">" . get_string("editsubject", "aim_quiz") . "</A>"; - echo "</P>"; } else { --- 220,223 ---- |
From: <gus...@us...> - 2003-08-30 15:21:42
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv27625/lang/en Modified Files: aim_quiz.php Log Message: I have made things more moodly by 1) putting the AiM pages into boxes with white background and 2) adding help icons to administrative links. The help files are copied from AiM's teacher.html and still need to be adapted. Index: aim_quiz.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/aim_quiz.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** aim_quiz.php 27 Aug 2003 14:24:58 -0000 1.2 --- aim_quiz.php 30 Aug 2003 15:21:31 -0000 1.3 *************** *** 10,13 **** --- 10,15 ---- $string['adminlinks'] = "Admin Links"; $string['adminonly'] = "You must be an administrator to use this page."; + $string['admin_quiz'] = "Quiz Administration"; + $string['admin_subject'] = "Subject Administration"; $string['aimpage'] = "AiM Quiz Page"; $string['aimquizsettings'] = "AiM Quiz Configuration"; *************** *** 16,20 **** $string['aimserverplural'] = "AiM Servers"; $string['aimserversubjects'] = "AiM Server Subjects"; ! $string['analyseresults'] = "Analyse Results"; $string['attemptquiz'] = "Attempt Quiz"; $string['autoregister'] = "Auto-register Students with AiM"; --- 18,22 ---- $string['aimserverplural'] = "AiM Servers"; $string['aimserversubjects'] = "AiM Server Subjects"; ! $string['analyze_quiz'] = "Quiz Results"; $string['attemptquiz'] = "Attempt Quiz"; $string['autoregister'] = "Auto-register Students with AiM"; *************** *** 25,30 **** $string['edited'] = "Edited"; $string['editgrade'] = "Edit Grade"; - $string['editquiz'] = "Edit Quiz"; - $string['editsubject'] = "Edit Subject"; $string['failed'] = "Error : Could not save the changes made."; $string['grademultiplier'] = "Grade Multiplier"; --- 27,30 ---- *************** *** 50,53 **** --- 50,54 ---- $string['notattempted'] = "You have not attempted this quiz."; $string['notteacher'] = "You must be a teacher to use this page."; + $string['quizresults'] = "Quiz Results"; $string['refresh'] = "Refresh"; $string['reviewresults'] = "Review Results"; *************** *** 60,64 **** $string['subjectson'] = "Subjects on "; $string['teachercomment'] = "Teacher Comment"; ! $string['tryquiz'] = "Try Quiz"; $string['viewquiz'] = "View Quiz"; --- 61,65 ---- $string['subjectson'] = "Subjects on "; $string['teachercomment'] = "Teacher Comment"; ! $string['try_quiz'] = "Try Quiz"; $string['viewquiz'] = "View Quiz"; |
From: <gus...@us...> - 2003-08-29 19:41:38
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv20546/WEB-INF/maple/aim Modified Files: Compile.mpl Log Message: This is just a temporary fix of the "ignored s> tag" bug. I replaced the call to Neil's new ConvertMPROC function with the old code. Index: Compile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Compile.mpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Compile.mpl 26 Aug 2003 18:38:48 -0000 1.4 --- Compile.mpl 29 Aug 2003 19:41:34 -0000 1.5 *************** *** 635,639 **** fi; ! mproc := `aim/Compile/ModifyMPROC`(eval(x[1])); setans := --- 635,697 ---- 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 := *************** *** 1811,1815 **** 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 --- 1869,1873 ---- 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 |
From: <gr...@us...> - 2003-08-29 19:05:19
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv12767 Modified Files: installlin.html Log Message: Update for AiM 3.0: Linux instructions for installing AiM. - GG Index: installlin.html =================================================================== RCS file: /cvsroot/aimmath/AIM/doc/installlin.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** installlin.html 27 Aug 2003 07:50:20 -0000 1.1 --- installlin.html 29 Aug 2003 19:05:14 -0000 1.2 *************** *** 2,51 **** <!-- @(#)$Id$ --> <head> ! <title>Installing AIM under Linux</title> </head> ! <body bgcolor='white'> ! <h1>Installing AIM under Linux</h1> ! These are still the old instructions for AiM 2.1. They should be adapted or rewritten. Any volunteers? <p/> - These are instructions for installing and configuring AiM. They - assume that you do not want your web server to do anything except run - AiM - it is perfectly possible for AiM to coexist with other things, - but it is a little more complicated to configure. They also assume - that you will be using the Jakarta Tomcat 4 server. - - <p/> The - system has also been installed under Mac OSX; support for this is not - yet properly integrated in the distribution, but the key point is to - replace the file <font color='green'>OS0_Linux.mpl</font> by - <font color='green'>OS0_OSX.mpl</font>. - - <br><br> - - If you already have AiM installed and you want to upgrade the Maple - part of the system, see the <a href="#upgrade">upgrade</a> section. - - <br><br> These notes tell you in detail where to put various files and - directories. All of these locations can be changed if you are willing - to edit some configuration files. In particular, in Windows you can - put Maple and TtH under <font color='green'>Program - Files</font> if you like; earlier releases of AiM had problems - with spaces in directory names, but I think these are now cured. - - <br><br> - <font color='red'> - Under Unix, many of the installation steps require that you should be - logged on as root. You will also need to be root to start the server. - </font> <h2>License terms</h2> ! AiM relies on various external components, such as Maple, Java, the ! Tomcat web server, TtH for LaTeX-to-HTML conversion and so on. There ! are some comments below about the license terms for these components, ! but of course you should consult their suppliers for definitive ! answers. ! The Maple and Java source code for AiM itself is free software; you can redistribute it and/or modify it under the terms of the GNU <a --- 2,44 ---- <!-- @(#)$Id$ --> <head> ! <title>Installing AiM under Windows</title> </head> ! <body> ! <h1><a name="install">Installing AiM under Windows</a></h1> ! These are instructions for installing and configuring AiM, ! for Linux (and other variants of UNIX, though it has not been ! fully tested under other variants of UNIX, and there still appear ! to be some problems under Mac OSX). <p/> + The installation consists of 5 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="#tth">Install TtH (TeX-to-HTML)</a></li> + <li><a href="#aim">Install AiM itself</a></li> + </ol> + It is likely that you already have some of the above software installed + in which case you should be able to skip those steps, so long as, the + installed version is current enough and is in a standard path so that + it can be found when you come to do the auto-configuration step of AiM. + If you already have a working installation of AiM then jump + directly to <a href="#aim">AiM installation step</a> to see how to + install your new AiM in place of or in parallel with your old installation. <h2>License terms</h2> ! AiM relies on various external components, such as ! <a href="http://www.maplesoft.com">Maple</a>, ! <a href="http://java.sun.com">Java</a>, ! the <a href="http://jakarta.apache.org/tomcat/">Tomcat</a> web server, ! <a href="http://hutchinson.belmont.ma.us/tth/">TtH</a> for ! LaTeX-to-HTML conversion, and ! the <a href="http://www.servlets.com/cos/index.html">com.oreilly.servlet</a> ! support classes. ! The license terms for these components can be found on their webpages. ! <p/> The Maple and Java source code for AiM itself is free software; you can redistribute it and/or modify it under the terms of the GNU <a *************** *** 60,78 **** GNU General Public License for more details. ! <h2>Prerequisites</h2> ! ! <h3>Maple</h3> ! ! You will need to install maple in <font ! color='green'>/usr/local/maple</font> (for Unix) or <font ! color='green'>C:\Maple</font> (for Windows). I have only checked the ! current version of AiM with Maple 7, but I believe it will work with ! Maple 6 and probably also with Maple 5. I understand that it will ! <font color='red'>not</font> work with Maple 8, because the <font ! color='green'>codegen</font> package has been deprecated and ! replaced by a completely different mechanism. This will probably be ! an improvement, once I have installed Maple 8 and understood it. ! <br><br> If you want to use AiM for actual teaching (rather than just checking it out) you will need a Maple license that allows you to make the --- 53,66 ---- GNU General Public License for more details. ! <h2><a name="maple">Maple</a></h2> + You will need Maple version 7, 8 or 9. Simply follow Maple's default + installation procedure, which typically installs software associated + with Maple in a directory such as <font color='green'>/usr/local/maple9</font> + so that the executables lie in <font color='green'>/usr/local/maple9/bin</font>. + A nice way to make these available in a standard path is by creating + symbolic links into <font color='green'>/usr/local/bin</font> via + the command <code>ln -s</code>. + <p/> If you want to use AiM for actual teaching (rather than just checking it out) you will need a Maple license that allows you to make the *************** *** 82,86 **** contact <a href='mailto:in...@ma...'>Waterloo Maple</a> directly to ensure that you are complying with your license terms. If ! you have any complex discussions about licensing issues then I (<a href='mailto:N.P...@sh...'>Neil Strickland</a>) would appreciate a copy. Waterloo Maple are aware of AiM and are --- 70,74 ---- contact <a href='mailto:in...@ma...'>Waterloo Maple</a> directly to ensure that you are complying with your license terms. If ! you have any complex discussions about licensing issues then (<a href='mailto:N.P...@sh...'>Neil Strickland</a>) would appreciate a copy. Waterloo Maple are aware of AiM and are *************** *** 90,191 **** the first instance). ! <h3>TtH</h3> ! ! You will need to download the TeX-to-HTML converter TtH from <a ! href="http://hutchinson.belmont.ma.us/tth/">hutchinson.belmont.ma.us/tth/</a>. ! Under Linux, put the executable file <font ! color='green'>tth</font> in <font ! color='green'>/usr/bin</font>. Under Windows, just call the ! TtH directory <font color='green'>C:\TtH</font>. TtH uses symbol ! fonts, which should display properly under Internet Explorer or ! Netscape on Windows platforms. A little browser configuration is ! needed for the fonts to work under Netscape on Unix platforms; see ! <a href="http://hutchinson.belmont.ma.us/tth/manual" ! >the TtH manual</a>. If you know that your users will have recent ! browsers with Unicode support then another option is to make TtH use ! the -u flag; see the mailing list for discussion of how to do this and ! whether it is a good idea. ! ! <h3>BLAT</h3> ! ! If you are running AiM under Windows, you will need to install BLAT ! for AiM to be able to send automatically generated emails. It is ! included in the AiM distribution as <font color='green' ! >WEB-INF/bin/blat194.zip</font> under the main aim directory; the ! original source was <a ! href='http://www.interlog.com/~tcharron/blat.html' ! >http://www.interlog.com/~tcharron/blat.html</a>. ! ! <h3>Java</h3> ! ! You will need to download the JDK (Java development kit) from <a ! href="http://java.sun.com">java.sun.com</a>. The package is ! about 25MB, so it takes a while to download. I have been using ! version 1.3.1, which works fine. Under Linux, it unpacks itself in ! <font color='green'>/usr/java/jdk1.3.1_01</font> by default. ! You should make a symbolic link to this from ! <font color='green'>/usr/java/jdk</font>. ! <h3>Tomcat</h3> ! You will need to download the Jakarta Tomcat 4 server from <a ! href="http://jakarta.apache.org">jakarta.apache.org</a>. ! There is an RPM (= Red Hat Package Manager) version, but when I last ! tried it, this was configured in an inconvenient way. These notes ! assume that instead, you have downloaded and unpacked the tar or zip ! file for the binary distribution. ! <br><br> ! Under Linux, the unpacked directory is called ! jakarta-tomcat-4.0. You should put it in <font ! color='green'>/usr/local/</font>, and make a symbolic link to it from <font color='green'>/usr/local/tomcat</font>. ! <br><br> ! Under Windows, you should call the unpacked directory ! <font color='green'>C:\Tomcat</font>. ! <br><br> ! Under the main Tomcat directory (<font ! color='green'>/usr/local/tomcat</font> or <font ! color='green'>C:\Tomcat</font>) you will find a subdirectory called ! <font color='green'>webapps</font>. I recommend that you ! <ul> ! <li>Start up the server, check that the example applications are ! working properly, then shut it down. ! </li> ! <li>Rename the directory webapps as hidewebapps. This will mean that ! the examples no longer work, but also that they will no longer ! clutter the log files with messages that can impede ! troubleshooting. ! </li> ! <li>Create a new webapps directory. ! </li> ! </ul> ! ! <h3>AiM</h3> ! You should download <font color='green'>aim.tgz</font> or ! <font color='green'>aim.zip</font> from ! <a ! href="http://aim.shef.ac.uk/aimsource">aim.shef.ac.uk/aimsource</a>, ! which you should unpack to get a directory called <font ! color='green'>ROOT</font>. ! <br><br> ! You should rename this directory to ! <font color='green'>/usr/local/tomcat/webapps/ROOT</font> or ! <font color='green'>C:\Tomcat\webapps\ROOT</font>. ! <h2>Configuration</h2> ! <ul> ! <li> ! Change directory to ! <font ! color='green'>/usr/local/tomcat/webapps/ROOT/WEB-INF/maple</font> ! or <font color='green'>C:\Tomcat\webapps\ROOT\WEB-INF\maple</font>. If you already have a <font color='green'>Config.mpl</font> file, you should make a copy of it. Backup files called Config.bak are generated automatically, so you should use some other name. ! <br><br> Now start Maple, and read in the file <font color='green'>AutoConf.mpl</font>. This will try to --- 78,181 ---- the first instance). ! <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-linux-i586.bin">installer ! for JRE 1.4.2</a> (14MB) or you can install the full developer's kit ! by downloading and running the ! <a href="http://aimmath.sourceforge.net/j2sdk-1_4_2_01-linux-i586.bin">installer ! for SDK 1.4.2</a> (35MB) both from ! <a href="http://java.sun.com">java.sun.com</a> (the latter of these gives ! you <code>javac</code> and others, which you will need if you intend to ! compile java code). By default, it will unpack in <font ! color='green'>/usr/java/j2sdk1.4.2_01</font> (but it will allow you to ! install it in <font color='green'>/usr/local/java/j2sdk1.4.2_01</font> ! if you prefer). You should make a symbolic link to this from ! <font color='green'>/usr/java/jdk</font> (or <font ! color='green'>/usr/local/java/jdk</font>). ! <h2><a name="tomcat">Tomcat</a></h2> ! You will need the Jakarta Tomcat 4 server from <a ! href="http://jakarta.apache.org">jakarta.apache.org</a>. Download ! <a href="http://aimmath.sourceforge.net/jakarta-tomcat-4.1.27.tar.gz"> ! jakarta tomcat 4.1.27</a> (7.1 MB). You should unpack it in ! <font color='green'>/usr/local/</font>, and make a symbolic link to it from <font color='green'>/usr/local/tomcat</font>. ! If you have a 4.0 series installation of Tomcat, it is a good idea ! to replace it with the current version (there were some location ! changes of some directories which may cause some problems if you don't ! do this). You can start up the Tomcat server and test some example ! applications, if you like, but generally it's problem-free. ! <h2><a name="tth">TtH</a></h2> ! You will need to download the TeX-to-HTML converter TtH from <a ! href="http://hutchinson.belmont.ma.us/tth/">hutchinson.belmont.ma.us/tth/</a>. ! The executable file <font color='green'>tth</font> should be in a standard ! path such as <font color='green'>/usr/bin</font> or <font color='green'>/usr/local/bin</font>. TtH, by default, uses symbol fonts, which should display ! properly under Internet Explorer or Netscape 4 (and earlier) on Windows ! platforms. Recent versions of Netscape and Mozilla no longer support ! symbol fonts, but do display Unicode fonts (which, alas, Internet Explorer ! does not fully support). If you know that your users will have recent ! browsers with Unicode support then another option is to make TtH use ! the -u flag; see the mailing list for discussion of how to do this and ! whether it is a good idea. We hope to soon to have the facility to ! detect the browser so that AiM serves pages with symbol fonts or Unicode ! fonts as appropriate for the browser. ! <h2><a name="aim">AiM</a></h2> ! You are now finally ready to install AiM itself by following the following ! steps. ! <ol> ! <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'>/usr/local/tomcat/webapps/</font> directory. Do not ! unzip it into the webapps directory itself but into a subdirectory that ! you create. You can choose any name for this subdirectory. If you choose ! ROOT then the directory will not appear in the URL of the server pages ! for the AiM quizzes. Any other choice will appear in the URL. (It is ! possible to have multiple AiM installations, and this simple rule ensures ! the URLs of these parallel installations are distinguished.) Below we will ! assume that 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: ! <p/> ! <em>Do you want to ...</em> ! <blockquote> ! <dl> ! <dt><em>keep the old installation and install AiM 3.0 in a different ! subdirectory of the webapps directory?</em></dt> ! <dd>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 the <a href="#copy">optional copying step</a> below. ! </dd> ! <dt><em>... or update by overwriting your old installation with AiM 3.0? ! </em></dt> ! <dd>In this case, you should unzip the new AiM into the ! <font color='green'>/usr/local/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.</dd> ! </dl> ! </blockquote> ! </li> ! <li>Change to the directory of your new AiM installation. (If you installed ! AiM in the default location then the directory will be ! <font color='green'>/usr/local/tomcat/webapps/AiM/WEB-INF/maple/</font>.) If you already have a <font color='green'>Config.mpl</font> file, you should make a copy of it. Backup files called Config.bak are generated automatically, so you should use some other name. ! <p/> Now start Maple, and read in the file <font color='green'>AutoConf.mpl</font>. This will try to *************** *** 196,200 **** <font color='green'>autoconf.log</font> as well as being printed on the terminal. ! <br><br> Under Linux, <font color='green'>AutoConf.mpl</font> will probably find everything it needs. There is currently a problem with time --- 186,190 ---- <font color='green'>autoconf.log</font> as well as being printed on the terminal. ! <p/> Under Linux, <font color='green'>AutoConf.mpl</font> will probably find everything it needs. There is currently a problem with time *************** *** 203,210 **** correct it to the corresponding zone without a shift. For example, BST = British Summer Time = GMT + 1 hour should be changed to GMT = ! GMT + 0 hours. Under Windows, <font ! color='green'>Autoconf.mpl</font> will need more help. (If you know ! how to find out the time zone or the host name under Windows, please ! let me know.) To provide help, you should copy the file <font color='green'>ManualConfig.dist</font> to <font color='green'>ManualConfig.mpl</font> and then edit it following the --- 193,197 ---- correct it to the corresponding zone without a shift. For example, BST = British Summer Time = GMT + 1 hour should be changed to GMT = ! GMT + 0 hours. To provide help, you should copy the file <font color='green'>ManualConfig.dist</font> to <font color='green'>ManualConfig.mpl</font> and then edit it following the *************** *** 212,267 **** color='green'>AutoConf.mpl</font> again. This will run various consistency checks as well as generating other configuration files. ! ! </li> ! <li>When you have successfully run AutoConf.mpl, you should make a ! copy of the file ! <font color='green'>/usr/local/tomcat/conf/server.xml</font> (or ! <font color='green'>C:\Tomcat\conf\server.xml</font>) and ! then run the file <font color='green'>Servlet.mpl</font>. ! This <ul> ! <li>Writes configuration information for Tomcat to the file ! <font color='green'>/usr/local/tomcat/conf/server.xml</font> ! </li> ! <li>Writes AiM-specific configuration information to the file <font color='green'>WEB-INF/web.xml</font> under the main AiM directory. </li> ! <li>Writes the scripts <font color='green'>WEB-INF/startaim.sh</font> and ! <font color='green'>WEB-INF/stopaim.sh</font> (or ! <font color='green'>WEB-INF/startaim.bat</font> and ! <font color='green'>WEB-INF/stopaim.bat</font>) used ! to stop and start the server. ! </li> ! <li>Copies the com.oreilly.servlet helper classes from ! <font color='green'>WEB-INF/cos/...</font> to ! <font color='green'>/usr/local/tomcat/classes/...</font>. ! (The source code, object code, and documentation in the ! com.oreilly.servlet package is copyright and owned by Jason ! Hunter, but he allows non-commercial redistribution subject to a ! <a href='coslicense.html'>license</a>.) </li> </ul> </li> ! <li>Now restart Maple and read in Make.mpl. This will recompile all ! the Maple source files, which may take a minute or two. ! </li> ! <li> ! Run the script <font ! color='green'>/usr/local/tomcat/webapps/ROOT/WEB-INF/startaim.sh</font> ! or <font ! color='green'>C:\Tomcat\webapps\ROOT\WEB-INF\startaim.bat</font> ! to start the server. You will probably need superuser privileges ! for this. </li> ! <li> ! Visit the URL <a ! href="http://localhost/admin.html">http://localhost/admin.html</a> ! and click on 'Zone login' to log on as the administrator (with empty ! password). After logging in, you can set a password, create new ! subjects and so on. </li> ! </ul> <h2><a name="trouble">Troubleshooting</a></h2> --- 199,249 ---- color='green'>AutoConf.mpl</font> again. This will run various consistency checks as well as generating other configuration files. ! You can iterate this procedure as often as you like until you get ! an installation without error messages. ! <p/> ! By the way, by running <font color='green'>AutoConf.mpl</font>, ! the file <font color='green'>Servlet.mpl</font> is read which ! configures Tomcat, writing <ul> ! <li>configuration information for Tomcat to the file ! <font color='green'>/usr/local/tomcat/conf/server.xml</font>;</li> ! <li>AiM-specific configuration information to the file <font color='green'>WEB-INF/web.xml</font> under the main AiM directory. </li> ! <li>and the scripts <font color='green'>WEB-INF/startaim.sh</font> and ! <font color='green'>WEB-INF/stopaim.sh</font> ! to stop and start the Tomcat server. </li> </ul> </li> ! <li>The installation is complete. Now start your Tomcat server, by ! executing <font color='green'>WEB-INF/startaim.sh</font> in the ! main AiM directory. </li> ! <li>Point your webbrowser at the URL of the AiM server. This will be something ! like <font color='green'><a href="http://localhost/AiM/admin.html">http://localhost/AiM/admin.html</a></font>, ! where you will need to replace <font color='green'>AiM</font> by the name of ! the subdirectory of <font color='green'>/usr/local/tomcat/webapps/</font> ! if you chose to unzip AiM in a directory other than AiM/, or omit ! <font color='green'>AiM/</font> completely if you chose to put it in ROOT/. ! You should click on 'Zone login' to log on as the administrator (with empty ! password). After logging in, you can set a password, create new ! subjects and so on. </li> ! <li><a name="copy">(Optional) You can copy</a> 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'>/usr/local/tomcat/webapps/ROOT/</font> and your new one ! is in <font color='green'>/usr/local/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> <h2><a name="trouble">Troubleshooting</a></h2> *************** *** 271,276 **** minimal tex file. If any of these things fail, it will display an error report when you try to log in as the administrator; this will ! hopefully be self-explanatory. ! <br><br> Some other kinds of errors may give you a Java stacktrace in your browser, looking something like this: --- 253,259 ---- minimal tex file. If any of these things fail, it will display an 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 browser, looking something like this: *************** *** 280,284 **** for servlet Alice threw exception javax.servlet.ServletException: Unexpected output while initializing ! new Aim process: Error, unable to read `AliceServer.mpl` --- 263,267 ---- for servlet Alice threw exception javax.servlet.ServletException: Unexpected output while initializing ! new AiM process: Error, unable to read `AliceServer.mpl` *************** *** 291,306 **** Note that this includes the line number in the source file Alice.java where the error occurred. The top of the stacktrace is often ! reasonably comprehensible. If necessary, you can send the whole thing ! to the AiM developers. ! <br><br> With other kinds of problems you may see a message like <font color='red'>Servlet Alice is unavailable</font> in your browser. ! This means that Tomcat started successfully but Alice did not. You ! should look at the log file <font color='green'>/usr/local/tomcat/logs/log.YYYY-MM-DD.txt</font>, and search backwards from the end for the string "unavailable". Just above this, you should find a stacktrace, and the top of the stacktrace may be informative. ! <br><br> If you see nothing at all in the browser, then Tomcat itself failed to start. Some possible reasons: --- 274,288 ---- Note that this includes the line number in the source file Alice.java where the error occurred. The top of the stacktrace is often ! reasonably comprehensible. ! <p/> With other kinds of problems you may see a message like <font color='red'>Servlet Alice is unavailable</font> in your browser. ! This means that Tomcat started successfully but Alice did not. You ! should look at the most recent Tomcat log file <font color='green'>/usr/local/tomcat/logs/log.YYYY-MM-DD.txt</font>, and search backwards from the end for the string "unavailable". Just above this, you should find a stacktrace, and the top of the stacktrace may be informative. ! <p/> If you see nothing at all in the browser, then Tomcat itself failed to start. Some possible reasons: *************** *** 308,328 **** <li>Tomcat had not shut down properly when you tried to restart it. I have found it safest to shut down twice (which gives an error ! message on the second attempt) before restarting. This problem may ! leave a message in the log file ! <font color='green'>/usr/local/tomcat/logs/catalina.out</font> ! saying <font color='red'>java.net.BindException: Address already in ! use</font>. </li> <li>There may be another web server (such as Apache or IIS) already ! listening on port 80. This will again give a message saying <font color='red'>java.net.BindException: Address already in use</font> in the log file. You should either shut down the other ! server, or set <font color='green'>Config['TomcatPort']</font> ! in <font color='green'>ManualConfig.mpl</font> to specify a ! different port. ! </li> ! <li>You may be trying to connect to port 80 without superuser ! privileges; the error message will say ! <font color='red'>java.net.BindException: Permission denied</font>. </li> <li>The message <font color='red'>Catalina.stop: --- 290,304 ---- <li>Tomcat had not shut down properly when you tried to restart it. I have found it safest to shut down twice (which gives an error ! message on the second attempt) before restarting. </li> <li>There may be another web server (such as Apache or IIS) already ! listening on port 8080 or whichever port you chose for Tomcat. ! This will give a message saying <font color='red'>java.net.BindException: Address already in use</font> in the log file. You should either shut down the other ! 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: *************** *** 332,364 **** </li> </ul> ! ! <h2><a name="upgrade">Upgrading</a></h2> ! ! In version 2.0.0, the file Config.mpl is automatically generated, ! using parameters supplied by the user in ManualConfig.mpl if ! necessary. Thus, if you are upgrading from a version prior to 2.0.0, ! you should first rename your Config.mpl file to Config.old (or ! whatever you like, but not Config.bak, as that will be overwritten.) ! ! <br><br> ! ! Apart from that, you can upgrade using the installation procedure ! described above, but omitting the installation of Java, TtH and so on. ! ! <br><br> ! ! Changes in AiM are often restricted to the Maple part of the system, ! and in this case a simpler procedure is available. (Note, however, ! that this does <b>not</b> apply to the changes in Version 2.0.0). To ! bring your installation up to date, download the file maple.tgz or ! maple.zip from <a ! href="http://aim.shef.ac.uk/aimsource">aim.shef.ac.uk/aimsource</a>, ! and unpack it in <font ! color='green'>/usr/local/tomcat/webapps/ROOT/WEB-INF</font> (or <font ! color='green'>C:\Tomcat\webapps\ROOT\WEB-INF</font>). Then change to ! the maple subdirectory, start maple, and read in the file <font ! color='green'>Make.mpl</font>. Finally, change back to the <font ! color='green'>WEB-INF</font> directory, and run the shutdown and ! startup scripts to restart the system. </body> --- 308,313 ---- </li> </ul> ! <hr/> ! Last modified by Greg Gamble on 30/08/03 </body> |
From: <nps...@us...> - 2003-08-27 22:35:17
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv22576/WEB-INF/maple Modified Files: Class.mpl Log Message: Class/IndexFunction modified so that field assignments do not automatically evaluate the expression being assigned. This seems like it is the right behaviour, but there may be other changes that need to be made in response. Index: Class.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Class.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Class.mpl 25 Aug 2003 21:47:18 -0000 1.3 --- Class.mpl 27 Aug 2003 22:34:37 -0000 1.4 *************** *** 143,151 **** if member(index,class['Fields']) then ! tbl[index] := eval(val); elif member(index,class['StaticFields']) then ! class['StaticFieldValue'][index] := eval(val); elif member(index,class['IndirectFields']) then ! tbl[class['FieldIndirectionTable'][index]][index] := eval(val); fi; fi; --- 143,154 ---- if member(index,class['Fields']) then ! # WAS: tbl[index] := eval(val); ! tbl[index] := eval(val,1); elif member(index,class['StaticFields']) then ! # WAS: class['StaticFieldValue'][index] := eval(val); ! class['StaticFieldValue'][index] := eval(val,1); elif member(index,class['IndirectFields']) then ! # WAS: tbl[class['FieldIndirectionTable'][index]][index] := eval(val); ! tbl[class['FieldIndirectionTable'][index]][index] := eval(val,1); fi; fi; |
From: <nps...@us...> - 2003-08-27 22:35:12
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv22576/WEB-INF/maple/aim Modified Files: TextQuestion.mpl Log Message: Class/IndexFunction modified so that field assignments do not automatically evaluate the expression being assigned. This seems like it is the right behaviour, but there may be other changes that need to be made in response. Index: TextQuestion.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/TextQuestion.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TextQuestion.mpl 25 Aug 2003 21:47:19 -0000 1.3 --- TextQuestion.mpl 27 Aug 2003 22:34:38 -0000 1.4 *************** *** 159,163 **** ans := eval(attempt['Answer']); rightans := eval(this['RightAnswer']); ! mapletype := eval(this['MapleType']); msg := ""; --- 159,163 ---- ans := eval(attempt['Answer']); rightans := eval(this['RightAnswer']); ! mapletype := this['MapleType']; msg := ""; *************** *** 551,555 **** __("Your answer should have type"), "\n<br/>\n<font color='blue'><tt>", ! sprintf("%A",eval(reqtype)), "</font></tt>\n<br/>\n", __("but it does not."), --- 551,558 ---- __("Your answer should have type"), "\n<br/>\n<font color='blue'><tt>", ! # WAS: sprintf("%A",eval(reqtype)), ! # I took out the eval to prevent problems when reqtype = vector ! # I am not sure if this might introduce other problems. NPS ! sprintf("%A",reqtype), "</font></tt>\n<br/>\n", __("but it does not."), |
From: <gus...@us...> - 2003-08-27 18:27:34
|
Update of /cvsroot/aimmath/AIM/bin/tth_exe In directory sc8-pr-cvs1:/tmp/cvs-serv12052/bin/tth_exe Added Files: license.txt tth tth.exe Log Message: merged from develop_2_1 |
From: <gus...@us...> - 2003-08-27 18:05:28
|
Update of /cvsroot/aimmath/AIM/imagecache In directory sc8-pr-cvs1:/tmp/cvs-serv12052/imagecache Added Files: README Log Message: merged from develop_2_1 |
From: <gus...@us...> - 2003-08-27 14:25:01
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv20135/lang/en Modified Files: aim_quiz.php Log Message: minor changes supplied by Alex Index: aim_quiz.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/aim_quiz.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 |
Update of /cvsroot/aimmath/moodle/lang/en/help/aim_quiz In directory sc8-pr-cvs1:/tmp/cvs-serv19705 Added Files: addupdate_server.html addupdate_subject.html passwd.html passwd_passwd.html passwd_subject.html Log Message: minor changes supplied by Alex --- NEW FILE: addupdate_server.html --- <P ALIGN=CENTER><B>Server Field</B></P> <P>This field sets the AiM server on which the quiz is hosted.</P> <P>Select a server from the list of those the administrator has granted access to. If the server you wish to use is not listed you should contact the administrator. The field displays the name of the server (set by the administrator) and the address which moodle will use to access the server.</P> <P>On making a selection the "Subject" field is filled with a list of subjects on the selected server which the administrator has granted access to.</P> <P><B>Links:</B></P> <UL> <LI>Parent : <A href="help.php?module=aim_quiz&file=addupdate.html">Add or Update Quiz</A> <LI><A href="help.php?module=moodle&file=index.html">Help Index</A> </UL> --- NEW FILE: addupdate_subject.html --- <P ALIGN=CENTER><B>Subject Field</B></P> <P>This field sets the subject to which the quiz belongs on the AiM server selected in the "Server" field. This is the subject name, not the subject title within AiM. It is listed as the "Name" property on the subject administration page within AiM.</P> <P>The list is generated when a server is selected in the "Server" field. The subject whose name matches the short name of the course to which the quiz is added is selected by default when this happens (or the first in the list if none matches). Thus if you change this field and then change the "Server" field you will need to change this field again.</P> <P>Select a subject from the list of those the administrator has granted access to. If the subject you wish to use is not listed you should contact the administrator.</P> <P><B>Links:</B></P> <UL> <LI>Parent : <A href="help.php?module=aim_quiz&file=addupdate.html">Add or Update Quiz</A> <LI><A href="help.php?module=moodle&file=index.html">Help Index</A> </UL> --- NEW FILE: passwd.html --- <P ALIGN=CENTER><B>Subject Passwords</B></P> <P>This page allows you to control which subjects can be accessed from the selected AiM server. Access is provided by giving the password for each subject. Then teachers can view the teacher pages for that subject without being prompted for the password (moodle has already authenticated them).</P> <P>When adding a new quiz, only subjects entered in this list are displayed in the list when this server is selected.</P> <P>The list shows the subjects and their passwords. Select the subject you wish to edit and the name and password will appear in the edit boxes. Click the "Save Changes" button to update the record in the database. Changes will be ignored if a different subject is selected in the list (or the current one is clicked on again) .</P> <P>To add a new subject, select the item at the end of the list called "New Item...". The edit boxes will be cleared. Enter the new subject name and password and click the "Save Changes" button to add the record to the database. Entries will be lost if a different subject is selected in the list (or if "New Item..." is clicked on again) .</P> <P>To delete a subject, select it in the list and click the "Delete" button.</P> <P>After adding, editing or deleting a subject the page will be reloaded if the update succeeded. Otherwise an error page will be displayed. Check that the subject is not already in the list. If there are several administrators, remember that somebody else may have updated the list since you last refreshed the page.</P> <P>If you reached the server configuration page from the page to add or update a quiz (<A href="help.php?module=aim_quiz&file=addupdate.html">Add or Update Quiz</A>) then a "Continue" link is displayed which takes you back to that page.</P> <P><B>Fields:</B></P> <UL> <LI><A href="help.php?module=aim_quiz&file=passwd_subject.html">Subject</A> <LI><A href="help.php?module=aim_quiz&file=passwd_passwd.html">Password</A> </UL> <P><B>Links:</B></P> <UL> <LI>Parent : <A href="help.php?module=aim_quiz&file=server.html">Server Configuration</A> <LI>AiM Server Configuration : <A href="help.php?module=aim_quiz&file=server.html">Server Configuration</A> <LI>Continue (if present) : <A href="help.php?module=aim_quiz&file=addupdate.html">Add or Update Quiz</A> <LI><A href="help.php?module=moodle&file=index.html">Help Index</A> </UL> --- NEW FILE: passwd_passwd.html --- <P ALIGN=CENTER><B>Password Field</B></P> <P>This field contains subject password which is used by teachers to login to the subject pages on AiM.</P> <P>Since teachers have already been authenticated by moodle there is no need for them to be asked to login to AiM. Therefore the subject and this password will be sent automatically when a teacher accesses the results pages.</P> <P><B>Links:</B></P> <UL> <LI>Parent : <A href="help.php?module=aim_quiz&file=passwd.html">Subject Passwords</A> <LI><A href="help.php?module=moodle&file=index.html">Help Index</A> </UL> --- NEW FILE: passwd_subject.html --- <P ALIGN=CENTER><B>Subject Field</B></P> <P>This field contains the name of the subject as set in AiM.</P> <P><B>Links:</B></P> <UL> <LI>Parent : <A href="help.php?module=aim_quiz&file=passwd.html">Subject Passwords</A> <LI><A href="help.php?module=moodle&file=index.html">Help Index</A> </UL> |