Update of /cvsroot/aimmath/moodle/mod/math_assignment
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25856
Modified Files:
lib.php mod.html
Log Message:
added assessmentmode
Index: mod.html
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/mod.html,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** mod.html 2 Mar 2004 21:11:51 -0000 1.28
--- mod.html 18 Mar 2004 22:29:51 -0000 1.29
***************
*** 7,11 ****
/*
* Variables specific to this module are:
! * name, problems, solutions, aimsubject, aimquiz, papergrade, aimgrade, timedue,
* solutiontime.
* We check that these are setup here.
--- 7,11 ----
/*
* Variables specific to this module are:
! * name, problems, solutions, aimsubject, aimquiz, papergrade, aimgrade, assessmentmode, timedue,
* solutiontime.
* We check that these are setup here.
***************
*** 44,47 ****
--- 44,50 ----
$form->aimgrade = 0;
}
+ if (!isset($form->assessmentmode)) {
+ $form->assessmentmode = 'assessment';
+ }
if (!isset($form->timedue)) {
$form->timedue = 0;
***************
*** 264,267 ****
--- 267,280 ----
</tr>
+ <tr>
+ <td align="right"><p><b><?php echo get_string('assessmentmode', 'math_assignment'); ?>:</b></p></td>
+ <td>
+ <input type="radio" name="assessmentmode" value="assessment" <?php p(($form->assessmentmode == 'assessment') ? "checked" : "") ?> />
+ <?php p(get_string("assessed","math_assignment")); ?>
+ <input type="radio" name="assessmentmode" value="practice" <?php p(($form->assessmentmode == 'practice') ? "checked" : "") ?> />
+ <?php p(get_string("practice","math_assignment")); ?>
+ </td>
+ </tr>
+
<?php
if ($aimsubject) {
Index: lib.php
===================================================================
RCS file: /cvsroot/aimmath/moodle/mod/math_assignment/lib.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** lib.php 10 Mar 2004 21:43:00 -0000 1.54
--- lib.php 18 Mar 2004 22:29:50 -0000 1.55
***************
*** 269,272 ****
--- 269,275 ----
return NULL;
}
+ if ($math_assignment->assessmentmode == 'practice') {
+ return NULL;
+ }
$return->maxgrade = $math_assignment->papergrade+ $math_assignment->aimgrade;
$return->grades = math_assignment_get_grades($math_assignment, "id", "asc");
***************
*** 596,600 ****
$postdata = math_assignment_add_arg_to_url_data($postdata, "Weight", "1.0");
$postdata = math_assignment_add_arg_to_url_data($postdata, "Access", "all");
! $postdata = math_assignment_add_arg_to_url_data($postdata, "Mode", "assessment");
// load the AiM page and grab the result
if (!$data = math_assignment_get_aim_output($server->address, $postdata))
--- 599,603 ----
$postdata = math_assignment_add_arg_to_url_data($postdata, "Weight", "1.0");
$postdata = math_assignment_add_arg_to_url_data($postdata, "Access", "all");
! $postdata = math_assignment_add_arg_to_url_data($postdata, "Mode", $math_assignment->assessmentmode);
// load the AiM page and grab the result
if (!$data = math_assignment_get_aim_output($server->address, $postdata))
|