aimmath-commit Mailing List for AiM Assessment in Mathematics (Page 9)
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: <mo...@us...> - 2003-09-28 00:23:24
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv21098 Added Files: AuthoringTtH.html AuthoringTtH.tex Removed Files: AuthoringGuide.pdf Log Message: revised Authoring Guide.. deleted pdf, replaced with .tex. Used TtH to make .html from .tex. --- NEW FILE: AuthoringTtH.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <meta name="GENERATOR" content="TtH 3.40"> <style type="text/css"> div.p { margin-top: 7pt;}</style> <style type="text/css"><!-- td div.comp { margin-top: -0.6ex; margin-bottom: -1ex;} td div.comb { margin-top: -0.6ex; margin-bottom: -.6ex;} td div.hrcomp { line-height: 0.9; margin-top: -0.8ex; margin-bottom: -1ex;} td div.norm {line-height:normal;} span.roman {font-family: serif; font-style: normal; font-weight: normal;} span.overacc2 {position: relative; left: .8em; top: -1.2ex;} span.overacc1 {position: relative; left: .6em; top: -1.2ex;} --></style> <title> AiM Authoring Guide</title> <h1 align="center">AiM Authoring Guide </h1> [...2567 lines suppressed...] </pre> </font></tt></blockquote> <div class="p"><!----></div> would specify a quiz having three questions, one that has the keywords <tt><font color="#009900">Äddition"</font></tt> and <tt><font color="#009900">ëasy"</font></tt>, one that has either the keywords <tt><font color="#009900">Äddition"</font></tt> or <tt><font color="#009900">"Substraction"</font></tt> and also the keyword <tt><font color="#009900">"medium"</font></tt>, and one that has the keyword <tt><font color="#009900">"Factoring"</font></tt> but not the keyword <tt><font color="#009900">"hard"</font></tt>. <HR NOSHADE SIZE=1></blockquote> <div class="p"><!----></div> <br /><br /><hr /><small>File translated from T<sub><font size="-1">E</font></sub>X by <a href="http://hutchinson.belmont.ma.us/tth/"> T<sub><font size="-1">T</font></sub>H</a>, version 3.40.<br />On 27 Sep 2003, 16:34.</small> </html> --- NEW FILE: AuthoringTtH.tex --- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % AuthoringTtH.tex % % The AuthoringTtH.html is produced by translating this file with TtH. % % If you make additions, run the file through an ordinary LaTeX compiler % before running it through TtH, so it will update the Table of Contents % automatically. The dvi version of this document still has some lines that % are too wide to fit on the page even if you narrow the margins by % removing the comments on the \addtolength commands below. % % Revisions: % Initial version 9/26/03: by Ken Monks % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} [...1946 lines suppressed...] \begin{codeblock} \begin{verbatim} [ Keys("Addition","easy"), Keys(OR("Addition","Substraction"),"medium"), Keys("Factoring",NOT("hard")) ] \end{verbatim} \end{codeblock} would specify a quiz having three questions, one that has the keywords \code{"Addition"} and \code{"easy"}, one that has either the keywords \code{"Addition"} or \code{"Substraction"} and also the keyword \code{"medium"}, and one that has the keyword \code{"Factoring"} but not the keyword \code{% "hard"}. \end{Example} \end{document} --- AuthoringGuide.pdf DELETED --- |
From: <ma...@us...> - 2003-09-27 22:30:23
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv13607/mod/math_assignment Modified Files: pdfgen.php Log Message: Implemented the generation of unique temporary file names. Index: pdfgen.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/pdfgen.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pdfgen.php 27 Sep 2003 09:19:27 -0000 1.10 --- pdfgen.php 27 Sep 2003 20:14:37 -0000 1.11 *************** *** 138,155 **** // generate pdf file from $latex ! //$tempfile = tempnam(); ! $tempfile = "temp.tex"; ! if (!$fp=fopen($tempfile,"w")) error("Sorry, I can't produce the pdf output. Failed to open temporary file."); fwrite($fp,$latex); fclose($fp); ! exec("pdflatex -interaction=batchmode temp.tex"); // output of pdf ! redirect("temp.pdf"); ! /* ! if ($file = fopen("temp.pdf", "rb")) { // the 'b' is for compatibility with Windoze // tell the browser that it is pdf --- 138,166 ---- // generate pdf file from $latex ! if (!$tempfile = tempnam("/tmp", "pdfsheet")) ! error("Sorry, I can't produce the pdf output. Failed to open temporary file."); ! if (!$fp=fopen("$tempfile.tex","wb")) error("Sorry, I can't produce the pdf output. Failed to open temporary file."); fwrite($fp,$latex); fclose($fp); ! exec("pdflatex -interaction=batchmode $tempfile.tex"); ! @unlink("$tempnam.tex"); // output of pdf ! /* We need to remove the temporary file so we had better output it to the browser directly rather than redirecting. ! If we redirect we have no idea when the file is no longer needed. */ ! //redirect("$tempnam.pdf"); ! /* I have just noticed the following in the php documentation on this issue of using Content-disposition headers: ! Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents this from working. There is no workaround. ! There is also a bug in Microsoft Internet Explorer 5.5 that interferes with this, which can be resolved by upgrading ! to Service Pack 2 or later. ! Darn MS! ! One possible way round this might be to use slash arguments with the last arguent 'problems.pdf' when a ! problem sheet is required and 'solutions.pdf' when solutions are required. With luck this might fool IE which seems to ! go by the extension when it ignores the headers. This would need testing in a broken version of IE. */ ! ! if ($file = fopen("$tempnam.pdf", "rb")) { // the 'b' is for compatibility with Windoze // tell the browser that it is pdf *************** *** 166,170 **** } ! */ function math_assignment_aim_to_latex($data,$type) { --- 177,181 ---- } ! @unlink("$tempnam.pdf"); function math_assignment_aim_to_latex($data,$type) { |
From: <ma...@us...> - 2003-09-27 13:36:53
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv7873/mod/math_assignment Modified Files: lib.php Log Message: Error reporting for mod.html implemented (requires the mod I posted to moodle). Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** lib.php 27 Sep 2003 09:15:05 -0000 1.25 --- lib.php 27 Sep 2003 13:36:33 -0000 1.26 *************** *** 26,36 **** $math_assignment->problemsisurl = 1; } ! else if (!empty($_FILES['problemsfile'])) ! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']); } $math_assignment->problems = trim($math_assignment->problems); if ($math_assignment->problems) { if (math_assignment_is_tex_file($math_assignment->problems) xor $math_assignment->aimquiz) ! return false; // sheet is not of the correct type } --- 26,38 ---- $math_assignment->problemsisurl = 1; } ! else if ($_FILES['problemsfile']['name']) { ! if (!$math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile'])) ! return get_string("failedupload", "math_assignment", get_string("problems", "math_assignment")); ! } } $math_assignment->problems = trim($math_assignment->problems); if ($math_assignment->problems) { if (math_assignment_is_tex_file($math_assignment->problems) xor $math_assignment->aimquiz) ! return get_string($math_assignment->aimquiz ? "invalidmustbetex" : "invalidmustnotbetex", "math_assignment", get_string("problems", "math_assignment")); } *************** *** 42,63 **** $math_assignment->solutionsisurl = 1; } ! else if (!empty($_FILES['solutionsfile'])) ! $math_assignment->solutions = math_assignment_save_upload($math_assignment->course, $_FILES['solutionsfile']); } $math_assignment->solutions = trim($math_assignment->solutions); if ($math_assignment->solutions) { if (math_assignment_is_tex_file($math_assignment->solutions) xor $math_assignment->aimquiz) ! return false; // sheet is not of the correct type } // check that the paper grade is valid if ($math_assignment->papergrade < 0) ! return false; // check we have some questions if (!$math_assignment->papergrade && !$math_assignment->aimquiz) ! return false; if (!math_assignment_setup_aim_quiz($math_assignment)) ! return false; $math_assignment->timemodified = time(); --- 44,67 ---- $math_assignment->solutionsisurl = 1; } ! else if ($_FILES['solutionsfile']['name']) { ! if (!$math_assignment->solutions = math_assignment_save_upload($math_assignment->course, $_FILES['solutionsfile'])) ! return get_string("failedupload", "math_assignment", get_string("solutions", "math_assignment")); ! } } $math_assignment->solutions = trim($math_assignment->solutions); if ($math_assignment->solutions) { if (math_assignment_is_tex_file($math_assignment->solutions) xor $math_assignment->aimquiz) ! return get_string($math_assignment->aimquiz ? "invalidmustbetex" : "invalidmustnotbetex", "math_assignment", get_string("solutions", "math_assignment")); } // check that the paper grade is valid if ($math_assignment->papergrade < 0) ! return get_string("invalidpapergrade", "math_assignment"); // check we have some questions if (!$math_assignment->papergrade && !$math_assignment->aimquiz) ! return get_string("invalidnoquestions", "math_assignment"); if (!math_assignment_setup_aim_quiz($math_assignment)) ! return get_string("failedaimsetup", "math_assignment"); $math_assignment->timemodified = time(); *************** *** 83,93 **** $math_assignment->problemsisurl = 1; } ! else if (!empty($_FILES['problemsfile'])) ! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']); } $math_assignment->problems = trim($math_assignment->problems); if ($math_assignment->problems) { if (math_assignment_is_tex_file($math_assignment->problems) xor $math_assignment->aimquiz) ! return false; // sheet is not of the correct type } --- 87,99 ---- $math_assignment->problemsisurl = 1; } ! else if ($_FILES['problemsfile']['name']) { ! if (!$math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile'])) ! return get_string("failedupload", "math_assignment", get_string("problems", "math_assignment")); ! } } $math_assignment->problems = trim($math_assignment->problems); if ($math_assignment->problems) { if (math_assignment_is_tex_file($math_assignment->problems) xor $math_assignment->aimquiz) ! return get_string($math_assignment->aimquiz ? "invalidmustbetex" : "invalidmustnotbetex", "math_assignment", get_string("problems", "math_assignment")); } *************** *** 99,120 **** $math_assignment->solutionsisurl = 1; } ! else if (!empty($_FILES['solutionsfile'])) ! $math_assignment->solutions = math_assignment_save_upload($math_assignment->course, $_FILES['solutionsfile']); } $math_assignment->solutions = trim($math_assignment->solutions); if ($math_assignment->solutions) { if (math_assignment_is_tex_file($math_assignment->solutions) xor $math_assignment->aimquiz) ! return false; // sheet is not of the correct type } // check that the paper grade is valid if ($math_assignment->papergrade < 0) ! return false; // check we have some questions if (!$math_assignment->papergrade && !$math_assignment->aimquiz) ! return false; if (!math_assignment_setup_aim_quiz($math_assignment)) ! return false; $math_assignment->timemodified = time(); --- 105,128 ---- $math_assignment->solutionsisurl = 1; } ! else if ($_FILES['solutionsfile']['name']) { ! if (!$math_assignment->solutions = math_assignment_save_upload($math_assignment->course, $_FILES['solutionsfile'])) ! return get_string("failedupload", "math_assignment", get_string("solutions", "math_assignment")); ! } } $math_assignment->solutions = trim($math_assignment->solutions); if ($math_assignment->solutions) { if (math_assignment_is_tex_file($math_assignment->solutions) xor $math_assignment->aimquiz) ! return get_string($math_assignment->aimquiz ? "invalidmustbetex" : "invalidmustnotbetex", "math_assignment", get_string("solutions", "math_assignment")); } // check that the paper grade is valid if ($math_assignment->papergrade < 0) ! return get_string("invalidpapergrade", "math_assignment"); // check we have some questions if (!$math_assignment->papergrade && !$math_assignment->aimquiz) ! return get_string("invalidnoquestions", "math_assignment"); if (!math_assignment_setup_aim_quiz($math_assignment)) ! return get_string("failedaimsetup", "math_assignment"); $math_assignment->timemodified = time(); |
From: <ma...@us...> - 2003-09-27 13:36:53
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv7873/lang/en Modified Files: math_assignment.php Log Message: Error reporting for mod.html implemented (requires the mod I posted to moodle). Index: math_assignment.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/math_assignment.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** math_assignment.php 26 Sep 2003 22:23:23 -0000 1.20 --- math_assignment.php 27 Sep 2003 13:36:33 -0000 1.21 *************** *** 43,46 **** --- 43,48 ---- $string['externalurl'] = "link to URL"; $string['failed'] = "Error : Could not save the changes made."; + $string['failedaimsetup'] = "Error : Either the AiM quiz specified could not be loaded (check that you entered the name correctly) or it was found to have a maximum grade of zero. If you are sure that neither case applies then contact the administrator."; + $string['failedupload'] = "Error : Could not upload the \$a."; $string['gradeemailmessage'] = "Your script has been marked and placed in the pigeonholes for collection."; $string['gradeemailobtained'] = "You obtained"; *************** *** 52,55 **** --- 54,61 ---- $string['invalid'] = "Error : Invalid entry"; $string['invalidgrademultiplier'] = "Grade multiplier must be a number between 0.1 and 10000 inclusive."; + $string['invalidmustbetex'] = "Error : \$a must be a TeX file when there is an AiM quiz."; + $string['invalidmustnotbetex'] = "Error : \$a must NOT be a TeX file when there is no AiM quiz."; + $string['invalidnoquestions'] = "Error : Assignment has no questions! You must set the maximum grade correctly for the paper based questions and/or specify an AiM quiz."; + $string['invalidpapergrade'] = "Error : Invalid maximum grade entered (for the paper based questions). Set to zero if the assignment has only AiM questions."; $string['latexoutput'] = "Default LaTeX Output Method"; $string['oldgrade'] = "Current Grade"; |
From: <gus...@us...> - 2003-09-27 09:20:11
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv26206/mod/math_assignment Modified Files: pdfgen.php Added Files: problems.tex solutions.tex Log Message: when no tex file is provided uses problems.tex or solutions.tex --- NEW FILE: problems.tex --- %123456789012345678901234567890123456789012345678901234567890123456789 \documentclass[12pt]{article} \usepackage{amsmath,amssymb} %Remove following six lines if not using A4 paper: \topmargin=-0.5truecm \oddsidemargin=10pt \evensidemargin=10pt \textheight=9 truein \textwidth=6.2 truein \parskip=5pt plus 2pt \newcounter{question} \setcounter{question}{0} \newcommand{\nextq}{\addtocounter{question}{1}\vspace{0.3truecm} \noindent{\bf\arabic{question}.$\quad$}} \begin{document} \begin{center} \bf \coursename -- \assignmentname \end{center} --- NEW FILE: solutions.tex --- %123456789012345678901234567890123456789012345678901234567890123456789 \documentclass[12pt]{article} \usepackage{amsmath,amssymb} %Remove following six lines if not using A4 paper: \topmargin=-0.5truecm \oddsidemargin=10pt \evensidemargin=10pt \textheight=9 truein \textwidth=6.2 truein \parskip=5pt plus 2pt \newcounter{question} \setcounter{question}{0} \newcommand{\nextq}{\addtocounter{question}{1}\vspace{0.3truecm} \noindent{\bf\arabic{question}.$\quad$}} \begin{document} \begin{center} \bf \coursename -- \assignmentname -- Solutions \end{center} Index: pdfgen.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/pdfgen.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pdfgen.php 25 Sep 2003 23:02:42 -0000 1.9 --- pdfgen.php 27 Sep 2003 09:19:27 -0000 1.10 *************** *** 39,75 **** // Create temp directory if it doesn't exist $tempdir = "$CFG->dataroot/temp/math_assignment/$math_assignment->id"; ! mkdir("$CFG->dataroot/temp", $CFG->directorypermissions); ! mkdir("$CFG->dataroot/temp/math_assignment", $CFG->directorypermissions); ! mkdir($tempdir, $CFG->directorypermissions); ! ! // Load lecturer's tex files or use dummy and store in $latex ! ! if ($type == "problems") { ! if ($math_assignment->problemsisurl) { ! $texfile = $math_assignment->problems; ! } ! else { ! $texfile = "$CFG->dataroot/$course->id/$math_assignment->problems"; ! } ! } ! else if ($type == solutions) { ! if ($math_assignment->solutionsisurl) { ! $texfile = $math_assignment->solutions; ! } ! else { ! $texfile = "$CFG->dataroot/$course->id/$math_assignment->solutions"; ! } ! } ! ! if (math_assignment_is_tex_file($texfile)) { ! $latex = file_get_contents($texfile); ! } ! else { ! $latex = file_get_contents("$CFG->dirroot/mod/math_assignment/$type.tex"); ! } ! ! // Insert course and assignment name if required ! $latex = str_replace("\coursename","$course->fullname",$latex); ! $latex = str_replace("\assignmentname","$math_assignment->name",$latex); // if there is an aim quiz load it into $data --- 39,45 ---- // Create temp directory if it doesn't exist $tempdir = "$CFG->dataroot/temp/math_assignment/$math_assignment->id"; ! @mkdir("$CFG->dataroot/temp", $CFG->directorypermissions); ! @mkdir("$CFG->dataroot/temp/math_assignment", $CFG->directorypermissions); ! @mkdir($tempdir, $CFG->directorypermissions); // if there is an aim quiz load it into $data *************** *** 108,112 **** } - // convert images --- 78,81 ---- *************** *** 123,134 **** } ! // convert AiM questions or solutions in $data and add to $latex $questions = preg_split("/id=\"question(\d+)\"/",$data); array_shift($questions); ! foreach ($questions as $question) { ! //$latex = preg_replace("/(?<!newcommand\{)\\\aimquestion/",addslashes(math_assignment_aim_to_latex($question,$type)),$latex,1); ! $latex = str_replace_once("\aimquestion","$\\sphericalangle$ ".math_assignment_aim_to_latex($question,$type),$latex); } // generate pdf file from $latex --- 92,138 ---- } ! // split into individual questions $questions = preg_split("/id=\"question(\d+)\"/",$data); array_shift($questions); ! ! ! // Add questions to lecturer's tex file or to dummy ! ! if ($type == "problems") { ! if ($math_assignment->problemsisurl) { ! $texfile = $math_assignment->problems; ! } ! else { ! $texfile = "$CFG->dataroot/$course->id/$math_assignment->problems"; ! } ! } ! else if ($type == solutions) { ! if ($math_assignment->solutionsisurl) { ! $texfile = $math_assignment->solutions; ! } ! else { ! $texfile = "$CFG->dataroot/$course->id/$math_assignment->solutions"; ! } ! } ! ! if (math_assignment_is_tex_file($texfile)) { ! $latex = file_get_contents($texfile); ! foreach ($questions as $question) { ! $latex = str_replace_once("\aimquestion","$\\sphericalangle$ ".math_assignment_aim_to_latex($question,$type),$latex); ! } } + else { + $latex = file_get_contents("$CFG->dirroot/mod/math_assignment/$type.tex"); + foreach ($questions as $question) { + $latex .= "\n\n\\nextq $\\sphericalangle$ ".math_assignment_aim_to_latex($question,$type); + } + $latex .= "\n\n\\end{document}"; + } + + // Insert course and assignment name if required + $latex = str_replace("\coursename","$course->fullname",$latex); + $latex = str_replace("\assignmentname","$math_assignment->name",$latex); + // generate pdf file from $latex *************** *** 195,200 **** // Parts $data = preg_replace("/id=\"question(\d+).(\d+)\"/i", ! "<latex>\n\n\vspace{2mm}\\noindent{\\bf Part \$2}\n\n</latex>",$data); // replace radio buttons --- 199,206 ---- // Parts + //$data = preg_replace("/id=\"question(\d+).(\d+)\"/i", + // "<latex>\n\n\vspace{2mm}\\noindent{\\bf Part \$2}\n\n</latex>",$data); $data = preg_replace("/id=\"question(\d+).(\d+)\"/i", ! "<latex>\n\n\vspace{1mm}{\\bf (\$2)} </latex>",$data); // replace radio buttons |
From: <gus...@us...> - 2003-09-27 09:15:18
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv25593/mod/math_assignment Modified Files: lib.php Log Message: now includes edit.php rather than editeml.php Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** lib.php 26 Sep 2003 22:23:23 -0000 1.24 --- lib.php 27 Sep 2003 09:15:05 -0000 1.25 *************** *** 1,5 **** <?PHP // $Id$ ! @include_once("../../lib/t2mml/editeml.php"); // TeX to MathML converter script /// Library of functions and constants for module math_assignment --- 1,5 ---- <?PHP // $Id$ ! @include_once("../../lib/t2mml/edit.php"); // TeX to MathML converter script /// Library of functions and constants for module math_assignment |
From: <ma...@us...> - 2003-09-26 11:27:44
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv22497/mod/math_assignment Modified Files: saveconfig.php Log Message: Optimised the saving of course settings. Index: saveconfig.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/saveconfig.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** saveconfig.php 23 Sep 2003 17:53:10 -0000 1.3 --- saveconfig.php 26 Sep 2003 11:27:40 -0000 1.4 *************** *** 31,49 **** // save course specific options - /* Note that ALL courses appear on the form so we assume that $subjects is comlete. Hence we - simply truncate the table and write it out again to save testing for existence before doing an insert - or an update as required since I am lazy :-) */ - - if (!$db->Execute("TRUNCATE TABLE `{$CFG->prefix}math_assignment_subject`")) { - error(get_string("failed", "math_assignment"), "$CFG->wwwroot/$CFG->admin/module.php?module=math_assignment"); - } - $result = true; ! foreach ($subjects as $course => $subject) { ! if ($subject->server) { ! $subject->course = $course; ! if (!insert_record("math_assignment_subject", $subject, false)) ! $result = false; ! } } if (!$result) { --- 31,58 ---- // save course specific options $result = true; ! switch(strtolower($CFG->dbtype)) { ! case 'mysql': ! foreach ($subjects as $course => $subject) { ! if ($subject->server) { ! $subject->course = $course; ! if (!$db->Execute("REPLACE `{$CFG->prefix}math_assignment_subject` SET `course` = '$subject->course', `name` = '$subject->name', `server` = '$subject->server', `password` = '$subject->password'")) ! $result = false; ! } ! else ! delete_records("math_assignment_subject", "course", $subject->course); ! } ! break; ! default: ! foreach ($subjects as $course => $subject) { ! if ($subject->server) { ! $subject->course = $course; ! if (!insert_record("math_assignment_subject", $subject, false)) { ! if (!update_record("math_assignment_subject", $subject, false)) ! $result = false; ! } ! } ! } ! break; } if (!$result) { |
From: <gus...@us...> - 2003-09-26 09:07:33
|
Update of /cvsroot/aimmath/moodle/lang/en_yo In directory sc8-pr-cvs1:/tmp/cvs-serv21020/lang/en_yo Removed Files: moodle.php Log Message: shouldn't be in CVS --- moodle.php DELETED --- |
From: <gus...@us...> - 2003-09-25 23:02:46
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv18831/mod/math_assignment Modified Files: pdfgen.php Log Message: small updates Index: pdfgen.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/pdfgen.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pdfgen.php 24 Sep 2003 23:57:28 -0000 1.8 --- pdfgen.php 25 Sep 2003 23:02:42 -0000 1.9 *************** *** 129,133 **** foreach ($questions as $question) { //$latex = preg_replace("/(?<!newcommand\{)\\\aimquestion/",addslashes(math_assignment_aim_to_latex($question,$type)),$latex,1); ! $latex = str_replace_once("\aimquestion",math_assignment_aim_to_latex($question,$type),$latex); } --- 129,133 ---- foreach ($questions as $question) { //$latex = preg_replace("/(?<!newcommand\{)\\\aimquestion/",addslashes(math_assignment_aim_to_latex($question,$type)),$latex,1); ! $latex = str_replace_once("\aimquestion","$\\sphericalangle$ ".math_assignment_aim_to_latex($question,$type),$latex); } *************** *** 179,183 **** // The "class=\"solu is there to save this from being erased in the next step below $data = preg_replace("/The correct answer is ([A-Z])/", ! "class=\"solu<latex>\n\n\\noindent{ Right Answer: } $1. </latex>",$data); // Remove anything else up to the solution or the next question or the end of file --- 179,187 ---- // The "class=\"solu is there to save this from being erased in the next step below $data = preg_replace("/The correct answer is ([A-Z])/", ! "class=\"solu<latex>\n\\noindent Right Answer: {\bf $1}. </latex>",$data); ! // Keep the answer to multiple response questions ! // The "class=\"solu is there to save this from being erased in the next step below ! $data = preg_replace("/The correct answer is (\{[A-Z](,[A-Z])*\})/", ! "class=\"solu<latex>\n\\noindent Right Answer: {\bf $1}. </latex>",$data); // Remove anything else up to the solution or the next question or the end of file *************** *** 195,204 **** // replace radio buttons ! $data = preg_replace("/(type=\"radio\"[^\/]*value=\")([A-Z])\"/", ! "<latex>\n\n {\bf $2 } </latex>",$data); // replace checkboxes by diamonds ! $data = preg_replace("/(type=\"checkbox\"[^\/]*value=\")([A-Z])\"/", ! "<latex>\n\n {\bf $2 } </latex>",$data); // delete AiM syntax hints (identified by \small) --- 199,212 ---- // replace radio buttons ! $data = preg_replace("/(type=\"radio\"[^\/]*value=\")([A])\"/", ! "<latex>\n\n {\bf $2: } </latex>",$data); ! $data = preg_replace("/(type=\"radio\"[^\/]*value=\")([B-Z])\"/", ! "<latex>,~~~ {\bf $2: } </latex>",$data); // replace checkboxes by diamonds ! $data = preg_replace("/(type=\"checkbox\"[^\/]*value=\")([A])\"/", ! "<latex>\n\n {\bf $2: } </latex>",$data); ! $data = preg_replace("/(type=\"checkbox\"[^\/]*value=\")([B-Z])\"/", ! "<latex>,~~~ {\bf $2: } </latex>",$data); // delete AiM syntax hints (identified by \small) |
From: <gus...@us...> - 2003-09-25 23:00:59
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv18370/mod/math_assignment Modified Files: texedit.php Log Message: use ordinary textfield to avoid slash problem Index: texedit.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/texedit.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texedit.php 24 Sep 2003 11:56:10 -0000 1.2 --- texedit.php 25 Sep 2003 23:00:56 -0000 1.3 *************** *** 50,54 **** echo " <INPUT TYPE=hidden NAME=\"file\" VALUE=\"$file\">"; echo " <INPUT TYPE=hidden NAME=\"action\" VALUE=\"edit\">"; ! print_textarea(false, 25, 80, 680, 400, "text", $contents); echo "</TD></TR><TR><TD align=\"center\">"; echo " <INPUT TYPE=submit VALUE=\"".get_string("savechanges")."\">"; --- 50,54 ---- echo " <INPUT TYPE=hidden NAME=\"file\" VALUE=\"$file\">"; echo " <INPUT TYPE=hidden NAME=\"action\" VALUE=\"edit\">"; ! echo " <textarea cols=\"80\" rows=\"25\" wrap=\"off\" name=\"text\">$contents</textarea>"; echo "</TD></TR><TR><TD align=\"center\">"; echo " <INPUT TYPE=submit VALUE=\"".get_string("savechanges")."\">"; |
From: <gus...@us...> - 2003-09-25 22:48:31
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv14886/WEB-INF/maple Modified Files: HTML.mpl Log Message: Fixed an xml incompatibilty Index: HTML.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/HTML.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HTML.mpl 25 Aug 2003 21:47:18 -0000 1.3 --- HTML.mpl 25 Sep 2003 22:48:27 -0000 1.4 *************** *** 719,723 **** html := html, ! "<option value=",`HTML/ValueEscape`(val)," selected>", op(opt[2]), "</option>\n"; --- 719,723 ---- html := html, ! "<option value=",`HTML/ValueEscape`(val)," selected=\"selected\">", op(opt[2]), "</option>\n"; |
From: <ma...@us...> - 2003-09-25 22:14:13
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv8087/mod/math_assignment Modified Files: config.html email.php lib.php version.php view.php Log Message: Added further code for the sending of emails about grades Index: config.html =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/config.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config.html 23 Sep 2003 17:54:40 -0000 1.5 --- config.html 25 Sep 2003 22:14:09 -0000 1.6 *************** *** 5,8 **** --- 5,10 ---- $strlatexoutput = get_string("latexoutput", "math_assignment"); $straimdisplay = get_string("aimdisplay", "math_assignment"); + $strdefaultemailhost = get_string("defaultemailhost", "math_assignment"); + $strsecretaryemail = get_string("secretaryemail", "math_assignment"); $strcoursesettings = get_string("coursesettings", "math_assignment"); $straimserver = get_string("aimserver", "math_assignment"); *************** *** 59,62 **** --- 61,74 ---- ?></td> <td align="left"><?php helpbutton ("config_aimdisplay", $straimdisplay, "math_assignment"); ?></td> + </tr> + <tr valign="top"> + <td align="right"><p><b><?php echo $strdefaultemailhost; ?>:</b></p></td> + <td align="left"><input type="text" name="math_assignment_default_email_host" size="40" maxlength="255" value="<?php echo $CFG->math_assignment_default_email_host; ?>" /></td> + <td align="left"><?php helpbutton ("config_defaultemailhost", $strdefaultemailhost, "math_assignment"); ?></td> + </tr> + <tr valign="top"> + <td align="right"><p><b><?php echo $strsecretaryemail; ?>:</b></p></td> + <td align="left"><input type="text" name="math_assignment_secretary_email" size="40" maxlength="255" value="<?php echo $CFG->math_assignment_secretary_email; ?>" /></td> + <td align="left"><?php helpbutton ("config_secretaryemail", $strsecretaryemail, "math_assignment"); ?></td> </tr> <?php Index: email.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/email.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** email.php 25 Sep 2003 17:15:41 -0000 1.1 --- email.php 25 Sep 2003 22:14:09 -0000 1.2 *************** *** 38,46 **** $students = math_assignment_get_grades($math_assignment); if ($students) { foreach ($students as $student) { ! // send email to the student + add to main email } } // send email to secretaries redirect("view.php?id=$cm->id", get_string("emailssent", "math_assignment"), 1); } --- 38,55 ---- $students = math_assignment_get_grades($math_assignment); if ($students) { + $failed = 0; foreach ($students as $student) { ! // send email to the student ! if (!math_assignment_email_grades($math_assignment, $student)) ! $failed++; } } + if ($failed == count($students)) + error(get_string("failed", "math_assignment"), "view.php?id=$cm->id"); // send email to secretaries + if (!math_assignment_email_all_grades($math_assignment, $students)) + error(get_string("failed", "math_assignment"), "view.php?id=$cm->id"); + // set flag in database + //set_field("math_assignment", "papersheetsreturned", "1", "id", $math_assignment->id); redirect("view.php?id=$cm->id", get_string("emailssent", "math_assignment"), 1); } Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** lib.php 25 Sep 2003 19:29:10 -0000 1.22 --- lib.php 25 Sep 2003 22:14:09 -0000 1.23 *************** *** 178,188 **** if ($math_assignments) { foreach ($math_assignments as $math_assignment) { ! // build the email ! $students = math_assignment_get_grades($math_assignment); ! if ($students) { ! foreach ($students as $student) { ! } ! // send it to the secretaries ! } } } --- 178,183 ---- if ($math_assignments) { foreach ($math_assignments as $math_assignment) { ! if ($students = math_assignment_get_grades($math_assignment)) ! math_assignment_email_all_grades($math_assignment, $students); } } *************** *** 799,803 **** else $sortsql = "u.$sort $sortdir"; ! $students = get_records_sql("SELECT s.userid, u.firstname, u.lastname, u.picture, g.papergrade, g.aimgrade, g.aimoverride, g.aimcomment, least(greatest(g.papergrade,0), $math_assignment->papergrade)+least(greatest(g.aimgrade,0), $math_assignment->aimgrade) AS totalgrade FROM {$CFG->prefix}user_students s LEFT JOIN {$CFG->prefix}user u ON s.course = '$math_assignment->course' AND u.id = s.userid LEFT JOIN {$CFG->prefix}math_assignment_grades g ON g.assignment = '$math_assignment->id' AND g.userid = s.userid WHERE u.deleted = '0' ORDER BY $sortsql"); break; default: --- 794,798 ---- else $sortsql = "u.$sort $sortdir"; ! $students = get_records_sql("SELECT s.userid, u.firstname, u.lastname, u.email, u.mailformat, u.picture, g.papergrade, g.aimgrade, g.aimoverride, g.aimcomment, least(greatest(g.papergrade,0), $math_assignment->papergrade)+least(greatest(g.aimgrade,0), $math_assignment->aimgrade) AS totalgrade FROM {$CFG->prefix}user_students s LEFT JOIN {$CFG->prefix}user u ON s.course = '$math_assignment->course' AND u.id = s.userid LEFT JOIN {$CFG->prefix}math_assignment_grades g ON g.assignment = '$math_assignment->id' AND g.userid = s.userid WHERE u.deleted = '0' ORDER BY $sortsql"); break; default: *************** *** 806,812 **** if ($students) { foreach ($students as $key => $student) { ! if ($user = get_record_sql("SELECT firstname, lastname, picture FROM {$CFG->prefix}user WHERE id = '$key' AND deleted = '0'")) { $students[$key]->firstname = $user->firstname; $students[$key]->lastname = $user->lastname; $students[$key]->picture = $user->picture; $grade = get_record_sql("SELECT papergrade, aimgrade, aimoverride, aimcomment FROM {$CFG->prefix}math_assignment_grades WHERE assignment = '$math_assignment->id' and userid = '$key'"); --- 801,809 ---- if ($students) { foreach ($students as $key => $student) { ! if ($user = get_record_sql("SELECT firstname, lastname, email, mailformat, picture FROM {$CFG->prefix}user WHERE id = '$key' AND deleted = '0'")) { $students[$key]->firstname = $user->firstname; $students[$key]->lastname = $user->lastname; + $students[$key]->email = $user->email; + $students[$key]->mailformat = $user->mailformat; $students[$key]->picture = $user->picture; $grade = get_record_sql("SELECT papergrade, aimgrade, aimoverride, aimcomment FROM {$CFG->prefix}math_assignment_grades WHERE assignment = '$math_assignment->id' and userid = '$key'"); *************** *** 852,855 **** --- 849,871 ---- } + function math_assignment_email_grades($math_assignment, $student) { + /// Function which constructs an email telling the student what their grade is + + // build the email + // send the email to $student->email + return true; + } + + function math_assignment_email_all_grades($math_assignment, $students) { + /// Function which constructs an email listing all the grades found and emails it to the secretaries + + global $CFG; + + // build the email + foreach ($students as $student) { + } + // send the email to $CFG->math_assignment_secretary_email + return true; + } ?> Index: version.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/version.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** version.php 25 Sep 2003 17:15:41 -0000 1.10 --- version.php 25 Sep 2003 22:14:09 -0000 1.11 *************** *** 6,10 **** ///////////////////////////////////////////////////////////////////////////////// ! $module->version = 2003092516; // The (date) version of this module $module->cron = 1200; // How often should cron check this module (seconds)? --- 6,10 ---- ///////////////////////////////////////////////////////////////////////////////// ! $module->version = 2003092523; // The (date) version of this module $module->cron = 1200; // How often should cron check this module (seconds)? Index: view.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/view.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** view.php 25 Sep 2003 17:15:41 -0000 1.16 --- view.php 25 Sep 2003 22:14:09 -0000 1.17 *************** *** 61,64 **** --- 61,65 ---- $strfirstname = get_string("firstname"); $strlastname = get_string("lastname"); + $stremail = get_string("email"); $strpaper = get_string("paper", "math_assignment"); $strcomputer = get_string("computer", "math_assignment"); *************** *** 312,316 **** if (isteacher($course->id)) { ! $zonelink = false; if ($subject = get_record("math_assignment_subject", "course", $course->id)) { if ($server = get_record("math_assignment_server", "id", $subject->server)) --- 313,317 ---- if (isteacher($course->id)) { ! $zonelink = ""; if ($subject = get_record("math_assignment_subject", "course", $course->id)) { if ($server = get_record("math_assignment_server", "id", $subject->server)) *************** *** 320,335 **** print_heading($strgrades); - // get sort strings if ($hasboth) { echo "<p align=\"center\"><b>" . get_string("maximumgrade") . "</b>: $math_assignment->papergrade ($strpaper) + $math_assignment->aimgrade ($strcomputer) = $totalmax</p>"; ! $table->head = array ("", get_sortable_header($cm->id, "firstname", $sort, $sortdir), get_sortable_header($cm->id, "lastname", $sort, $sortdir), "$strpaper $strgrade", "$strcomputer $strgrade", get_sortable_header($cm->id, "totalgrade", $sort, $sortdir, "$strtotal $strgrade")); ! $table->width = array(35, "", "", "", "", ""); ! $table->align = array("LEFT", "RIGHT", "LEFT", "CENTER", "CENTER", "CENTER"); } else { echo "<p align=\"center\"><b>" . get_string("maximumgrade") . "</b>: $totalmax</p>"; ! $table->head = array ("", get_sortable_header($cm->id, "firstname", $sort, $sortdir), get_sortable_header($cm->id, "lastname", $sort, $sortdir), "$strgrade"); ! $table->width = array(35, "", "", ""); ! $table->align = array("LEFT", "RIGHT", "LEFT", "CENTER"); } --- 321,335 ---- print_heading($strgrades); if ($hasboth) { echo "<p align=\"center\"><b>" . get_string("maximumgrade") . "</b>: $math_assignment->papergrade ($strpaper) + $math_assignment->aimgrade ($strcomputer) = $totalmax</p>"; ! $table->head = array ("", get_sortable_header($cm->id, "firstname", $sort, $sortdir), get_sortable_header($cm->id, "lastname", $sort, $sortdir), $stremail, "$strpaper $strgrade", "$strcomputer $strgrade", get_sortable_header($cm->id, "totalgrade", $sort, $sortdir, "$strtotal $strgrade")); ! $table->width = array(35, "", "", "", "", "", ""); ! $table->align = array("LEFT", "RIGHT", "LEFT", "CENTER", "CENTER", "CENTER", "CENTER"); } else { echo "<p align=\"center\"><b>" . get_string("maximumgrade") . "</b>: $totalmax</p>"; ! $table->head = array ("", get_sortable_header($cm->id, "firstname", $sort, $sortdir), get_sortable_header($cm->id, "lastname", $sort, $sortdir), $stremail, "$strgrade"); ! $table->width = array(35, "", "", "", ""); ! $table->align = array("LEFT", "RIGHT", "LEFT", "CENTER", "CENTER"); } *************** *** 343,374 **** if ($student->papergrade >= 0) $papergrade = $student->papergrade; ! else ! $papergrade = ""; ! $papergrade = "<input type=\"text\" name=\"$student->userid\" size=\"10\" maxlength=\"10\" value=\"$papergrade\" tabindex=\"$i\" />"; ! if ($student->aimgrade >= 0) ! $aimgrade = $student->aimgrade; ! else ! $aimgrade = ""; ! if ($student->aimoverride) { ! $edited = "$stredited ("; ! $editedclose = ")"; ! } ! else if ($student->aimcomment) { ! $edited = "$strcommented ("; ! $editedclose = ")"; ! } ! else { ! $edited = ""; ! $editedclose = ""; ! } ! if ($hasboth) ! $table->data[] = array($picture, $student->firstname, $student->lastname, $papergrade, "$aimgrade $edited<a href=\"editgrade.php?id=$math_assignment->id&userid=$student->userid\">$stredit</a>$editedclose", $student->totalgrade); else if ($haspaper) ! $table->data[] = array($picture, $student->firstname, $student->lastname, $papergrade); else if ($hasaim) ! $table->data[] = array($picture, $student->firstname, $student->lastname, "$aimgrade $edited<a href=\"editgrade.php?id=$math_assignment->id&userid=$student->userid\">$stredit</a>$editedclose"); --- 343,387 ---- if ($student->papergrade >= 0) $papergrade = $student->papergrade; ! else ! $papergrade = ""; ! $papergrade = "<input type=\"text\" name=\"$student->userid\" size=\"10\" maxlength=\"10\" value=\"$papergrade\" tabindex=\"$i\" />"; ! if ($student->aimgrade >= 0) ! $aimgrade = $student->aimgrade; ! else ! $aimgrade = ""; ! if ($student->aimoverride) { ! $edited = "$stredited ("; ! $editedclose = ")"; ! } ! else if ($student->aimcomment) { ! $edited = "$strcommented ("; ! $editedclose = ")"; ! } ! else { ! $edited = ""; ! $editedclose = ""; ! } ! ! $email = "<a href=\"mailto:$student->email\">"; ! if ($CFG->math_assignment_default_email_host) { ! if (preg_match("/^(.*)@(.*)$/", $student->email, $matches)) { ! if (strcmp($matches[2], $CFG->math_assignment_default_email_host) == 0) ! $email .= "$matches[1]</a>"; ! else ! $email .= "$student->email</a>"; ! } ! else ! $email .= "$student->email</a>"; ! } ! else ! $email .= "$student->email</a>"; if ($hasboth) ! $table->data[] = array($picture, $student->firstname, $student->lastname, $email, $papergrade, "$aimgrade $edited<a href=\"editgrade.php?id=$math_assignment->id&userid=$student->userid\">$stredit</a>$editedclose", $student->totalgrade); else if ($haspaper) ! $table->data[] = array($picture, $student->firstname, $student->lastname, $email, $papergrade); else if ($hasaim) ! $table->data[] = array($picture, $student->firstname, $student->lastname, $email, "$aimgrade $edited<a href=\"editgrade.php?id=$math_assignment->id&userid=$student->userid\">$stredit</a>$editedclose"); |
From: <ma...@us...> - 2003-09-25 22:14:13
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment/db In directory sc8-pr-cvs1:/tmp/cvs-serv8087/mod/math_assignment/db Modified Files: mysql.php mysql.sql Log Message: Added further code for the sending of emails about grades Index: mysql.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/db/mysql.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mysql.php 25 Sep 2003 15:02:23 -0000 1.11 --- mysql.php 25 Sep 2003 22:14:09 -0000 1.12 *************** *** 23,26 **** --- 23,30 ---- execute_sql("ALTER TABLE `{$CFG->prefix}math_assignment` ADD `papersheetsreturned` tinyint(1) NOT NULL default '0' AFTER `solutionsisurl`"); } + if ($oldversion < 2003092523) { + set_config("math_assignment_default_email_host", ""); + set_config("math_assignment_secretary_email", ""); + } return true; Index: mysql.sql =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/db/mysql.sql,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mysql.sql 25 Sep 2003 15:02:23 -0000 1.10 --- mysql.sql 25 Sep 2003 22:14:09 -0000 1.11 *************** *** 59,60 **** --- 59,62 ---- INSERT `prefix_config` SET `name`="math_assignment_default_latex_output",`value`="0"; INSERT `prefix_config` SET `name`="math_assignment_aim_display", `value`="1"; + INSERT `prefix_config` SET `name`="math_assignment_default_email_host", `value`=""; + INSERT `prefix_config` SET `name`="math_assignment_secretary_email", `value`=""; |
From: <ma...@us...> - 2003-09-25 22:14:13
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv8087/lang/en Modified Files: math_assignment.php Log Message: Added further code for the sending of emails about grades Index: math_assignment.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/math_assignment.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** math_assignment.php 25 Sep 2003 17:15:41 -0000 1.18 --- math_assignment.php 25 Sep 2003 22:14:09 -0000 1.19 *************** *** 27,30 **** --- 27,31 ---- $string['commented'] = "Commented"; $string['coursesettings'] = "Course Settings"; + $string['defaultemailhost'] = "Default Email Host"; $string['deleteall'] = "None (set courses to use no AiM subject)"; $string['deletequery'] = "Are you sure you want to delete this server?"; *************** *** 79,82 **** --- 80,84 ---- $string['reset'] = "Reset"; $string['reviewresults'] = "Review Results"; + $string['secretaryemail'] = "Secretary Email Address"; $string['serverinuse'] = "Error : Can not delete server as one or more assignments depend on it."; $string['singlequestion'] = "single question"; |
From: <ma...@us...> - 2003-09-25 22:12:09
|
Update of /cvsroot/aimmath/moodle/lib/t2mml In directory sc8-pr-cvs1:/tmp/cvs-serv7724/lib/t2mml Modified Files: edit.php editeml.php Log Message: Fixed short tags Index: edit.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lib/t2mml/edit.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** edit.php 21 Sep 2003 22:00:57 -0000 1.1 --- edit.php 25 Sep 2003 22:12:05 -0000 1.2 *************** *** 1,3 **** ! <? /* This TeX to MathML converter is based on WeM - Web editeur Mathematique --- 1,3 ---- ! <?php /* This TeX to MathML converter is based on WeM - Web editeur Mathematique Index: editeml.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lib/t2mml/editeml.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editeml.php 17 Sep 2003 19:22:19 -0000 1.1 --- editeml.php 25 Sep 2003 22:12:05 -0000 1.2 *************** *** 1,3 **** ! <? /* WeM - Web editeur Mathematique Copyright 2002 Stephan Semirat --- 1,3 ---- ! <?php /* WeM - Web editeur Mathematique Copyright 2002 Stephan Semirat |
From: <gus...@us...> - 2003-09-25 19:37:14
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1:/tmp/cvs-serv7059/WEB-INF/maple/aim/admin Modified Files: Quiz.mpl Log Message: Added extra optional boolean parameter "KeepQuestionOrder" which, when set to true, avoids reordering of questions. This is to make it easier for external programs to interface with AiM Index: Quiz.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Quiz.mpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Quiz.mpl 30 Aug 2003 21:08:04 -0000 1.4 --- Quiz.mpl 25 Sep 2003 19:37:10 -0000 1.5 *************** *** 24,27 **** --- 24,28 ---- ['Parameter',"SelectorText" = ""], ['Parameter',"RandQuestionOrder"::boolean = false], + ['Parameter',"KeepQuestionOrder"::boolean = false], ['Parameter', *************** *** 346,350 **** fi; ! if action <> "UseAllQuestions" then # reorder the question list qlist := NULL; --- 347,351 ---- fi; ! if action <> "UseAllQuestions" and p["KeepQuestionOrder"] = "false" then # reorder the question list qlist := NULL; |
From: <gus...@us...> - 2003-09-25 19:29:13
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv5295/mod/math_assignment Modified Files: lib.php Log Message: Solved the problem of the unwanted question reordering when changing assessment. Solution involves calling AiM with extra parameter "KeepQuestionOrder" = "true" Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** lib.php 25 Sep 2003 17:15:41 -0000 1.21 --- lib.php 25 Sep 2003 19:29:10 -0000 1.22 *************** *** 493,496 **** --- 493,497 ---- $postdata = math_assignment_add_arg_to_url_data($postdata, "Command", "admin/Quiz"); $postdata = math_assignment_add_arg_to_url_data($postdata, "Action", "SaveQuizOptions"); + $postdata = math_assignment_add_arg_to_url_data($postdata, "KeepQuestionOrder", "true"); $postdata = math_assignment_add_arg_to_url_data($postdata, "SubjectName", $subject->name); $postdata = math_assignment_add_arg_to_url_data($postdata, "QuizName", $math_assignment->aimquiz); |
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv30160/WEB-INF/maple Modified Files: AutoConf.mpl AutoConfWin.mpl AutoConfWin.mws ConfigFields.mpl ImageCache.mpl ManualConfig.dist Log Message: Added additional configuration variables ImageFormat, ImageWidth, ImageHeight, SourceEditBoxWidth and SourceEditBoxHeight Index: AutoConf.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AutoConf.mpl 15 Sep 2003 23:23:41 -0000 1.6 --- AutoConf.mpl 25 Sep 2003 19:01:14 -0000 1.7 *************** *** 788,791 **** --- 788,797 ---- setconfig('ShowToolBars' , true): + setconfig('SourceEditBoxWidth' , 80): + setconfig('SourceEditBoxHeight' , 25): + + setconfig('ImageFormat' , "gif"): + setconfig('ImageWidth' , 400): + setconfig('ImageHeight' , 400): setconfig('MapleInitOptions',"default"): Index: AutoConfWin.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConfWin.mpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AutoConfWin.mpl 10 Sep 2003 16:00:26 -0000 1.2 --- AutoConfWin.mpl 25 Sep 2003 19:01:14 -0000 1.3 *************** *** 663,666 **** --- 663,672 ---- setconfig('ShowToolBars' , true): + setconfig('SourceEditBoxWidth' , 80): + setconfig('SourceEditBoxHeight' , 25): + + setconfig('ImageFormat' , "gif"): + setconfig('ImageWidth' , 400): + setconfig('ImageHeight' , 400): setconfig('MapleInitOptions',"default"): Index: AutoConfWin.mws =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConfWin.mws,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AutoConfWin.mws 6 Sep 2003 20:04:26 -0000 1.5 --- AutoConfWin.mws 25 Sep 2003 19:01:14 -0000 1.6 *************** *** 33,176 **** ified domain name of the server (something like " }}{PARA 0 "" 0 "" {TEXT -1 63 " \"aim.shef.ac.uk\"). This should be entered as the v ! alue of " }{TEXT 257 18 "Config['HostName']" }{TEXT -1 7 " under " }} ! {PARA 0 "" 0 "" {TEXT -1 32 " \"Basic Configuration\" below." }} ! {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 2 "+ " } ! {TEXT 258 53 "The address of the server that you use to send email." } ! }{PARA 0 "" 0 "" {TEXT -1 94 " This should again be a fully qualifi ! ed domain name (eg \"smtp.york.ac.uk\"). If you are not" }}{PARA 0 " ! " 0 "" {TEXT -1 95 " sure what to enter, try looking at the options ! used by your email client. For example, in " }}{PARA 0 "" 0 "" ! {TEXT -1 42 " Microsoft Outlook, use the menu items " }}{PARA 0 "" ! 0 "" {TEXT -1 168 " Tools > Options > Mail Delivery > Accounts > Ma ! il > Properties > Servers\n and look under \"Outgoing mail (SMTP)\" ! . You can get started with AiM without filling in" }}{PARA 0 "" 0 "" ! {TEXT -1 86 " this field, but your students will not be able to get ! password reminders by email." }}{PARA 0 "" 0 "" {TEXT -1 50 " The \+ ! address should be entered as the value of " }{TEXT 259 21 "Config['SMT ! PServer'] " }{TEXT -1 13 "under \"Basic " }}{PARA 0 "" 0 "" {TEXT -1 ! 25 " Configuration\" below." }}{PARA 0 "" 0 "" {TEXT -1 4 " " }} ! {PARA 0 "" 0 "" {TEXT -1 2 "+ " }{TEXT 260 33 "The name of the top AiM ! directory" }}{PARA 0 "" 0 "" {TEXT -1 76 " This is just the last co ! mponent of the name. If you installed AiM under " }}{PARA 0 "" 0 "" ! {TEXT -1 3 " " }{TEXT 261 22 "C:/Tomcat/webapps/ROOT" }{TEXT -1 20 " ! , for example, then " }{TEXT 262 23 "Config['TomcatContext']" }{TEXT ! -1 12 " should just" }}{PARA 0 "" 0 "" {TEXT -1 20 " be set to \"ROO ! T\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "O ! nce you have set these values, click on " }{TEXT 263 5 "Edit " }{TEXT ! -1 38 "on the Maple toolbar, then select the " }}{PARA 0 "" 0 "" ! {TEXT 264 7 "Execute" }{TEXT -1 24 " submenu, then click on " }{TEXT ! 265 9 "Worksheet" }{TEXT -1 41 ". This will execute the worksheet, wh ! ich" }}{PARA 0 "" 0 "" {TEXT -1 90 "will attempt to determine all othe ! r configuration information automatically. If there are" }}{PARA 0 " ! " 0 "" {TEXT -1 83 "any error messages, you should check your entries \+ ! under \"Basic Configuration\". You" }}{PARA 0 "" 0 "" {TEXT -1 27 "ma ! y also need to click the " }{TEXT 266 1 "+" }{TEXT 267 1 " " }{TEXT ! -1 58 "signs next to \"Things that should be found automatically\" " } ! }{PARA 0 "" 0 "" {TEXT -1 86 "and/or \"Additional Configuration\", whi ! ch will reveal a number of other configuration " }}{PARA 0 "" 0 "" ! {TEXT -1 86 "options that you may need to set manually. You can then \+ ! execute the worksheet again, " }}{PARA 0 "" 0 "" {TEXT -1 90 "and repe ! at until there are no error messages. (Some of the additional options ! are useful " }}{PARA 0 "" 0 "" {TEXT -1 86 "even if you have no error ! s, but you may wish to ignore this possibility at your first " }} ! {PARA 0 "" 0 "" {TEXT -1 9 "attempt.)" }}}{SECT 0 {PARA 3 "" 0 "" ! {TEXT -1 19 "Basic configuration" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT ! 1 0 351 "Config := table([]):\n\n# The fully qualified host name of th ! e server (eg aim.shef.ac.uk). \nConfig['HostName'] := \"localhost\":\n ! \n# The SMTP server that AiM should use for sending mail.\nConfig['SMT ! PServer'] := \"\":\n\n# The name of the subdirectory of the Tomcat\\we ! bapps directory into \n# which you have copied the AiM files\nConfig[' ! TomcatContext'] := \"AiM\":" }}}{PARA 0 "" 0 "" {TEXT -1 82 "Uncomment ! the line below (by removing the initial # character) to get more verb ! ose" }}{PARA 0 "" 0 "" {TEXT -1 41 "messages about the configuration p ! rocess." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "# waffle := true: ! " }}}{PARA 3 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT ! -1 41 "Things that should be found automatically" }}{PARA 0 "" 0 "" ! {TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 91 "AiM needs to use a vari ! ety of files (eg the Maple executable) and directories (eg the main " ! }}{PARA 0 "" 0 "" {TEXT -1 98 "directory for the Java Runtime Environm ! ent). Often, it can find these for itself. If it fails to" }}{PARA ! 0 "" 0 "" {TEXT -1 96 "do so, or if it finds the wrong versions, then \+ ! you can help it by filling in some of the options" }}{PARA 0 "" 0 "" ! {TEXT -1 84 "below. If you need to change anything, remember to remov ! e the comment character (#)" }}{PARA 0 "" 0 "" {TEXT -1 29 "at the beg ! inning of the line." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 ! "> " 0 "" {MPLTEXT 1 0 1585 "######################################### ! #############################\n# The absolute path to the BLAT program ! , used for sending email\n# Example:\n# Config['BLATProgram'] := \"C: ! \\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\blat\\\\blat.exe\":\n\n######## ! ##############################################################\n# The \+ ! absolute path to the kill program (used to kill processes on this OS). ! \n# Example:\n# Config['KillProgram'] := \"C:\\\\Tomcat\\\\webapps\\\\ ! AiM\\\\bin\\\\Process\\\\Process.exe\":\n\n########################### ! ###########################################\n# The top directory for t ! he Tomcat distribution. \n# Example:\n# Config['CatalinaHome'] := \"C: ! \\\\Tomcat\":\n\n##################################################### ! #################\n# The absolute path to the maple program. \n# Examp ! le:\n# Config['MapleProgram'] := \"C:\\\\Program Files\\\\Maple 8\\\\b ! in.win\\\\cmaple8.exe\":\n\n########################################## ! ############################\n# The absolute path to the tth program ( ! used to convert LaTeX to HTML).\n# Example:\n# Config['TtHProgram'] := ! \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\tth_exe\\\\tth.exe\":\n\n# ! ##################################################################### ! \n# The top directory for the Java distribution. \n# Example:\n# Confi ! g['JavaHome'] := \"C:\\\\Program Files\\\\Java\\\\j2re1.4.2\":\n\n#### ! ##################################################################\n# \+ ! The directory where the servlet should put temporary copies of uploade ! d\n# files. (The Maple part of the system will delete them or move th ! em to\n# a more permanent home moments later.) \n# Example:\n# Config ! ['TempDir'] := \"C:\\\\WINDOWS\\\\Temp\":" }}}}{SECT 1 {PARA 3 "" 0 " ! " {TEXT -1 24 "Additional Configuration" }}{PARA 0 "" 0 "" {TEXT -1 0 ! "" }}{PARA 0 "" 0 "" {TEXT -1 85 "This section lists some additional o ! ptions that you may wish to change. If you alter" }}{PARA 0 "" 0 "" ! {TEXT -1 84 "anything, remember to remove the comment character (#) at ! the beginning of the line." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG ! {PARA 0 "> " 0 "" {MPLTEXT 1 0 3109 "################################# ! #####################################\n# The number of 'Recent Request ! s' to show on the Alice Monitor page\n# Config['AliceHistorySize'] := \+ ! 20:\n\n############################################################### ! #######\n# The time limits placed on Maple processes by the Alice serv ! let. \n# Processes which take longer than the time limit are terminate ! d.\n# The AdminTimeLimit restricts the time allowed for Administrative ! \n# commands. The StudentTimeLimit is the restriction on all other \n# ! commands. Generally the StudentTimeLimit should be shorter than\n# th ! e admisitrative time limit. Both values are integers which specify \n# ! the time limit in milliseconds.\n# Config['StudentTimeLimit'] := 6000 ! 0: # one minute\n# Config['AdminTimeLimit'] := 1200000: # twenty min ! utes\n\n############################################################## ! ########\n# The maximum number of maple processes that can be running \+ ! at the same\n# time on this machine.\n# Config['MaxMapleProcesses'] := ! 8:\n\n############################################################### ! #######\n# The maximum allowed size for uploaded files, in bytes. The ! default is\n# ten megabytes.\n# Config['MaxPostSize'] := 10485760:\n ! \n\n################################################################## ! ####\n# The number of the port on which Tomcat should listen. By defa ! ult\n# this is 8080. For any port other than 80, the\n# number must be ! included explicitly in URL's (for example, \n# http://allserv.rug.ac. ! be:8080). \n# Config['TomcatPort'] := 8080:\n\n\n\n################### ! ###################################################\n# In principle th ! is allows you to choose the language in which AiM's\n# messages are pr ! esented. The required mechanisms are in place but \n# as yet there ar ! e no tables of translated messages.\n# Config['Locale'] := \"en\":\n\n ! \n#################################################################### ! ##\n# Config['ShowToolBars'] := true:\n# true if the administrator's b ! rowser windows should have a full set of\n# toolbars; false if they sh ! ould be omitted to save space.\n\n\n################################## ! ####################################\n# The name of the time zone, and ! the number of SECONDS ahead of GMT.\n# Note that these are separate v ! ariables, not fields in the Config\n# table.\n#\n# The handling of sum ! mer time may not be correct in Europe, and is\n# certainly incorrect i ! n the southern hemisphere. It is recommended\n# that you adjust manua ! lly for this. \n#\n# `Date/LocalTimeZoneName` := \"GMT\":\n# `Date/ ! LocalTimeZoneOffset` := 0:\n\n\n###################################### ! ################################\n#################################### ! ##################################\n# You can change the following fie ! lds if you dare, but you should\n# read the source code first and prob ! ably ask for advice.\n# Config['AimDir']\n# Config['LastRequestFile'] ! \n# Config['Locale']\n# Config['LogDir']\n# Config['MapleInitOptions'] ! \n# Config['MapleVersion']\n# Config['OperatingSystem']\n# Config['Roo ! tDir']\n# Config['ServletLogFile']\n# Config['DocumentURL']\n# Config[ ! 'ServletURL']\n# Config['WEBINFDir']\n# Config['WebAppDir']\n# Config[ ! 'WebDir']\n" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "read(\"Auto ! ConfWin.mpl\"):" }}}}{MARK "1 35 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 ! 1 }{PAGENUMBERS 0 1 2 33 1 1 } --- 33,181 ---- ified domain name of the server (something like " }}{PARA 0 "" 0 "" {TEXT -1 63 " \"aim.shef.ac.uk\"). This should be entered as the v ! alue of " }{TEXT 257 18 "Config['HostName']" }{TEXT -1 7 " below." }}} ! {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "Config['HostName'] := \"loca ! lhost\":" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" ! {TEXT -1 2 "+ " }{TEXT 258 53 "The address of the server that you use \+ ! to send email." }}{PARA 0 "" 0 "" {TEXT -1 94 " This should again b ! e a fully qualified domain name (eg \"smtp.york.ac.uk\"). If you are \+ ! not" }}{PARA 0 "" 0 "" {TEXT -1 95 " sure what to enter, try lookin ! g at the options used by your email client. For example, in " }} ! {PARA 0 "" 0 "" {TEXT -1 42 " Microsoft Outlook, use the menu items ! " }}{PARA 0 "" 0 "" {TEXT -1 168 " Tools > Options > Mail Delivery ! > Accounts > Mail > Properties > Servers\n and look under \"Outgoi ! ng mail (SMTP)\". You can get started with AiM without filling in" }} ! {PARA 0 "" 0 "" {TEXT -1 86 " this field, but your students will no ! t be able to get password reminders by email." }}{PARA 0 "" 0 "" ! {TEXT -1 50 " The address should be entered as the value of " } ! {TEXT 259 21 "Config['SMTPServer'] " }{TEXT -1 6 "below." }}}{EXCHG ! {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "Config['SMTPServer'] := \"\":" }}} ! {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 2 "+ \+ ! " }{TEXT 260 33 "The name of the top AiM directory" }}{PARA 0 "" 0 "" ! {TEXT -1 76 " This is just the last component of the name. If you i ! nstalled AiM under " }}{PARA 0 "" 0 "" {TEXT -1 3 " " }{TEXT 261 22 ! "C:/Tomcat/webapps/ROOT" }{TEXT -1 20 ", for example, then " }{TEXT ! 262 23 "Config['TomcatContext']" }{TEXT -1 12 " should just" }}{PARA ! 0 "" 0 "" {TEXT -1 20 " be set to \"ROOT\"." }}}{EXCHG {PARA 0 "> " ! 0 "" {MPLTEXT 1 0 33 "Config['TomcatContext'] := \"AiM\":" }}}{EXCHG ! {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "Once you \+ ! have set these values, click on " }{TEXT 263 5 "Edit " }{TEXT -1 38 "o ! n the Maple toolbar, then select the " }}{PARA 0 "" 0 "" {TEXT 264 7 " ! Execute" }{TEXT -1 24 " submenu, then click on " }{TEXT 265 9 "Workshe ! et" }{TEXT -1 41 ". This will execute the worksheet, which" }}{PARA ! 0 "" 0 "" {TEXT -1 90 "will attempt to determine all other configurati ! on information automatically. If there are" }}{PARA 0 "" 0 "" {TEXT ! -1 61 "any error messages, you should check your entries above. You" ! }}{PARA 0 "" 0 "" {TEXT -1 27 "may also need to click the " }{TEXT ! 266 1 "+" }{TEXT 267 1 " " }{TEXT -1 58 "signs next to \"Things that s ! hould be found automatically\" " }}{PARA 0 "" 0 "" {TEXT -1 86 "and/or ! \"Additional Configuration\", which will reveal a number of other co ! nfiguration " }}{PARA 0 "" 0 "" {TEXT -1 86 "options that you may need ! to set manually. You can then execute the worksheet again, " }} ! {PARA 0 "" 0 "" {TEXT -1 90 "and repeat until there are no error messa ! ges. (Some of the additional options are useful " }}{PARA 0 "" 0 "" ! {TEXT -1 86 "even if you have no errors, but you may wish to ignore th ! is possibility at your first " }}{PARA 0 "" 0 "" {TEXT -1 9 "attempt.) ! " }}{PARA 0 "" 0 "" {TEXT -1 82 "Uncomment the line below (by removing ! the initial # character) to get more verbose" }}{PARA 0 "" 0 "" ! {TEXT -1 41 "messages about the configuration process." }}}{EXCHG ! {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "# waffle := true:" }}}{SECT 1 ! {PARA 3 "" 0 "" {TEXT -1 41 "Things that should be found automatically ! " }}{PARA 0 "" 0 "" {TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 91 "AiM ! needs to use a variety of files (eg the Maple executable) and directo ! ries (eg the main " }}{PARA 0 "" 0 "" {TEXT -1 98 "directory for the J ! ava Runtime Environment). Often, it can find these for itself. If it ! fails to" }}{PARA 0 "" 0 "" {TEXT -1 96 "do so, or if it finds the wr ! ong versions, then you can help it by filling in some of the options" ! }}{PARA 0 "" 0 "" {TEXT -1 84 "below. If you need to change anything, ! remember to remove the comment character (#)" }}{PARA 0 "" 0 "" ! {TEXT -1 29 "at the beginning of the line." }}{PARA 0 "" 0 "" {TEXT ! -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1585 "################ ! ######################################################\n# The absolute ! path to the BLAT program, used for sending email\n# Example:\n# Confi ! g['BLATProgram'] := \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\blat\\ ! \\blat.exe\":\n\n##################################################### ! #################\n# The absolute path to the kill program (used to ki ! ll processes on this OS).\n# Example:\n# Config['KillProgram'] := \"C: ! \\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\Process\\\\Process.exe\":\n\n## ! ####################################################################\n ! # The top directory for the Tomcat distribution. \n# Example:\n# Confi ! g['CatalinaHome'] := \"C:\\\\Tomcat\":\n\n############################ ! ##########################################\n# The absolute path to the ! maple program. \n# Example:\n# Config['MapleProgram'] := \"C:\\\\Prog ! ram Files\\\\Maple 8\\\\bin.win\\\\cmaple8.exe\":\n\n################# ! #####################################################\n# The absolute \+ ! path to the tth program (used to convert LaTeX to HTML).\n# Example:\n ! # Config['TtHProgram'] := \"C:\\\\Tomcat\\\\webapps\\\\AiM\\\\bin\\\\t ! th_exe\\\\tth.exe\":\n\n############################################## ! ########################\n# The top directory for the Java distributio ! n. \n# Example:\n# Config['JavaHome'] := \"C:\\\\Program Files\\\\Java ! \\\\j2re1.4.2\":\n\n################################################## ! ####################\n# The directory where the servlet should put tem ! porary copies of uploaded\n# files. (The Maple part of the system wil ! l delete them or move them to\n# a more permanent home moments later.) ! \n# Example:\n# Config['TempDir'] := \"C:\\\\WINDOWS\\\\Temp\":" }}} ! }{SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "Additional Configuration" }} ! {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 85 "This sect ! ion lists some additional options that you may wish to change. If you ! alter" }}{PARA 0 "" 0 "" {TEXT -1 84 "anything, remember to remove th ! e comment character (#) at the beginning of the line." }}{PARA 0 "" 0 ! "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3767 "####### ! ###############################################################\n# The ! number of 'Recent Requests' to show on the Alice Monitor page\n# Conf ! ig['AliceHistorySize'] := 20:\n\n##################################### ! #################################\n# The time limits placed on Maple p ! rocesses by the Alice servlet. \n# Processes which take longer than th ! e time limit are terminated.\n# The AdminTimeLimit restricts the time \+ ! allowed for Administrative\n# commands. The StudentTimeLimit is the re ! striction on all other \n# commands. Generally the StudentTimeLimit sh ! ould be shorter than\n# the admisitrative time limit. Both values are \+ ! integers which specify \n# the time limit in milliseconds.\n# Config[' ! StudentTimeLimit'] := 60000: # one minute\n# Config['AdminTimeLimit'] ! := 1200000: # twenty minutes\n\n#################################### ! ##################################\n# The maximum number of maple proc ! esses that can be running at the same\n# time on this machine.\n# Conf ! ig['MaxMapleProcesses'] := 8:\n\n##################################### ! #################################\n# The maximum allowed size for uplo ! aded files, in bytes. The default is\n# ten megabytes.\n# Config['Max ! PostSize'] := 10485760:\n\n########################################### ! ###########################\n# The number of the port on which Tomcat \+ ! should listen. By default\n# this is 8080. For any port other than 80 ! , the\n# number must be included explicitly in URL's (for example, \n# ! http://allserv.rug.ac.be:8080). \n# Config['TomcatPort'] := 8080:\n\n ! ###################################################################### ! \n# In principle this allows you to choose the language in which AiM's ! \n# messages are presented. The required mechanisms are in place but \+ ! \n# as yet there are no tables of translated messages.\n# Config['Loca ! le'] := \"en\":\n\n################################################### ! ###################\n# Config['ShowToolBars'] := true:\n# true if the \+ ! administrator's browser windows should have a full set of\n# toolbars; ! false if they should be omitted to save space.\n\n################### ! ###################################################\n# Config['SourceE ! ditBoxWidth'] := 100:\n# Config['SourceEditBoxHeight'] := 50:\n# This \+ ! determines the width of the textarea used for editing the\n# question \+ ! source files\n\n###################################################### ! ################\n# Config['ImageFormat'] := \"jpg\":\n# This determin ! es the image format used for Maple plots.\n# Possible options are gif \+ ! and jpg\n\n########################################################### ! ###########\n# Config['ImageWidth'] := 480:\n# Config['ImageHeight'] : ! = 280:\n# This determines the image format used for Maple plots.\n# Po ! ssible options are gif and jpg\n\n#################################### ! ##################################\n# The name of the time zone, and t ! he number of SECONDS ahead of GMT.\n# Note that these are separate var ! iables, not fields in the Config\n# table.\n#\n# The handling of summe ! r time may not be correct in Europe, and is\n# certainly incorrect in \+ ! the southern hemisphere. It is recommended\n# that you adjust manuall ! y for this. \n#\n# `Date/LocalTimeZoneName` := \"GMT\":\n# `Date/Lo ! calTimeZoneOffset` := 0:\n\n########################################## ! ############################\n######################################## ! ##############################\n# You can change the following fields \+ ! if you dare, but you should\n# read the source code first and probably ! ask for advice.\n# Config['AimDir']\n# Config['LastRequestFile']\n# C ! onfig['Locale']\n# Config['LogDir']\n# Config['MapleInitOptions']\n# C ! onfig['MapleVersion']\n# Config['OperatingSystem']\n# Config['RootDir' ! ]\n# Config['ServletLogFile']\n# Config['DocumentURL']\n# Config['Serv ! letURL']\n# Config['WEBINFDir']\n# Config['WebAppDir']\n# Config['WebD ! ir']\n" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "read(\"AutoConfW ! in.mpl\"):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "2 ! 0 0" 32 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 ! } Index: ConfigFields.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/ConfigFields.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConfigFields.mpl 25 Aug 2003 21:47:18 -0000 1.3 --- ConfigFields.mpl 25 Sep 2003 19:01:15 -0000 1.4 *************** *** 57,60 **** --- 57,80 ---- true if the administrator's browser windows should have a full set of toolbars; false if they should be omitted to save space."], + + [`SourceEditBoxWidth`, + posint," + The width of the source edit textfield in pixel."], + + [`SourceEditBoxHeight`, + posint," + The height of the source edit textfield in pixel."], + + [`ImageFormat`, + string," + The image format used for Maple plots. Can be either gif or jpg."], + + [`ImageWidth`, + posint," + The width of Maple plots in pixel."], + + [`ImageHeight`, + posint," + The height of Maple plots in pixel."], ['Locale', Index: ImageCache.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/ImageCache.mpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ImageCache.mpl 25 Aug 2003 21:47:18 -0000 1.3 --- ImageCache.mpl 25 Sep 2003 19:01:15 -0000 1.4 *************** *** 232,249 **** ['Method','NewImageURL'::string, "The argument @x@ is a maple data structure representing a plot. ! This method saves @x@ as a GIF file, records the name and creation time in the @Images@ field, and returns a string ! containing a URL that refers to the GIF file. ", proc(this,x::`ImageCache/Plot`) local c,file,url; c := this['NextCount']; ! file := sprintf("%s/%d.gif",this['Dir'],c); ! url := sprintf("%s/%d.gif",this['URLBase'],c); ! plotsetup( ! 'gif', ! plotoutput=file, ! plotoptions="transparent=true,height=400,width=400" ! ); print(x); plotsetup(default); --- 232,259 ---- ['Method','NewImageURL'::string, "The argument @x@ is a maple data structure representing a plot. ! This method saves @x@ as a GIF or JPG file, records the name and creation time in the @Images@ field, and returns a string ! containing a URL that refers to the GIF or JPG file. ", proc(this,x::`ImageCache/Plot`) local c,file,url; c := this['NextCount']; ! file := sprintf("%s/%d.%s",this['Dir'],c,Config['ImageFormat']); ! url := sprintf("%s/%d.%s",this['URLBase'],c,Config['ImageFormat']); ! if Config['ImageFormat'] = "jpg" then ! plotsetup( ! 'jpeg', ! plotoutput=file, ! plotoptions=sprintf("height=%d,width=%d", ! Config['ImageHeight'],Config['ImageWidth']) ! ); ! else ! plotsetup( ! 'gif', ! plotoutput=file, ! plotoptions=sprintf("transparent=true,height=%d,width=%d", ! Config['ImageHeight'],Config['ImageWidth']) ! ); ! end if; print(x); plotsetup(default); *************** *** 284,288 **** newlock[k] := oldlock[k]; else ! traperror(fremove(sprintf("%s/%d.gif",this['Dir'],k))); fi; od; --- 294,298 ---- newlock[k] := oldlock[k]; else ! traperror(fremove(sprintf("%s/%d.%s",this['Dir'],k,Config['ImageFormat']))); fi; od; *************** *** 300,304 **** local n; for n in this['Images'] do ! traperror(fremove(sprintf("%s/%d.gif",this['Dir'],n))); od; --- 310,314 ---- local n; for n in this['Images'] do ! traperror(fremove(sprintf("%s/%d.%s",this['Dir'],n,Config['ImageFormat']))); od; Index: ManualConfig.dist =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/ManualConfig.dist,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ManualConfig.dist 25 Aug 2003 21:47:18 -0000 1.2 --- ManualConfig.dist 25 Sep 2003 19:01:15 -0000 1.3 *************** *** 100,103 **** --- 100,119 ---- # toolbars; false if they should be omitted to save space. + ###################################################################### + # Config['SourceEditBoxWidth'] := 100: + # Config['SourceEditBoxHeight'] := 50: + # This determines the width of the textarea used for editing the + # question source files + + ###################################################################### + # Config['ImageFormat'] := "jpg": + # This determines the image format used for Maple plots. + # Possible options are gif and jpg + + ###################################################################### + # Config['ImageWidth'] := 480: + # Config['ImageHeight'] := 280: + # This determines the image format used for Maple plots. + # Possible options are gif and jpg ###################################################################### |
From: <gus...@us...> - 2003-09-25 19:01:25
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1:/tmp/cvs-serv30160/WEB-INF/maple/aim/admin Modified Files: SourceFile.mpl Log Message: Added additional configuration variables ImageFormat, ImageWidth, ImageHeight, SourceEditBoxWidth and SourceEditBoxHeight Index: SourceFile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/SourceFile.mpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SourceFile.mpl 30 Aug 2003 21:08:04 -0000 1.4 --- SourceFile.mpl 25 Sep 2003 19:01:15 -0000 1.5 *************** *** 105,109 **** [["textarea", "name" = "SourceText", ! "cols" = "70", "rows" = {"rows"} ], {"SourceText"}], --- 105,109 ---- [["textarea", "name" = "SourceText", ! "cols" = Config['SourceEditBoxWidth'], "rows" = {"rows"} ], {"SourceText"}], *************** *** 375,381 **** od; ! rows := 25; if not(`Util/WhiteSpace`(sourcetext)) then ! rows := min(max(5,`Util/CountLines`(sourcetext)),25); fi; --- 375,381 ---- od; ! rows := Config['SourceEditBoxHeight']; if not(`Util/WhiteSpace`(sourcetext)) then ! rows := min(max(5,`Util/CountLines`(sourcetext)),rows); fi; *************** *** 392,394 **** EndPackage(): - --- 392,393 ---- |
From: <gus...@us...> - 2003-09-25 19:01:25
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv30160/WEB-INF/maple/aim Modified Files: Util.mpl Log Message: Added additional configuration variables ImageFormat, ImageWidth, ImageHeight, SourceEditBoxWidth and SourceEditBoxHeight Index: Util.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Util.mpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Util.mpl 1 Sep 2003 05:55:59 -0000 1.5 --- Util.mpl 25 Sep 2003 19:01:15 -0000 1.6 *************** *** 177,182 **** eval(s), sprintf( ! "<center><img src=%a height='400' width='400'/></center><br/>\n", ! url)); else s := cat(eval(s),`aim/LaTeX/Display`(x)); --- 177,182 ---- eval(s), sprintf( ! "<center><img src=%a width=%a height=%a/></center><br/>\n", ! url,Config['ImageWidth'],Config['ImageHeight'])); else s := cat(eval(s),`aim/LaTeX/Display`(x)); |
From: <ma...@us...> - 2003-09-25 17:17:02
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv29846/mod/math_assignment Removed Files: depends.php Log Message: Not needed as the functionality has now been built into deleteserver.php --- depends.php DELETED --- |
From: <ma...@us...> - 2003-09-25 17:15:45
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv29576/mod/math_assignment Modified Files: index.php lib.php version.php view.php Added Files: email.php Log Message: Added email code including a new page and a cron job. --- NEW FILE: email.php --- <?PHP // $Id: email.php,v 1.1 2003/09/25 17:15:41 madalex Exp $ /// This page emails all the students their grades and sends a complete list to the secretaries /// It asks for confirmation from the user that the scripts have been made available require_once("../../config.php"); require_once("lib.php"); require_once("../../user/lib.php"); require_variable($id); // course module id if (! $site = get_site()) { redirect("$CFG->wwwroot/$CFG->admin/index.php"); } if (! $cm = get_record("course_modules", "id", $id)) { error("Course Module ID was incorrect"); } if (! $course = get_record("course", "id", $cm->course)) { error("Course is misconfigured"); } if (! $math_assignment = get_record("math_assignment", "id", $cm->instance)) { error("Course module is incorrect"); } require_login($course->id); add_to_log($course->id, "math_assignment", "email", "email.php?id=$math_assignment->id", ""); if (!isteacher($course->id)) { error(get_string("notteacher", "math_assignment")); } if (isset($go)) { if (strcasecmp($go, "yes") == 0) { $students = math_assignment_get_grades($math_assignment); if ($students) { foreach ($students as $student) { // send email to the student + add to main email } } // send email to secretaries redirect("view.php?id=$cm->id", get_string("emailssent", "math_assignment"), 1); } } /// Print the page header if ($course->category) { $navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->"; } else $navigation = ""; $strmath_assignments = get_string("modulenameplural", "math_assignment"); $strmath_assignment = get_string("modulename", "math_assignment"); $stremailstudents = get_string("emailstudents", "math_assignment"); print_header("$course->shortname: $math_assignment->name", "$course->fullname", "$navigation <a href=\"index.php?id=$course->id\">$strmath_assignments</a> -> <a href=\"view.php?id=$cm->id\">$math_assignment->name</a> -> $stremailstudents", "", "", true, update_module_button($cm->id, $course->id, $strmath_assignment), navmenu($course, $cm)); /// Print the main part of the page print_heading_with_help($stremailstudents, "emailstudents", "math_assignment"); notice_yesno(nl2br(get_string("emailnotice", "math_assignment")), "email.php?id=$cm->id&go=yes", "view.php?id=$cm->id"); ?> <?php print_footer($course); ?> Index: index.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 25 Sep 2003 15:32:55 -0000 1.6 --- index.php 25 Sep 2003 17:15:41 -0000 1.7 *************** *** 155,169 **** $grade->aimcomment = ""; } ! if ($grade->papergrade >= 0) $papergrade = "$grade->papergrade / $math_assignment->papergrade"; else $papergrade = ""; ! if ($grade->aimgrade >= 0) ! $aimgrade = "$grade->aimgrade / $math_assignment->aimgrade"; else $aimgrade = ""; $maxgrade = $math_assignment->papergrade + $math_assignment->aimgrade; ! if ($grade->aimoverride) ! $aimgrade .= " (" . get_string("gradeoverride", "math_assignment") . ")"; if ($course->format == "weeks" or $course->format == "topics") $row = array ($math_assignment->section, $link); --- 155,175 ---- $grade->aimcomment = ""; } ! if ($grade->papergrade >= 0 && $math_assignment->papergrade > 0) $papergrade = "$grade->papergrade / $math_assignment->papergrade"; else $papergrade = ""; ! if ($math_assignment->aimgrade > 0) { ! if ($grade->aimgrade >= 0) ! $aimgrade = "$grade->aimgrade / $math_assignment->aimgrade"; ! else ! $aimgrade = ""; ! if ($grade->aimoverride) ! $aimgrade .= " (" . get_string("gradeoverride", "math_assignment") . ")"; ! } else $aimgrade = ""; + $totalgrade = math_assignment_total_grade($math_assignment, $grade); $maxgrade = $math_assignment->papergrade + $math_assignment->aimgrade; ! $totalgrade = "$totalgrade / $maxgrade"; if ($course->format == "weeks" or $course->format == "topics") $row = array ($math_assignment->section, $link); *************** *** 178,182 **** else $solutions = ""; ! array_push($row, userdate($math_assignment->timedue, "", 99, false), $proburl ? "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>" : "", $solutions, $papergrade, $aimgrade); $table->data[] = $row; } --- 184,188 ---- else $solutions = ""; ! array_push($row, userdate($math_assignment->timedue, "", 99, false), $proburl ? "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>" : "", $solutions, $papergrade, $aimgrade, $totalgrade); $table->data[] = $row; } Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** lib.php 25 Sep 2003 15:32:55 -0000 1.20 --- lib.php 25 Sep 2003 17:15:41 -0000 1.21 *************** *** 175,178 **** --- 175,190 ---- global $CFG; + $math_assignments = get_records_sql("SELECT `id`,`course`,`name`,`papergrade`,`aimgrade`,`timedue` FROM `{$CFG->prefix}math_assignment` WHERE `papersheetsreturned` = '0' AND `timedue` < NOW() AND `papergrade` = '0'"); + if ($math_assignments) { + foreach ($math_assignments as $math_assignment) { + // build the email + $students = math_assignment_get_grades($math_assignment); + if ($students) { + foreach ($students as $student) { + } + // send it to the secretaries + } + } + } return true; } *************** *** 184,188 **** $math_assignment = get_record("math_assignment", "id", $math_assignmentid); $return->maxgrade = $math_assignment->papergrade+ $math_assignment->aimgrade; ! $return->grades = get_records_menu("math_assignment_grades", "assignment", $math_assignmentid, "", "userid,least(greatest(papergrade,0), $math_assignment->papergrade)+least(greatest(aimgrade,0), $math_assignment->aimgrade)"); return $return; } --- 196,202 ---- $math_assignment = get_record("math_assignment", "id", $math_assignmentid); $return->maxgrade = $math_assignment->papergrade+ $math_assignment->aimgrade; ! $return->grades = math_assignment_get_grades($math_assignment, "id", "asc"); ! if ($return->grades) ! array_walk($return->grades, create_function('&$val','$val = $val->totalgrade;')); return $return; } *************** *** 771,774 **** --- 785,846 ---- } } + } + + function math_assignment_get_grades($math_assignment, $sort="lastname", $sortdir="asc") { + // returns an array of grades indexed by userid for all students in the course + + global $CFG; + + switch(strtolower($CFG->dbtype)) { + case 'mysql': + if (strcasecmp($sort, "totalgrade") == 0) + $sortsql = "totalgrade $sortdir"; + else + $sortsql = "u.$sort $sortdir"; + $students = get_records_sql("SELECT s.userid, u.firstname, u.lastname, u.picture, g.papergrade, g.aimgrade, g.aimoverride, g.aimcomment, least(greatest(g.papergrade,0), $math_assignment->papergrade)+least(greatest(g.aimgrade,0), $math_assignment->aimgrade) AS totalgrade FROM {$CFG->prefix}user_students s LEFT JOIN {$CFG->prefix}user u ON s.course = '$math_assignment->course' AND u.id = s.userid LEFT JOIN {$CFG->prefix}math_assignment_grades g ON g.assignment = '$math_assignment->id' AND g.userid = s.userid WHERE u.deleted = '0' ORDER BY $sortsql"); + break; + default: + // emulate + $students = get_records_sql("SELECT userid,userid FROM {$CFG->prefix}user_students WHERE course = '$math_assignment->course'"); + if ($students) { + foreach ($students as $key => $student) { + if ($user = get_record_sql("SELECT firstname, lastname, picture FROM {$CFG->prefix}user WHERE id = '$key' AND deleted = '0'")) { + $students[$key]->firstname = $user->firstname; + $students[$key]->lastname = $user->lastname; + $students[$key]->picture = $user->picture; + $grade = get_record_sql("SELECT papergrade, aimgrade, aimoverride, aimcomment FROM {$CFG->prefix}math_assignment_grades WHERE assignment = '$math_assignment->id' and userid = '$key'"); + if ($grade) { + $students[$key]->papergrade = $grade->papergrade; + $students[$key]->aimgrade = $grade->aimgrade; + $students[$key]->aimoverride = $grade->aimoverride ; + $students[$key]->aimcomment = $grade->aimcomment; + $students[$key]->totalgrade = math_assignment_total_grade($math_assignment, $grade); + } + else { + $students[$key]->papergrade = -1; + $students[$key]->aimgrade = -1; + $students[$key]->aimoverride = 0 ; + $students[$key]->aimcomment = ""; + $students[$key]->totalgrade = 0; + } + } + else { + // assume it failed because deleted was not zero + unset($students[$key]); + } + } + // sort + if (strcasecmp($sortdir, "desc") == 0) + $mult = -1; + else + $mult = 1; + if (strcasecmp($sort, "id") == 0) + uksort($students, create_function('$a, $b', 'return (($a > $b) ? 1 : -1) * ' . $mult . ';')); + else + uasort($students, create_function('$a, $b', 'return (($a->' . $sort . ' > $b->' . $sort . ') ? 1 : -1) * ' . $mult . ';')); + } + break; + } + return $students; } Index: version.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/version.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** version.php 25 Sep 2003 15:02:23 -0000 1.9 --- version.php 25 Sep 2003 17:15:41 -0000 1.10 *************** *** 7,11 **** $module->version = 2003092516; // The (date) version of this module ! $module->cron = 0; // How often should cron check this module (seconds)? ?> --- 7,11 ---- $module->version = 2003092516; // The (date) version of this module ! $module->cron = 1200; // How often should cron check this module (seconds)? ?> Index: view.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/view.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** view.php 25 Sep 2003 15:02:24 -0000 1.15 --- view.php 25 Sep 2003 17:15:41 -0000 1.16 *************** *** 89,139 **** // Get a list of students for this course including grades ! switch(strtolower($CFG->dbtype)) { ! case 'mysql': ! if (strcasecmp($sort, "totalgrade") == 0) ! $sortsql = "totalgrade $sortdir"; ! else ! $sortsql = "u.$sort $sortdir"; ! $students = get_records_sql("SELECT s.userid, u.firstname, u.lastname, u.picture, g.papergrade, g.aimgrade, g.aimoverride, g.aimcomment, least(greatest(g.papergrade,0), $math_assignment->papergrade)+least(greatest(g.aimgrade,0), $math_assignment->aimgrade) AS totalgrade FROM {$CFG->prefix}user_students s LEFT JOIN {$CFG->prefix}user u ON s.course = '$course->id' AND u.id = s.userid LEFT JOIN {$CFG->prefix}math_assignment_grades g ON g.assignment = '$math_assignment->id' AND g.userid = s.userid WHERE u.deleted = '0' ORDER BY $sortsql"); ! break; ! default: ! // emulate ! $students = get_records_sql("SELECT userid,userid FROM {$CFG->prefix}user_students WHERE course = '$course->id'"); ! if ($students) { ! foreach ($students as $key => $student) { ! if ($user = get_record_sql("SELECT firstname, lastname, picture FROM {$CFG->prefix}user WHERE id = '$key' AND deleted = '0'")) { ! $students[$key]->firstname = $user->firstname; ! $students[$key]->lastname = $user->lastname; ! $students[$key]->picture = $user->picture; ! $grade = get_record_sql("SELECT papergrade, aimgrade, aimoverride, aimcomment FROM {$CFG->prefix}math_assignment_grades WHERE assignment = '$math_assignment->id' and userid = '$key'"); ! if ($grade) { ! $students[$key]->papergrade = $grade->papergrade; ! $students[$key]->aimgrade = $grade->aimgrade; ! $students[$key]->aimoverride = $grade->aimoverride ; ! $students[$key]->aimcomment = $grade->aimcomment; ! $students[$key]->totalgrade = math_assignment_total_grade($math_assignment, $grade); ! } ! else { ! $students[$key]->papergrade = -1; ! $students[$key]->aimgrade = -1; ! $students[$key]->aimoverride = 0 ; ! $students[$key]->aimcomment = ""; ! $students[$key]->totalgrade = 0; ! } ! } ! else { ! // assume it failed because deleted was not zero ! unset($students[$key]); ! } ! } ! // sort ! if (strcasecmp($sortdir, "desc") == 0) ! $mult = -1; ! else ! $mult = 1; ! uasort($students, create_function('$a, $b', 'return (($a->' . $sort . ' > $b->' . $sort . ') ? 1 : -1) * ' . $mult . ';')); ! } ! break; ! } if (!$students) { print_header("$course->shortname: $math_assignment->name", "$course->fullname", --- 89,93 ---- // Get a list of students for this course including grades ! $students = math_assignment_get_grades($math_assignment, $sort, $sortdir); if (!$students) { print_header("$course->shortname: $math_assignment->name", "$course->fullname", |
From: <ma...@us...> - 2003-09-25 17:15:45
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv29576/lang/en Modified Files: math_assignment.php Log Message: Added email code including a new page and a cron job. Index: math_assignment.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/math_assignment.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** math_assignment.php 25 Sep 2003 15:02:22 -0000 1.17 --- math_assignment.php 25 Sep 2003 17:15:41 -0000 1.18 *************** *** 36,39 **** --- 36,41 ---- $string['editquiz'] = "AiM Quiz Administration"; $string['editsubject'] = "AiM Subject Administration"; + $string['emailnotice'] = "Email students their marks and let them know that their scripts are ready for collection?\n** Put the scripts in the student pigeon holes first **"; + $string['emailssent'] = "Emails Sent"; $string['emailstudents'] = "Email Students"; $string['externalurl'] = "link to URL"; |
From: <ma...@us...> - 2003-09-25 15:32:59
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv32661/mod/math_assignment Modified Files: index.php lib.php Log Message: Fixed problems and solutions link display bug. Index: index.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 18 Sep 2003 23:57:57 -0000 1.5 --- index.php 25 Sep 2003 15:32:55 -0000 1.6 *************** *** 119,122 **** --- 119,124 ---- math_assignment_get_file_urls($math_assignment, $proburl, $solurl); + $proburl = htmlspecialchars($proburl); + $solurl = htmlspecialchars($solurl); if ($teacher) { if ($showaim && $math_assignment->aimquiz) { *************** *** 137,141 **** $row = array ($link); } ! array_push($row, userdate($math_assignment->timedue, "", 99, false), $math_assignment->problems ? "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>" : "", $math_assignment->solutions ? "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>" : ""); if ($showaim) { if ($math_assignment->aimquiz) --- 139,143 ---- $row = array ($link); } ! array_push($row, userdate($math_assignment->timedue, "", 99, false), $proburl ? "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>" : "", $solurl ? "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>" : ""); if ($showaim) { if ($math_assignment->aimquiz) *************** *** 168,172 **** else $row = array ($link); ! if ($math_assignment->solutions) { if ($timenow > $math_assignment->timedue) $solutions = "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>"; --- 170,174 ---- else $row = array ($link); ! if ($solurl) { if ($timenow > $math_assignment->timedue) $solutions = "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>"; *************** *** 176,180 **** else $solutions = ""; ! array_push($row, userdate($math_assignment->timedue, "", 99, false), $math_assignment->problems ? "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>" : "", $solutions, $papergrade, $aimgrade); $table->data[] = $row; } --- 178,182 ---- else $solutions = ""; ! array_push($row, userdate($math_assignment->timedue, "", 99, false), $proburl ? "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>" : "", $solutions, $papergrade, $aimgrade); $table->data[] = $row; } Index: lib.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** lib.php 24 Sep 2003 11:48:41 -0000 1.19 --- lib.php 25 Sep 2003 15:32:55 -0000 1.20 *************** *** 46,52 **** } ! $math_assignment->timemodified = time(); if (!math_assignment_setup_aim_quiz($math_assignment)) return false; return insert_record("math_assignment", $math_assignment); } --- 46,60 ---- } ! // check that the paper grade is valid ! if ($math_assignment->papergrade < 0) ! return false; ! // check we have some questions ! if (!$math_assignment->papergrade && !$math_assignment->aimquiz) ! return false; ! if (!math_assignment_setup_aim_quiz($math_assignment)) return false; + + $math_assignment->timemodified = time(); return insert_record("math_assignment", $math_assignment); } *************** *** 58,61 **** --- 66,71 ---- /// will update an existing instance with new data. + $math_assignment->id = $math_assignment->instance; + // due time $math_assignment->timedue = make_timestamp($math_assignment->dueyear, $math_assignment->duemonth,$math_assignment->dueday, $math_assignment->duehour, $math_assignment->dueminute); *************** *** 93,100 **** } ! $math_assignment->timemodified = time(); ! $math_assignment->id = $math_assignment->instance; if (!math_assignment_setup_aim_quiz($math_assignment)) return false; return update_record("math_assignment", $math_assignment); } --- 103,117 ---- } ! // check that the paper grade is valid ! if ($math_assignment->papergrade < 0) ! return false; ! // check we have some questions ! if (!$math_assignment->papergrade && !$math_assignment->aimquiz) ! return false; ! if (!math_assignment_setup_aim_quiz($math_assignment)) return false; + + $math_assignment->timemodified = time(); return update_record("math_assignment", $math_assignment); } *************** *** 255,259 **** $proburl = htmlspecialchars($proburl); $solurl = htmlspecialchars($solurl); ! if ($math_assignment->problems) { if (isset($return)) $return .= "<br />\n"; --- 272,276 ---- $proburl = htmlspecialchars($proburl); $solurl = htmlspecialchars($solurl); ! if ($proburl) { if (isset($return)) $return .= "<br />\n"; *************** *** 266,270 **** $return .= math_assignment_help_button("viewproblems", $strviewproblems, false); } ! if (($math_assignment->solutions) and ($math_assignment->timedue < time())) { if (isset($return)) $return .= "<br />\n"; --- 283,287 ---- $return .= math_assignment_help_button("viewproblems", $strviewproblems, false); } ! if (($solurl) and ($math_assignment->timedue < time())) { if (isset($return)) $return .= "<br />\n"; *************** *** 277,281 **** $return .= math_assignment_help_button("viewsolutions", $strviewsolutions, false); } ! else if(($math_assignment->solutions) && isteacher($math_assignment->course)) { if (isset($return)) $return .= "<br />\n"; --- 294,298 ---- $return .= math_assignment_help_button("viewsolutions", $strviewsolutions, false); } ! else if(($solurl) && isteacher($math_assignment->course)) { if (isset($return)) $return .= "<br />\n"; |
From: <ma...@us...> - 2003-09-25 15:02:35
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv24998/mod/math_assignment Modified Files: mod.html version.php view.php Log Message: Added 'email students' button to view.php for markers / lecturers to press once the scripts have been returned. Index: mod.html =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/mod.html,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mod.html 24 Sep 2003 13:22:22 -0000 1.20 --- mod.html 25 Sep 2003 15:02:23 -0000 1.21 *************** *** 26,29 **** --- 26,32 ---- $form->solutionscompile = true; } + if (!isset($form->papersheetsreturned)) { + $form->papersheetsreturned = 0; + } if (!isset($form->aimquiz)) { $form->aimquiz = ""; *************** *** 105,108 **** --- 108,112 ---- $upload_max_filesize = get_max_upload_file_size(); echo "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"$upload_max_filesize\" />"; + echo "<input type=\"hidden\" name=\"papersheetsreturned\" value=\"$form->papersheetsreturned\" />"; ?> <center> Index: version.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/version.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** version.php 24 Sep 2003 13:22:22 -0000 1.8 --- version.php 25 Sep 2003 15:02:23 -0000 1.9 *************** *** 6,10 **** ///////////////////////////////////////////////////////////////////////////////// ! $module->version = 2003092414; // The (date) version of this module $module->cron = 0; // How often should cron check this module (seconds)? --- 6,10 ---- ///////////////////////////////////////////////////////////////////////////////// ! $module->version = 2003092516; // The (date) version of this module $module->cron = 0; // How often should cron check this module (seconds)? Index: view.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/view.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** view.php 23 Sep 2003 22:49:41 -0000 1.14 --- view.php 25 Sep 2003 15:02:24 -0000 1.15 *************** *** 436,440 **** echo "</td><td>"; helpbutton ("editpapergrades", "$strpaper $strgrades", "math_assignment"); ! echo "</td></tr></table></form>"; } echo "<table border=\"0\" align=\"center\"><tr><td>"; --- 436,446 ---- echo "</td><td>"; helpbutton ("editpapergrades", "$strpaper $strgrades", "math_assignment"); ! echo "</td></tr></table></form>\n"; ! if (!$math_assignment->papersheetsreturned) { ! echo "<table border=\"0\" align=\"center\"><tr><td>"; ! $options = array("id"=>$cm->id); ! print_single_button("email.php", $options, get_string("emailstudents", "math_assignment")); ! echo "</td></tr></table>\n"; ! } } echo "<table border=\"0\" align=\"center\"><tr><td>"; |