diff --git a/src/main/java/org/wise/portal/domain/authentication/impl/TeacherUserDetails.java b/src/main/java/org/wise/portal/domain/authentication/impl/TeacherUserDetails.java index 76f7e51340..69fec73a6f 100644 --- a/src/main/java/org/wise/portal/domain/authentication/impl/TeacherUserDetails.java +++ b/src/main/java/org/wise/portal/domain/authentication/impl/TeacherUserDetails.java @@ -228,6 +228,7 @@ public HashMap getInfo() { infoMap.put("How did you hear about us", this.getHowDidYouHearAboutUs()); infoMap.put("Email", this.getEmailAddress()); infoMap.put("Language", this.getLanguage()); + infoMap.put("Account Enabled", this.isEnabled()); return infoMap; } diff --git a/src/main/resources/i18n/i18n.properties b/src/main/resources/i18n/i18n.properties index fa378a33dd..61e55883c0 100644 --- a/src/main/resources/i18n/i18n.properties +++ b/src/main/resources/i18n/i18n.properties @@ -3196,6 +3196,8 @@ teacher.teacherinfo.numberOfLogins=Number of logins teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=Last Login teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=Account Enabled +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=Close this window teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link diff --git a/src/main/resources/i18n/i18n_ar.properties b/src/main/resources/i18n/i18n_ar.properties index 7bb6ae2c07..57ab4421c4 100644 --- a/src/main/resources/i18n/i18n_ar.properties +++ b/src/main/resources/i18n/i18n_ar.properties @@ -3426,6 +3426,8 @@ teacher.teacherinfo.numberOfLogins=عدد مرات تسجيل الدخول: teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=آخر تسجيل دخول teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=الحساب مفعل +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=إغلاق هذه النافذة teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link teacher.termsofuse.termsOfUse=شروط الاستخدام diff --git a/src/main/resources/i18n/i18n_el.properties b/src/main/resources/i18n/i18n_el.properties index f0da33dac7..254d738a7d 100644 --- a/src/main/resources/i18n/i18n_el.properties +++ b/src/main/resources/i18n/i18n_el.properties @@ -2710,6 +2710,8 @@ teacher.teacherinfo.numberOfLogins=Αριθμός συνδέσεων teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=Τελευταία σύνδεση teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=Ενεργοποιημένος λογαριασμός +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=Κλείσιμο αυτού του παραθύρου teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link teacher.termsofuse.termsOfUse=Όροι Χρήσης diff --git a/src/main/resources/i18n/i18n_es.properties b/src/main/resources/i18n/i18n_es.properties index 8928708133..e1c2598fd4 100644 --- a/src/main/resources/i18n/i18n_es.properties +++ b/src/main/resources/i18n/i18n_es.properties @@ -2400,6 +2400,8 @@ teacher.teacherinfo.numberOfLogins=Cantidad de veces logueado teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=Última visita teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=Cuenta habilitada +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=Cerrar esta ventana teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link teacher.termsofuse.termsOfUse=Términos de uso diff --git a/src/main/resources/i18n/i18n_iw.properties b/src/main/resources/i18n/i18n_iw.properties index eaa710a03c..9290be1d18 100644 --- a/src/main/resources/i18n/i18n_iw.properties +++ b/src/main/resources/i18n/i18n_iw.properties @@ -2804,6 +2804,8 @@ teacher.teacherinfo.numberOfLogins=מספר כניסות teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=כניסה אחרונה teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=חשבון מופעל +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=סגירת החלון teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link teacher.termsofuse.termsOfUse=תנאי שימוש diff --git a/src/main/resources/i18n/i18n_ja.properties b/src/main/resources/i18n/i18n_ja.properties index 816a17079f..86bdaa1550 100644 --- a/src/main/resources/i18n/i18n_ja.properties +++ b/src/main/resources/i18n/i18n_ja.properties @@ -1076,6 +1076,8 @@ teacher.teacherinfo.schoolName=学校名 teacher.teacherinfo.schoolName.description=The label for the School Name field teacher.teacherinfo.schoolLevel=学校レベル teacher.teacherinfo.schoolLevel.description=The label for the School Level field +teacher.teacherinfo.accountEnabled=アカウント有効 +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.management.updatemyaccountinfo.title=アカウント情報 teacher.management.updatemyaccountinfo.title.description=Title for the teacher account information page teacher.management.updatemyaccountinfo.displayName=表示名: diff --git a/src/main/resources/i18n/i18n_nl.properties b/src/main/resources/i18n/i18n_nl.properties index c705a5f9cc..b1b8c8ac40 100644 --- a/src/main/resources/i18n/i18n_nl.properties +++ b/src/main/resources/i18n/i18n_nl.properties @@ -2735,6 +2735,8 @@ teacher.teacherinfo.numberOfLogins=Aantal logins teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=Laatste login teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=Account ingeschakeld +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=Sluit dit venster teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link teacher.termsofuse.termsOfUse=Gebruikersvoorwaarden diff --git a/src/main/resources/i18n/i18n_tr.properties b/src/main/resources/i18n/i18n_tr.properties index 2234437737..3cf3fb66d9 100644 --- a/src/main/resources/i18n/i18n_tr.properties +++ b/src/main/resources/i18n/i18n_tr.properties @@ -2917,6 +2917,8 @@ teacher.teacherinfo.numberOfLogins=Giriş Sayısı teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=Son Giriş teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=Hesap Etkin +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=Bu pencereyi kapat teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link teacher.termsofuse.termsOfUse=Kullanım Koşulları diff --git a/src/main/resources/i18n/i18n_zh_CN.properties b/src/main/resources/i18n/i18n_zh_CN.properties index 97afcf47cd..69a0cda330 100644 --- a/src/main/resources/i18n/i18n_zh_CN.properties +++ b/src/main/resources/i18n/i18n_zh_CN.properties @@ -1066,6 +1066,8 @@ teacher.teacherinfo.numberOfLogins=登录次数 teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=上次登录 teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=账号已启用 +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=关闭该窗口 teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link teacher.termsofuse.termsOfUse=使用条款 diff --git a/src/main/resources/i18n/i18n_zh_TW.properties b/src/main/resources/i18n/i18n_zh_TW.properties index 7acf00cf8e..16a85c42d0 100755 --- a/src/main/resources/i18n/i18n_zh_TW.properties +++ b/src/main/resources/i18n/i18n_zh_TW.properties @@ -4695,6 +4695,8 @@ teacher.teacherinfo.numberOfLogins=登入次數 teacher.teacherinfo.numberOfLogins.description=The label for the Number of logins field teacher.teacherinfo.lastLogin=最後一次登入 teacher.teacherinfo.lastLogin.description=The label for the Last Login field +teacher.teacherinfo.accountEnabled=帳號已啟用 +teacher.teacherinfo.accountEnabled.description=The label for the Account Enabled field teacher.teacherinfo.closeThisWindow=關閉視窗 teacher.teacherinfo.closeThisWindow.description=The text for the Close this window link teacher.termsofuse.termsOfUse=使用條款 diff --git a/src/main/webapp/portal/teacher/account/info.jsp b/src/main/webapp/portal/teacher/account/info.jsp index 1d0636b060..499fb3d87a 100644 --- a/src/main/webapp/portal/teacher/account/info.jsp +++ b/src/main/webapp/portal/teacher/account/info.jsp @@ -13,8 +13,39 @@ " rel="stylesheet" type="text/css" > + + + + +
@@ -96,6 +127,20 @@ + + + + + + + + +
diff --git a/src/test/java/org/wise/portal/domain/authentication/impl/TeacherUserDetailsTest.java b/src/test/java/org/wise/portal/domain/authentication/impl/TeacherUserDetailsTest.java index a1e6997782..c22aa551ad 100644 --- a/src/test/java/org/wise/portal/domain/authentication/impl/TeacherUserDetailsTest.java +++ b/src/test/java/org/wise/portal/domain/authentication/impl/TeacherUserDetailsTest.java @@ -22,20 +22,20 @@ */ package org.wise.portal.domain.authentication.impl; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.util.Calendar; import java.util.Date; import java.util.HashMap; +import org.junit.jupiter.api.Test; import org.wise.portal.domain.authentication.Schoollevel; -import org.wise.portal.domain.authentication.impl.TeacherUserDetails; - -import junit.framework.TestCase; /** * @author Sally Ahn * @version $Id$ */ -public class TeacherUserDetailsTest extends TestCase { +public class TeacherUserDetailsTest { private TeacherUserDetails teacherUserDetails = new TeacherUserDetails(); @@ -63,6 +63,7 @@ public class TeacherUserDetailsTest extends TestCase { private static final String DISPLAYNAME ="Mr. Right"; + @Test public void testGetInfo() { teacherUserDetails.setCity(CITY); teacherUserDetails.setCountry(COUNTRY); @@ -91,6 +92,7 @@ public void testGetInfo() { assertEquals(infoMap.get("Last Login"), LASTLOGIN); assertEquals(infoMap.get("Number of Logins"), Integer.toString(NUMBEROFLOGINS)); assertEquals(infoMap.get("Display Name"), DISPLAYNAME); + assertEquals(infoMap.get("Account Enabled"), true); } } diff --git a/src/test/java/org/wise/portal/presentation/web/controllers/admin/UserInfoControllerTest.java b/src/test/java/org/wise/portal/presentation/web/controllers/admin/UserInfoControllerTest.java index 6481dd8161..4369f98892 100644 --- a/src/test/java/org/wise/portal/presentation/web/controllers/admin/UserInfoControllerTest.java +++ b/src/test/java/org/wise/portal/presentation/web/controllers/admin/UserInfoControllerTest.java @@ -28,6 +28,7 @@ import static org.junit.Assert.assertEquals; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import org.easymock.EasyMockExtension; @@ -91,6 +92,8 @@ public void getUserAccountInfo_AdminLooksUpTeacher_ReturnTeacherAccountInfoPage( String view = controller.getUserAccountInfo(adminAuth, TEACHER_USERNAME, modelMap); assertEquals("teacher/account/info", view); assertEquals(false, modelMap.get("isStudent")); + HashMap resultUserInfoMap = (HashMap) modelMap.get("userInfoMap"); + assertEquals(true, resultUserInfoMap.get("Account Enabled")); List resultRunList = (List) modelMap.get("runList"); assertEquals(1, resultRunList.size()); verify(userService);