Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv18245
Modified Files:
config.html lib.php
Log Message:
grades are now floats
Index: config.html
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/config.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** config.html 11 Jan 2004 14:08:06 -0000 1.7
--- config.html 11 Jan 2004 19:43:12 -0000 1.8
***************
*** 2,6 ****
$straimserverconfig = get_string("aimserverconfig", "math_assignment");
$strautoregister = get_string("autoregister", "math_assignment");
- $strgrademultiplier = get_string("grademultiplier", "math_assignment");
$strlatexoutput = get_string("latexoutput", "math_assignment");
$straimdisplay = get_string("aimdisplay", "math_assignment");
--- 2,5 ----
***************
*** 34,42 ****
<td align="left"><?php helpbutton ("config_autoregister", $strautoregister, "math_assignment"); ?></td>
</tr>
! <tr valign="top">
! <td align="right"><p><b><?php echo $strgrademultiplier; ?>:</b></p></td>
! <td align="left"><input type="text" name="math_assignment_grade_multiplier" size="20" maxlength="20" value="<?php echo $CFG->math_assignment_grade_multiplier; ?>" /></td>
! <td align="left"><?php helpbutton ("config_grademultiplier", $strgrademultiplier, "math_assignment"); ?></TD>
! </tr>
<tr valign="top">
<td align="right"><p><b><?php echo $strlatexoutput; ?>:</b></p></td>
--- 33,37 ----
<td align="left"><?php helpbutton ("config_autoregister", $strautoregister, "math_assignment"); ?></td>
</tr>
!
<tr valign="top">
<td align="right"><p><b><?php echo $strlatexoutput; ?>:</b></p></td>
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** lib.php 11 Jan 2004 17:20:31 -0000 1.47
--- lib.php 11 Jan 2004 19:43:12 -0000 1.48
***************
*** 644,651 ****
// find the row which gives the totals
if (preg_match("/<td(?:\s[^<>]*?|)>Total<\/td>(?:.(?!<td\s|<td>))*.?<td(?:\s[^<>]*?|)>((?:.(?!<\/td>))*?.?)<\/td>(?:.(?!<td\s|<td>))*.?<td(?:\s[^<>]*?|)>((?:.(?!<\/td>))*?.?)<\/td>/si", $data, $matches)) {
! if (empty($CFG->math_assignment_grade_multiplier))
! $CFG->math_assignment_grade_multiplier = 1.0;
! $max_grade = (int) (((float) decodeHTML($matches[1])) * ((float) $CFG->math_assignment_grade_multiplier));
! $grade = (int) (((float) decodeHTML($matches[2])) * ((float) $CFG->math_assignment_grade_multiplier));
}
}
--- 644,649 ----
// find the row which gives the totals
if (preg_match("/<td(?:\s[^<>]*?|)>Total<\/td>(?:.(?!<td\s|<td>))*.?<td(?:\s[^<>]*?|)>((?:.(?!<\/td>))*?.?)<\/td>(?:.(?!<td\s|<td>))*.?<td(?:\s[^<>]*?|)>((?:.(?!<\/td>))*?.?)<\/td>/si", $data, $matches)) {
! $max_grade = (float) decodeHTML($matches[1]);
! $grade = (float) decodeHTML($matches[2]);
}
}
***************
*** 1110,1113 ****
--- 1108,1112 ----
if (!$math_assignment->papersheetsreturned) {
$papergrade = "<span style=\"color: silver \">$papergrade</span>";
+ }
// don't give results if assignment still open
if ($math_assignment->timedue > time()) {
|