From 1cb0242507b28d7eb90a103b0d9b4e540ae3aaea Mon Sep 17 00:00:00 2001 From: Nadim Ritter Date: Fri, 19 Jul 2024 11:34:45 +0200 Subject: [PATCH] better logging for lastname bug --- .../lms/impl/moodle/legacy/MoodleCourseAccess.java | 8 ++++++++ .../lms/impl/moodle/plugin/MoodlePluginCourseAccess.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccess.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccess.java index 89dd9dbe..f9b51b91 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccess.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccess.java @@ -403,9 +403,17 @@ public class MoodleCourseAccess implements CourseAccessAPI { throw new RuntimeException("No user details on Moodle API request"); } + System.out.println("---------------------"); + System.out.println("*************it got here moodle course access debugging"); if (log.isDebugEnabled()) { + System.out.println("*************inside if"); log.debug("User details received from Moodle: {}", userDetails[0]); } + System.out.println("firstname: " + userDetails[0].firstname); + System.out.println("firstname: " + userDetails[0].lastname); + System.out.println("firstname: " + userDetails[0].fullname); + System.out.println(userDetails[0]); + System.out.println("---------------------"); final Map additionalAttributes = MoodleUtils.getMoodleAccountDetails(userDetails); return new ExamineeAccountDetails( diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java index 2d30ffd5..4725f1dd 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java @@ -339,9 +339,17 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme throw new RuntimeException("No user details on Moodle API request"); } + System.out.println("---------------------"); + System.out.println("*************it got here moodle plugin debugging"); if (log.isDebugEnabled()) { + System.out.println("*************inside if"); log.debug("User details received from Moodle: {}", userDetails[0]); } + System.out.println("firstname: " + userDetails[0].firstname); + System.out.println("firstname: " + userDetails[0].lastname); + System.out.println("firstname: " + userDetails[0].fullname); + System.out.println(userDetails[0]); + System.out.println("---------------------"); final Map additionalAttributes = MoodleUtils.getMoodleAccountDetails(userDetails); return new ExamineeAccountDetails(