Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1:/tmp/cvs-serv29125/mod/math_assignment
Modified Files:
lib.php mod.html
Log Message:
Updated tex file selection logic.
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** lib.php 23 Sep 2003 22:49:41 -0000 1.18
--- lib.php 24 Sep 2003 11:48:41 -0000 1.19
***************
*** 25,28 ****
--- 25,32 ----
}
$math_assignment->problems = trim($math_assignment->problems);
+ if ($math_assignment->problems) {
+ if (math_assignment_is_tex_file($math_assignment->problems) xor $math_assignment->aimquiz)
+ return false; // sheet is not of the correct type
+ }
// solutions
***************
*** 37,40 ****
--- 41,48 ----
}
$math_assignment->solutions = trim($math_assignment->solutions);
+ if ($math_assignment->solutions) {
+ if (math_assignment_is_tex_file($math_assignment->solutions) xor $math_assignment->aimquiz)
+ return false; // sheet is not of the correct type
+ }
$math_assignment->timemodified = time();
***************
*** 64,67 ****
--- 72,79 ----
}
$math_assignment->problems = trim($math_assignment->problems);
+ if ($math_assignment->problems) {
+ if (math_assignment_is_tex_file($math_assignment->problems) xor $math_assignment->aimquiz)
+ return false; // sheet is not of the correct type
+ }
// solutions
***************
*** 76,79 ****
--- 88,95 ----
}
$math_assignment->solutions = trim($math_assignment->solutions);
+ if ($math_assignment->solutions) {
+ if (math_assignment_is_tex_file($math_assignment->solutions) xor $math_assignment->aimquiz)
+ return false; // sheet is not of the correct type
+ }
$math_assignment->timemodified = time();
Index: mod.html
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/mod.html,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** mod.html 24 Sep 2003 10:58:25 -0000 1.18
--- mod.html 24 Sep 2003 11:48:41 -0000 1.19
***************
*** 227,230 ****
--- 227,240 ----
</tr>
+ <?php
+ if ($aimsubject) {
+ ?>
+ <tr valign="top">
+ <td align="center" colspan="2"><p><?php print_string("mustbetex", "math_assignment"); ?></p></td>
+ </tr>
+ <?php
+ }
+ ?>
+
<tr valign="top">
<td align="right"><p><b><?php echo $strmaxgrade; ?>:</b></p></td>
***************
*** 232,236 ****
<input type="text" name="papergrade" size="10" maxlength="10" value="<?php p($form->papergrade); ?>" /> <?php
// print the following clarification only if there can be an AiM component
! if ($aimsubject > 0)
print_string("maxgradepaperonly", "math_assignment");
helpbutton("addupdate_maxgrade", $strmaxgrade, "math_assignment");
--- 242,246 ----
<input type="text" name="papergrade" size="10" maxlength="10" value="<?php p($form->papergrade); ?>" /> <?php
// print the following clarification only if there can be an AiM component
! if ($aimsubject)
print_string("maxgradepaperonly", "math_assignment");
helpbutton("addupdate_maxgrade", $strmaxgrade, "math_assignment");
|