Exemple #1
0
 do {
     $clientID = $myrow["clientID"];
     $sessionColumns = "<td>" . $myrow["userName"] . "</td><td>" . $myrow["userProblem"] . "</td><td>" . $myrow["userSection"] . "</td><td>" . $myrow["startTime"] . "</td>";
     $sessionLink1 = "<td><a href=\"OpenTrace.php?x=" . $dbuser . "&amp;sv=" . $dbserver . "&amp;pwd=" . $dbpass . "&amp;d=" . $dbname . "&amp;cid=" . $clientID . "&amp;u=" . $myrow["userName"] . "&amp;p=" . $myrow["userProblem"] . "&amp;s=" . $myrow["userSection"] . "&amp;m=" . $methods;
     $sessionLink2 = "\">Session&nbsp;log</a></td>";
     $tempSqlOld = "SELECT initiatingParty,command,tID FROM PROBLEM_ATTEMPT_TRANSACTION WHERE clientID = '{$clientID}'";
     $tempSql = "SELECT client,server,tID FROM STEP_TRANSACTION WHERE clientID = '{$clientID}'";
     $queryStart = microtime(true);
     $tempResultOld = mysql_query($tempSqlOld);
     $tempResult = mysql_query($tempSql);
     $queryTime += microtime(true) - $queryStart;
     // loop through session
     $cutoff = 600;
     // Minimum number of seconds between turns where
     // we assume user is not "on task."
     $sessionTime = new session_time();
     // get student input and server reply
     while (($myrow = mysql_fetch_array($tempResult)) || ($myrow = mysql_fetch_array($tempResultOld))) {
         if (isset($myrow["command"])) {
             $myrow2 = mysql_fetch_array($tempResultOld);
             if ($myrow["initiatingParty"] == 'client') {
                 $action = $myrow["command"];
                 $ttID = $myrow["tID"];
                 $response = $myrow2["command"];
             } else {
                 $action = $myrow2["command"];
                 $ttID = $myrow2["tID"];
                 $response = $myrow["command"];
             }
         } else {
             $action = $myrow["client"];
Exemple #2
0
 do {
     $clientID = $myrow['clientID'];
     $thisName = $myrow['userName'];
     $thisSection = $myrow['userSection'];
     $thisProblem = $myrow['userProblem'];
     $tempSqlOld = "SELECT initiatingParty,command,tID FROM PROBLEM_ATTEMPT_TRANSACTION WHERE clientID = '{$clientID}'";
     $tempSql = "SELECT client,server,tID FROM STEP_TRANSACTION WHERE clientID = '{$clientID}'";
     $queryStart = microtime(true);
     $tempResultOld = mysql_query($tempSqlOld);
     $tempResult = mysql_query($tempSql);
     $queryTime += microtime(true) - $queryStart;
     // loop through session
     // Minimum number of seconds between transactions where
     // we assume user is not "on task."
     $cutoff = 180;
     $sessionTime = new session_time();
     $sessionCorrects = array();
     // Objects that have turned green.
     $blame = new turn_blame();
     $sessionScore = 0;
     $state->begin_session();
     //
     // echo "session " . $myrow["startTime"] . "<br>\n";
     // get student input and server reply
     while (($myrow = mysql_fetch_array($tempResult)) || $tempResultOld && ($myrow = mysql_fetch_array($tempResultOld))) {
         if (isset($myrow['command'])) {
             $myrow2 = mysql_fetch_array($tempResultOld);
             if ($myrow['initiatingParty'] == 'client') {
                 $action = $myrow['command'];
                 $ttID = $myrow['tID'];
                 $response = $myrow2['command'];