From 9c8caba0644b7c84b25fab7206a5855241727fb9 Mon Sep 17 00:00:00 2001 From: sachingrover211 Date: Sat, 28 Sep 2019 16:26:19 -0700 Subject: [PATCH 1/2] null check added for one row of message missing value in the logs. --- log/createDashboard_js.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/log/createDashboard_js.php b/log/createDashboard_js.php index 5e44847..36394d1 100644 --- a/log/createDashboard_js.php +++ b/log/createDashboard_js.php @@ -1,22 +1,22 @@ . + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with Dragoon. If not, see . */ include "logAnalysis.php"; include "logProblemObject.php"; @@ -84,7 +84,7 @@ function getQuery($section, $mode, $activity, $user, $problem, $fromDate, $toDat (!empty($mode)?$modeString:""). (!empty($activity)?$activityString:""). "ORDER BY user asc, problem asc, time asc, id asc;"; - // $queryString = "SELECT tid, mode, session.session_id, user, problem, time, method, message, `group` from session JOIN step ON session.session_id = step.session_id where method != 'client-message' AND mode != 'AUTHOR' AND user = 'cdluna' AND problem LIKE '%ps3-0%' ORDER BY user asc, problem asc, tid asc;"; + //$queryString = "SELECT tid, session.session_id, mode, user, problem, time, method, message, folder from session JOIN step ON session.session_id = step.session_id where section = 'lms-CPI_Fall_2017' AND method != 'runtime-error' AND mode NOT LIKE '%AUTHOR' AND user = 'jarell13' ORDER BY user asc, problem asc, time asc, id asc;"; //echo $queryString; return $queryString; @@ -535,7 +535,7 @@ function parseMessages($result){ //when some other property came and is not for the current node. this is primarily because some log messages just didnt reach the database if($currentNode!=null && strpos($currentNode->id, $newMessage['nodeID']) === false){ $pushNodeBack = true; - $newNode = $upObject->getNodeFromName($newMessage['node']); + $newNode = (array_key_exists("node", $newMessage)?$upObject->getNodeFromName($newMessage['node']):null); if($newNode != null && !($newNode->nodeExist)){ //the node was deleted and without the description for re creation did not reach. so just start from the value that you have. $newNode->id = $newNode->id."|".$newMessage['nodeID']; @@ -543,7 +543,7 @@ function parseMessages($result){ } else if($newNode == null) { $newNode = new Node(); $newNode->id = $newMessage['nodeID']; - $newNode->name = $newMessage['node']; //has come after description so the node name will always be there. + $newNode->name = array_key_exists("node", $newMessage)?$newMessage['node']:""; $newNode->openTimes = 1; $newNode->nodeExist = true; } From a6c8cb9e2d3bf1939763c861d6bc716a7a6fe6e0 Mon Sep 17 00:00:00 2001 From: sachingrover211 Date: Tue, 1 Oct 2019 06:08:19 -0700 Subject: [PATCH 2/2] changes for out of order messages due to network issue --- log/createDashboard_js.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log/createDashboard_js.php b/log/createDashboard_js.php index 36394d1..2efd1c8 100644 --- a/log/createDashboard_js.php +++ b/log/createDashboard_js.php @@ -516,7 +516,7 @@ function parseMessages($result){ } else if($newNode == null && $currentNode != null && strpos($currentNode->id, $newMessage['nodeID']) === false){ // case when no node exists and an out of order message. this issue has been fixed but still for fall 14 analysis it is needed $newNode = new Node(); - $newNode->name = $newMessage['node']; + $newNode->name = array_key_exists("node", $newMessage)?$newMessage['node']:""; $newNode->id = $nodeID; $newNode->openTimes = 0; $newNode->nodeExist = true; @@ -547,7 +547,7 @@ function parseMessages($result){ $newNode->openTimes = 1; $newNode->nodeExist = true; } - } else if($currentNode == null && count($upObject->nodes) == 0){ + } else if($currentNode == null /*&& count($upObject->nodes) == 0*/){ //first message is out of order $currentNode = new Node(); $currentNode->id = $newMessage['nodeID'];