diff --git a/class/TrainingModule.php b/class/TrainingModule.php index e1777f2..74770e7 100755 --- a/class/TrainingModule.php +++ b/class/TrainingModule.php @@ -77,7 +77,7 @@ public function certify_training($operator, $staff){ if ($results = $mysqli->query(" SELECT * FROM `tm_enroll` - WHERE tm_id = $this->tm_id AND operator = ".$staff->getOperator()." AND `revoked` = 'N' + WHERE tm_id = $this->tm_id AND operator = ".$staff->getOperator()." AND `current` = 'Y' ")){ if( $results->num_rows == 1 || $staff->getRoleID() > 9) { //True when they have the related training @@ -91,9 +91,9 @@ public function certify_training($operator, $staff){ if ($mysqli->query(" INSERT INTO `tm_enroll` - (`tm_id`, `operator`, `completed`, `staff_id`, `revoked`) + (`tm_id`, `operator`, `completed`, `staff_id`, `current`) VALUES - ('$this->tm_id', '$operator', CURRENT_TIME(), '".$staff->getOperator()."', 'N'); + ('$this->tm_id', '$operator', CURRENT_TIME(), '".$staff->getOperator()."', 'Y'); ")){ return true; } elseif ( strpos($mysqli->error, "Duplicate") === 0) {