diff --git a/src/main/java/model/DAO/DAOExercise.java b/src/main/java/model/DAO/DAOExercise.java index e6aa6cf..131e2c1 100644 --- a/src/main/java/model/DAO/DAOExercise.java +++ b/src/main/java/model/DAO/DAOExercise.java @@ -368,7 +368,7 @@ public List getExerciseToApprove(int therapistId){ List exercises = new ArrayList<>(); try { connection = connection.isClosed() ? DAOConnection.getConnection() : connection; - String query = "SELECT e.ID_exercise, e.ID_user, eg.ExerciseName, e.InsertionDate, eg.ExerciseDescription, e.Feedback, eg.Difficulty, eg.Target, eg.Type " + + String query = "SELECT e.ID_exercise, e.ID_user, eg.ExerciseName, e.InsertionDate, eg.ExerciseDescription, e.Feedback, eg.Difficulty, eg.Target, eg.Type, e.Evaluation " + "FROM exercise e JOIN exercise_glossary eg ON e.ID_exercise = eg.ID_exercise JOIN user u ON e.ID_user = u.ID " + "WHERE e.CompletionDate IS NULL AND u.ID_Therapist = ? AND e.Recommended = 0"; @@ -386,7 +386,8 @@ public List getExerciseToApprove(int therapistId){ rs.getDate("InsertionDate"), rs.getInt("Difficulty"), rs.getString("Target"), - rs.getString("Type") + rs.getString("Type"), + rs.getInt("Evaluation") ); exercises.add(exercise); } diff --git a/src/main/java/model/entity/SlimmerExercise.java b/src/main/java/model/entity/SlimmerExercise.java index 70c24ce..8312a88 100644 --- a/src/main/java/model/entity/SlimmerExercise.java +++ b/src/main/java/model/entity/SlimmerExercise.java @@ -108,13 +108,9 @@ public int getUserId() { public void setUserId(int userId) { this.userId = userId; } -} - public int getEvaluation() { - return evaluation; - } + public int getEvaluation() { return evaluation; } + + public void setEvaluation(int evaluation) { this.evaluation = evaluation; } - public void setEvaluation(int vote) { - this.evaluation = evaluation; - } } \ No newline at end of file