[Aimmath-commit] moodle/mod/math_assignment lib.php,1.2,1.3
Brought to you by:
gustav_delius,
npstrick
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; } |