Merge pull request #135 from SafeExamBrowser/SEBSP-131

Sebsp 131
This commit is contained in:
Andreas Hefti 2024-07-01 09:11:43 +02:00 committed by GitHub
commit 2f260212ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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, "

View file

@ -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());