Skip to content
Snippets Groups Projects
Commit fcc709b8 authored by srosse's avatar srosse
Browse files

OO-1284,OO-998: wording, fix managed group which override configuration, fix...

OO-1284,OO-998: wording, fix managed group which override configuration, fix validation method of contact course element if deployed from course
parent 2f33a89d
No related branches found
No related tags found
No related merge requests found
......@@ -452,7 +452,7 @@ pbl.intro.warning.header=Important
pbl.nothing=No modifications to be published. The course is up to date.
pbl.nothing.button=Back to editor
pbl.quick.auto=Yes, automatically
pbl.quick.description=There are unpublished modifications to this course. Would you like to publish them befor closing the editor?
pbl.quick.description=There are unpublished modifications to this course. Would you like to publish them before closing the editor?
pbl.quick.manual=Yes, manually
pbl.quick.no=No
pbl.quick.title=Publish modifications
......
......@@ -224,14 +224,14 @@ public class COCourseNode extends AbstractAccessableCourseNode {
isValid = isValid || (StringHelper.containsNonWhitespace(email2AreaCoaches));
String email2GroupCoaches = (String) getModuleConfiguration().get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP);
isValid = isValid || (StringHelper.containsNonWhitespace(email2GroupCoaches));
isValid = isValid || getModuleConfiguration().getBooleanEntry(COEditController.CONFIG_KEY_EMAILTOCOACHES_ALL);
isValid = isValid || getModuleConfiguration().getBooleanEntry(COEditController.CONFIG_KEY_EMAILTOCOACHES_COURSE);
isValid = isValid || getModuleConfiguration().getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_ALL, false);
isValid = isValid || getModuleConfiguration().getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_COURSE, false);
String email2AreaParticipants = (String) getModuleConfiguration().get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_AREA);
isValid = isValid || (StringHelper.containsNonWhitespace(email2AreaParticipants));
String email2GroupParticipants = (String) getModuleConfiguration().get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP);
isValid = isValid || (StringHelper.containsNonWhitespace(email2GroupParticipants));
isValid = isValid || getModuleConfiguration().getBooleanEntry(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_ALL);
isValid = isValid || getModuleConfiguration().getBooleanEntry(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_COURSE);
isValid = isValid || getModuleConfiguration().getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_ALL, false);
isValid = isValid || getModuleConfiguration().getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_COURSE, false);
StatusDescription sd = StatusDescription.NOERROR;
if (!isValid) {
......
......@@ -88,14 +88,13 @@ public class BusinessGroupMembersController extends BasicController {
// set if the checkboxes are checked or not.
dmsForm.setDisplayMembers(businessGroup);
mainVC.put("displayMembers", dmsForm.getInitialComponent());
configForm = new MembershipConfigurationForm (ureq, getWindowControl());
configForm.setEnabled(!BusinessGroupManagedFlag.isManaged(businessGroup, BusinessGroupManagedFlag.membersmanagement));
boolean managed = BusinessGroupManagedFlag.isManaged(businessGroup, BusinessGroupManagedFlag.membersmanagement);
configForm = new MembershipConfigurationForm(ureq, getWindowControl(), managed);
listenTo(configForm);
configForm.setMembershipConfiguration(businessGroup);
mainVC.put("configMembers", configForm.getInitialComponent());
boolean managed = BusinessGroupManagedFlag.isManaged(businessGroup, BusinessGroupManagedFlag.membersmanagement);
SearchMembersParams searchParams = new SearchMembersParams(false, false, false, true, true, true, true);
membersController = new MemberListController(ureq, getWindowControl(), businessGroup, searchParams);
listenTo(membersController);
......
......@@ -43,17 +43,20 @@ public class MembershipConfigurationForm extends FormBasicController {
private SelectionElement allowToLeaveEl;
private final boolean managed;
@Autowired
private BusinessGroupModule businessGroupModule;
/**
* @param name
* @param transl
* @param hasPartips
* @param hasOwners
*
* @param ureq
* @param wControl
* @param managed
*/
public MembershipConfigurationForm(UserRequest ureq, WindowControl wControl) {
public MembershipConfigurationForm(UserRequest ureq, WindowControl wControl, boolean managed) {
super(ureq, wControl, LAYOUT_DEFAULT_6_6);
this.managed = managed;
initForm(ureq);
}
......@@ -67,10 +70,6 @@ public class MembershipConfigurationForm extends FormBasicController {
}
}
public void setEnabled(boolean enabled) {
allowToLeaveEl.setEnabled(enabled);
}
@Override
protected void formOK(UserRequest ureq) {
//
......@@ -87,7 +86,9 @@ public class MembershipConfigurationForm extends FormBasicController {
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
allowToLeaveEl = uifactory.addCheckboxesHorizontal("allow.leaving", "allow.leaving.group", formLayout, new String[]{"xx"}, new String[]{""});
allowToLeaveEl.addActionListener(FormEvent.ONCLICK);
if(businessGroupModule.isAllowLeavingGroupOverride()) {
if(managed) {
allowToLeaveEl.setEnabled(false);
} else if(businessGroupModule.isAllowLeavingGroupOverride()) {
allowToLeaveEl.setEnabled(true);
} else {
allowToLeaveEl.setEnabled(false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment