Index: user-tool-prefs/tool/src/bundle/user-tool-prefs.properties =================================================================== --- user-tool-prefs/tool/src/bundle/user-tool-prefs.properties (revision 127276) +++ user-tool-prefs/tool/src/bundle/user-tool-prefs.properties (working copy) @@ -82,12 +82,14 @@ locale_msg=Please select your language (and country) preference. Your current language preference is: privacy_title=Privacy Status - +privacy_default=Default Status +privacy_item_visible=Make me visible when I am added to sites by default +privacy_item_hidden=Hide me when I am added to sites by default privacy_stmt1=You may alter your settings to keep yourself and your personal information hidden from others in this site. Your status in this site is currently set to " - +privacy_specific_site=Set status for a specific site privacy_stmt_show=." Others can see your name in the roster and can contact you through the site. privacy_stmt_hide=." Others cannot see your name in the roster and cannot contact you through the site. - +privacy_all_sites=Change your status in all your sites privacy_change_directions=If you would like to change your status, check the box next to privacy_change_directions2=and then click the Update button below. Index: user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/PrivacyBean.java =================================================================== --- user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/PrivacyBean.java (revision 127276) +++ user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/PrivacyBean.java (working copy) @@ -59,6 +59,7 @@ private String checkboxText; private boolean changeStatus; private String privacyStatus; + private String defaultPrivacyStatus; private Boolean displayPopup; private String selectedSite; private boolean siteSelected = false; @@ -275,20 +276,22 @@ * Determines if ready to change status and calls method to do so */ public String processUpdate() { - if (isMyWorkspace() && ! siteSelected) { - noSiteProcessErr = true; - //setUpdateMessage(true); - return "main"; - } +// if (isMyWorkspace() && ! siteSelected) { +// noSiteProcessErr = true; +// //setUpdateMessage(true); +// return "main"; +// } + if (isMyWorkspace() && siteSelected) { if (!privacyStatus.equals("")){ processChoice(isMyWorkspace() ? curSite : getContextId(), privacyStatus.equals(HIDDEN) ? false : true); - setUpdateMessage(true); } displayPopup = false; + } + + privacyManager.setDefaultPrivacyState(getUserId(), defaultPrivacyStatus); + setUpdateMessage(true); - - /** // if user checked the checkbox if (changeStatus) { @@ -421,4 +424,16 @@ public void setUpdateMessage(boolean updateMessage) { this.updateMessage = updateMessage; } + + public String getDefaultPrivacyStatus() { + if (defaultPrivacyStatus == null) { + defaultPrivacyStatus = privacyManager.getDefaultPrivacyState(getUserId()); + } + + return defaultPrivacyStatus; + } + + public void setDefaultPrivacyStatus(String defaultPrivacyStatus) { + this.defaultPrivacyStatus = defaultPrivacyStatus; + } } Index: user-tool-prefs/tool/src/webapp/prefs/privacy.jsp =================================================================== --- user-tool-prefs/tool/src/webapp/prefs/privacy.jsp (revision 127276) +++ user-tool-prefs/tool/src/webapp/prefs/privacy.jsp (working copy) @@ -6,7 +6,9 @@ <% response.setContentType("text/html; charset=UTF-8"); %> - + + + @@ -64,14 +66,26 @@ -
- + <%-- Message if Show All or Hide All has been clicked --%>
-

+ +

+ +


+ + + + +
+ +

+ +

+
parent.privacy_show_popup();" /> - + +

+ +

+
-
+ +
<%