diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleUtils.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleUtils.java index d6d83a39..a5b8e4be 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleUtils.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleUtils.java @@ -530,6 +530,29 @@ public abstract class MoodleUtils { this.mailformat = mailformat; this.descriptionformat = descriptionformat; } + @Override + public String toString() { + return "MoodleUserDetails{" + + "id='" + id + '\'' + + ", username='" + username + '\'' + + ", firstname='" + firstname + '\'' + + ", lastname='" + lastname + '\'' + + ", fullname='" + fullname + '\'' + + ", email='" + email + '\'' + + ", department='" + department + '\'' + + ", firstaccess=" + firstaccess + + ", lastaccess=" + lastaccess + + ", auth='" + auth + '\'' + + ", suspended=" + suspended + + ", confirmed=" + confirmed + + ", lang='" + lang + '\'' + + ", theme='" + theme + '\'' + + ", timezone='" + timezone + '\'' + + ", description='" + description + '\'' + + ", mailformat=" + mailformat + + ", descriptionformat=" + descriptionformat + + '}'; + } } @JsonIgnoreProperties(ignoreUnknown = true) 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 f37e62e7..89dd9dbe 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,6 +403,10 @@ public class MoodleCourseAccess implements CourseAccessAPI { throw new RuntimeException("No user details on Moodle API request"); } + if (log.isDebugEnabled()) { + log.debug("User details received from Moodle: {}", userDetails[0]); + } + final Map additionalAttributes = MoodleUtils.getMoodleAccountDetails(userDetails); return new ExamineeAccountDetails( userDetails[0].id, 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 c6bce011..2d30ffd5 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,6 +339,10 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme throw new RuntimeException("No user details on Moodle API request"); } + if (log.isDebugEnabled()) { + log.debug("User details received from Moodle: {}", userDetails[0]); + } + final Map additionalAttributes = MoodleUtils.getMoodleAccountDetails(userDetails); return new ExamineeAccountDetails( userDetails[0].id,