aimmath-commit Mailing List for AiM Assessment in Mathematics (Page 13)
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: <ma...@us...> - 2003-09-16 17:05:41
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv11051/mod/math_assignment
Modified Files:
aimpage.php
Log Message:
Implemented links to change between html and xml + mathml
Index: aimpage.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/aimpage.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** aimpage.php 16 Sep 2003 11:44:44 -0000 1.5
--- aimpage.php 16 Sep 2003 17:05:37 -0000 1.6
***************
*** 14,23 ****
optional_variable($q); // quiz ID
optional_variable($aimaction); // action to get AiM to perform
- optional_variable($output, "html"); // output type (html, xml)
-
- if (strcasecmp($output, "xml") == 0)
- $usexml = function_exists('editer');
- else
- $usexml = false;
if (! $site = get_site()) {
--- 14,17 ----
***************
*** 108,112 ****
--- 102,127 ----
}
}
+ // special case for changing the output type
+ if (count($_POST) == 2) {
+ if (array_key_exists("outputchange", $_POST) && array_key_exists("postdata", $_POST)) {
+ if (strcmp($_POST['outputchange'], "html") == 0 || strcmp($_POST['outputchange'], "xml") == 0) {
+ // set the cookie
+ setcookie("output", $_POST['outputchange'], 0x7FFFFFFF);
+ $_COOKIE['output'] = $_POST['outputchange'];
+ $postdata = $_POST['postdata'];
+ }
+ }
+ }
+ }
+
+ // get output option from cookie
+ if (function_exists('editer')) {
+ if (array_key_exists("output", $_COOKIE))
+ $usexml = (strcasecmp($_COOKIE['output'], "xml") == 0);
+ else
+ $usexml = $CFG->math_assignment_default_latex_output ? true : false;
}
+ else
+ $usexml = false;
// Print the page header
***************
*** 162,165 ****
--- 177,201 ----
$data = math_assignment_get_aim_output($server->address, $postdata, $usexml ? "latex" : "html");
}
+ }
+
+ // print output problems box
+ if (function_exists('editer')) {
+ echo "<center>";
+ print_simple_box_start();
+ echo "<p align=\"center\">";
+ print_string("outputprobs", "math_assignment");
+ echo " ";
+ print_string($usexml ? "mathml" : "html", "math_assignment");
+ echo ".<br />\n";
+ echo "<form name=\"output_change\" action=\"aimpage.php?id=$cm->id\" method=\"post\">\n";
+ echo "<input type=\"hidden\" name=\"outputchange\" value=\"" . ($usexml ? "html" : "xml") . "\" />\n";
+ echo "<input type=\"hidden\" name=\"postdata\" value=\"" . htmlspecialchars($postdata) . "\" />\n";
+ echo "<a href=\"javascript:document.output_change.submit();\">";
+ print_string("outputchange", "math_assignment");
+ echo " ";
+ print_string($usexml ? "html" : "mathml", "math_assignment");
+ echo "</a>.\n</form></p>\n";
+ print_simple_box_end();
+ echo "</center>\n";
}
|
|
From: <ma...@us...> - 2003-09-16 17:05:40
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv11051/lang/en Modified Files: math_assignment.php Log Message: Implemented links to change between html and xml + mathml Index: math_assignment.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/math_assignment.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** math_assignment.php 16 Sep 2003 15:32:15 -0000 1.6 --- math_assignment.php 16 Sep 2003 17:05:37 -0000 1.7 *************** *** 49,52 **** --- 49,54 ---- $string['oldgrade'] = "Current Grade"; $string['or'] = "OR"; + $string['outputchange'] = "Click here to change to"; + $string['outputprobs'] = "Mathematics not displaying correctly? The page is currently being produced using"; $string['paper'] = "Paper"; $string['passwd'] = "Password"; *************** *** 54,58 **** $string['pdfok'] = "The pdf file has been successfully opened in another browser window."; $string['problems'] = "Problem sheet"; ! $string['mathml'] = "MathML"; $string['managesubjects'] = "Manage Subjects"; $string['mathassignmentsettings'] = "Math Assignment Configuration"; --- 56,60 ---- $string['pdfok'] = "The pdf file has been successfully opened in another browser window."; $string['problems'] = "Problem sheet"; ! $string['mathml'] = "XML with MathML"; $string['managesubjects'] = "Manage Subjects"; $string['mathassignmentsettings'] = "Math Assignment Configuration"; |
|
From: <gus...@us...> - 2003-09-16 16:58:33
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv9214/mod/math_assignment
Modified Files:
mod.html
Log Message:
again having to reinstate my old mods which Alex overwrote without comment :-(
Index: mod.html
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/mod.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** mod.html 16 Sep 2003 15:20:12 -0000 1.7
--- mod.html 16 Sep 2003 16:58:21 -0000 1.8
***************
*** 27,31 ****
}
if (!isset($form->aimsubject)) {
! $form->aimsubject = "";
}
if (!isset($form->aimquiz)) {
--- 27,31 ----
}
if (!isset($form->aimsubject)) {
! $form->aimsubject = 0;
}
if (!isset($form->aimquiz)) {
***************
*** 44,50 ****
if (!$form->name)
$form->name = get_string("modulename", "math_assignment");
! if (!$form->aimsubject) {
! $courses = get_courses();
! $form->aimsubject = $courses[$form->course]->shortname;
}
// Process problems and solutions
--- 44,53 ----
if (!$form->name)
$form->name = get_string("modulename", "math_assignment");
!
! if (!$form->aimsubject > 0) {
! // get aimsubject from database
! if (!$form->aimsubject = get_field("math_assignment_subject", "id", "course", $form->course)) {
! $form->aimsubject = 0;
! };
}
// Process problems and solutions
***************
*** 233,237 ****
</tr>
! <tr valign="top">
<td align="right"><p><b><?php echo "$straimsubject"; ?>:</b></p></td>
<td>
--- 236,243 ----
</tr>
! <?php
! if ($CFG->math_assignment_teachers_choose_subject) {
! ?>
! <tr valign="top">
<td align="right"><p><b><?php echo "$straimsubject"; ?>:</b></p></td>
<td>
***************
*** 261,272 ****
?>
</td>
! </tr>
! <tr valign="top">
<td align="right"><p><b><?php echo $straimquiz; ?>:</b></p></td>
<td>
<input type="text" name="aimquiz" size="40" maxlength="255" value="<?php p($form->aimquiz); ?>" /> <?php helpbutton("addupdate_quiz", $straimquiz, "math_assignment"); ?>
</td>
! </tr>
</table>
--- 267,287 ----
?>
</td>
! </tr>
! <?php
! }
! ?>
! <?php
! if (($CFG->math_assignment_teachers_choose_subject > 0) or ($form->aimsubject > 0)) {
! ?>
! <tr valign="top">
<td align="right"><p><b><?php echo $straimquiz; ?>:</b></p></td>
<td>
<input type="text" name="aimquiz" size="40" maxlength="255" value="<?php p($form->aimquiz); ?>" /> <?php helpbutton("addupdate_quiz", $straimquiz, "math_assignment"); ?>
</td>
! </tr>
! <?php
! }
! ?>
</table>
|
|
From: <ma...@us...> - 2003-09-16 15:43:08
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv23990/mod/math_assignment
Modified Files:
lib.php
Log Message:
Changed handling of problem and solution sheets.
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** lib.php 16 Sep 2003 15:26:30 -0000 1.11
--- lib.php 16 Sep 2003 15:43:03 -0000 1.12
***************
*** 22,27 ****
}
$math_assignment->problems = trim($math_assignment->problems);
! if (isset($math_assignment->problemscompile))
$math_assignment->problemscompile = ($math_assignment->problemscompile != "");
else
$math_assignment->problemscompile = false;
--- 22,30 ----
}
$math_assignment->problems = trim($math_assignment->problems);
! if (isset($math_assignment->problemscompile)) {
$math_assignment->problemscompile = ($math_assignment->problemscompile != "");
+ if (!math_assignment_is_tex_file($math_assignment->problems))
+ $math_assignment->problemscompile = false;
+ }
else
$math_assignment->problemscompile = false;
***************
*** 35,40 ****
}
$math_assignment->solutions = trim($math_assignment->solutions);
! if (isset($math_assignment->solutionscompile))
$math_assignment->solutionscompile = ($math_assignment->solutionscompile != "");
else
$math_assignment->solutionscompile = false;
--- 38,46 ----
}
$math_assignment->solutions = trim($math_assignment->solutions);
! if (isset($math_assignment->solutionscompile)) {
$math_assignment->solutionscompile = ($math_assignment->solutionscompile != "");
+ if (!math_assignment_is_tex_file($math_assignment->solutions))
+ $math_assignment->solutionscompile = false;
+ }
else
$math_assignment->solutionscompile = false;
***************
*** 63,68 ****
}
$math_assignment->problems = trim($math_assignment->problems);
! if (isset($math_assignment->problemscompile))
$math_assignment->problemscompile = ($math_assignment->problemscompile != "");
else
$math_assignment->problemscompile = false;
--- 69,77 ----
}
$math_assignment->problems = trim($math_assignment->problems);
! if (isset($math_assignment->problemscompile)) {
$math_assignment->problemscompile = ($math_assignment->problemscompile != "");
+ if (!math_assignment_is_tex_file($math_assignment->problems))
+ $math_assignment->problemscompile = false;
+ }
else
$math_assignment->problemscompile = false;
***************
*** 76,81 ****
}
$math_assignment->solutions = trim($math_assignment->solutions);
! if (isset($math_assignment->solutionscompile))
$math_assignment->solutionscompile = ($math_assignment->solutionscompile != "");
else
$math_assignment->solutionscompile = false;
--- 85,93 ----
}
$math_assignment->solutions = trim($math_assignment->solutions);
! if (isset($math_assignment->solutionscompile)) {
$math_assignment->solutionscompile = ($math_assignment->solutionscompile != "");
+ if (!math_assignment_is_tex_file($math_assignment->solutions))
+ $math_assignment->solutionscompile = false;
+ }
else
$math_assignment->solutionscompile = false;
***************
*** 176,179 ****
--- 188,201 ----
chmod("$basedir/$file_name", 0666);
return $file_name;
+ }
+
+ function math_assignment_is_tex_file($file) {
+ /// Function which determins if a file is a tex file based on the extension
+
+ if (strcasecmp(substr($file, -4), ".tex") == 0)
+ return true;
+ if (strcasecmp(substr($file, -6), ".latex") == 0)
+ return true;
+ return false;
}
|
|
From: <ma...@us...> - 2003-09-16 15:32:19
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv21645/lang/en Modified Files: math_assignment.php Log Message: Changed handling of problem and solution sheets. Index: math_assignment.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/math_assignment.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** math_assignment.php 16 Sep 2003 14:41:38 -0000 1.5 --- math_assignment.php 16 Sep 2003 15:32:15 -0000 1.6 *************** *** 24,27 **** --- 24,28 ---- $string['browsesource'] = "Browse AiM Source"; $string['choosesubject'] = "Teachers choose AiM subject"; + $string['compiletex'] = "Compile file (if any) as TeX source and add AiM questions (if any)"; $string['computer'] = "Computer"; $string['comment'] = "Comment"; *************** *** 33,37 **** $string['editquiz'] = "AiM Quiz Administration"; //"Edit Quiz"; $string['editsubject'] = "AiM Subject Administration"; //"Edit Subject"; ! $string['externalurl'] = "URL of external file -->"; $string['failed'] = "Error : Could not save the changes made."; $string['grademultiplier'] = "Grade Multiplier"; --- 34,38 ---- $string['editquiz'] = "AiM Quiz Administration"; //"Edit Quiz"; $string['editsubject'] = "AiM Subject Administration"; //"Edit Subject"; ! $string['externalurl'] = "link to URL"; $string['failed'] = "Error : Could not save the changes made."; $string['grademultiplier'] = "Grade Multiplier"; *************** *** 47,50 **** --- 48,52 ---- $string['loading'] = "Starting Download..."; $string['oldgrade'] = "Current Grade"; + $string['or'] = "OR"; $string['paper'] = "Paper"; $string['passwd'] = "Password"; *************** *** 83,87 **** $string['timedue'] = "Due Date and Time"; $string['tryquiz'] = "Try AiM Assignment"; ! $string['uploadnew'] = "Upload new file -->"; $string['viewproblems'] = "View Problems"; $string['viewquiz'] = "View AiM Assignment"; --- 85,90 ---- $string['timedue'] = "Due Date and Time"; $string['tryquiz'] = "Try AiM Assignment"; ! $string['uploadnew'] = "upload new file"; ! $string['useuploaded'] = "Choose uploaded file"; $string['viewproblems'] = "View Problems"; $string['viewquiz'] = "View AiM Assignment"; |
|
From: <ma...@us...> - 2003-09-16 15:26:33
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv20421/mod/math_assignment
Modified Files:
lib.php
Log Message:
Changed handling of problem and solution sheets.
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** lib.php 16 Sep 2003 13:23:10 -0000 1.10
--- lib.php 16 Sep 2003 15:26:30 -0000 1.11
***************
*** 15,36 ****
// problems
! if ($math_assignment->problemsurl <> "") {
! $math_assignment->problems = $math_assignment->problemsurl;
! }
! else if ($math_assignment->problemsfile <> "") {
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
// solutions
! if ($math_assignment->solutions == "|url|")
! $math_assignment->solutions = $math_assignment->solutionsurl;
! else if ($math_assignment->solutions == "|upload|") {
! if (empty($_FILES['solutionsfile']))
! $math_assignment->solutions = "";
! else
$math_assignment->solutions = math_assignment_save_upload($math_assignment->course, $_FILES['solutionsfile']);
}
$math_assignment->solutions = trim($math_assignment->solutions);
$math_assignment->timemodified = time();
--- 15,42 ----
// problems
! if ($math_assignment->problems === "") {
! if ($math_assignment->problemsurl)
! $math_assignment->problems = $math_assignment->problemsurl;
! 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 (isset($math_assignment->problemscompile))
+ $math_assignment->problemscompile = ($math_assignment->problemscompile != "");
+ else
+ $math_assignment->problemscompile = false;
// solutions
! if ($math_assignment->solutions === "") {
! if ($math_assignment->solutionsurl)
! $math_assignment->solutions = $math_assignment->solutionsurl;
! 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 (isset($math_assignment->solutionscompile))
+ $math_assignment->solutionscompile = ($math_assignment->solutionscompile != "");
+ else
+ $math_assignment->solutionscompile = false;
$math_assignment->timemodified = time();
***************
*** 50,73 ****
// problems
! if ($math_assignment->problems == "|url|")
! $math_assignment->problems = $math_assignment->problemsurl;
! else if ($math_assignment->problems == "|upload|") {
! if (empty($_FILES['problemsfile']))
! $math_assignment->problems = "";
! else
$math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
// solutions
! if ($math_assignment->solutions == "|url|")
! $math_assignment->solutions = $math_assignment->solutionsurl;
! else if ($math_assignment->solutions == "|upload|") {
! if (empty($_FILES['solutionsfile']))
! $math_assignment->solutions = "";
! else
$math_assignment->solutions = math_assignment_save_upload($math_assignment->course, $_FILES['solutionsfile']);
}
$math_assignment->solutions = trim($math_assignment->solutions);
$math_assignment->timemodified = time();
--- 56,83 ----
// problems
! if ($math_assignment->problems === "") {
! if ($math_assignment->problemsurl)
! $math_assignment->problems = $math_assignment->problemsurl;
! 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 (isset($math_assignment->problemscompile))
+ $math_assignment->problemscompile = ($math_assignment->problemscompile != "");
+ else
+ $math_assignment->problemscompile = false;
// solutions
! if ($math_assignment->solutions === "") {
! if ($math_assignment->solutionsurl)
! $math_assignment->solutions = $math_assignment->solutionsurl;
! 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 (isset($math_assignment->solutionscompile))
+ $math_assignment->solutionscompile = ($math_assignment->solutionscompile != "");
+ else
+ $math_assignment->solutionscompile = false;
$math_assignment->timemodified = time();
***************
*** 250,273 ****
global $CFG;
! if ($math_assignment->problems) {
! if(strcasecmp(substr($math_assignment->problems, -4), ".tex") == 0)
$proburl = "pdfgen.php?id=$math_assignment->id&type=problems";
- else if ($CFG->slasharguments)
- $proburl = "$CFG->wwwroot/file.php/$math_assignment->course/$math_assignment->problems";
else
! $proburl = "$CFG->wwwroot/file.php?file=/$math_assignment->course/$math_assignment->problems";
}
! else
! $proburl = "";
! if ($math_assignment->solutions) {
! if(strcasecmp(substr($math_assignment->solutions, -4), ".tex") == 0)
$solurl = "pdfgen.php?id=$math_assignment->id&type=solutions";
- else if ($CFG->slasharguments)
- $solurl = "$CFG->wwwroot/file.php/$math_assignment->course/$math_assignment->solutions";
else
! $solurl = "$CFG->wwwroot/file.php?file=/$math_assignment->course/$math_assignment->solutions";
}
- else
- $solurl = "";
}
--- 260,296 ----
global $CFG;
! if($math_assignment->problemscompile) {
! if ($math_assignment->problems || $math_assignment->aimquiz)
$proburl = "pdfgen.php?id=$math_assignment->id&type=problems";
else
! $proburl = "";
}
! else {
! if ($math_assignment->problems) {
! if ($CFG->slasharguments)
! $proburl = "$CFG->wwwroot/file.php/$math_assignment->course/$math_assignment->problems";
! else
! $proburl = "$CFG->wwwroot/file.php?file=/$math_assignment->course/$math_assignment->problems";
! }
! else
! $proburl = "";
! }
!
! if($math_assignment->solutionscompile) {
! if ($math_assignment->solutions || $math_assignment->aimquiz)
$solurl = "pdfgen.php?id=$math_assignment->id&type=solutions";
else
! $solurl = "";
! }
! else {
! if ($math_assignment->solutions) {
! if ($CFG->slasharguments)
! $solurl = "$CFG->wwwroot/file.php/$math_assignment->course/$math_assignment->solutions";
! else
! $solurl = "$CFG->wwwroot/file.php?file=/$math_assignment->course/$math_assignment->solutions";
! }
! else
! $solurl = "";
}
}
|
|
From: <ma...@us...> - 2003-09-16 15:21:52
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv19064/mod/math_assignment Modified Files: version.php Log Message: Changed handling of problem and solution sheets. Index: version.php =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/version.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** version.php 9 Sep 2003 18:31:07 -0000 1.1 --- version.php 16 Sep 2003 15:21:47 -0000 1.2 *************** *** 6,10 **** ///////////////////////////////////////////////////////////////////////////////// ! $module->version = 2003090900; // The (date) version of this module $module->cron = 0; // How often should cron check this module (seconds)? --- 6,10 ---- ///////////////////////////////////////////////////////////////////////////////// ! $module->version = 2003091616; // The (date) version of this module $module->cron = 0; // How often should cron check this module (seconds)? |
|
From: <ma...@us...> - 2003-09-16 15:20:18
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv18670/mod/math_assignment
Modified Files:
mod.html
Log Message:
Changed handling of problem and solution sheets.
Index: mod.html
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/mod.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mod.html 16 Sep 2003 14:57:55 -0000 1.6
--- mod.html 16 Sep 2003 15:20:12 -0000 1.7
***************
*** 11,15 ****
* We check that these are setup here.
*/
-
if (!isset($form->name)) {
$form->name = "";
--- 11,14 ----
***************
*** 18,26 ****
$form->problems = "";
}
if (!isset($form->solutions)) {
$form->solutions = "";
}
if (!isset($form->aimsubject)) {
! $form->aimsubject = 0;
}
if (!isset($form->aimquiz)) {
--- 17,31 ----
$form->problems = "";
}
+ if (!isset($form->problemscompile)) {
+ $form->problemscompile = true;
+ }
if (!isset($form->solutions)) {
$form->solutions = "";
}
+ if (!isset($form->solutionscompile)) {
+ $form->solutionscompile = true;
+ }
if (!isset($form->aimsubject)) {
! $form->aimsubject = "";
}
if (!isset($form->aimquiz)) {
***************
*** 39,50 ****
if (!$form->name)
$form->name = get_string("modulename", "math_assignment");
!
! if (!$form->aimsubject > 0) {
! // get aimsubject from database
! if (!$form->aimsubject = get_field("math_assignment_subject", "id", "course", $form->course)) {
! $form->aimsubject = 0;
! };
}
-
// Process problems and solutions
$form->problemsurl = "";
--- 44,51 ----
if (!$form->name)
$form->name = get_string("modulename", "math_assignment");
! if (!$form->aimsubject) {
! $courses = get_courses();
! $form->aimsubject = $courses[$form->course]->shortname;
}
// Process problems and solutions
$form->problemsurl = "";
***************
*** 52,56 ****
if (strcasecmp(substr($form->problems, 0, 5), "http:") == 0) {
$form->problemsurl = $form->problems;
! $form->problems = "|url|";
}
}
--- 53,57 ----
if (strcasecmp(substr($form->problems, 0, 5), "http:") == 0) {
$form->problemsurl = $form->problems;
! $form->problems = "";
}
}
***************
*** 59,63 ****
if (strcasecmp(substr($form->solutions, 0, 5), "http:") == 0) {
$form->solutionsurl = $form->solutions;
! $form->solutions = "|url|";
}
}
--- 60,64 ----
if (strcasecmp(substr($form->solutions, 0, 5), "http:") == 0) {
$form->solutionsurl = $form->solutions;
! $form->solutions = "";
}
}
***************
*** 65,73 ****
$strname = get_string("name");
$strtimedue = get_string("timedue", "math_assignment");
- $strnone = get_string("none");
- $strexternalurl = get_string("externalurl", "math_assignment");
- $struploadnew = get_string("uploadnew", "math_assignment");
$strproblems = get_string("problems", "math_assignment");
$strsolutions = get_string("solutions", "math_assignment");
$strmaxgrade = get_string("maxgrade", "math_assignment");
$straimsubject = get_string("aimsubject","math_assignment");
--- 66,77 ----
$strname = get_string("name");
$strtimedue = get_string("timedue", "math_assignment");
$strproblems = get_string("problems", "math_assignment");
$strsolutions = get_string("solutions", "math_assignment");
+ $strnone = get_string("none");
+ $struseuploaded = get_string("useuploaded", "math_assignment");
+ $stror = get_string("or", "math_assignment");
+ $struploadnew = get_string("uploadnew", "math_assignment");
+ $strexternalurl = get_string("externalurl", "math_assignment");
+ $strcompiletex = get_string("compiletex", "math_assignment");
$strmaxgrade = get_string("maxgrade", "math_assignment");
$straimsubject = get_string("aimsubject","math_assignment");
***************
*** 77,87 ****
<script language="JavaScript"><!-- //hide
! function enableeditbox(type)
{
list = eval("document.form." + type);
- url = eval("document.form." + type + "url");
file = eval("document.form." + type + "file");
! url.disabled = (list.value != "|url|");
! file.disabled = (list.value != "|upload|");
}
//end --></script>
--- 81,99 ----
<script language="JavaScript"><!-- //hide
! function sheet_change(type, changed)
{
list = eval("document.form." + type);
file = eval("document.form." + type + "file");
! url = eval("document.form." + type + "url");
! if (changed == "list" && list.value != "<?php echo $strnone; ?>") {
! url.value = "";
! }
! else if (changed == "file" && file.value != "") {
! list.value = "";
! url.value = "";
! }
! else if (changed == "url" && url.value != "") {
! list.value = "";
! }
}
//end --></script>
***************
*** 131,158 ****
<tr>
<td align="right">
! Choose uploaded file:
</td>
<td>
<?php choose_from_menu ($options, "problems", $form->problems,
! $strnone, "enableeditbox('problems');", ""); ?>
</td>
</tr>
<tr>
<td align="right">
! <b>OR</b> upload new file:
</td>
<td>
! <input type="file" name="problemsfile" size="30" value="" />
</td>
</tr>
<tr>
<td align="right">
! <b>OR</b> link to URL:
</td>
<td>
<input type="text" name="problemsurl" size="44" maxlength="255"
! value="<?php echo $form->problemsurl ?>">
</td>
</tr>
</table>
</td>
--- 143,174 ----
<tr>
<td align="right">
! <?php echo "$struseuploaded : "; ?>
</td>
<td>
<?php choose_from_menu ($options, "problems", $form->problems,
! $strnone, "sheet_change('problems', 'list');", ""); ?>
</td>
+ <td rowspan="4"><?php helpbutton("addupdate_problems", $strproblems, "math_assignment"); ?>
</tr>
<tr>
<td align="right">
! <?php echo "<b>$stror</b> $struploadnew : "; ?>
</td>
<td>
! <input type="file" name="problemsfile" size="30" value="" onchange="sheet_change('problems', 'file');" />
</td>
</tr>
<tr>
<td align="right">
! <?php echo "<b>$stror</b> $strexternalurl : "; ?>
</td>
<td>
<input type="text" name="problemsurl" size="44" maxlength="255"
! value="<?php echo $form->problemsurl ?>" onchange="sheet_change('problems', 'url');" />
</td>
</tr>
+ <tr>
+ <td colspan="2"><input type="checkbox" name="problemscompile"<?php if ($form->problemscompile) echo " checked=\"true\""; ?> /><?php echo "$strcompiletex"; ?></td>
+ </tr>
</table>
</td>
***************
*** 164,195 ****
</td>
<td>
! <?php
! $rootdir = $CFG->dataroot . "/" . $course->id;
! $coursedirs = get_directory_list($rootdir, $CFG->moddata);
! $options = array();
! $options["|url|"] = $strexternalurl;
! $options["|upload|"] = $struploadnew;
! foreach ($coursedirs as $dir) {
! $options["$dir"] = $dir;
! }
! echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" align=\"left\">\n";
! echo "<tr valign=\"middle\">\n";
! echo "<td align=\"left\" rowspan=\"2\">\n";
! choose_from_menu ($options, "solutions", $form->solutions, $strnone, "enableeditbox('solutions');", "");
! echo "</td>\n<td align=\"left\">";
! echo "<input type=\"text\" name=\"solutionsurl\" size=\"44\" maxlength=\"255\" value=\"$form->solutionsurl\"";
! if ($form->solutions == "|url|")
! echo " />";
! else
! echo " disabled=\"true\" />";
! echo "</td>\n<td align=\"left\" rowspan=\"2\">";
! helpbutton("addupdate_solutions", $strsolutions, "math_assignment");
! echo "</td>\n</tr>\n";
! echo "<tr valign=\"middle\">\n";
! echo "<td align=\"left\">";
! echo "<input type=\"file\" name=\"solutionsfile\" size=\"40\" value=\"\" disabled=\"true\" />";
! echo "</td>\n</tr>\n";
! echo "</table>\n";
! ?>
</td>
</tr>
--- 180,223 ----
</td>
<td>
! <?php
! $rootdir = $CFG->dataroot . "/" . $course->id;
! $coursedirs = get_directory_list($rootdir, $CFG->moddata);
! $options = array();
! foreach ($coursedirs as $dir) {
! $options["$dir"] = $dir;
! }
! ?>
! <table>
! <tr>
! <td align="right">
! <?php echo "$struseuploaded : "; ?>
! </td>
! <td>
! <?php choose_from_menu ($options, "solutions", $form->solutions,
! $strnone, "sheet_change('solutions', 'list');", ""); ?>
! </td>
! <td rowspan="4"><?php helpbutton("addupdate_solutions", $strsolutions, "math_assignment"); ?>
! </tr>
! <tr>
! <td align="right">
! <?php echo "<b>$stror</b> $struploadnew : "; ?>
! </td>
! <td>
! <input type="file" name="solutionsfile" size="30" value="" onchange="sheet_change('solutions', 'file');" />
! </td>
! </tr>
! <tr>
! <td align="right">
! <?php echo "<b>$stror</b> $strexternalurl : "; ?>
! </td>
! <td>
! <input type="text" name="solutionsurl" size="44" maxlength="255"
! value="<?php echo $form->solutionsurl ?>" onchange="sheet_change('problems', 'url');" />
! </td>
! </tr>
! <tr>
! <td colspan="2"><input type="checkbox" name="solutionscompile"<?php if ($form->solutionscompile) echo " checked=\"true\""; ?> /><?php echo "$strcompiletex"; ?></td>
! </tr>
! </table>
</td>
</tr>
***************
*** 205,256 ****
</tr>
! <?php
! if ($CFG->math_assignment_teachers_choose_subject) {
! ?>
! <tr valign="top">
! <td align="right"><p><b><?php echo "$straimsubject"; ?>:</b></p></td>
! <td>
! <select name="aimsubject">
! <?php math_assignment_list_all_subjects($form->aimsubject); ?>
! </select>
! <?php
! helpbutton ("addupdate_serversubject", $straimsubject, "math_assignment");
! if (isadmin()) {
! if (!empty($update)) {
! $newreturn = "update=$update";
! if (!empty($return)) {
! $newreturn .= "&return=$return";
! }
! }
! else if (isset($id) && isset($section) && isset($add)) {
! $newreturn = "id=$id§ion=$section&add=$add";
! }
! else {
! $newreturn = "";
! }
! if (!empty($newreturn)) {
! $newreturn = "?return=" . htmlspecialchars(urlencode($newreturn));
}
- echo "<a href=\"$CFG->wwwroot/mod/math_assignment/servers.php$newreturn\">" . get_string("aimserverconfig", "math_assignment") . "</a>";
}
! ?>
! </td>
! </tr>
! <?php
! }
! ?>
! <?php
! if (($CFG->math_assignment_teachers_choose_subject > 0) or ($form->aimsubject > 0)) {
! ?>
! <tr valign="top">
! <td align="right"><p><b><?php echo $straimquiz; ?>:</b></p></td>
! <td>
! <input type="text" name="aimquiz" size="40" maxlength="255" value="<?php p($form->aimquiz); ?>" /> <?php helpbutton("addupdate_quiz", $straimquiz, "math_assignment"); ?>
! </td>
! </tr>
! <?php
! }
! ?>
</table>
--- 233,272 ----
</tr>
! <tr valign="top">
! <td align="right"><p><b><?php echo "$straimsubject"; ?>:</b></p></td>
! <td>
! <select name="aimsubject">
! <?php math_assignment_list_all_subjects($form->aimsubject); ?>
! </select>
! <?php
! helpbutton ("addupdate_serversubject", $straimsubject, "math_assignment");
! if (isadmin()) {
! if (!empty($update)) {
! $newreturn = "update=$update";
! if (!empty($return)) {
! $newreturn .= "&return=$return";
}
}
! else if (isset($id) && isset($section) && isset($add)) {
! $newreturn = "id=$id§ion=$section&add=$add";
! }
! else {
! $newreturn = "";
! }
! if (!empty($newreturn)) {
! $newreturn = "?return=" . htmlspecialchars(urlencode($newreturn));
! }
! echo "<a href=\"$CFG->wwwroot/mod/math_assignment/servers.php$newreturn\">" . get_string("aimserverconfig", "math_assignment") . "</a>";
! }
! ?>
! </td>
! </tr>
! <tr valign="top">
! <td align="right"><p><b><?php echo $straimquiz; ?>:</b></p></td>
! <td>
! <input type="text" name="aimquiz" size="40" maxlength="255" value="<?php p($form->aimquiz); ?>" /> <?php helpbutton("addupdate_quiz", $straimquiz, "math_assignment"); ?>
! </td>
! </tr>
</table>
|
|
From: <ma...@us...> - 2003-09-16 15:20:18
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment/db
In directory sc8-pr-cvs1:/tmp/cvs-serv18670/mod/math_assignment/db
Modified Files:
mysql.php mysql.sql
Log Message:
Changed handling of problem and solution sheets.
Index: mysql.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/db/mysql.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mysql.php 16 Sep 2003 14:41:38 -0000 1.2
--- mysql.php 16 Sep 2003 15:20:11 -0000 1.3
***************
*** 6,12 ****
global $CFG;
if ($oldversion < 2003091500) {
table_column("math_assignment_subject", "", "course");
! return true;
}
--- 6,19 ----
global $CFG;
+
+ $return = true;
if ($oldversion < 2003091500) {
table_column("math_assignment_subject", "", "course");
! }
! if ($oldversion < 2003091616) {
! if (!execute_sql("ALTER TABLE `{$CFG->prefix}math_assignment` ADD `problemscompile` TINYINT(1) NOT NULL default '1' AFTER `problems`, ADD `solutionscompile` TINYINT(1) NOT NULL default '1' AFTER `solutions`"))
! $return = false;
! }
! return $return;
}
Index: mysql.sql
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/db/mysql.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mysql.sql 9 Sep 2003 18:31:07 -0000 1.1
--- mysql.sql 16 Sep 2003 15:20:12 -0000 1.2
***************
*** 10,14 ****
--- 10,16 ----
`name` varchar(255) NOT NULL default '',
`problems` varchar(255) NOT NULL default '',
+ `problemscompile` tinyint(1) NOT NULL default '1',
`solutions` varchar(255) NOT NULL default '',
+ `solutionscompile` tinyint(1) NOT NULL default '1',
`aimsubject` int(10) NOT NULL default '0',
`aimquiz` varchar(255) NOT NULL default '',
|
|
From: <gus...@us...> - 2003-09-16 14:57:59
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv14061/mod/math_assignment Modified Files: mod.html Log Message: removed a debugging echo Index: mod.html =================================================================== RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/mod.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mod.html 16 Sep 2003 14:41:38 -0000 1.5 --- mod.html 16 Sep 2003 14:57:55 -0000 1.6 *************** *** 47,52 **** } - echo "aimsubject: $form->aimsubject"; - // Process problems and solutions $form->problemsurl = ""; --- 47,50 ---- |
|
From: <gus...@us...> - 2003-09-16 14:41:42
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv10369/mod/math_assignment
Modified Files:
config.html mod.html subjects.php
Log Message:
The administrator is now asked to associate a Moodle course with each AiM subject. There is an extra option denying the teacher the right to choose other AiM subjects.
Index: config.html
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/config.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** config.html 9 Sep 2003 18:31:07 -0000 1.1
--- config.html 16 Sep 2003 14:41:38 -0000 1.2
***************
*** 42,45 ****
--- 42,56 ----
</tr>
<tr valign="top">
+ <td align="right"><p><b><?php echo "Teachers choose AiM subject" ?>:</b></p></td>
+ <td align="left"><?php
+ unset($options);
+ $options[0] = "false";
+ $options[1] = "true";
+
+ choose_from_menu ($options, "math_assignment_teachers_choose_subject", $CFG->math_assignment_teachers_choose_subject, "", "", "");
+ ?></td>
+ <td align="left"><?php helpbutton ("config_choosesubject", "Teachers choose AiM subject", "math_assignment"); ?></td>
+ </tr>
+ <tr valign="top">
<td align="right"><p><b><?php echo $strserverdisplay; ?>:</b></p></td>
<td align="left"><?php
Index: mod.html
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/mod.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mod.html 16 Sep 2003 10:06:23 -0000 1.4
--- mod.html 16 Sep 2003 14:41:38 -0000 1.5
***************
*** 11,14 ****
--- 11,15 ----
* We check that these are setup here.
*/
+
if (!isset($form->name)) {
$form->name = "";
***************
*** 21,25 ****
}
if (!isset($form->aimsubject)) {
! $form->aimsubject = "";
}
if (!isset($form->aimquiz)) {
--- 22,26 ----
}
if (!isset($form->aimsubject)) {
! $form->aimsubject = 0;
}
if (!isset($form->aimquiz)) {
***************
*** 38,45 ****
if (!$form->name)
$form->name = get_string("modulename", "math_assignment");
! if (!$form->aimsubject) {
! $courses = get_courses();
! $form->aimsubject = $courses[$form->course]->shortname;
}
// Process problems and solutions
$form->problemsurl = "";
--- 39,52 ----
if (!$form->name)
$form->name = get_string("modulename", "math_assignment");
!
! if (!$form->aimsubject > 0) {
! // get aimsubject from database
! if (!$form->aimsubject = get_field("math_assignment_subject", "id", "course", $form->course)) {
! $form->aimsubject = 0;
! };
}
+
+ echo "aimsubject: $form->aimsubject";
+
// Process problems and solutions
$form->problemsurl = "";
***************
*** 200,239 ****
</tr>
! <tr valign="top">
! <td align="right"><p><b><?php echo "$straimsubject"; ?>:</b></p></td>
! <td>
! <select name="aimsubject">
! <?php math_assignment_list_all_subjects($form->aimsubject); ?>
! </select>
! <?php
! helpbutton ("addupdate_serversubject", $straimsubject, "math_assignment");
! if (isadmin()) {
! if (!empty($update)) {
! $newreturn = "update=$update";
! if (!empty($return)) {
! $newreturn .= "&return=$return";
}
}
! else if (isset($id) && isset($section) && isset($add)) {
! $newreturn = "id=$id§ion=$section&add=$add";
! }
! else {
! $newreturn = "";
! }
! if (!empty($newreturn)) {
! $newreturn = "?return=" . htmlspecialchars(urlencode($newreturn));
! }
! echo "<a href=\"$CFG->wwwroot/mod/math_assignment/servers.php$newreturn\">" . get_string("aimserverconfig", "math_assignment") . "</a>";
! }
! ?>
! </td>
! </tr>
! <tr valign="top">
! <td align="right"><p><b><?php echo $straimquiz; ?>:</b></p></td>
! <td>
! <input type="text" name="aimquiz" size="40" maxlength="255" value="<?php p($form->aimquiz); ?>" /> <?php helpbutton("addupdate_quiz", $straimquiz, "math_assignment"); ?>
! </td>
! </tr>
</table>
--- 207,258 ----
</tr>
! <?php
! if ($CFG->math_assignment_teachers_choose_subject) {
! ?>
! <tr valign="top">
! <td align="right"><p><b><?php echo "$straimsubject"; ?>:</b></p></td>
! <td>
! <select name="aimsubject">
! <?php math_assignment_list_all_subjects($form->aimsubject); ?>
! </select>
! <?php
! helpbutton ("addupdate_serversubject", $straimsubject, "math_assignment");
! if (isadmin()) {
! if (!empty($update)) {
! $newreturn = "update=$update";
! if (!empty($return)) {
! $newreturn .= "&return=$return";
! }
}
+ else if (isset($id) && isset($section) && isset($add)) {
+ $newreturn = "id=$id§ion=$section&add=$add";
+ }
+ else {
+ $newreturn = "";
+ }
+ if (!empty($newreturn)) {
+ $newreturn = "?return=" . htmlspecialchars(urlencode($newreturn));
+ }
+ echo "<a href=\"$CFG->wwwroot/mod/math_assignment/servers.php$newreturn\">" . get_string("aimserverconfig", "math_assignment") . "</a>";
}
! ?>
! </td>
! </tr>
! <?php
! }
! ?>
! <?php
! if (($CFG->math_assignment_teachers_choose_subject > 0) or ($form->aimsubject > 0)) {
! ?>
! <tr valign="top">
! <td align="right"><p><b><?php echo $straimquiz; ?>:</b></p></td>
! <td>
! <input type="text" name="aimquiz" size="40" maxlength="255" value="<?php p($form->aimquiz); ?>" /> <?php helpbutton("addupdate_quiz", $straimquiz, "math_assignment"); ?>
! </td>
! </tr>
! <?php
! }
! ?>
</table>
Index: subjects.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/subjects.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** subjects.php 9 Sep 2003 18:31:07 -0000 1.1
--- subjects.php 16 Sep 2003 14:41:38 -0000 1.2
***************
*** 10,13 ****
--- 10,14 ----
optional_variable($name); // new name for the subject
optional_variable($passwd); // password
+ optional_variable($course); // course that this subject is assigned to
optional_variable($delete); // delete button
optional_variable($return); // return options (passed to mod.php to go back to add / update page)
***************
*** 66,69 ****
--- 67,71 ----
$entry->server = $server->id;
$entry->password = $passwd;
+ $entry->course = $course;
if (!update_record("math_assignment_subject", $entry)) {
error(get_string("failed", "math_assignment"), "subjects.php?server=$servername");
***************
*** 74,77 ****
--- 76,80 ----
$entry->server = $server->id;
$entry->password = $passwd;
+ $entry->course = $course;
if (!insert_record("math_assignment_subject", $entry)) {
error(get_string("failed", "math_assignment"), "subjects.php?server=$servername");
***************
*** 98,101 ****
--- 101,105 ----
$strsubject = get_string("subject","math_assignment");
$strpasswd = get_string("passwd","math_assignment");
+ $strsubjectcourse = get_string("subjectcourse","math_assignment");
?>
***************
*** 150,153 ****
--- 154,164 ----
<td>
<input type="text" name="passwd" size="40" maxlength="255" /> <?php helpbutton ("subject_passwd", $strpasswd, "math_assignment"); ?>
+ </td>
+ </tr>
+
+ <tr valign="top">
+ <td align="right"><p><b><?php echo $strsubjectcourse; ?>:</b></p></td>
+ <td>
+ <input type="text" name="course" size="40" maxlength="255" /> <?php helpbutton ("subject_course", $strsubjectcourse, "math_assignment"); ?>
</td>
</tr>
|
|
From: <gus...@us...> - 2003-09-16 14:41:42
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment/db
In directory sc8-pr-cvs1:/tmp/cvs-serv10369/mod/math_assignment/db
Modified Files:
mysql.php
Log Message:
The administrator is now asked to associate a Moodle course with each AiM subject. There is an extra option denying the teacher the right to choose other AiM subjects.
Index: mysql.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/db/mysql.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mysql.php 9 Sep 2003 18:31:07 -0000 1.1
--- mysql.php 16 Sep 2003 14:41:38 -0000 1.2
***************
*** 6,10 ****
global $CFG;
!
return true;
}
--- 6,11 ----
global $CFG;
! if ($oldversion < 2003091500) {
! table_column("math_assignment_subject", "", "course");
return true;
}
|
|
From: <gus...@us...> - 2003-09-16 14:41:42
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv10369/lang/en Modified Files: math_assignment.php Log Message: The administrator is now asked to associate a Moodle course with each AiM subject. There is an extra option denying the teacher the right to choose other AiM subjects. Index: math_assignment.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/math_assignment.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** math_assignment.php 16 Sep 2003 10:06:23 -0000 1.4 --- math_assignment.php 16 Sep 2003 14:41:38 -0000 1.5 *************** *** 23,26 **** --- 23,27 ---- $string['autoregister'] = "Auto-register Students with AiM"; $string['browsesource'] = "Browse AiM Source"; + $string['choosesubject'] = "Teachers choose AiM subject"; $string['computer'] = "Computer"; $string['comment'] = "Comment"; |
|
From: <gus...@us...> - 2003-09-16 13:23:13
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv26050/mod/math_assignment
Modified Files:
lib.php
Log Message:
merged Alex's change with my earlier changes. Alex, please be careful to merge before committing.
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** lib.php 16 Sep 2003 11:44:44 -0000 1.9
--- lib.php 16 Sep 2003 13:23:10 -0000 1.10
***************
*** 15,25 ****
// problems
! if ($math_assignment->problems == "|url|")
$math_assignment->problems = $math_assignment->problemsurl;
! else if ($math_assignment->problems == "|upload|") {
! if (empty($_FILES['problemsfile']))
! $math_assignment->problems = "";
! else
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
--- 15,23 ----
// problems
! if ($math_assignment->problemsurl <> "") {
$math_assignment->problems = $math_assignment->problemsurl;
! }
! else if ($math_assignment->problemsfile <> "") {
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
***************
*** 347,354 ****
$return .= "<br />\n";
// Browse Source
! $strbrowsesource = get_string("browsesource", "math_assignment");
! $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=source\">$strbrowsesource</a>";
! $return .= math_assignment_help_button("admin_sourcedir", $strbrowsesource, false);
! $return .= "<br />\n";
// Edit Subject
$streditsubject = get_string("editsubject", "math_assignment");
--- 345,352 ----
$return .= "<br />\n";
// Browse Source
! //$strbrowsesource = get_string("browsesource", "math_assignment");
! //$return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=source\">$strbrowsesource</a>";
! //$return .= math_assignment_help_button("admin_sourcedir", $strbrowsesource, false);
! //$return .= "<br />\n";
// Edit Subject
$streditsubject = get_string("editsubject", "math_assignment");
|
|
From: <ma...@us...> - 2003-09-16 11:44:50
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv2609/mod/math_assignment
Modified Files:
aimpage.php lib.php
Log Message:
Fixed multipart questions.
Index: aimpage.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/aimpage.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** aimpage.php 11 Sep 2003 21:15:32 -0000 1.4
--- aimpage.php 16 Sep 2003 11:44:44 -0000 1.5
***************
*** 105,109 ****
foreach ($_POST as $key => $arg) {
if (strcasecmp($key, "target")) { // ignore target arguments
! $postdata = math_assignment_add_arg_to_url_data($postdata, $key, stripslashes($arg));
}
}
--- 105,109 ----
foreach ($_POST as $key => $arg) {
if (strcasecmp($key, "target")) { // ignore target arguments
! $postdata = math_assignment_add_arg_to_url_data($postdata, math_assignment_convert_arg_name($key), stripslashes($arg));
}
}
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** lib.php 16 Sep 2003 10:06:23 -0000 1.8
--- lib.php 16 Sep 2003 11:44:44 -0000 1.9
***************
*** 15,23 ****
// problems
! if ($math_assignment->problemsurl <> "") {
$math_assignment->problems = $math_assignment->problemsurl;
! }
! else if ($math_assignment->problemsfile <> "") {
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
--- 15,25 ----
// problems
! if ($math_assignment->problems == "|url|")
$math_assignment->problems = $math_assignment->problemsurl;
! else if ($math_assignment->problems == "|upload|") {
! if (empty($_FILES['problemsfile']))
! $math_assignment->problems = "";
! else
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
***************
*** 345,352 ****
$return .= "<br />\n";
// Browse Source
! //$strbrowsesource = get_string("browsesource", "math_assignment");
! //$return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=source\">$strbrowsesource</a>";
! //$return .= math_assignment_help_button("admin_sourcedir", $strbrowsesource, false);
! //$return .= "<br />\n";
// Edit Subject
$streditsubject = get_string("editsubject", "math_assignment");
--- 347,354 ----
$return .= "<br />\n";
// Browse Source
! $strbrowsesource = get_string("browsesource", "math_assignment");
! $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=source\">$strbrowsesource</a>";
! $return .= math_assignment_help_button("admin_sourcedir", $strbrowsesource, false);
! $return .= "<br />\n";
// Edit Subject
$streditsubject = get_string("editsubject", "math_assignment");
***************
*** 359,362 ****
--- 361,371 ----
$return .= "</p>\n";
return $return;
+ }
+
+ function math_assignment_convert_arg_name($name) {
+ /// Function to demangle names which php has mangled before passing them to AiM
+
+ $name = preg_replace("/RawAnswer([0-9]*)_([0-9]+)/i", "RawAnswer\\1.\\2", $name);
+ return $name;
}
|
|
From: <gus...@us...> - 2003-09-16 10:06:26
|
Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv15818/lang/en Modified Files: math_assignment.php Log Message: Redesigned posting of problem sheets Index: math_assignment.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en/math_assignment.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** math_assignment.php 14 Sep 2003 14:11:14 -0000 1.3 --- math_assignment.php 16 Sep 2003 10:06:23 -0000 1.4 *************** *** 50,54 **** $string['pdferror'] = "There has been a problem while trying to create the pdf file."; $string['pdfok'] = "The pdf file has been successfully opened in another browser window."; ! $string['problems'] = "Problems"; $string['mathml'] = "MathML"; $string['managesubjects'] = "Manage Subjects"; --- 50,54 ---- $string['pdferror'] = "There has been a problem while trying to create the pdf file."; $string['pdfok'] = "The pdf file has been successfully opened in another browser window."; ! $string['problems'] = "Problem sheet"; $string['mathml'] = "MathML"; $string['managesubjects'] = "Manage Subjects"; *************** *** 73,77 **** $string['serverdisplay'] = "Server Display"; $string['serverinuse'] = "Error : Can not delete server as one or more Assignments depend on it."; ! $string['solutions'] = "Solutions"; $string['student_password'] = "Student AiM Password"; $string['studentnotattempted'] = "The student has not attempted this assignment."; --- 73,77 ---- $string['serverdisplay'] = "Server Display"; $string['serverinuse'] = "Error : Can not delete server as one or more Assignments depend on it."; ! $string['solutions'] = "Solution sheet"; $string['student_password'] = "Student AiM Password"; $string['studentnotattempted'] = "The student has not attempted this assignment."; |
|
From: <gus...@us...> - 2003-09-16 10:06:26
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv15818/mod/math_assignment
Modified Files:
lib.php mod.html
Log Message:
Redesigned posting of problem sheets
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** lib.php 16 Sep 2003 09:16:30 -0000 1.7
--- lib.php 16 Sep 2003 10:06:23 -0000 1.8
***************
*** 15,25 ****
// problems
! if ($math_assignment->problems == "|url|")
$math_assignment->problems = $math_assignment->problemsurl;
! else if ($math_assignment->problems == "|upload|") {
! if (empty($_FILES['problemsfile']))
! $math_assignment->problems = "";
! else
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
--- 15,23 ----
// problems
! if ($math_assignment->problemsurl <> "") {
$math_assignment->problems = $math_assignment->problemsurl;
! }
! else if ($math_assignment->problemsfile <> "") {
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
Index: mod.html
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/mod.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mod.html 14 Sep 2003 14:11:14 -0000 1.3
--- mod.html 16 Sep 2003 10:06:23 -0000 1.4
***************
*** 115,146 ****
</td>
<td>
! <?php
! $rootdir = $CFG->dataroot . "/" . $course->id;
! $coursedirs = get_directory_list($rootdir, $CFG->moddata);
! $options = array();
! $options["|url|"] = $strexternalurl;
! $options["|upload|"] = $struploadnew;
! foreach ($coursedirs as $dir) {
! $options["$dir"] = $dir;
! }
! echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" align=\"left\">\n";
! echo "<tr valign=\"middle\">\n";
! echo "<td align=\"left\" rowspan=\"2\">\n";
! choose_from_menu ($options, "problems", $form->problems, $strnone, "enableeditbox('problems');", "");
! echo "</td>\n<td align=\"left\">";
! echo "<input type=\"text\" name=\"problemsurl\" size=\"44\" maxlength=\"255\" value=\"$form->problemsurl\"";
! if ($form->problems == "|url|")
! echo " />";
! else
! echo " disabled=\"true\" />";
! echo "</td>\n<td align=\"left\" rowspan=\"2\">";
! helpbutton("addupdate_problems", $strproblems, "math_assignment");
! echo "</td>\n</tr>\n";
! echo "<tr valign=\"middle\">\n";
! echo "<td align=\"left\">";
! echo "<input type=\"file\" name=\"problemsfile\" size=\"40\" value=\"\" disabled=\"true\" />";
! echo "</td>\n</tr>\n";
! echo "</table>\n";
! ?>
</td>
</tr>
--- 115,154 ----
</td>
<td>
! <?php
! $rootdir = $CFG->dataroot . "/" . $course->id;
! $coursedirs = get_directory_list($rootdir, $CFG->moddata);
! $options = array();
! foreach ($coursedirs as $dir) {
! $options["$dir"] = $dir;
! }
! ?>
! <table>
! <tr>
! <td align="right">
! Choose uploaded file:
! </td>
! <td>
! <?php choose_from_menu ($options, "problems", $form->problems,
! $strnone, "enableeditbox('problems');", ""); ?>
! </td>
! </tr>
! <tr>
! <td align="right">
! <b>OR</b> upload new file:
! </td>
! <td>
! <input type="file" name="problemsfile" size="30" value="" />
! </td>
! </tr>
! <tr>
! <td align="right">
! <b>OR</b> link to URL:
! </td>
! <td>
! <input type="text" name="problemsurl" size="44" maxlength="255"
! value="<?php echo $form->problemsurl ?>">
! </td>
! </tr>
! </table>
</td>
</tr>
|
|
From: <gus...@us...> - 2003-09-16 09:16:40
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv6362/mod/math_assignment
Modified Files:
lib.php
Log Message:
Taken out "Browse Source" link from admin menu
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** lib.php 16 Sep 2003 00:02:18 -0000 1.6
--- lib.php 16 Sep 2003 09:16:30 -0000 1.7
***************
*** 347,354 ****
$return .= "<br />\n";
// Browse Source
! $strbrowsesource = get_string("browsesource", "math_assignment");
! $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=source\">$strbrowsesource</a>";
! $return .= math_assignment_help_button("admin_sourcedir", $strbrowsesource, false);
! $return .= "<br />\n";
// Edit Subject
$streditsubject = get_string("editsubject", "math_assignment");
--- 347,354 ----
$return .= "<br />\n";
// Browse Source
! //$strbrowsesource = get_string("browsesource", "math_assignment");
! //$return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=source\">$strbrowsesource</a>";
! //$return .= math_assignment_help_button("admin_sourcedir", $strbrowsesource, false);
! //$return .= "<br />\n";
// Edit Subject
$streditsubject = get_string("editsubject", "math_assignment");
|
|
From: <ma...@us...> - 2003-09-16 00:02:28
|
Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv9452/mod/math_assignment
Modified Files:
lib.php
Log Message:
Fixed file upload bug.
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** lib.php 14 Sep 2003 14:11:14 -0000 1.5
--- lib.php 16 Sep 2003 00:02:18 -0000 1.6
***************
*** 21,25 ****
$math_assignment->problems = "";
else
! $math_assignment->problems = math_assignment_save_upload($_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
--- 21,25 ----
$math_assignment->problems = "";
else
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
***************
*** 32,36 ****
$math_assignment->solutions = "";
else
! $math_assignment->solutions = math_assignment_save_upload($_FILES['solutionsfile']);
}
$math_assignment->solutions = trim($math_assignment->solutions);
--- 32,36 ----
$math_assignment->solutions = "";
else
! $math_assignment->solutions = math_assignment_save_upload($math_assignment->course, $_FILES['solutionsfile']);
}
$math_assignment->solutions = trim($math_assignment->solutions);
***************
*** 58,62 ****
$math_assignment->problems = "";
else
! $math_assignment->problems = math_assignment_save_upload($_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
--- 58,62 ----
$math_assignment->problems = "";
else
! $math_assignment->problems = math_assignment_save_upload($math_assignment->course, $_FILES['problemsfile']);
}
$math_assignment->problems = trim($math_assignment->problems);
***************
*** 69,73 ****
$math_assignment->solutions = "";
else
! $math_assignment->solutions = math_assignment_save_upload($_FILES['solutionsfile']);
}
$math_assignment->solutions = trim($math_assignment->solutions);
--- 69,73 ----
$math_assignment->solutions = "";
else
! $math_assignment->solutions = math_assignment_save_upload($math_assignment->course, $_FILES['solutionsfile']);
}
$math_assignment->solutions = trim($math_assignment->solutions);
***************
*** 155,161 ****
/// starts with math_assignment_
! function math_assignment_save_upload($file) {
/// Function which saves an uploaded file (used when adding / updating an instance)
! if (!$basedir = make_upload_directory("$course->id"))
return "";
if (!is_uploaded_file($file['tmp_name']) || $file['size'] == 0)
--- 155,161 ----
/// starts with math_assignment_
! function math_assignment_save_upload($courseid, $file) {
/// Function which saves an uploaded file (used when adding / updating an instance)
! if (!$basedir = make_upload_directory("$courseid"))
return "";
if (!is_uploaded_file($file['tmp_name']) || $file['size'] == 0)
***************
*** 466,470 ****
// get max grade for the aim quiz
$max_grade = math_assignment_get_aim_max_grade($math_assignment, $subject, $server);
! if ($max_grade <= 0)
return false;
$math_assignment->aimgrade = $max_grade;
--- 466,470 ----
// get max grade for the aim quiz
$max_grade = math_assignment_get_aim_max_grade($math_assignment, $subject, $server);
! if (!$max_grade) // note that this includes the case where $max_grade is zero
return false;
$math_assignment->aimgrade = $max_grade;
***************
*** 484,488 ****
$postdata = math_assignment_add_arg_to_url_data($postdata, "DueDateYear", $date['year']);
// load the AiM page and grab the result
! $data = math_assignment_get_aim_output($server->address, $postdata);
// did it work?
return preg_match("/<title>Quiz:[^<>]*?<\/title>/i", $data) ? true : false;
--- 484,489 ----
$postdata = math_assignment_add_arg_to_url_data($postdata, "DueDateYear", $date['year']);
// load the AiM page and grab the result
! if (!$data = math_assignment_get_aim_output($server->address, $postdata))
! return false;
// did it work?
return preg_match("/<title>Quiz:[^<>]*?<\/title>/i", $data) ? true : false;
***************
*** 514,517 ****
--- 515,520 ----
if (!math_assignment_convert_aim_output($math_assignment, $subject, $data, "", "", false, $grade, $max_grade))
return false;
+ if ($max_grade < 0)
+ return false; // no grades table on page (or something is VERY wrong with AiM!)
return $max_grade;
}
|
|
From: <bre...@us...> - 2003-09-15 23:31:58
|
Update of /cvsroot/aimmath/AIM/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv3948
Modified Files:
installosx.html
Log Message:
Minor changes to instructions.
Index: installosx.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installosx.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** installosx.html 15 Sep 2003 04:58:13 -0000 1.4
--- installosx.html 15 Sep 2003 23:31:55 -0000 1.5
***************
*** 310,316 ****
entering
<blockquote>
! <code>/usr/local/tomcat/bin/startup.sh</code>
</blockquote> in the
! Terminal.<p/>
</li>
<li>Point your Web browser at the URL of the AiM server. This will be something
--- 310,320 ----
entering
<blockquote>
! <code>sudo /usr/local/tomcat/bin/startup.sh</code>
</blockquote> in the
! Terminal and
! <blockquote>
! <code>sudo /usr/local/tomcat/bin/shutdown.sh</code>
! </blockquote>
! to shutdown the Tomcat server.<p/>
</li>
<li>Point your Web browser at the URL of the AiM server. This will be something
|
|
From: <bre...@us...> - 2003-09-15 23:23:53
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple
In directory sc8-pr-cvs1:/tmp/cvs-serv2292
Modified Files:
AutoConf.mpl
Log Message:
Updated default location of Maple binary for OS X.
Index: AutoConf.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AutoConf.mpl 13 Sep 2003 21:05:28 -0000 1.5
--- AutoConf.mpl 15 Sep 2003 23:23:41 -0000 1.6
***************
*** 471,475 ****
"Conf" = 'MapleProgram',
"Def" = "/bin/maple",
! "Def" = "/Applications/\"Maple\ 9.app\"/Contents/MacOS/bin/maple",
"Def" = "/usr/bin/maple",
"Def" = "/usr/local/bin/maple",
--- 471,475 ----
"Conf" = 'MapleProgram',
"Def" = "/bin/maple",
! "Def" = "/Applications/Maple 9.app/Contents/MacOS/bin/maple",
"Def" = "/usr/bin/maple",
"Def" = "/usr/local/bin/maple",
|
|
From: <gr...@us...> - 2003-09-15 16:35:11
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim
In directory sc8-pr-cvs1:/tmp/cvs-serv31904
Modified Files:
LaTeX.mpl
Log Message:
Made changes to restore behaviour of earlier behaviour of AiM w.r.t.
symbols of form `-1` ... i.e. we avoid encapsulation by \mbox{{\tt ...}}
We leave the behaviour as Maple 7+ has it if there are special symbols
- not sure if we want this or not ... easy now to change it if we don't. GG
Index: LaTeX.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/LaTeX.mpl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** LaTeX.mpl 15 Sep 2003 15:57:26 -0000 1.10
--- LaTeX.mpl 15 Sep 2003 16:17:56 -0000 1.11
***************
*** 74,86 ****
`Package/Assign`(
`latex/latex/symbol`,
! "This is the Maple 7 version of this routine, modified to prevent nonstandard symbols from being surrounded by single quotes, @`@, and fix a bug that caused and error when converting the symbol @``@ to latex. @aim/LaTeX(``)@ now returns @NULL@)",
proc(QQ)
! local texlist, `{`, `}`, `\\_`, QQtmp;
option system, remember;
! # KM
# WAS: if assigned(`latex/special_names`[`` || QQ]) then
! if QQ = `` then return NULL;
elif assigned(`latex/special_names`[`` || QQ]) then
! # END KM
texlist := `latex/special_names`[evaln(`` || QQ)]
elif member(QQ, eval(`latex/greek`, 1)) then
--- 74,91 ----
`Package/Assign`(
`latex/latex/symbol`,
! "This is the Maple 7 version of this routine, modified to prevent
! nonstandard symbols from being surrounded by single quotes, @`@,
! and fix a bug that caused an error when converting the symbol
! @``@ to latex. @aim/LaTeX(``)@ now returns @\"\"@) (this restores
! the behaviour of the original AIM routine above).",
proc(QQ)
! local texlist, `{`, `}`, `\\_`, QQtmp, QQchars;
option system, remember;
! # KM & GG
# WAS: if assigned(`latex/special_names`[`` || QQ]) then
! if StringTools:-IsSpace(QQ) then
! texlist := convert(QQ, string);
elif assigned(`latex/special_names`[`` || QQ]) then
! # END KM & GG
texlist := `latex/special_names`[evaln(`` || QQ)]
elif member(QQ, eval(`latex/greek`, 1)) then
***************
*** 147,158 ****
`{`, `latex/csname_font`, cat(op(subs("_" = "\\_",
`latex/latex/chars_in_string`(substring(QQ, 1 .. -2))))), `}`
! # KM
# WAS: else texlist := `\\mbox `, `{` $ 2, `latex/verbatim_font`, cat(`\``,
! else texlist := `\\mbox `, `{` $ 2, `latex/verbatim_font`, cat(
! op(subs("``" = "````", "#" = "\\#", "$" = "\\$", "%" = "\\%",
! "&" = "\\&", "_" = "\\_", "{" = "\\{", "}" = "\\}", "~" = "\\~{}",
! "^" = "\\^{}", "\\" = "$\\backslash$", "<" = "$<$", ">" = "$>$",
! # WAS: "|" = "$|$", `latex/latex/chars_in_string`(QQ))), `\``), `}` $ 2
! "|" = "$|$", `latex/latex/chars_in_string`(QQ))) ), `}` $ 2
fi;
return texlist
--- 152,174 ----
`{`, `latex/csname_font`, cat(op(subs("_" = "\\_",
`latex/latex/chars_in_string`(substring(QQ, 1 .. -2))))), `}`
! # KM & GG
# WAS: else texlist := `\\mbox `, `{` $ 2, `latex/verbatim_font`, cat(`\``,
! # op(subs("``" = "````", "#" = "\\#", "$" = "\\$", "%" = "\\%",
! # "&" = "\\&", "_" = "\\_", "{" = "\\{", "}" = "\\}", "~" = "\\~{}",
! # "^" = "\\^{}", "\\" = "$\\backslash$", "<" = "$<$", ">" = "$>$",
! # "|" = "$|$", `latex/latex/chars_in_string`(QQ))), `\``), `}` $ 2
! else
! QQchars := `latex/latex/chars_in_string`(QQ);
! texlist := subs("#" = "\\#", "$" = "\\$", "%" = "\\%",
! "&" = "\\&", "_" = "\\_", "{" = "\\{", "}" = "\\}",
! "~" = "\\~{}", "^" = "\\^{}", "\\" = "$\\backslash$",
! "<" = "$<$", ">" = "$>$", "|" = "$|$", QQchars);
! if QQchars <> texlist then
! texlist := `\\mbox `, `{` $ 2, `latex/verbatim_font`,
! cat(op(texlist)), `}` $ 2
! else
! texlist := cat(op(texlist));
! fi;
! # END KM & GG
fi;
return texlist
|
|
From: <mo...@us...> - 2003-09-15 15:57:30
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv29044 Modified Files: LaTeX.mpl Log Message: renamed latex/latex/symbol_no to latex/latex/symbol Index: LaTeX.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/LaTeX.mpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** LaTeX.mpl 15 Sep 2003 01:02:29 -0000 1.9 --- LaTeX.mpl 15 Sep 2003 15:57:26 -0000 1.10 *************** *** 73,77 **** `Package/Assign`( ! `latex/latex/symbol_no`, "This is the Maple 7 version of this routine, modified to prevent nonstandard symbols from being surrounded by single quotes, @`@, and fix a bug that caused and error when converting the symbol @``@ to latex. @aim/LaTeX(``)@ now returns @NULL@)", proc(QQ) --- 73,77 ---- `Package/Assign`( ! `latex/latex/symbol`, "This is the Maple 7 version of this routine, modified to prevent nonstandard symbols from being surrounded by single quotes, @`@, and fix a bug that caused and error when converting the symbol @``@ to latex. @aim/LaTeX(``)@ now returns @NULL@)", proc(QQ) |
|
From: <bre...@us...> - 2003-09-15 04:58:16
|
Update of /cvsroot/aimmath/AIM/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv17176
Modified Files:
installosx.html
Log Message:
Further changes to bring it more in-line with installlin.html.
Index: installosx.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installosx.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** installosx.html 15 Sep 2003 03:56:21 -0000 1.3
--- installosx.html 15 Sep 2003 04:58:13 -0000 1.4
***************
*** 101,110 ****
<code>sudo mv ~/Desktop/jakarta-tomcat-4.1.27 /usr/local</code>
</blockquote>
! in the Terminal and enter your password when prompted. If you downloaded from ServerLogistics, follow their installation instructions.
! If you have a 4.0 series installation of Tomcat, it is a good idea
to replace it with the current version (there were some location
changes of some directories which may cause some problems if you don't
! do this). You can start up the Tomcat server and test some example
! applications, if you like, but generally it's problem-free.
<!--
--- 101,117 ----
<code>sudo mv ~/Desktop/jakarta-tomcat-4.1.27 /usr/local</code>
</blockquote>
! in the Terminal and enter your password when prompted. If you downloaded from ServerLogistics, follow their installation instructions. If you have a 4.0 series installation of Tomcat, it is a good idea
to replace it with the current version (there were some location
changes of some directories which may cause some problems if you don't
! do this).<p/>
! At this point you need to set the JAVA_HOME environment variable. To do this open Terminal and enter
! <blockquote>
! <code>pico .tcshrc</code>
! </blockquote>
! then enter
! <blockquote>
! <code>setenv JAVA_HOME /Library/Java/Home</code>
! </blockquote>
! and finally press CTRL-O to save the .tcshrc file and CTRL-X to quit the pico editor. You can start up the Tomcat server and test some example applications, if you like, but generally it's problem-free.
<!--
***************
*** 226,243 ****
printed on the terminal.
<p/>
! Under OS X, <font color='green'>AutoConf.mpl</font> will probably
! find everything it needs. There is currently a problem with time
! zones, however; if automatic configuration reports a time zone that
! already includes a shift for summer time, then you should manually
! correct it to the corresponding zone without a shift. For example,
! BST = British Summer Time = GMT + 1 hour should be changed to GMT =
! GMT + 0 hours. To provide help, you should copy the file <font
! color='green'>ManualConfig.dist</font> to <font
color='green'>ManualConfig.mpl</font> and then edit it following the
instructions included in the file. You should then run <font
! color='green'>AutoConf.mpl</font> again. This will run various
! consistency checks as well as generating other configuration files.
! You can iterate this procedure as often as you like until you get
! an installation without error messages.
<p/>
By the way, by running <font color='green'>AutoConf.mpl</font>,
--- 233,290 ----
printed on the terminal.
<p/>
! <a name = "reconfig">
! Usually <font color='green'>AutoConf.mpl</font></a> will find everything
! it needs, but if not, you will need to have a file <font
! color='green'>ManualConfig.mpl</font> that contains the parameters
! whose default values you wish to override and rerun <font
! color='green'>AutoConf.mpl</font>. To create such a file start
! by copying <font color='green'>ManualConfig.dist</font> to <font
color='green'>ManualConfig.mpl</font> and then edit it following the
instructions included in the file. You should then run <font
! color='green'>AutoConf.mpl</font> again. You can iterate this procedure
! as often as is needed until you get an installation without error messages.
! Particular settings you may want to check are the following:
! <dl>
! <dt><em>Do you need to set the port used by Tomcat to something other
! that the default?</em>
! <dd>The default port used by Tomcat is 8080. Prior to AiM 3.0 the
! default port was 80. The issues to consider are:
! <ul>
! <li>When port 80 is used, it need not appear in the URL, but then
! Tomcat needs to be run as a root process.</li>
! <li>If port 8080 is used (or any other port > 1024) then the
! string <tt>:8080</tt> (or whatever port was used) needs to
! appear after the domain part of the URL, but Tomcat need not
! be run as a root process.</li>
! </ul>
! If you are upgrading from a previous installation
! that used port 80, then it will probably be best to stick with that,
! but then you will need to set
! <blockquote>
! Config['TomcatPort'] := 80:
! </blockquote>
! in <font color='green'>ManualConfig.mpl</font>. If you neglected
! to do this the first time around you may have to manually edit
! the files <font color='green'>admin.html</font> and
! <font color='green'>index.html</font> in
! the <font color='green'>WEB-INF</font> directory and
! <font color='green'>DefaultZone.mpl</font>
! in the <font color='green'>WEB-INF/root</font> directory, to remove
! the string <tt>:8080</tt>. Incidentally, the port used by Tomcat is
! set in the <tt><Connector/></tt> tag
! (that is in turn embedded in <tt><Server ...><Service ...>
! ... </Service></Server></tt>) in the file
! <font color='green'>/usr/local/tomcat/conf/server.xml</font>.</dd>
! <dt><em>Is the time set correctly?</em>
! <dd>There is currently a problem with time zones; if automatic
! configuration reports a time zone that includes a shift for
! summer time, then you may need to manually correct it to the
! corresponding zone without a shift. For example,
! BST = British Summer Time = GMT + 1 hour should be changed to
! GMT = GMT + 0 hours. If you are in the southern hemisphere or
! your locale doesn't have daylight saving, you may want
! to hard-set the time in <font color='green'>ManualConfig.mpl</font>
! (see the end of the file).</dd>
! </dl>
<p/>
By the way, by running <font color='green'>AutoConf.mpl</font>,
***************
*** 268,272 ****
</li>
<li>Point your Web browser at the URL of the AiM server. This will be something
! like <font color='green'><a href="http://localhost/AiM/admin.html">http://localhost/AiM/admin.html</a></font>,
where you will need to replace <font color='green'>AiM</font> by the name of
the subdirectory of <font color='green'>/usr/local/tomcat/webapps/</font>
--- 315,319 ----
</li>
<li>Point your Web browser at the URL of the AiM server. This will be something
! like <font color='green'><a href="http://localhost:8080/AiM/admin.html">http://localhost:8080/AiM/admin.html</a></font>,
where you will need to replace <font color='green'>AiM</font> by the name of
the subdirectory of <font color='green'>/usr/local/tomcat/webapps/</font>
***************
*** 355,359 ****
</ul>
<hr/>
! Last modified by Jon Breitenbucher on 14/09/03
</body>
--- 402,406 ----
</ul>
<hr/>
! Last modified by Jon Breitenbucher on 15/09/03
</body>
|
|
From: <bre...@us...> - 2003-09-15 03:56:24
|
Update of /cvsroot/aimmath/AIM/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv7158
Modified Files:
installosx.html
Log Message:
Changed to reflect changes in Servlet.mpl for startup and shutdown. installlin.html and installwin.html should be changed also.
Index: installosx.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installosx.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** installosx.html 14 Sep 2003 16:11:43 -0000 1.2
--- installosx.html 15 Sep 2003 03:56:21 -0000 1.3
***************
*** 216,220 ****
</blockquote>
<blockquote>
! <code>read"AutoConf.mpl";</code>
</blockquote>
in Terminal. This will try to
--- 216,220 ----
</blockquote>
<blockquote>
! <code>read("AutoConf.mpl");</code>
</blockquote>
in Terminal. This will try to
***************
*** 247,254 ****
<li>configuration information for Tomcat to the file
<font color='green'>/usr/local/tomcat/conf/server.xml</font>;</li>
! <li>AiM-specific configuration information to the file
<font color='green'>WEB-INF/web.xml</font> under the
main AiM directory.
</li>
<li>and the scripts
<font color='green'>WEB-INF/startaim.sh</font> and
--- 247,255 ----
<li>configuration information for Tomcat to the file
<font color='green'>/usr/local/tomcat/conf/server.xml</font>;</li>
! <li> and AiM-specific configuration information to the file
<font color='green'>WEB-INF/web.xml</font> under the
main AiM directory.
</li>
+ <!--
<li>and the scripts
<font color='green'>WEB-INF/startaim.sh</font> and
***************
*** 256,259 ****
--- 257,261 ----
to stop and start the Tomcat server.
</li>
+ -->
</ul><p/>
</li>
***************
*** 261,265 ****
entering
<blockquote>
! <code>/usr/local/tomcat/webapps/AiM/WEB-INF/startaim.sh</code>
</blockquote> in the
Terminal.<p/>
--- 263,267 ----
entering
<blockquote>
! <code>/usr/local/tomcat/bin/startup.sh</code>
</blockquote> in the
Terminal.<p/>
|