aimmath-commit Mailing List for AiM Assessment in Mathematics (Page 15)
                
                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-10 20:47:55
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv29289/mod/math_assignment
Modified Files:
	lib.php 
Log Message:
Allowed (but not enforced) differentiation between 'quiz not working' and 'quiz with zero grade'. This means the function can be called by the 'trial quiz' module.
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lib.php	10 Sep 2003 18:25:51 -0000	1.2
--- lib.php	10 Sep 2003 20:47:51 -0000	1.3
***************
*** 374,377 ****
--- 374,378 ----
          return true;
      }
+ 
      if (!$subject = get_record("math_assignment_subject", "id", $math_assignment->aimsubject))
          return false;
***************
*** 409,418 ****
      if (is_null($subject)) {
          if (!$subject = get_record("math_assignment_subject", "id", $math_assignment->aimsubject))
!             return 0;
          $server = null;
      }
      if (is_null($server)) {
          if (!$server = get_record("math_assignment_server", "id", $subject->server))
!             return 0;
      }
      $postdata = "";
--- 410,419 ----
      if (is_null($subject)) {
          if (!$subject = get_record("math_assignment_subject", "id", $math_assignment->aimsubject))
!             return false;
          $server = null;
      }
      if (is_null($server)) {
          if (!$server = get_record("math_assignment_server", "id", $subject->server))
!             return false;
      }
      $postdata = "";
***************
*** 425,432 ****
      // load the AiM page and grab the result
      if (!$data = math_assignment_get_aim_output($server->address, $postdata))
!         return 0;
      // convert the output and get grades
      if (!math_assignment_convert_aim_output($math_assignment, $subject, $data, "", "", false, $grade, $max_grade))
!         return 0;
      return $max_grade;
  }
--- 426,433 ----
      // load the AiM page and grab the result
      if (!$data = math_assignment_get_aim_output($server->address, $postdata))
!         return false;
      // convert the output and get grades
      if (!math_assignment_convert_aim_output($math_assignment, $subject, $data, "", "", false, $grade, $max_grade))
!         return false;
      return $max_grade;
  }
 | 
| 
      
      
      From: <gus...@us...> - 2003-09-10 19:18:49
      
     | 
| Update of /cvsroot/aimmath/AIM/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv7297/doc
Modified Files:
	installlin.html installwin.html 
Log Message:
AiM 3.0 beta 2
Index: installlin.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installlin.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** installlin.html	9 Sep 2003 11:58:36 -0000	1.5
--- installlin.html	10 Sep 2003 19:18:45 -0000	1.6
***************
*** 152,156 ****
    <font color='green'>complete</font>) from 
    <a href="http://sourceforge.net/projects/aimmath/">SourceForge</a> 
!   or directly <a href="http://aimmath.sourceforge.net/aim.zip">from here</a>
    and unzip it into a subdirectory of the 
    <font color='green'>/usr/local/tomcat/webapps/</font> directory. Do not 
--- 152,156 ----
    <font color='green'>complete</font>) from 
    <a href="http://sourceforge.net/projects/aimmath/">SourceForge</a> 
!   or directly <a href="http://aimmath.sourceforge.net/aim.tar.gz">from here</a>
    and unzip it into a subdirectory of the 
    <font color='green'>/usr/local/tomcat/webapps/</font> directory. Do not 
Index: installwin.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installwin.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** installwin.html	9 Sep 2003 11:58:36 -0000	1.8
--- installwin.html	10 Sep 2003 19:18:45 -0000	1.9
***************
*** 113,117 ****
    <font color='green'>complete</font>) from
    <a href="http://sourceforge.net/projects/aimmath/">SourceForge</a>
!   or directly <a href="http://aimmath.sourceforge.net/aim.zip">from
    here</a> and unzip it into a subdirectory of the 
    <font color='green'>C:\Tomcat\webapps\</font> directory. Do not unzip it
--- 113,117 ----
    <font color='green'>complete</font>) from
    <a href="http://sourceforge.net/projects/aimmath/">SourceForge</a>
!   or directly <a href="http://aimmath.sourceforge.net/aim.tar.gz">from
    here</a> and unzip it into a subdirectory of the 
    <font color='green'>C:\Tomcat\webapps\</font> directory. Do not unzip it
 | 
| 
      
      
      From: <gus...@us...> - 2003-09-10 19:18:49
      
     | 
| Update of /cvsroot/aimmath/AIM In directory sc8-pr-cvs1:/tmp/cvs-serv7297 Added Files: version.txt Log Message: AiM 3.0 beta 2 --- NEW FILE: version.txt --- This is AiM 3.0 beta 2 | 
| 
      
      
      From: <ma...@us...> - 2003-09-10 18:25:54
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv27923/mod/math_assignment
Modified Files:
	aimpage.php lib.php view.php 
Log Message:
Fixed problems when assignments have no AiM part
Index: aimpage.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/aimpage.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** aimpage.php	9 Sep 2003 18:31:07 -0000	1.1
--- aimpage.php	10 Sep 2003 18:25:50 -0000	1.2
***************
*** 184,188 ****
      // write admin links
      if (isteacher($course->id))
!         math_assignment_print_admin_links($cm, $math_assignment, "right");
      // write pdf link
      if ($createpdfaction) {
--- 184,188 ----
      // write admin links
      if (isteacher($course->id))
!         echo math_assignment_get_admin_links($cm, $math_assignment, "right");
      // write pdf link
      if ($createpdfaction) {
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** lib.php	9 Sep 2003 18:31:07 -0000	1.1
--- lib.php	10 Sep 2003 18:25:51 -0000	1.2
***************
*** 173,176 ****
--- 173,188 ----
  }
  
+ function math_assignment_help_button($page, $name, $print=true) {
+ /// Function which outputs / returns the output required for a help button for this module
+ 
+     if ($print)
+         return helpbutton($page, $name, "math_assignment");
+     ob_start();
+     helpbutton($page, $name, "math_assignment");
+     $return = ob_get_contents();
+     ob_end_clean();
+     return $return;
+ }
+ 
  function math_assignment_get_file_urls($courseid, $math_assignment, &$proburl, &$solurl) {
  /// Function which creates the URLs for the problem sheet and solution sheet
***************
*** 187,265 ****
  }
  
! function math_assignment_print_file_links($cm, $math_assignment, $align="left") {
  /// Function which prints the problem and solution sheet links
  /// Note that if $align is empty we assume we are already in a paragraph, else we put the links in a paragraph
  
      math_assignment_get_file_urls($cm->course, $math_assignment, $proburl, $solurl);
-     $count = 0;
      if ($math_assignment->problems) {
!         if ($count)
!             echo "<br />\n";
          else if ($align)
!             echo "<p align=\"$align\">";
          $strviewproblems = get_string("viewproblems", "math_assignment");
!         echo "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>";
!         helpbutton("viewproblems", $strviewproblems, "math_assignment");
!         $count++;
      }
      if (($math_assignment->solutions) and ($math_assignment->timedue < time())) {
!         if ($count)
!             echo "<br />\n";
          else if ($align)
!             echo "<p align=\"$align\">";
          $strviewsolutions = get_string("viewsolutions", "math_assignment");
!         echo "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>";
!         helpbutton("viewsolutions", $strviewsolutions, "math_assignment");
!         $count++;
      }
      else if(($math_assignment->solutions) && isteacher($cm->course)) {
!         if ($count)
!             echo "<br />\n";
          else if ($align)
!             echo "<p align=\"$align\">";
          $strviewsolutions = get_string("viewsolutions", "math_assignment");
!         echo "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions (" . get_string("notavailabletostudentsyet", "math_assignment") . ")</a>";
!         helpbutton("viewsolutionsteacher", $strviewsolutions, "math_assignment");
!         $count++;
      }
!     if ($count && $align)
!         echo "</p>\n";
!     return $count;
  }
  
! function math_assignment_print_admin_links($cm, $math_assignment, $align="left") {
  /// Function which prints the admin links
  
!     echo "<p align=\"$align\">";
!     $links = math_assignment_print_file_links($cm, $math_assignment, "");
      if ($math_assignment->aimquiz) {
!         if ($links)
!             echo "<br />\n";
          // Analyse Results
          $stranalyseresults = get_string("analyseresults", "math_assignment");
!         echo "<a href=\"aimpage.php?id=$cm->id\">$stranalyseresults</a>";
!         helpbutton("analyze_quiz", $stranalyseresults, "math_assignment");
!         echo "<br />\n";
          // Try Quiz
          $strtryquiz = get_string("tryquiz", "math_assignment");
!         echo "<a href=\"aimpage.php?id=$cm->id&aimaction=try\">$strtryquiz</a>";
!         helpbutton("try_quiz", $strtryquiz, "math_assignment");
!         echo "<br />\n";
          // Edit Quiz
          $streditquiz = get_string("editquiz", "math_assignment");
!         echo "<a href=\"aimpage.php?id=$cm->id&aimaction=edit\">$streditquiz</a>";
!         helpbutton("admin_quiz", $streditquiz, "math_assignment");
!         echo "<br />\n";
          // Browse Source
          $strbrowsesource = get_string("browsesource", "math_assignment");
!         echo "<a href=\"aimpage.php?id=$cm->id&aimaction=source\">$strbrowsesource</a>";
!         helpbutton("admin_sourcedir", $strbrowsesource, "math_assignment");
!         echo "<br />\n";
          // Edit Subject
          $streditsubject = get_string("editsubject", "math_assignment");
!         echo "<a href=\"aimpage.php?id=$cm->id&aimaction=subject\">$streditsubject</a>";
!         helpbutton("admin_subject", $streditsubject, "math_assignment");
      }
!     echo "</p>\n";
  }
  
--- 199,280 ----
  }
  
! function math_assignment_get_file_links($cm, $math_assignment, $align="left") {
  /// Function which prints the problem and solution sheet links
  /// Note that if $align is empty we assume we are already in a paragraph, else we put the links in a paragraph
  
      math_assignment_get_file_urls($cm->course, $math_assignment, $proburl, $solurl);
      if ($math_assignment->problems) {
!         if (isset($return))
!             $return .= "<br />\n";
          else if ($align)
!             $return .= "<p align=\"$align\">";
          $strviewproblems = get_string("viewproblems", "math_assignment");
!         $return .= "<a href=\"$proburl\" target=\"problems\">$strviewproblems</a>";
!         $return .= math_assignment_help_button("viewproblems", $strviewproblems, false);
      }
      if (($math_assignment->solutions) and ($math_assignment->timedue < time())) {
!         if (isset($return))
!             $return .= "<br />\n";
          else if ($align)
!             $return .= "<p align=\"$align\">";
          $strviewsolutions = get_string("viewsolutions", "math_assignment");
!         $return .= "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions</a>";
!         $return .= math_assignment_help_button("viewsolutions", $strviewsolutions, false);
      }
      else if(($math_assignment->solutions) && isteacher($cm->course)) {
!         if (isset($return))
!             $return .= "<br />\n";
          else if ($align)
!             $return .= "<p align=\"$align\">";
          $strviewsolutions = get_string("viewsolutions", "math_assignment");
!         $return .= "<a href=\"$solurl\" target=\"solutions\">$strviewsolutions (" . get_string("notavailabletostudentsyet", "math_assignment") . ")</a>";
!         $return .= math_assignment_help_button("viewsolutionsteacher", $strviewsolutions, false);
      }
!     if (isset($return) && $align){
!         $return .= "</p>\n";
!         return $return;
!     }
!     return "";
  }
  
! function math_assignment_get_admin_links($cm, $math_assignment, $align="left") {
  /// Function which prints the admin links
  
!     $return = "";
!     $filelinks = math_assignment_get_file_links($cm, $math_assignment, "");
      if ($math_assignment->aimquiz) {
!         $return = "<p align=\"$align\">$filelinks";
!         if ($filelinks)
!             $return .= "<br />\n";
          // Analyse Results
          $stranalyseresults = get_string("analyseresults", "math_assignment");
!         $return .= "<a href=\"aimpage.php?id=$cm->id\">$stranalyseresults</a>";
!         $return .= math_assignment_help_button("analyze_quiz", $stranalyseresults, false);
!         $return .= "<br />\n";
          // Try Quiz
          $strtryquiz = get_string("tryquiz", "math_assignment");
!         $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=try\">$strtryquiz</a>";
!         $return .= math_assignment_help_button("try_quiz", $strtryquiz, false);
!         $return .= "<br />\n";
          // Edit Quiz
          $streditquiz = get_string("editquiz", "math_assignment");
!         $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=edit\">$streditquiz</a>";
!         $return .= math_assignment_help_button("admin_quiz", $streditquiz, false);
!         $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");
!         $return .= "<a href=\"aimpage.php?id=$cm->id&aimaction=subject\">$streditsubject</a>";
!         $return .= math_assignment_help_button("admin_subject", $streditsubject, false);
      }
!     else if ($filelinks)
!         $return = "<p align=\"$align\">$filelinks";
!     if (!empty($return))
!         $return .= "</p>\n";
!     return $return;
  }
  
***************
*** 354,357 ****
--- 369,377 ----
  /// Function to update the AiM settings when the instance settings change
  
+     if (empty($math_assignment->aimquiz)) { // no aim questions
+         $math_assignment->aimsubject = 0;
+         $math_assignment->aimgrade = 0;
+         return true;
+     }
      if (!$subject = get_record("math_assignment_subject", "id", $math_assignment->aimsubject))
          return false;
Index: view.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/view.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** view.php	10 Sep 2003 12:06:18 -0000	1.3
--- view.php	10 Sep 2003 18:25:51 -0000	1.4
***************
*** 228,232 ****
  
          if (isteacher($course->id)) {
!             math_assignment_print_admin_links($cm, $math_assignment, "right");
              print_heading($strgrades);
              echo "<p align=\"center\"><b>" . get_string("maximumgrade") . "</b>: $math_assignment->papergrade ($strpaper) + $math_assignment->aimgrade ($strcomputer) = $totalmax</p>";
--- 228,232 ----
  
          if (isteacher($course->id)) {
!             echo math_assignment_get_admin_links($cm, $math_assignment, "right");
              print_heading($strgrades);
              echo "<p align=\"center\"><b>" . get_string("maximumgrade") . "</b>: $math_assignment->papergrade ($strpaper) + $math_assignment->aimgrade ($strcomputer) = $totalmax</p>";
***************
*** 289,297 ****
              echo "</td></tr></table>";
  
!             print_heading(get_string("administration"));
!             math_assignment_print_admin_links($cm, $math_assignment, "center");
          }
          else {
!             math_assignment_print_file_links($math_assignment, "center");
              if (!empty($math_assignment->aimquiz)) {
                  if ($grade->aimoverride) {
--- 289,299 ----
              echo "</td></tr></table>";
  
!             if ($adminlinks = math_assignment_get_admin_links($cm, $math_assignment, "center")) {
!                 print_heading(get_string("administration"));
!                 echo $adminlinks;
!             }
          }
          else {
!             echo math_assignment_get_file_links($math_assignment, "center");
              if (!empty($math_assignment->aimquiz)) {
                  if ($grade->aimoverride) {
 | 
| 
      
      
      From: <gus...@us...> - 2003-09-10 16:00:30
      
     | 
| Update of /cvsroot/aimmath/AIM/WEB-INF/maple
In directory sc8-pr-cvs1:/tmp/cvs-serv28130/WEB-INF/maple
Modified Files:
	AutoConf.mpl AutoConfWin.mpl 
Log Message:
AiM no longer looks for old versions of tth and process but always uses the one included in the release.
Index: AutoConf.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AutoConf.mpl	25 Aug 2003 21:47:18 -0000	1.3
--- AutoConf.mpl	10 Sep 2003 16:00:26 -0000	1.4
***************
*** 759,765 ****
    "Conf"  = 'TtHProgram',
    "Path"  = "tth",
-   "Def"   = "/usr/local/bin/tth",
-   "Def"   = "/usr/bin/tth",
-   "Def"   = "/bin/tth",
    "Def"   = cat(Config['WebAppDir'],"/bin/tth_exe/tth"),
    "Check" = ["-r < tthtest.tex","TtH is OK"]
--- 759,762 ----
***************
*** 771,777 ****
    "Conf"  = 'TtHProgram',
    "Path"  = "tth.exe",
-   "Def"   = "C:\\TtH\\tth.exe",
-   "Def"   = "C:\\Program Files\\tth.exe",
-   "Def"   = "C:\\Program Files\\TtH\\tth.exe",
    "Def"   = cat(Config['WebAppDir'],"\\bin\\tth_exe\\tth.exe"),
    "Check" = ["-r < tthtest.tex","TtH is OK"]
--- 768,771 ----
Index: AutoConfWin.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConfWin.mpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AutoConfWin.mpl	6 Sep 2003 20:00:39 -0000	1.1
--- AutoConfWin.mpl	10 Sep 2003 16:00:26 -0000	1.2
***************
*** 677,683 ****
    "Conf"  = 'TtHProgram',
    "Path"  = "tth",
-   "Def"   = "/usr/local/bin/tth",
-   "Def"   = "/usr/bin/tth",
-   "Def"   = "/bin/tth",
    "Def"   = cat(Config['WebAppDir'],"/bin/tth_exe/tth"),
    "Check" = ["-r < tthtest.tex","TtH is OK"]
--- 677,680 ----
***************
*** 689,695 ****
    "Conf"  = 'TtHProgram',
    "Path"  = "tth.exe",
-   "Def"   = "C:\\TtH\\tth.exe",
-   "Def"   = "C:\\Program Files\\tth.exe",
-   "Def"   = "C:\\Program Files\\TtH\\tth.exe",
    "Def"   = cat(Config['WebAppDir'],"\\bin\\tth_exe\\tth.exe"),
    "Check" = ["-r < tthtest.tex","TtH is OK"]
--- 686,689 ----
***************
*** 720,725 ****
    "Conf"  = 'KillProgram',
    "Path"  = "Process.exe",
-   "Def"   = "C:\\AIM\\Process",
-   "Def"   = "C:\\Process",
    "Def"   = cat(Config['WebAppDir'],"\\bin\\process\\Process.exe"),
    "Check" = ["-v","beyondlogic.org"]
--- 714,717 ----
 | 
| 
      
      
      From: <mo...@us...> - 2003-09-10 15:26:14
      
     | 
| Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim
In directory sc8-pr-cvs1:/tmp/cvs-serv20004
Modified Files:
	LaTeX.mpl 
Log Message:
the last bug fix only worked with Maple 9. Hopefully this one will work with Maple 7,8,9 though I can't test it with Maple 8 or Maple 7
Index: LaTeX.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/LaTeX.mpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LaTeX.mpl	10 Sep 2003 02:38:02 -0000	1.6
--- LaTeX.mpl	10 Sep 2003 15:26:09 -0000	1.7
***************
*** 177,268 ****
    "",
    proc(e)
!     local subexp, den, ee, ff, subee, i, k, num, texlist, `\\,`,
!      `\\frac `, `\\sqrt `, `{`, `}`, ccnt, keepcnt, ll, nlist;
!     global _LatexSmallFractionConstant;
!     option `Copyright (c) 1992 by the University of Waterloo. All rights reserved.`;
!     if type(op(1, e), 'numeric') and op(1, e) < 0 then
!         LaTeX:-CountCharacters(1);
!         return `latex/latex/copy`('`-`'), `latex/print`(-e)
!     end if;
!     if type(op(1, e), 'numeric') then
! #        i := _LatexSmallFractionConstant;
! #        _LatexSmallFractionConstant := 50;
!         texlist := `latex/print`(op(1, e)), `\\,`,
!             `latex/print`(subsop(1 = 1, e));
! #        _LatexSmallFractionConstant := i;
!         return texlist
!     end if;
!     texlist := NULL;
!     num := 1;
!     den := 1;
!     ee := e;
!     for subee in [op(ee)] do
!         if type(subee, 'fraction') then
!             num := num*op(1, subee); den := den*op(2, subee)
!         elif
!         type(subee, '`^`') and type(op(2, subee), 'rational')
!          and op(2, subee) < 0 then den := den/subee
!         else num := num*subee
!         end if
!     end do;
!     if den <> 1 then
!         if type(num, '`latex/istall`') or
!         type(den, '`latex/istall`') then
!             if num <> 1 then
!                 texlist := `latex/print`(num);
!                 if type(num, '`+`') then texlist :=
!                     ` \\left( `, texlist, ` \\right) `
!                 end if
!             else texlist := NULL
!             end if;
!             if type(den, '`*`') then den := [op(den)]
!             else den := [den]
!             end if;
!             for subexp in den do
!                 nlist := `latex/print`(1/subexp);
!                 ll := LaTeX:-CheckLineBreak();
!                 texlist := texlist, nlist, ll
!             end do;
!             texlist
!         else texlist := texlist, `{`, '`\\frac `', '`{`',
!             `latex/print`(num), '`}`', '`{`',
!             `latex/print`(den), '`}`', `}`
!         end if
!     else
!         i := 1;
!         ff := [op(ee)];
!         for k to nops(ff) do
!             keepcnt := LaTeX:-ResetCount();
!             if type(ff[k], {'series', '`+`'}) then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             elif type(ff[k], 'complex'('numeric')) and
!             nops(ff[k]) = 2 then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             elif i < nops(ee) and type(ff[k], 'function')
!              and member(op(0, ff[k]), {diff, Diff}) then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             elif type(ff[k], 'function') and
!             member(op(0, ff[k]), {`@`, `@@`}) then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             elif type(ff[k], procedure) then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             else nlist := `latex/print`(ff[k])
!             end if;
!             if i < nops(ee) and (
!             i = 1 and type(op(1, ee), 'integer') or
!             type(ff[k], '`!`') or
!             type(ff[k], {'string', 'symbol'}) and
!             1 < length(ff[k]) or
!             has([`latex/print`(ff[k])], '`\\sqrt `')) then
!                 nlist := nlist, `\\,`
!             end if;
!             ccnt := LaTeX:-SetCount(keepcnt);
!             ll := LaTeX:-CheckLineBreak(ccnt);
!             texlist := texlist, nlist, ll;
!             i := i + 1
!         end do
!     end if;
!     texlist
!   end
  ):
  
--- 177,257 ----
    "",
    proc(e)
!   local subexp, den, ee, ff, subee, i, k, num, texlist, `\\,`, `\\frac `,
!   `\\sqrt `, `{`, `}`;
!   global _LatexSmallFractionConstant;
!   option
!   `Copyright (c) 1992 by the University of Waterloo. All rights reserved.`;
!   if type(op(1, e), 'numeric') and op(1, e) < 0 then
!       return `latex/latex/copy`('`-`'), `latex/print`(-e)
!   end if;
!   if type(op(1, e), 'numeric') then
! #      i := _LatexSmallFractionConstant;
! #      _LatexSmallFractionConstant := 50;
!       texlist := `latex/print`(op(1, e)), `\\,`,
!           `latex/print`(subsop(1 = 1, e));
! #      _LatexSmallFractionConstant := i;
!       return texlist
!   end if;
!   texlist := NULL;
!   num := 1;
!   den := 1;
!   ee := e;
!   for subee in [op(ee)] do
!       if type(subee, 'fraction') then
!           num := num*op(1, subee); den := den*op(2, subee)
!       elif type(subee, '`^`') and type(op(2, subee), 'rational') and
!       op(2, subee) < 0 then den := den/subee
!       else num := num*subee
!       end if
!   end do;
!   if den <> 1 then
!       if type(num, '`latex/istall`') or type(den, '`latex/istall`') then
!           if num <> 1 then
!               texlist := `latex/print`(num);
!               if type(num, '`+`') then
!                   texlist := ` \\left( `, texlist, ` \\right) `
!               end if
!           else texlist := NULL
!           end if;
!           if type(den, '`*`') then den := [op(den)]
!           else den := [den]
!           end if;
!           for subexp in den do
!               texlist := texlist, `latex/print`(1/subexp)
!           end do;
!           texlist
!       else texlist := texlist, `{`, '`\\frac `', '`{`',
!           `latex/print`(num), '`}`', '`{`', `latex/print`(den), '`}`',
!           `}`
!       end if
!   else
!       i := 1;
!       ff := [op(ee)];
!       for k to nops(ff) do
!           if type(ff[k], {'`+`', 'series'}) then
!               texlist := texlist, `latex/latex/prinpar`(ff[k])
!           elif type(ff[k], 'complex'('numeric')) and nops(ff[k]) = 2
!           then texlist := texlist, `latex/latex/prinpar`(ff[k])
!           elif i < nops(ee) and type(ff[k], 'function') and
!           member(op(0, ff[k]), {diff, Diff}) then
!               texlist := texlist, `latex/latex/prinpar`(ff[k])
!           elif
!           type(ff[k], 'function') and member(op(0, ff[k]), {`@`, `@@`})
!           then texlist := texlist, `latex/latex/prinpar`(ff[k])
!           elif type(ff[k], procedure) then
!               texlist := texlist, `latex/latex/prinpar`(ff[k])
!           else texlist := texlist, `latex/print`(ff[k])
!           end if;
!           if i < nops(ee) and (
!           i = 1 and type(op(1, ee), 'integer') or type(ff[k], '`!`') or
!           type(ff[k], {'symbol', 'string'}) and 1 < length(ff[k]) or
!           has([`latex/print`(ff[k])], '`\\sqrt `')) then
!               texlist := texlist, `\\,`
!           end if;
!           i := i + 1
!       end do
!   end if;
!   texlist
! end
  ):
  
 | 
| 
      
      
      From: <gus...@us...> - 2003-09-10 13:13:34
      
     | 
| Update of /cvsroot/aimmath/moodle/lang/en_yo In directory sc8-pr-cvs1:/tmp/cvs-serv24064/lang/en_yo Modified Files: math_assignment.php Log Message: taken out strings in en_yo that were identical to those in en Index: math_assignment.php =================================================================== RCS file: /cvsroot/aimmath/moodle/lang/en_yo/math_assignment.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** math_assignment.php 9 Sep 2003 18:31:07 -0000 1.1 --- math_assignment.php 10 Sep 2003 13:13:30 -0000 1.2 *************** *** 6,73 **** #------------------------------------------------------------ - $string['actions'] = "Actions"; - $string['address'] = "Address"; - $string['adminlinks'] = "Admin Links"; - $string['adminonly'] = "You must be an administrator to use this page."; - $string['aimpage'] = "AiM Quiz Page"; - $string['aimquiz'] = "AiM Quiz"; - $string['aimserver'] = "AiM Server"; - $string['aimserverconfig'] = "AiM Server Configuration"; - $string['aimserverplural'] = "AiM Servers"; - $string['aimserversubjects'] = "AiM Server Subjects"; - $string['aimsubject'] = "AiM Subject"; - $string['analyseresults'] = "Analyse AiM Results"; - $string['attemptquiz'] = "Attempt AiM Quiz"; - $string['autoregister'] = "Auto-register Students with AiM"; $string['browsesource'] = "Browse Source"; - $string['createpdf'] = "Display printer friendly (pdf) version of this page"; - $string['computer'] = "Computer"; - $string['comment'] = "Comment"; - $string['commented'] = "Commented"; - $string['deletequery'] = "Are you sure you want to delete this server?"; - $string['edited'] = "Edited"; - $string['edit'] = "Edit"; - $string['editgrade'] = "Edit AiM Grade"; - $string['editquiz'] = "AiM Quiz Administration"; //"Edit Quiz"; - $string['editsubject'] = "AiM Subject Administration"; //"Edit Subject"; - $string['failed'] = "Error : Could not save the changes made."; - $string['grademultiplier'] = "Grade Multiplier"; - $string['gradeoverride'] = "set by teacher"; - $string['gradeoverridemsg'] = "Since the teacher has modified your grades, attempting the assignment will not change them. However you can still view the AiM assignment page for reference."; - $string['guestsno'] = "Sorry, guests can not view or attempt assignments"; - $string['html'] = "HTML"; - $string['invalid'] = "Error : Invalid entry"; - $string['invalidgrademultiplier'] = "Grade multiplier must be a number between 0.1 and 10000 inclusive."; - $string['latexoutput'] = "Default LaTeX Output Method"; - $string['loading'] = "Starting Download..."; - $string['oldgrade'] = "Current Grade"; - $string['paper'] = "Paper"; - $string['passwd'] = "Password"; - $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['mathml'] = "MathML"; - $string['managesubjects'] = "Manage Subjects"; $string['mathassignmentsettings'] = "Assignment Configuration"; - $string['name'] = "Name"; - $string['newgrade'] = "Override Grade"; - $string['newitem'] = "New..."; - $string['noaccess'] = "Error : The administrator has not granted access to this subject on this server"; - $string['nooutput'] = "Error : No usable data was returned from the AiM server. The server may be down."; - $string['noreview'] = "You are not allowed to review this assignment"; - $string['notattempted'] = "You have not attempted this assignment."; - $string['notmarked'] = "The assignment has not yet been marked."; - $string['notteacher'] = "You must be a teacher to use this page."; - $string['refresh'] = "Refresh"; - $string['reviewresults'] = "Review Results"; - $string['serverinuse'] = "Error : Can not delete server as one or more Assignments depend on it."; - $string['student_password'] = "Student AiM Password"; - $string['studentnotattempted'] = "The student has not attempted this assignment."; - $string['subjectinuse'] = "Error : Can not delete subject as one or more Assignments depend on it."; - $string['subjectplural'] = "Subjects"; - $string['subjectson'] = "Subjects on "; - $string['teachercomment'] = "Teacher Comment"; - $string['timedue'] = "Due Date and Time"; - $string['tryquiz'] = "Try AiM Assignment"; - $string['viewquiz'] = "View AiM Assignment"; ?> --- 6,11 ---- | 
| 
      
      
      From: <ma...@us...> - 2003-09-10 12:06:22
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv11280/mod/math_assignment
Modified Files:
	view.php 
Log Message:
Changed tab order for paper grade entry controls.
Index: view.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/view.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** view.php	10 Sep 2003 11:17:05 -0000	1.2
--- view.php	10 Sep 2003 12:06:18 -0000	1.3
***************
*** 239,242 ****
--- 239,243 ----
              $strcommented = get_string("commented", "math_assignment");
  
+             $i = 1;
              foreach ($students as $student) {
                  $studentgrade = $grades[$student->id];
***************
*** 246,250 ****
                   else
                       $papergrade = "";
!                  $papergrade = "<input type=\"text\" name=\"$student->id\" size=\"10\" maxlength=\"10\" value=\"$papergrade\" />";
                   if ($studentgrade->aimgrade >= 0)
                       $aimgrade = $studentgrade->aimgrade;
--- 247,251 ----
                   else
                       $papergrade = "";
!                  $papergrade = "<input type=\"text\" name=\"$student->id\" size=\"10\" maxlength=\"10\" value=\"$papergrade\" tabindex=\"$i\" />";
                   if ($studentgrade->aimgrade >= 0)
                       $aimgrade = $studentgrade->aimgrade;
***************
*** 264,267 ****
--- 265,269 ----
                   }
                  $table->data[] = array($picture, $student->firstname, $student->lastname, $papergrade, "$aimgrade $edited<a href=\"editgrade.php?id=$math_assignment->id&userid=$student->id\">$stredit</a>$editedclose", math_assignment_total_grade($math_assignment, $studentgrade));
+                 $i++;
              }
  
 | 
| 
      
      
      From: <ma...@us...> - 2003-09-10 11:17:14
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv3830/mod/math_assignment
Modified Files:
	view.php 
Log Message:
Admin links added at top right
Index: view.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/view.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** view.php	9 Sep 2003 18:31:07 -0000	1.1
--- view.php	10 Sep 2003 11:17:05 -0000	1.2
***************
*** 228,231 ****
--- 228,232 ----
  
          if (isteacher($course->id)) {
+             math_assignment_print_admin_links($cm, $math_assignment, "right");
              print_heading($strgrades);
              echo "<p align=\"center\"><b>" . get_string("maximumgrade") . "</b>: $math_assignment->papergrade ($strpaper) + $math_assignment->aimgrade ($strcomputer) = $totalmax</p>";
 | 
| 
      
      
      From: <mo...@us...> - 2003-09-10 02:38:14
      
     | 
| Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim
In directory sc8-pr-cvs1:/tmp/cvs-serv15309
Modified Files:
	LaTeX.mpl 
Log Message:
fixed bug "missing parentheses around complex numbers"
Index: LaTeX.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/LaTeX.mpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LaTeX.mpl	1 Sep 2003 16:34:42 -0000	1.5
--- LaTeX.mpl	10 Sep 2003 02:38:02 -0000	1.6
***************
*** 174,202 ****
  # KM
  `Package/Assign`(
! `latex/latex/*`,
! "",
! proc(e)
! local subexp, den, ee, subee, i, num, texlist, lnum,lden, `\\,`, `\\frac `, `\\sqrt `,
! `{`, `}`;
! global _LatexSmallFractionConstant;
! option
! `Copyright (c) 1992 by the University of Waterloo. All rights reserved.`;
! 
      if type(op(1, e), 'numeric') and op(1, e) < 0 then
!         RETURN(`latex/latex/copy`('`-`'), `latex/print`(-e))
!     fi;
      if type(op(1, e), 'numeric') then
! # KM
! # DIST   i := _LatexSmallFractionConstant;
! # DIST        _LatexSmallFractionConstant := 50;
! # END KM
!         texlist :=
!             `latex/print`(op(1, e)), `\\,`, `latex/print`(subsop(1 = 1, e))
!             ;
! # KM
! # DIST    _LatexSmallFractionConstant := i;
! # END KM
!         RETURN(texlist)
!     fi;
      texlist := NULL;
      num := 1;
--- 174,196 ----
  # KM
  `Package/Assign`(
!   `latex/latex/*`,
!   "",
!   proc(e)
!     local subexp, den, ee, ff, subee, i, k, num, texlist, `\\,`,
!      `\\frac `, `\\sqrt `, `{`, `}`, ccnt, keepcnt, ll, nlist;
!     global _LatexSmallFractionConstant;
!     option `Copyright (c) 1992 by the University of Waterloo. All rights reserved.`;
      if type(op(1, e), 'numeric') and op(1, e) < 0 then
!         LaTeX:-CountCharacters(1);
!         return `latex/latex/copy`('`-`'), `latex/print`(-e)
!     end if;
      if type(op(1, e), 'numeric') then
! #        i := _LatexSmallFractionConstant;
! #        _LatexSmallFractionConstant := 50;
!         texlist := `latex/print`(op(1, e)), `\\,`,
!             `latex/print`(subsop(1 = 1, e));
! #        _LatexSmallFractionConstant := i;
!         return texlist
!     end if;
      texlist := NULL;
      num := 1;
***************
*** 206,269 ****
          if type(subee, 'fraction') then
              num := num*op(1, subee); den := den*op(2, subee)
!         elif type(subee, '`^`') and type(op(2, subee), 'rational') and
!         op(2, subee) < 0 then
!            if type(subee,table) then
!               den := den/op(subee)
!            else
!               den := den/subee
!            fi
!         else
!            if type(subee,table) then
!               num := num*op(subee) 
!            else
!               num := num*subee
!            fi
!         fi
!     od;
      if den <> 1 then
!         if type(num, '`latex/istall`') or type(den, '`latex/istall`') then
              if num <> 1 then
                  texlist := `latex/print`(num);
!                 if type(num, `+`) then
!                     texlist := `\\left(`, texlist, `\\right)`
!                 fi
              else texlist := NULL
!             fi;
!             if type(den, '`*`') then den := [op(den)] else den := [den] fi;
              for subexp in den do
!                 texlist := texlist, `latex/print`(1/subexp)
!             od;
              texlist
!         else 
!             lnum := `if`(type(num,table),
!                         `latex/print`(op(num)),`latex/print`(num));
!             lden := `if`(type(den,table),
!                         `latex/print`(op(den)),`latex/print`(den));
!             texlist := texlist, `{`, '`\\frac `', '`{`',
!                        lnum, '`}`', '`{`', lden, '`}`', `}`;
!         fi
      else
          i := 1;
!         for subee in ee do
!             if type(subee, {'series', '`+`'}) then
!                 texlist := texlist, `latex/latex/prinpar`(subee)
!             elif i < nops(ee) and type(subee, 'function') and
!             member(op(0, subee), {diff, Diff}) then
!                 texlist := texlist, `latex/latex/prinpar`(subee)
!      elif type(subee,table) then
!              texlist := texlist,`latex/print`(op(subee));             
!             else texlist := texlist, `latex/print`(subee)
!             fi;
              if i < nops(ee) and (
!             i = 1 and type(op(1, ee), 'integer') or type(subee, '`!`') or
!             type(subee, {'string', 'symbol'}) and 1 < length(subee) or
!             has([`latex/print`(subee)], '`\\sqrt `')) then
!                 texlist := texlist, `\\,`
!             fi;
              i := i + 1
!         od
!     fi;
!     RETURN(texlist)
! end
  ):
  
--- 200,268 ----
          if type(subee, 'fraction') then
              num := num*op(1, subee); den := den*op(2, subee)
!         elif
!         type(subee, '`^`') and type(op(2, subee), 'rational')
!          and op(2, subee) < 0 then den := den/subee
!         else num := num*subee
!         end if
!     end do;
      if den <> 1 then
!         if type(num, '`latex/istall`') or
!         type(den, '`latex/istall`') then
              if num <> 1 then
                  texlist := `latex/print`(num);
!                 if type(num, '`+`') then texlist :=
!                     ` \\left( `, texlist, ` \\right) `
!                 end if
              else texlist := NULL
!             end if;
!             if type(den, '`*`') then den := [op(den)]
!             else den := [den]
!             end if;
              for subexp in den do
!                 nlist := `latex/print`(1/subexp);
!                 ll := LaTeX:-CheckLineBreak();
!                 texlist := texlist, nlist, ll
!             end do;
              texlist
!         else texlist := texlist, `{`, '`\\frac `', '`{`',
!             `latex/print`(num), '`}`', '`{`',
!             `latex/print`(den), '`}`', `}`
!         end if
      else
          i := 1;
!         ff := [op(ee)];
!         for k to nops(ff) do
!             keepcnt := LaTeX:-ResetCount();
!             if type(ff[k], {'series', '`+`'}) then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             elif type(ff[k], 'complex'('numeric')) and
!             nops(ff[k]) = 2 then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             elif i < nops(ee) and type(ff[k], 'function')
!              and member(op(0, ff[k]), {diff, Diff}) then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             elif type(ff[k], 'function') and
!             member(op(0, ff[k]), {`@`, `@@`}) then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             elif type(ff[k], procedure) then
!                 nlist := `latex/latex/prinpar`(ff[k])
!             else nlist := `latex/print`(ff[k])
!             end if;
              if i < nops(ee) and (
!             i = 1 and type(op(1, ee), 'integer') or
!             type(ff[k], '`!`') or
!             type(ff[k], {'string', 'symbol'}) and
!             1 < length(ff[k]) or
!             has([`latex/print`(ff[k])], '`\\sqrt `')) then
!                 nlist := nlist, `\\,`
!             end if;
!             ccnt := LaTeX:-SetCount(keepcnt);
!             ll := LaTeX:-CheckLineBreak(ccnt);
!             texlist := texlist, nlist, ll;
              i := i + 1
!         end do
!     end if;
!     texlist
!   end
  ):
  
 | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 19:00:44
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/aim_quiz/db In directory sc8-pr-cvs1:/tmp/cvs-serv19719/mod/aim_quiz/db Removed Files: mysql.php mysql.sql Log Message: Remove old aim_quiz module --- mysql.php DELETED --- --- mysql.sql DELETED --- | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 19:00:44
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/aim_quiz In directory sc8-pr-cvs1:/tmp/cvs-serv19719/mod/aim_quiz Removed Files: aimpage.php config.html deleteserver.php depends.php editgrade.php icon.gif index.php lib.php mod.html servers.php subjects.php version.php view.php Log Message: Remove old aim_quiz module --- aimpage.php DELETED --- --- config.html DELETED --- --- deleteserver.php DELETED --- --- depends.php DELETED --- --- editgrade.php DELETED --- --- icon.gif DELETED --- --- index.php DELETED --- --- lib.php DELETED --- --- mod.html DELETED --- --- servers.php DELETED --- --- subjects.php DELETED --- --- version.php DELETED --- --- view.php DELETED --- | 
| Update of /cvsroot/aimmath/moodle/lang/en/help/aim_quiz In directory sc8-pr-cvs1:/tmp/cvs-serv19719/lang/en/help/aim_quiz Removed Files: addupdate.html addupdate_name.html addupdate_quiz.html addupdate_server.html addupdate_serversubject.html addupdate_subject.html admin_quiz.html admin_sourcedir.html admin_sourcefile.html admin_subject.html adminoverview.html analyze_question.html analyze_quiz.html analyze_subject.html config.html config_autoregister.html config_grademultiplier.html config_latexoutput.html editgrade.html editgrade_comment.html editgrade_new.html editgrade_old.html gradesoverview.html index.html mods.html overview.html passwd.html passwd_passwd.html passwd_subject.html review_quiz.html review_subject.html server.html server_address.html server_name.html server_passwd.html subject.html subject_passwd.html subject_subject.html try_question.html try_quiz.html Log Message: Remove old aim_quiz module --- addupdate.html DELETED --- --- addupdate_name.html DELETED --- --- addupdate_quiz.html DELETED --- --- addupdate_server.html DELETED --- --- addupdate_serversubject.html DELETED --- --- addupdate_subject.html DELETED --- --- admin_quiz.html DELETED --- --- admin_sourcedir.html DELETED --- --- admin_sourcefile.html DELETED --- --- admin_subject.html DELETED --- --- adminoverview.html DELETED --- --- analyze_question.html DELETED --- --- analyze_quiz.html DELETED --- --- analyze_subject.html DELETED --- --- config.html DELETED --- --- config_autoregister.html DELETED --- --- config_grademultiplier.html DELETED --- --- config_latexoutput.html DELETED --- --- editgrade.html DELETED --- --- editgrade_comment.html DELETED --- --- editgrade_new.html DELETED --- --- editgrade_old.html DELETED --- --- gradesoverview.html DELETED --- --- index.html DELETED --- --- mods.html DELETED --- --- overview.html DELETED --- --- passwd.html DELETED --- --- passwd_passwd.html DELETED --- --- passwd_subject.html DELETED --- --- review_quiz.html DELETED --- --- review_subject.html DELETED --- --- server.html DELETED --- --- server_address.html DELETED --- --- server_name.html DELETED --- --- server_passwd.html DELETED --- --- subject.html DELETED --- --- subject_passwd.html DELETED --- --- subject_subject.html DELETED --- --- try_question.html DELETED --- --- try_quiz.html DELETED --- | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 19:00:37
      
     | 
| Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv19719/lang/en Removed Files: aim_quiz.php Log Message: Remove old aim_quiz module --- aim_quiz.php DELETED --- | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 18:31:18
      
     | 
| Update of /cvsroot/aimmath/moodle/lang/en_yo In directory sc8-pr-cvs1:/tmp/cvs-serv14086/lang/en_yo Added Files: math_assignment.php moodle.php Log Message: New module math_assignment --- NEW FILE: math_assignment.php --- <?PHP // $Id: math_assignment.php,v 1.1 2003/09/09 18:31:07 gustav_delius Exp $ #------------------------------------------------------------ $string['modulename'] = "Assignment"; $string['modulenameplural'] = "Assignments"; #------------------------------------------------------------ $string['actions'] = "Actions"; $string['address'] = "Address"; $string['adminlinks'] = "Admin Links"; $string['adminonly'] = "You must be an administrator to use this page."; $string['aimpage'] = "AiM Quiz Page"; $string['aimquiz'] = "AiM Quiz"; $string['aimserver'] = "AiM Server"; $string['aimserverconfig'] = "AiM Server Configuration"; $string['aimserverplural'] = "AiM Servers"; $string['aimserversubjects'] = "AiM Server Subjects"; $string['aimsubject'] = "AiM Subject"; $string['analyseresults'] = "Analyse AiM Results"; $string['attemptquiz'] = "Attempt AiM Quiz"; $string['autoregister'] = "Auto-register Students with AiM"; $string['browsesource'] = "Browse Source"; $string['createpdf'] = "Display printer friendly (pdf) version of this page"; $string['computer'] = "Computer"; $string['comment'] = "Comment"; $string['commented'] = "Commented"; $string['deletequery'] = "Are you sure you want to delete this server?"; $string['edited'] = "Edited"; $string['edit'] = "Edit"; $string['editgrade'] = "Edit AiM Grade"; $string['editquiz'] = "AiM Quiz Administration"; //"Edit Quiz"; $string['editsubject'] = "AiM Subject Administration"; //"Edit Subject"; $string['failed'] = "Error : Could not save the changes made."; $string['grademultiplier'] = "Grade Multiplier"; $string['gradeoverride'] = "set by teacher"; $string['gradeoverridemsg'] = "Since the teacher has modified your grades, attempting the assignment will not change them. However you can still view the AiM assignment page for reference."; $string['guestsno'] = "Sorry, guests can not view or attempt assignments"; $string['html'] = "HTML"; $string['invalid'] = "Error : Invalid entry"; $string['invalidgrademultiplier'] = "Grade multiplier must be a number between 0.1 and 10000 inclusive."; $string['latexoutput'] = "Default LaTeX Output Method"; $string['loading'] = "Starting Download..."; $string['oldgrade'] = "Current Grade"; $string['paper'] = "Paper"; $string['passwd'] = "Password"; $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['mathml'] = "MathML"; $string['managesubjects'] = "Manage Subjects"; $string['mathassignmentsettings'] = "Assignment Configuration"; $string['name'] = "Name"; $string['newgrade'] = "Override Grade"; $string['newitem'] = "New..."; $string['noaccess'] = "Error : The administrator has not granted access to this subject on this server"; $string['nooutput'] = "Error : No usable data was returned from the AiM server. The server may be down."; $string['noreview'] = "You are not allowed to review this assignment"; $string['notattempted'] = "You have not attempted this assignment."; $string['notmarked'] = "The assignment has not yet been marked."; $string['notteacher'] = "You must be a teacher to use this page."; $string['refresh'] = "Refresh"; $string['reviewresults'] = "Review Results"; $string['serverinuse'] = "Error : Can not delete server as one or more Assignments depend on it."; $string['student_password'] = "Student AiM Password"; $string['studentnotattempted'] = "The student has not attempted this assignment."; $string['subjectinuse'] = "Error : Can not delete subject as one or more Assignments depend on it."; $string['subjectplural'] = "Subjects"; $string['subjectson'] = "Subjects on "; $string['teachercomment'] = "Teacher Comment"; $string['timedue'] = "Due Date and Time"; $string['tryquiz'] = "Try AiM Assignment"; $string['viewquiz'] = "View AiM Assignment"; ?> --- NEW FILE: moodle.php --- (This appears to be a binary file; contents omitted.) | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 18:31:16
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/math_assignment/db
In directory sc8-pr-cvs1:/tmp/cvs-serv14086/mod/math_assignment/db
Added Files:
	mysql.php mysql.sql 
Log Message:
New module math_assignment
--- NEW FILE: mysql.php ---
<?PHP // $Id: mysql.php,v 1.1 2003/09/09 18:31:07 gustav_delius Exp $
function math_assignment_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
    global $CFG;
    return true;
}
?>
--- NEW FILE: mysql.sql ---
# This file contains a complete database schema for all the 
# tables used by this module, written in SQL
# It may also contain INSERT statements for particular data 
# that may be used, especially new entries in the table log_display
CREATE TABLE `prefix_math_assignment` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `course` int(10) unsigned NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `problems` varchar(255) NOT NULL default '',
  `solutions` varchar(255) NOT NULL default '',
  `aimsubject` int(10) NOT NULL default '0',
  `aimquiz` varchar(255) NOT NULL default '',
  `papergrade` int(10) unsigned NOT NULL default '0',
  `aimgrade` int(10) unsigned NOT NULL default '0',
  `timedue` int(10) unsigned NOT NULL default '0',
  `timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (`id`)
) TYPE=MyISAM COMMENT='Main information about each math assignment';
CREATE TABLE `prefix_math_assignment_subject` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `server` int(10) unsigned NOT NULL default '0',
  `password` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE `UNIQUE` (`name`, `server`)
) TYPE=MyISAM COMMENT='AiM subjects used by math assignments';
CREATE TABLE `prefix_math_assignment_server` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `address` varchar(255) NOT NULL default '',
  `student_passwd` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE `NAME` (`name`)
) TYPE=MyISAM COMMENT='AiM servers used by math assignments';
CREATE TABLE `prefix_math_assignment_grades` (
  `assignment` int(10) unsigned NOT NULL default '0',
  `userid` int(10) unsigned NOT NULL default '0',
  `papergrade` int(10) NOT NULL default '-1',
  `papertimemodified` int(10) unsigned NOT NULL default '0',
  `aimgrade` int(10) NOT NULL default '-1',
  `aimtimemodified` int(10) unsigned NOT NULL default '0',
  `aimoverride` tinyint(1) NOT NULL default '0',
  `aimcomment` text NOT NULL default '',
PRIMARY KEY (`assignment`,`userid`)
) TYPE=MyISAM COMMENT='Final math assignment grade (may be best of several attempts)';
INSERT `prefix_config` SET `name`="math_assignment_debug",`value`="0";
INSERT `prefix_config` SET `name`="math_assignment_auto_register",`value`="1";
INSERT `prefix_config` SET `name`="math_assignment_grade_multiplier",`value`="1";
INSERT `prefix_config` SET `name`="math_assignment_default_latex_output",`value`="0";
INSERT `prefix_config` SET `name`="math_assignment_server_display", `value`="2";
INSERT `prefix_config` SET `name`="math_assignment_aim_display", `value`="1";
 | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 18:31:14
      
     | 
| Update of /cvsroot/aimmath/moodle/lang/en In directory sc8-pr-cvs1:/tmp/cvs-serv14086/lang/en Added Files: math_assignment.php Log Message: New module math_assignment --- NEW FILE: math_assignment.php --- <?PHP // $Id: math_assignment.php,v 1.1 2003/09/09 18:31:07 gustav_delius Exp $ #------------------------------------------------------------ $string['modulename'] = "Math Assignment"; $string['modulenameplural'] = "Math Assignments"; #------------------------------------------------------------ $string['actions'] = "Actions"; $string['address'] = "Address"; $string['adminlinks'] = "Admin Links"; $string['adminonly'] = "You must be an administrator to use this page."; $string['aimdisplay'] = "Display AiM Details For"; $string['aimpage'] = "AiM Quiz Page"; $string['aimquiz'] = "AiM Quiz"; $string['aimserver'] = "AiM Server"; $string['aimserverconfig'] = "AiM Server Configuration"; $string['aimserverplural'] = "AiM Servers"; $string['aimserversubjects'] = "AiM Server Subjects"; $string['aimsubject'] = "AiM Subject"; $string['always'] = "Always"; $string['analyseresults'] = "Analyse AiM Results"; $string['attemptquiz'] = "Attempt AiM Quiz"; $string['autoregister'] = "Auto-register Students with AiM"; $string['browsesource'] = "Browse AiM Source"; $string['createpdf'] = "Display printer friendly (pdf) version of this page"; $string['computer'] = "Computer"; $string['comment'] = "Comment"; $string['commented'] = "Commented"; $string['deletequery'] = "Are you sure you want to delete this server?"; $string['edited'] = "Edited"; $string['edit'] = "Edit"; $string['editgrade'] = "Edit AiM Grade"; $string['editquiz'] = "AiM Quiz Administration"; //"Edit Quiz"; $string['editsubject'] = "AiM Subject Administration"; //"Edit Subject"; $string['failed'] = "Error : Could not save the changes made."; $string['grademultiplier'] = "Grade Multiplier"; $string['gradeoverride'] = "set by teacher"; $string['gradeoverridemsg'] = "Since the teacher has modified your grades, attempting the assignment will not change them. However you can still view the AiM assignment page for reference."; $string['guestsno'] = "Sorry, guests can not view or attempt assignments"; $string['html'] = "HTML"; $string['ifduplicates'] = "When Duplicate Subjects Exist"; $string['ifmultiple'] = "When Multiple Servers Exist"; $string['invalid'] = "Error : Invalid entry"; $string['invalidgrademultiplier'] = "Grade multiplier must be a number between 0.1 and 10000 inclusive."; $string['latexoutput'] = "Default LaTeX Output Method"; $string['loading'] = "Starting Download..."; $string['oldgrade'] = "Current Grade"; $string['paper'] = "Paper"; $string['passwd'] = "Password"; $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"; $string['mathassignmentsettings'] = "Math Assignment Configuration"; $string['maxgrade'] = "Maximum Grade"; $string['maxgradepaperonly'] = "(paper-based hand-marked questions only)"; $string['name'] = "Name"; $string['newgrade'] = "Override Grade"; $string['newitem'] = "New..."; $string['never'] = "Never"; $string['noaccess'] = "Error : The administrator has not granted access to this subject on this server"; $string['nobody'] = "Nobody"; $string['nooutput'] = "Error : No usable data was returned from the AiM server. The server may be down."; $string['noreview'] = "You are not allowed to review this assignment"; $string['notattempted'] = "You have not attempted this assignment."; $string['notavailabletostudentsyet'] = "not available to students yet"; $string['notmarked'] = "The assignment has not yet been marked."; $string['notteacher'] = "You must be a teacher to use this page."; $string['refresh'] = "Refresh"; $string['reset'] = "Reset"; $string['reviewresults'] = "Review Results"; $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."; $string['subject'] = "Subject"; $string['subjectinuse'] = "Error : Can not delete subject as one or more Assignments depend on it."; $string['subjectplural'] = "Subjects"; $string['subjectson'] = "Subjects on "; $string['timedue'] = "Due Date and Time"; $string['tryquiz'] = "Try AiM Assignment"; $string['viewproblems'] = "View Problems"; $string['viewquiz'] = "View AiM Assignment"; $string['viewsolutions'] = "View Solutions"; ?> | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 18:30:04
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/math_assignment/db In directory sc8-pr-cvs1:/tmp/cvs-serv13777/db Log Message: Directory /cvsroot/aimmath/moodle/mod/math_assignment/db added to the repository | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 18:30:00
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv13756/math_assignment Log Message: Directory /cvsroot/aimmath/moodle/mod/math_assignment added to the repository | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 18:29:48
      
     | 
| Update of /cvsroot/aimmath/moodle/lang/en/help/math_assignment In directory sc8-pr-cvs1:/tmp/cvs-serv13729/math_assignment Log Message: Directory /cvsroot/aimmath/moodle/lang/en/help/math_assignment added to the repository | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 18:29:41
      
     | 
| Update of /cvsroot/aimmath/moodle/lang/en_yo In directory sc8-pr-cvs1:/tmp/cvs-serv13697/en_yo Log Message: Directory /cvsroot/aimmath/moodle/lang/en_yo added to the repository | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 11:58:40
      
     | 
| Update of /cvsroot/aimmath/AIM/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv24855/doc
Modified Files:
	installlin.html installwin.html 
Log Message:
added remark that old questions should be recompiled after installation.
Index: installlin.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installlin.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** installlin.html	8 Sep 2003 22:01:25 -0000	1.4
--- installlin.html	9 Sep 2003 11:58:36 -0000	1.5
***************
*** 2,6 ****
  <!--  @(#)$Id$ -->
  <head>
!  <title>Installing AiM under Unix</title>
  </head>
  <body>
--- 2,6 ----
  <!--  @(#)$Id$ -->
  <head>
!  <title>Installing AiM under Linux</title>
  </head>
  <body>
***************
*** 283,287 ****
      to stop and start the Tomcat server.
     </li>
!   </ul>
   </li>
   <li>The installation is complete. Now start your Tomcat server, by
--- 283,287 ----
      to stop and start the Tomcat server.
     </li>
!   </ul><p />
   </li>
   <li>The installation is complete. Now start your Tomcat server, by
***************
*** 319,323 ****
    <font color='green'>/usr/local/tomcat/conf/tomcat-users.xml</font>). See
    <a href = 
!   "http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html">http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html</a> for more details.
   </li>
   <li>Point your webbrowser at the URL of the AiM server. This will be something
--- 319,323 ----
    <font color='green'>/usr/local/tomcat/conf/tomcat-users.xml</font>). See
    <a href = 
!   "http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html">http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html</a> for more details.<p/>
   </li>
   <li>Point your webbrowser at the URL of the AiM server. This will be something
***************
*** 329,333 ****
   You should click on 'Zone login' to log on as the administrator (with empty
   password).  After logging in, you can set a password, create new
!  subjects and so on.
   </li>
   <li><a name="copy">(Optional) You can copy</a> data from an old AiM 
--- 329,333 ----
   You should click on 'Zone login' to log on as the administrator (with empty
   password).  After logging in, you can set a password, create new
!  subjects and so on.<p/>
   </li>
   <li><a name="copy">(Optional) You can copy</a> data from an old AiM 
***************
*** 343,346 ****
--- 343,352 ----
   to replace every occurrence of <font color='green'>ROOT</font> by 
   <font color='green'>AiM</font> in all the files.</li>
+  </p>
+  If you installed the new AiM over an existing one or if you copied existing 
+  questions into your root folder over as described above, you should recompile 
+  all the questions. There is a convenient link on the subject administration 
+  page to recompile all visible quizzes in a subject in one go. 
+  </li>
  </ol>
  
***************
*** 408,412 ****
  </ul>
  <hr/>
! Last modified by Gustav Delius on 08/09/03
  
  </body>
--- 414,418 ----
  </ul>
  <hr/>
! Last modified by Gustav Delius on 09/09/03
  
  </body>
Index: installwin.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installwin.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** installwin.html	8 Sep 2003 22:01:26 -0000	1.7
--- installwin.html	9 Sep 2003 11:58:36 -0000	1.8
***************
*** 202,205 ****
--- 202,210 ----
    every occurrence of <font color='green'>ROOT</font> by <font
    color='green'>AiM</font> in all the files.
+   <p/>
+   If you installed the new AiM over an existing one or if you copied existing 
+   questions into your root folder over as described above, you should recompile 
+   all the questions. There is a convenient link on the subject administration 
+   page to recompile all visible quizzes in a subject in one go.
   </li>
  </ol>
***************
*** 269,273 ****
  
  <hr>
! Last modified by Gustav Delius on 08/09/03
  
  </body>
--- 274,278 ----
  
  <hr>
! Last modified by Gustav Delius on 09/09/03
  
  </body>
 | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 02:51:26
      
     | 
| Update of /cvsroot/aimmath/AIM/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv22976/doc
Modified Files:
	installlin.html installwin.html 
Log Message:
Minor corrections to installation instructions.
Index: installlin.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installlin.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** installlin.html	1 Sep 2003 09:01:48 -0000	1.3
--- installlin.html	8 Sep 2003 22:01:25 -0000	1.4
***************
*** 2,9 ****
  <!--  @(#)$Id$ -->
  <head>
!  <title>Installing AiM under Windows</title>
  </head>
  <body>
! <h1><a name="install">Installing AiM under Windows</a></h1>
  
  These are instructions for installing and configuring AiM,
--- 2,9 ----
  <!--  @(#)$Id$ -->
  <head>
!  <title>Installing AiM under Unix</title>
  </head>
  <body>
! <h1><a name="install">Installing AiM under Unix</a></h1>
  
  These are instructions for installing and configuring AiM,
***************
*** 12,16 ****
  to be some problems under Mac OSX).
  <p/>
! The installation consists of 5 steps:
  <ol>
  <li><a href="#maple">Install Maple</a></li>
--- 12,16 ----
  to be some problems under Mac OSX).
  <p/>
! The installation consists of 4 steps:
  <ol>
  <li><a href="#maple">Install Maple</a></li>
***************
*** 254,258 ****
          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
--- 254,258 ----
          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
***************
*** 408,412 ****
  </ul>
  <hr/>
! Last modified by Greg Gamble on 01/09/03
  
  </body>
--- 408,412 ----
  </ul>
  <hr/>
! Last modified by Gustav Delius on 08/09/03
  
  </body>
Index: installwin.html
===================================================================
RCS file: /cvsroot/aimmath/AIM/doc/installwin.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** installwin.html	6 Sep 2003 20:00:39 -0000	1.6
--- installwin.html	8 Sep 2003 22:01:26 -0000	1.7
***************
*** 7,12 ****
  <h1><a name="install">Installing AiM under Windows</a></h1>
  
! These are instructions for installing and configuring AiM. Installation
! has been tested with Windows 2000 and Windows XP.
  <p/>
  The installation consists of 4 steps:
--- 7,13 ----
  <h1><a name="install">Installing AiM under Windows</a></h1>
  
! These are instructions for installing and configuring AiM under Windows. Installation
! has been tested with Windows 2000 and Windows XP but there is no reason why it would
! not work with other versions.
  <p/>
  The installation consists of 4 steps:
***************
*** 116,142 ****
    <font color='green'>C:\Tomcat\webapps\</font> directory. Do not unzip it
    into the webapps directory itself but into a subdirectory that you
!   create.  You can choose any name for this subdirectory. Below we will
    assume that you chose the name "<font color='green'>AiM</font>".  If
    you chose something different, simply replace
    "<font color='green'>AiM</font>" by your choice in all filenames and
!   URLs below.  <p/> If you already have a working AiM installation
!   then you have to make an important choice. Do you want to
!   <ol>
!    <li>keep the old installation and install AiM 3.0 in a different
!     subdirectory of the webapps directory. You will then have two
!     completely independent installations. The new AiM server will not know
!     about the students and quizzes on the old installation unless you copy
!     the data over as explained in <a href="#copy">step 5</a> below.
!    </li>
!    <li>update by overwriting your old installation with AiM 3.0. In this
!     case you should unzip the new AiM into the <font
!     color='green'>C:/Tomcat/webapps/ROOT/</font> directory (or to wherever
!     you chose to install the old AiM). The old subjects, quizzes and
!     student data will then still be available in the updated AiM
!     installation.
!    </li>
!   </ol>
    <p/>
!  </li>
   <li>
    Open the maple subfolder of your new AiM installation. (If you
--- 117,153 ----
    <font color='green'>C:\Tomcat\webapps\</font> directory. Do not unzip it
    into the webapps directory itself but into a subdirectory that you
!   create.  You can choose any name for this subdirectory. 
!   If you choose ROOT then the directory will not appear in the URL of 
!   the server pages for the AiM quizzes. Any other choice will appear 
!   in the URL. (It is possible to have multiple AiM installations, and 
!   this simple rule ensures the URLs of these parallel installations are 
!   distinguished.) Below we will
    assume that you chose the name "<font color='green'>AiM</font>".  If
    you chose something different, simply replace
    "<font color='green'>AiM</font>" by your choice in all filenames and
!   URLs below.  <p/> 
!   If you already have a working AiM installation then you have to make an 
!   important choice:
    <p/>
!   <em>Do you want to ...</em>
!   <blockquote>
!   <dl>
!    <dt><em>keep the old installation and install AiM 3.0 in a different 
!     subdirectory of the webapps directory?</em></dt>
!    <dd>You will then have two completely independent installations. 
!     The new AiM server will not know about the students and quizzes 
!     on the old installation unless you copy the data over as explained
!     in the <a href="#copy">optional copying step</a> below.
!     </dd>
!    <dt><em>... or update by overwriting your old installation with AiM 3.0?
!     </em></dt>
!    <dd>In this case, you should unzip the new AiM into the 
!     <font color='green'>/usr/local/tomcat/webapps/ROOT/</font> directory (or
!     to wherever you chose to install the old AiM). The old subjects, quizzes
!     and student data will then still be available in the updated AiM 
!     installation.</dd>
!   </dl>
!   </blockquote>
!   </li>
   <li>
    Open the maple subfolder of your new AiM installation. (If you
***************
*** 172,179 ****
    unzipped AiM.  You should click on 'Zone login' to log on as the
    administrator (with empty password).  After logging in, you can set
!   a password, create new subjects and so on.<p/>  Students will be 
    able to log in at <font color='green'><a
    href="http://localhost:8080/AiM/">http://your.host.name:8080/AiM/</a></font> 
!   (without the <font color='green'>admin.html</font>).
   </li>
   <li>
--- 183,190 ----
    unzipped AiM.  You should click on 'Zone login' to log on as the
    administrator (with empty password).  After logging in, you can set
!   a password, create new subjects and so on.  Students will be 
    able to log in at <font color='green'><a
    href="http://localhost:8080/AiM/">http://your.host.name:8080/AiM/</a></font> 
!   (without the <font color='green'>admin.html</font>).<p/>
   </li>
   <li>
***************
*** 258,262 ****
  
  <hr>
! Last modified by Neil Strickland on 06/09/03
  
  </body>
--- 269,273 ----
  
  <hr>
! Last modified by Gustav Delius on 08/09/03
  
  </body>
 | 
| 
      
      
      From: <mo...@us...> - 2003-09-09 01:59:50
      
     | 
| Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv8259 Modified Files: AuthoringGuide.pdf Log Message: added more documentation Index: AuthoringGuide.pdf =================================================================== RCS file: /cvsroot/aimmath/AIM/doc/AuthoringGuide.pdf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsjrRxgU and /tmp/cvsQmzclF differ | 
| 
      
      
      From: <gus...@us...> - 2003-09-09 01:52:59
      
     | 
| Update of /cvsroot/aimmath/moodle/mod/aim_quiz
In directory sc8-pr-cvs1:/tmp/cvs-serv25709/mod/aim_quiz
Modified Files:
	lib.php 
Log Message:
update of AiM to pdf conversion
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/aim_quiz/lib.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** lib.php	6 Sep 2003 08:24:25 -0000	1.8
--- lib.php	8 Sep 2003 17:55:38 -0000	1.9
***************
*** 218,223 ****
  
      // set LaTeX output mode required
!     if (!function_exists('editer'))
!         $mathdisplay = "html";
      $postdata= aim_quiz_add_arg_to_url_data($postdata, "MathDisplay",  $mathdisplay);
      set_time_limit(240);
--- 218,222 ----
  
      // set LaTeX output mode required
! 
      $postdata= aim_quiz_add_arg_to_url_data($postdata, "MathDisplay",  $mathdisplay);
      set_time_limit(240);
***************
*** 516,522 ****
  }
  
! function aim_quiz_pdf($aim_quiz, $course, $data) {
  /// Function which extracts the latex from the AiM quiz page and converts it to pdf
! /// This is not yet complete
  /// The strategy is:
  /// 1) use regexps to convert anything on the quiz page that
--- 515,521 ----
  }
  
! function aim_quiz_pdf($aim_quiz, $course, $data, $solutions="true") {
  /// Function which extracts the latex from the AiM quiz page and converts it to pdf
! /// This is not yet complete. In particular figures are ignored.
  /// The strategy is:
  /// 1) use regexps to convert anything on the quiz page that
***************
*** 526,529 ****
--- 525,529 ----
  
      $latex = "\\documentclass[12pt]{article}\n
+ \\usepackage{amsmath}\n
  \\begin{document}\n
  \\begin{center}
***************
*** 531,546 ****
  \\end{center}"; 
  
      // remove everything before the first question
      $data = preg_replace("/^[\s\S]*?(?=id=\"question)/", 
          "",$data);
!         
!     // remove all answers and solutions
!     $data = preg_replace("/class=\"lastanswer\"[\s\S]*?((?=id=\"question)|$)/", 
!         "",$data);
!         
      // remove questionheaders including descriptions
      $data = preg_replace("/class=\"questionheader\"[\s\S]*?class=\"questionbody/", 
!         "",$data);
!     
      // Questions    
      $data = preg_replace("/id=\"question(\d+)\"/i", 
--- 531,567 ----
  \\end{center}"; 
  
+ //echo htmlentities($data);
+ 
      // remove everything before the first question
      $data = preg_replace("/^[\s\S]*?(?=id=\"question)/", 
          "",$data);
! 
!     if (!$solutions) {          
!         // remove all answers and solutions
!         $data = preg_replace("/class=\"lastanswer\"[\s\S]*?((?=id=\"question)|$)/", 
!                 "",$data);
!     }
!     else {
!         // remove answers but keep solution
!         //$data = preg_replace("/class=\"lastanswer\"[\s\S]*?((?=class=\"rightanswer)|$)/", 
!         //        "<latex>\n\n\\noindent{\\bf Right Answer:}\n\n</latex>",$data);
!         $data = preg_replace("/class=\"lastanswer/", 
!                 "<latex>\n\n\\noindent{\\bf Your Answer: }</latex>",$data);
!         $data = preg_replace("/Your last answer was ([A-Z])/", 
!                 "<latex>$1</latex>",$data);
!                 
!         $data = preg_replace("/class=\"rightanswer/", 
!                 "<latex>\n\n\\noindent{\\bf Right Answer: }</latex>",$data);
!         $data = preg_replace("/The correct answer is ([A-Z])/", 
!                 "<latex>$1</latex>",$data);                
!                 
!         $data = preg_replace("/class=\"solution/", 
!                 "<latex>\n\n\\noindent{\\bf Solution:}\n\n</latex>",$data);
!     }    
!   
      // remove questionheaders including descriptions
      $data = preg_replace("/class=\"questionheader\"[\s\S]*?class=\"questionbody/", 
!             "",$data);
! 
      // Questions    
      $data = preg_replace("/id=\"question(\d+)\"/i", 
***************
*** 549,562 ****
      // Parts    
      $data = preg_replace("/id=\"question(\d+).(\d+)\"/i", 
!         "<latex>\n\n\vspace{2mm}{\\bf Part \$2}\n\n</latex>",$data);
      
!     // replace radio buttons by circles
!     $data = preg_replace("/(type=\"radio\"[^\/]*value=\")[A-Z]\"/",
!         "<latex>\n\n $\circ$ </latex>",$data);
      
      // replace checkboxes by diamonds    
!     $data = preg_replace("/(type=\"checkbox\"[^\/]*value=\")[A-Z]\"/",
!         "<latex>\n\n $\diamond$ </latex>",$data);
!     // replace input box by ....
  //    preg_match_all("/<latex>([\s\S]*)?<\/latex>/", $data, $matches);
  //    $latex .= implode(" ", $matches[0]);
--- 570,588 ----
      // 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 
!     $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)
!     $data = preg_replace("/\\\\small[^}]*./",
!         "",$data);
!         
!     // We might at some point want to replace input box by ....
  //    preg_match_all("/<latex>([\s\S]*)?<\/latex>/", $data, $matches);
  //    $latex .= implode(" ", $matches[0]);
***************
*** 572,587 ****
  
      $latex .= "\n\n\\end{document}";
      $fp=fopen("temp.tex","w");
      fwrite($fp,$latex);
      fclose($fp);
      
!     // The next step is to call pdflatex to convert the latex to pdf
!     // Unfortunately I have the problem that PHP hangs after executing
!     // any command using exec or similar.
!     // Does anyone know a solution? Is it a problem with the particular
!     // version of PHP or apache that I am using?
      
- //    $latexoutput = system("pdflatex -interaction=batchmode temp.tex");
- //    exec(cmd);
      return true;
  }
--- 598,612 ----
  
      $latex .= "\n\n\\end{document}";
+     
+     // Write latex to disk and then convert to pdf
+     // The use of the temp file needs to be changed
      $fp=fopen("temp.tex","w");
      fwrite($fp,$latex);
      fclose($fp);
+     exec("pdflatex -interaction=batchmode temp.tex");
      
!     // The following should be changed to load temp.pdf into a separate window
!     redirect("temp.pdf");
      
      return true;
  }
 |