From 4448f14ab6a583721a981ee654cc4268cdba9766 Mon Sep 17 00:00:00 2001 From: "ms@Nicro" Date: Wed, 17 Jan 2024 19:47:35 +0100 Subject: [PATCH] Merged with Develop --- src/main/java/model/DAO/DAOExercise.java | 5 +++-- src/main/java/model/entity/SlimmerExercise.java | 10 +++------- 2 files changed, 6 insertions(+), 9 deletions(-) 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