Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
bvds committed Jun 5, 2012
2 parents 54eaf1c + 29ea0db commit 8cb23a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Help/grade.cl
Expand Up @@ -200,6 +200,12 @@
(when (eql (graded-status graded) +correct+)
(let ((n (graded-possibilities graded))
(j (length (graded-incorrects graded))))
;; The value for n is sometimes just a guess.
;; In fact, if j is as big as n, then we know that
;; the guess was wrong. In that case, we adjust n.
(unless (> n j)
(setf n (+ j 1))
(setf (graded-possibilities graded) n))
(incf (tally-score tally)
(* weight
(weight-correct-after-failures j n))))))))
Expand Down
11 changes: 8 additions & 3 deletions LogProcessing/Web-Interface/Save.php
@@ -1,8 +1,13 @@
<?
$dbname=$_GET["d"];
$dbuser=$_GET["x"];
$dbserver=$_GET["sv"];
$dbpass=$_GET["pwd"];
$dbname=$_GET["d"];
if(strcmp($dbuser,'open')==0){
$problem_attempt='OPEN_PROBLEM_ATTEMPT';
} else {
$problem_attempt='PROBLEM_ATTEMPT';
}

$adminName = $_GET["a"];
$userName = $_GET["u"];
Expand All @@ -17,8 +22,8 @@ function_exists('mysql_connect') or die ("Missing mysql extension");
mysql_select_db($dbname)
or die ("UNABLE TO SELECT DATABASE");

$sqlOld = "SELECT * FROM OPEN_PROBLEM_ATTEMPT AS P1,PROBLEM_ATTEMPT_TRANSACTION AS P2 WHERE P1.clientID = P2.clientID AND P1.userName = '$userName' AND P1.userProblem = '$userProblem' AND P1.userSection = '$userSection' AND P2.tID < ($tID+2)";
$sql = "SELECT * FROM OPEN_PROBLEM_ATTEMPT AS P1,STEP_TRANSACTION AS P2 WHERE P1.clientID = P2.clientID AND P1.userName = '$userName' AND P1.userProblem = '$userProblem' AND P1.userSection = '$userSection' AND P2.tID <= $tID";
$sqlOld = "SELECT * FROM $problem_attempt AS P1,PROBLEM_ATTEMPT_TRANSACTION AS P2 WHERE P1.clientID = P2.clientID AND P1.userName = '$userName' AND P1.userProblem = '$userProblem' AND P1.userSection = '$userSection' AND P2.tID < ($tID+2)";
$sql = "SELECT * FROM $problem_attempt AS P1,STEP_TRANSACTION AS P2 WHERE P1.clientID = P2.clientID AND P1.userName = '$userName' AND P1.userProblem = '$userProblem' AND P1.userSection = '$userSection' AND P2.tID <= $tID";

$resultOld = mysql_query($sqlOld);
$result = mysql_query($sql);
Expand Down

0 comments on commit 8cb23a9

Please sign in to comment.