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 370e95a1..f7a1d360 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 @@ -420,7 +420,7 @@ public class MoodleCourseAccess implements CourseAccessAPI { additionalAttributes.put("descriptionformat", String.valueOf(userDetails[0].descriptionformat)); return new ExamineeAccountDetails( userDetails[0].id, - userDetails[0].fullname, + userDetails[0].lastname + " " + userDetails[0].firstname, userDetails[0].username, userDetails[0].email, additionalAttributes); 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 852c6885..ae95c034 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 @@ -356,7 +356,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme additionalAttributes.put("descriptionformat", String.valueOf(userDetails[0].descriptionformat)); return new ExamineeAccountDetails( userDetails[0].id, - userDetails[0].fullname, + userDetails[0].lastname + " " + userDetails[0].firstname, userDetails[0].username, userDetails[0].email, additionalAttributes); diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccessTest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccessTest.java index 734312c7..37705291 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccessTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccessTest.java @@ -100,7 +100,7 @@ public class MoodleCourseAccessTest { final ExamineeAccountDetails userDetails = examineeAccountDetails.getOrThrow(); assertEquals("15", userDetails.id); assertEquals("seb1", userDetails.username); - assertEquals("seb user1", userDetails.name); + assertEquals("user1 seb", userDetails.name); assertEquals("demo1@safeexambrowser.org", userDetails.email); assertEquals( "{auth=manual, " diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccessTest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccessTest.java index 1a42947a..39223557 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccessTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccessTest.java @@ -252,7 +252,7 @@ public class MoodlePluginCourseAccessTest { assertFalse(userDetailsResult.hasError()); final ExamineeAccountDetails examineeAccountDetails = userDetailsResult.get(); assertEquals( - "ExamineeAccountDetails [id=2, name=test user, username=testuser, email=text@user.mail, " + "ExamineeAccountDetails [id=2, name=user test, username=testuser, email=text@user.mail, " + "additionalAttributes={mailformat=null, firstname=test, auth=null, timezone=null, description=null, firstaccess=null, confirmed=null, suspended=null, lastname=user, lastaccess=null, theme=null, descriptionformat=null, department=null, lang=null}]", examineeAccountDetails.toString());