diff --git a/src/main/java/controller/ExerciseEvaluator.java b/src/main/java/controller/ExerciseEvaluator.java index 209d0fd..2d34a00 100644 --- a/src/main/java/controller/ExerciseEvaluator.java +++ b/src/main/java/controller/ExerciseEvaluator.java @@ -137,10 +137,8 @@ private int evaluateITTnTTI(Map execution, Map s String executionValue = entry.getValue(); String solutionValue = solution.get(k); - if (executionValue != null) { - if (executionValue.equals(solutionValue.toUpperCase())) { - right++; - } + if (executionValue != null && executionValue.equals(solutionValue.toUpperCase())) { + right++; } } return (int)((right /total)*100); diff --git a/src/main/java/controller/Login.java b/src/main/java/controller/Login.java index 5fbe9df..249e2c9 100644 --- a/src/main/java/controller/Login.java +++ b/src/main/java/controller/Login.java @@ -23,6 +23,7 @@ public class Login extends HttpServlet { private UserData userData; private UserRegistry userReg; + @Override public void init() { this.authService = new Authenticator(); this.userData = new UserData(); diff --git a/src/main/java/model/DAO/DAOCondition.java b/src/main/java/model/DAO/DAOCondition.java index f2a07cf..2233f21 100644 --- a/src/main/java/model/DAO/DAOCondition.java +++ b/src/main/java/model/DAO/DAOCondition.java @@ -11,7 +11,7 @@ import java.util.ArrayList; public class DAOCondition { - private static final Logger logger = LoggerFactory.getLogger(DAOConnection.class); + private static final Logger logger = LoggerFactory.getLogger(DAOCondition.class); private Connection connection; public DAOCondition(Connection connection) {this.connection=connection;} diff --git a/src/main/java/model/service/condition/ConditionManager.java b/src/main/java/model/service/condition/ConditionManager.java index 82588ab..6953acb 100644 --- a/src/main/java/model/service/condition/ConditionManager.java +++ b/src/main/java/model/service/condition/ConditionManager.java @@ -1,13 +1,14 @@ package model.service.condition; import model.DAO.DAOCondition; +import model.entity.Condition; import java.util.ArrayList; public class ConditionManager implements ConditionInterface { DAOCondition c=new DAOCondition(); - public ArrayList getConditionsOfPatient(int id_patient) { return c.getConditionsOfPatient(id_patient);} - public ArrayList getConditionsNOTOfPatient(int id_patient) { return c.getConditionsNOTOfPatient(id_patient);} + public ArrayList getConditionsOfPatient(int id_patient) { return c.getConditionsOfPatient(id_patient);} + public ArrayList getConditionsNOTOfPatient(int id_patient) { return c.getConditionsNOTOfPatient(id_patient);} public boolean AddConditionPatient(int ID_condition, int ID_patient, int Severity) {return c.AddConditionPatient(ID_condition, ID_patient,Severity);} public boolean RemoveConditionPatient(int ID_condition, int ID_patient) {return c.RemoveConditionPatient(ID_condition,ID_patient);} } diff --git a/src/main/webapp/JSP/viewPatientInfo.jsp b/src/main/webapp/JSP/viewPatientInfo.jsp index 966f7ce..077144b 100644 --- a/src/main/webapp/JSP/viewPatientInfo.jsp +++ b/src/main/webapp/JSP/viewPatientInfo.jsp @@ -6,7 +6,7 @@ <%@ page import="model.entity.Exercise" %> <%@ page import="java.util.List" %> - +