Esempio n. 1
0
 //-------------------------------------------------------------------------------
 //gaze_event
 $queryId = $db->query("SELECT h.id as id, h.job_id, h.file_id, h.element_id, h.x_path, h.time, h.type" . ", g.t_time, g.lx, g.ly, g.rx, g.ry, g.l_dil, g.r_dil, g.l_dil, g.l_char, g.l_offset, g.r_char, g.r_offset" . " FROM log_event_header h, gaze_event g WHERE h.job_id = '{$jobId}' AND h.file_id = '{$fileId}' AND h.id = g.header_id ORDER BY h.time, h.id ASC");
 $err = $db->get_error();
 $errno = $err["error_code"];
 if ($errno != 0) {
     log::doLog("CASMACAT: fetchLogChunk(): " . print_r($err, true));
     throw new Exception("CASMACAT: fetchLogChunk(): " . print_r($err, true));
 }
 $gazeRow = null;
 $gazeEvents = array();
 while (($gazeRow = $db->fetch($queryId)) != false) {
     $gazeRowAsObject = snakeToCamel($gazeRow);
     //log::doLog("CASMACAT: fetchLogChunk(): Next headerRow: " . print_r($gazeRowAsObject, true));
     $gazeEvent = new LogEvent($jobId, $fileId, $gazeRowAsObject);
     $gazeEvent->gazeData($gazeRowAsObject);
     array_push($gazeEvents, $gazeEvent);
 }
 if (!empty($gazeEvents)) {
     //log::doLog("CASMACAT: gazeEvents: " . print_r($gazeEvents, true));
     $countGazes = 0;
     $lenGazes = count($gazeEvents);
     //print $lenGazes;
 } else {
     $lenGazes = 0;
 }
 //-------------------------------------------------------------------------------
 //itp_event
 $queryId = $db->query("SELECT h.id as id, h.job_id, h.file_id, h.element_id, h.x_path, h.time, h.type" . ", i.data" . " FROM log_event_header h, itp_event i WHERE h.job_id = '{$jobId}' AND h.file_id = '{$fileId}' AND h.id = i.header_id ORDER BY h.time, h.id ASC");
 $err = $db->get_error();
 $errno = $err["error_code"];