Skip to content
Snippets Groups Projects
Commit 1fcf741c authored by fkiefer's avatar fkiefer
Browse files

OO-2635 config for download xls, fixes

parent 6e949d72
No related branches found
No related tags found
No related merge requests found
Showing
with 73 additions and 38 deletions
...@@ -113,6 +113,7 @@ public class MembersAvatarDisplayRunController extends FormBasicController { ...@@ -113,6 +113,7 @@ public class MembersAvatarDisplayRunController extends FormBasicController {
private List<Identity> waiting; private List<Identity> waiting;
private final boolean canEmail; private final boolean canEmail;
private final boolean canDownload;
private final boolean showOwners; private final boolean showOwners;
private final boolean showCoaches; private final boolean showCoaches;
private final boolean showParticipants; private final boolean showParticipants;
...@@ -146,8 +147,8 @@ public class MembersAvatarDisplayRunController extends FormBasicController { ...@@ -146,8 +147,8 @@ public class MembersAvatarDisplayRunController extends FormBasicController {
public MembersAvatarDisplayRunController(UserRequest ureq, WindowControl wControl, Translator translator, CourseEnvironment courseEnv, BusinessGroup businessGroup, public MembersAvatarDisplayRunController(UserRequest ureq, WindowControl wControl, Translator translator, CourseEnvironment courseEnv, BusinessGroup businessGroup,
List<Identity> owners, List<Identity> coaches, List<Identity> participants, List<Identity> waiting, boolean canEmail, boolean deduplicateList, List<Identity> owners, List<Identity> coaches, List<Identity> participants, List<Identity> waiting, boolean canEmail, boolean canDownload,
boolean showOwners, boolean showCoaches, boolean showParticipants, boolean showWaiting, boolean editable) { boolean deduplicateList, boolean showOwners, boolean showCoaches, boolean showParticipants, boolean showWaiting, boolean editable) {
super(ureq, wControl, "members", translator); super(ureq, wControl, "members", translator);
setTranslator(translator); setTranslator(translator);
...@@ -166,6 +167,7 @@ public class MembersAvatarDisplayRunController extends FormBasicController { ...@@ -166,6 +167,7 @@ public class MembersAvatarDisplayRunController extends FormBasicController {
this.waiting = waiting; this.waiting = waiting;
// flags // flags
this.canEmail = canEmail; this.canEmail = canEmail;
this.canDownload = canDownload;
this.showOwners = showOwners; this.showOwners = showOwners;
this.showCoaches = showCoaches; this.showCoaches = showCoaches;
this.showParticipants = showParticipants; this.showParticipants = showParticipants;
...@@ -192,8 +194,8 @@ public class MembersAvatarDisplayRunController extends FormBasicController { ...@@ -192,8 +194,8 @@ public class MembersAvatarDisplayRunController extends FormBasicController {
IdentityEnvironment idEnv = ureq.getUserSession().getIdentityEnvironment(); IdentityEnvironment idEnv = ureq.getUserSession().getIdentityEnvironment();
Identity ownId = idEnv.getIdentity(); Identity ownId = idEnv.getIdentity();
Roles roles = idEnv.getRoles(); Roles roles = idEnv.getRoles();
boolean memberXlsEnabled = businessGroup != null ? businessGroup.isDownloadMembersLists() && !waiting.contains(ownId) : false; if (editable && (roles.isOLATAdmin() || roles.isGroupManager() || owners.contains(ownId) || coaches.contains(ownId)
if (editable && (roles.isOLATAdmin() || roles.isGroupManager() || owners.contains(ownId) || coaches.contains(ownId) || memberXlsEnabled)) { || (canDownload && !waiting.contains(ownId)))) {
downloadLink = uifactory.addFormLink("download", "members.download", null, formLayout, Link.BUTTON); downloadLink = uifactory.addFormLink("download", "members.download", null, formLayout, Link.BUTTON);
downloadLink.setIconLeftCSS("o_icon o_icon_download"); downloadLink.setIconLeftCSS("o_icon o_icon_download");
if(formLayout instanceof FormLayoutContainer) { if(formLayout instanceof FormLayoutContainer) {
...@@ -463,12 +465,12 @@ public class MembersAvatarDisplayRunController extends FormBasicController { ...@@ -463,12 +465,12 @@ public class MembersAvatarDisplayRunController extends FormBasicController {
private String createBodyTemplate() { private String createBodyTemplate() {
if (courseEnv == null) { if (courseEnv == null) {
String courseName = businessGroup.getName(); String groupName = businessGroup.getName();
// Build REST URL to business group, use hack via group manager to access // Build REST URL to business group,
StringBuilder courseLink = new StringBuilder(); StringBuilder groupLink = new StringBuilder();
courseLink.append(Settings.getServerContextPathURI()) groupLink.append(Settings.getServerContextPathURI())
.append("/auth/BusinessGroup/").append(businessGroup.getKey()); .append("/auth/BusinessGroup/").append(businessGroup.getKey());
return translate("email.body.template", new String[]{courseName, courseLink.toString()}); return translate("email.body.template", new String[]{groupName, groupLink.toString()});
} else { } else {
String courseName = courseEnv.getCourseTitle(); String courseName = courseEnv.getCourseTitle();
// Build REST URL to course element, use hack via group manager to access repo entry // Build REST URL to course element, use hack via group manager to access repo entry
......
...@@ -63,6 +63,7 @@ public class MembersDisplayRunController extends BasicController { ...@@ -63,6 +63,7 @@ public class MembersDisplayRunController extends BasicController {
private List<Identity> waiting; private List<Identity> waiting;
private final boolean canEmail; private final boolean canEmail;
private final boolean canDownload;
private final boolean showOwners; private final boolean showOwners;
private final boolean showCoaches; private final boolean showCoaches;
private final boolean showParticipants; private final boolean showParticipants;
...@@ -72,8 +73,8 @@ public class MembersDisplayRunController extends BasicController { ...@@ -72,8 +73,8 @@ public class MembersDisplayRunController extends BasicController {
public MembersDisplayRunController(UserRequest ureq, WindowControl wControl, Translator translator, CourseEnvironment courseEnv, BusinessGroup businessGroup, public MembersDisplayRunController(UserRequest ureq, WindowControl wControl, Translator translator, CourseEnvironment courseEnv, BusinessGroup businessGroup,
List<Identity> owners, List<Identity> coaches, List<Identity> participants, List<Identity> waiting, boolean canEmail, boolean deduplicateList, List<Identity> owners, List<Identity> coaches, List<Identity> participants, List<Identity> waiting, boolean canEmail, boolean canDownload,
boolean showOwners, boolean showCoaches, boolean showParticipants, boolean showWaiting, boolean editable) { boolean deduplicateList, boolean showOwners, boolean showCoaches, boolean showParticipants, boolean showWaiting, boolean editable) {
super(ureq, wControl); super(ureq, wControl);
setTranslator(translator); setTranslator(translator);
this.courseOrGroupIdentifier = courseEnv == null ? GUIPREF_KEY_GROUPMEMBER + businessGroup.getKey() this.courseOrGroupIdentifier = courseEnv == null ? GUIPREF_KEY_GROUPMEMBER + businessGroup.getKey()
...@@ -87,6 +88,7 @@ public class MembersDisplayRunController extends BasicController { ...@@ -87,6 +88,7 @@ public class MembersDisplayRunController extends BasicController {
this.waiting = waiting; this.waiting = waiting;
// flags // flags
this.canEmail = canEmail; this.canEmail = canEmail;
this.canDownload = canDownload;
this.showOwners = showOwners; this.showOwners = showOwners;
this.showCoaches = showCoaches; this.showCoaches = showCoaches;
this.showParticipants = showParticipants; this.showParticipants = showParticipants;
...@@ -135,7 +137,7 @@ public class MembersDisplayRunController extends BasicController { ...@@ -135,7 +137,7 @@ public class MembersDisplayRunController extends BasicController {
private void doOpenPortraitView(UserRequest ureq) { private void doOpenPortraitView(UserRequest ureq) {
if (membersAvatarController == null) { if (membersAvatarController == null) {
membersAvatarController = new MembersAvatarDisplayRunController(ureq, getWindowControl(), getTranslator(), membersAvatarController = new MembersAvatarDisplayRunController(ureq, getWindowControl(), getTranslator(),
courseEnv, businessGroup, owners, coaches, participants, waiting, canEmail, deduplicateList, courseEnv, businessGroup, owners, coaches, participants, waiting, canEmail, canDownload, deduplicateList,
showOwners, showCoaches, showParticipants, showWaiting, editable); showOwners, showCoaches, showParticipants, showWaiting, editable);
listenTo(membersAvatarController); listenTo(membersAvatarController);
} }
...@@ -149,7 +151,7 @@ public class MembersDisplayRunController extends BasicController { ...@@ -149,7 +151,7 @@ public class MembersDisplayRunController extends BasicController {
private void doOpenListView(UserRequest ureq, boolean onClick) { private void doOpenListView(UserRequest ureq, boolean onClick) {
if (membersListController == null) { if (membersListController == null) {
membersListController = new MembersListDisplayRunController(ureq, getWindowControl(), getTranslator(), membersListController = new MembersListDisplayRunController(ureq, getWindowControl(), getTranslator(),
courseEnv, businessGroup, owners, coaches, participants, waiting, canEmail, deduplicateList, courseEnv, businessGroup, owners, coaches, participants, waiting, canEmail, canDownload, deduplicateList,
showOwners, showCoaches, showParticipants, showWaiting, editable); showOwners, showCoaches, showParticipants, showWaiting, editable);
listenTo(membersListController); listenTo(membersListController);
} }
......
...@@ -131,8 +131,8 @@ public class MembersListDisplayRunController extends BasicController { ...@@ -131,8 +131,8 @@ public class MembersListDisplayRunController extends BasicController {
public MembersListDisplayRunController(UserRequest ureq, WindowControl wControl, Translator translator, CourseEnvironment courseEnv, BusinessGroup businessGroup, public MembersListDisplayRunController(UserRequest ureq, WindowControl wControl, Translator translator, CourseEnvironment courseEnv, BusinessGroup businessGroup,
List<Identity> owners, List<Identity> coaches, List<Identity> participants, List<Identity> waiting, boolean canEmail, boolean deduplicateList, List<Identity> owners, List<Identity> coaches, List<Identity> participants, List<Identity> waiting, boolean canEmail, boolean canDownload,
boolean showOwners, boolean showCoaches, boolean showParticipants, boolean showWaiting, boolean editable) { boolean deduplicateList, boolean showOwners, boolean showCoaches, boolean showParticipants, boolean showWaiting, boolean editable) {
super(ureq, wControl); super(ureq, wControl);
Translator fallback = userManager.getPropertyHandlerTranslator(getTranslator()); Translator fallback = userManager.getPropertyHandlerTranslator(getTranslator());
setTranslator(Util.createPackageTranslator(translator, fallback, getLocale())); setTranslator(Util.createPackageTranslator(translator, fallback, getLocale()));
...@@ -163,8 +163,8 @@ public class MembersListDisplayRunController extends BasicController { ...@@ -163,8 +163,8 @@ public class MembersListDisplayRunController extends BasicController {
IdentityEnvironment idEnv = ureq.getUserSession().getIdentityEnvironment(); IdentityEnvironment idEnv = ureq.getUserSession().getIdentityEnvironment();
Identity ownId = idEnv.getIdentity(); Identity ownId = idEnv.getIdentity();
Roles roles = idEnv.getRoles(); Roles roles = idEnv.getRoles();
boolean memberXlsEnabled = businessGroup != null ? businessGroup.isDownloadMembersLists() && !waiting.contains(ownId) : false; if (editable && (roles.isOLATAdmin() || roles.isGroupManager() || owners.contains(ownId) || coaches.contains(ownId)
if (editable && (roles.isOLATAdmin() || roles.isGroupManager() || owners.contains(ownId) || coaches.contains(ownId) || memberXlsEnabled)) { || (canDownload && !waiting.contains(ownId)))) {
downloadLink = LinkFactory.createLink(null, "download", "download", "members.download", getTranslator(), mainVC, this, Link.BUTTON); downloadLink = LinkFactory.createLink(null, "download", "download", "members.download", getTranslator(), mainVC, this, Link.BUTTON);
downloadLink.setIconLeftCSS("o_icon o_icon_download"); downloadLink.setIconLeftCSS("o_icon o_icon_download");
printLink = LinkFactory.createButton("print", mainVC, this); printLink = LinkFactory.createButton("print", mainVC, this);
...@@ -296,12 +296,12 @@ public class MembersListDisplayRunController extends BasicController { ...@@ -296,12 +296,12 @@ public class MembersListDisplayRunController extends BasicController {
private String createBodyTemplate() { private String createBodyTemplate() {
if (courseEnv == null) { if (courseEnv == null) {
String courseName = businessGroup.getName(); String groupName = businessGroup.getName();
// Build REST URL to business group, use hack via group manager to access // Build REST URL to business group, use hack via group manager to access
StringBuilder courseLink = new StringBuilder(); StringBuilder groupLink = new StringBuilder();
courseLink.append(Settings.getServerContextPathURI()) groupLink.append(Settings.getServerContextPathURI())
.append("/auth/BusinessGroup/").append(businessGroup.getKey()); .append("/auth/BusinessGroup/").append(businessGroup.getKey());
return translate("email.body.template", new String[]{courseName, courseLink.toString()}); return translate("email.body.template", new String[]{groupName, groupLink.toString()});
} else { } else {
String courseName = courseEnv.getCourseTitle(); String courseName = courseEnv.getCourseTitle();
// Build REST URL to course element, use hack via group manager to access repo entry // Build REST URL to course element, use hack via group manager to access repo entry
......
...@@ -113,9 +113,8 @@ public class MembersMailController extends FormBasicController { ...@@ -113,9 +113,8 @@ public class MembersMailController extends FormBasicController {
public MembersMailController(UserRequest ureq, WindowControl wControl, Translator translator, CourseEnvironment courseEnv, public MembersMailController(UserRequest ureq, WindowControl wControl, Translator translator, CourseEnvironment courseEnv,
List<Member> ownerList, List<Member> coachList, List<Member> participantList, List<Member> waitingList, String bodyTemplate) { List<Member> ownerList, List<Member> coachList, List<Member> participantList, List<Member> waitingList, String bodyTemplate) {
super(ureq, wControl, Util.createPackageTranslator(MailHelper.class, ureq.getLocale())); super(ureq, wControl);
setTranslator(Util.createPackageTranslator(translator, MailHelper.class, ureq.getLocale())); setTranslator(Util.createPackageTranslator(translator, MailHelper.class, ureq.getLocale()));
// setTranslator(translator);
this.courseEnv = courseEnv; this.courseEnv = courseEnv;
this.ownerList = ownerList; this.ownerList = ownerList;
...@@ -417,7 +416,7 @@ public class MembersMailController extends FormBasicController { ...@@ -417,7 +416,7 @@ public class MembersMailController extends FormBasicController {
showError("FileMoveCopyFailed",""); showError("FileMoveCopyFailed","");
} else { } else {
attachmentSize += size; attachmentSize += size;
FormLink removeFile = uifactory.addFormLink("delete_" + (++counter), "delete", "", null, uploadCont, Link.LINK); FormLink removeFile = uifactory.addFormLink("delete_" + (++counter), "delete", "delete", null, uploadCont, Link.LINK);
removeFile.setIconLeftCSS("o_icon o_icon-fw o_icon_delete"); removeFile.setIconLeftCSS("o_icon o_icon-fw o_icon_delete");
String css = CSSHelper.createFiletypeIconCssClassFor(filename); String css = CSSHelper.createFiletypeIconCssClassFor(filename);
Attachment wrapper = new Attachment(attachment, attachment.getName(), css, removeFile); Attachment wrapper = new Attachment(attachment, attachment.getName(), css, removeFile);
......
...@@ -71,6 +71,7 @@ public class MembersCourseNode extends AbstractAccessableCourseNode { ...@@ -71,6 +71,7 @@ public class MembersCourseNode extends AbstractAccessableCourseNode {
public static final String CONFIG_KEY_EMAIL_FUNCTION = "emailFunction"; public static final String CONFIG_KEY_EMAIL_FUNCTION = "emailFunction";
public static final String CONFIG_KEY_DOWNLOAD_FUNCTION = "downloadFunction";
public static final String EMAIL_FUNCTION_ALL = "all"; public static final String EMAIL_FUNCTION_ALL = "all";
public static final String EMAIL_FUNCTION_COACH_ADMIN = "coachAndAdmin"; public static final String EMAIL_FUNCTION_COACH_ADMIN = "coachAndAdmin";
...@@ -175,6 +176,7 @@ public class MembersCourseNode extends AbstractAccessableCourseNode { ...@@ -175,6 +176,7 @@ public class MembersCourseNode extends AbstractAccessableCourseNode {
config.setBooleanEntry(CONFIG_KEY_SHOWCOACHES, true); config.setBooleanEntry(CONFIG_KEY_SHOWCOACHES, true);
config.setBooleanEntry(CONFIG_KEY_SHOWPARTICIPANTS, true); config.setBooleanEntry(CONFIG_KEY_SHOWPARTICIPANTS, true);
config.setStringValue(CONFIG_KEY_EMAIL_FUNCTION, EMAIL_FUNCTION_COACH_ADMIN); config.setStringValue(CONFIG_KEY_EMAIL_FUNCTION, EMAIL_FUNCTION_COACH_ADMIN);
config.setStringValue(CONFIG_KEY_DOWNLOAD_FUNCTION, EMAIL_FUNCTION_COACH_ADMIN);
config.setConfigurationVersion(3); config.setConfigurationVersion(3);
} }
......
...@@ -58,6 +58,7 @@ public class MembersConfigForm extends FormBasicController { ...@@ -58,6 +58,7 @@ public class MembersConfigForm extends FormBasicController {
private final ModuleConfiguration config; private final ModuleConfiguration config;
private MultipleSelectionElement showOwners; private MultipleSelectionElement showOwners;
private SingleSelection emailFunctionEl; private SingleSelection emailFunctionEl;
private SingleSelection downloadFunctionEl;
private final MembersSelectorFormFragment membersFragment; private final MembersSelectorFormFragment membersFragment;
...@@ -130,6 +131,17 @@ public class MembersConfigForm extends FormBasicController { ...@@ -130,6 +131,17 @@ public class MembersConfigForm extends FormBasicController {
} else if(MembersCourseNode.EMAIL_FUNCTION_ALL.equals(emailFct)) { } else if(MembersCourseNode.EMAIL_FUNCTION_ALL.equals(emailFct)) {
emailFunctionEl.select(MembersCourseNode.EMAIL_FUNCTION_ALL, true); emailFunctionEl.select(MembersCourseNode.EMAIL_FUNCTION_ALL, true);
} }
String[] downloadFctValues = new String[]{
translate("download.function.all"), translate("download.function.coachAndAdmin")
};
downloadFunctionEl = uifactory.addRadiosVertical("download", "download.function", formLayout, emailFctKeys, downloadFctValues);
downloadFunctionEl.addActionListener(FormEvent.ONCLICK);
String downloadFct = config.getStringValue(MembersCourseNode.CONFIG_KEY_DOWNLOAD_FUNCTION, MembersCourseNode.EMAIL_FUNCTION_COACH_ADMIN);
if(MembersCourseNode.EMAIL_FUNCTION_COACH_ADMIN.equals(downloadFct)) {
downloadFunctionEl.select(MembersCourseNode.EMAIL_FUNCTION_COACH_ADMIN, true);
} else if(MembersCourseNode.EMAIL_FUNCTION_ALL.equals(downloadFct)) {
downloadFunctionEl.select(MembersCourseNode.EMAIL_FUNCTION_ALL, true);
}
subm = uifactory.addFormSubmitButton("save", formLayout); subm = uifactory.addFormSubmitButton("save", formLayout);
...@@ -192,6 +204,14 @@ public class MembersConfigForm extends FormBasicController { ...@@ -192,6 +204,14 @@ public class MembersConfigForm extends FormBasicController {
} }
fireEvent(ureq, Event.CHANGED_EVENT); fireEvent(ureq, Event.CHANGED_EVENT);
} }
} else if (downloadFunctionEl == source) {
if (downloadFunctionEl.isOneSelected()) {
if (downloadFunctionEl.isSelected(0)) {
config.setStringValue(MembersCourseNode.CONFIG_KEY_DOWNLOAD_FUNCTION, MembersCourseNode.EMAIL_FUNCTION_ALL);
} else {
config.setStringValue(MembersCourseNode.CONFIG_KEY_DOWNLOAD_FUNCTION, MembersCourseNode.EMAIL_FUNCTION_COACH_ADMIN);
}
}
} }
update(); update();
......
...@@ -57,8 +57,6 @@ public class MembersCourseNodeRunController extends BasicController { ...@@ -57,8 +57,6 @@ public class MembersCourseNodeRunController extends BasicController {
public static final String USER_PROPS_ID = MembersCourseNodeRunController.class.getName(); public static final String USER_PROPS_ID = MembersCourseNodeRunController.class.getName();
private CourseEnvironment courseEnv;
private boolean canEmail, deduplicateList, showOwners, showCoaches = false, showParticipants = false;
private List<Identity> owners, coaches, participants; private List<Identity> owners, coaches, participants;
private MembersDisplayRunController membersDisplayRunController; private MembersDisplayRunController membersDisplayRunController;
...@@ -73,18 +71,21 @@ public class MembersCourseNodeRunController extends BasicController { ...@@ -73,18 +71,21 @@ public class MembersCourseNodeRunController extends BasicController {
public MembersCourseNodeRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, ModuleConfiguration config) { public MembersCourseNodeRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, ModuleConfiguration config) {
super(ureq, wControl); super(ureq, wControl);
courseEnv = userCourseEnv.getCourseEnvironment(); CourseEnvironment courseEnv = userCourseEnv.getCourseEnvironment();
this.coaches = new ArrayList<>(); this.coaches = new ArrayList<>();
this.participants = new ArrayList<>(); this.participants = new ArrayList<>();
showOwners = config.getBooleanSafe(MembersCourseNode.CONFIG_KEY_SHOWOWNER); boolean showOwners = config.getBooleanSafe(MembersCourseNode.CONFIG_KEY_SHOWOWNER);
MembersCourseNodeConfiguration nodeConfig = (MembersCourseNodeConfiguration)CourseNodeFactory.getInstance().getCourseNodeConfiguration("cmembers"); MembersCourseNodeConfiguration nodeConfig = (MembersCourseNodeConfiguration)CourseNodeFactory.getInstance().getCourseNodeConfiguration("cmembers");
deduplicateList = nodeConfig.isDeduplicateList(); boolean deduplicateList = nodeConfig.isDeduplicateList();
String emailFct = config.getStringValue(MembersCourseNode.CONFIG_KEY_EMAIL_FUNCTION, MembersCourseNode.EMAIL_FUNCTION_COACH_ADMIN); String emailFct = config.getStringValue(MembersCourseNode.CONFIG_KEY_EMAIL_FUNCTION, MembersCourseNode.EMAIL_FUNCTION_COACH_ADMIN);
canEmail = MembersCourseNode.EMAIL_FUNCTION_ALL.equals(emailFct) || userCourseEnv.isAdmin() || userCourseEnv.isCoach(); boolean canEmail = MembersCourseNode.EMAIL_FUNCTION_ALL.equals(emailFct) || userCourseEnv.isAdmin() || userCourseEnv.isCoach();
String downloadFct = config.getStringValue(MembersCourseNode.CONFIG_KEY_DOWNLOAD_FUNCTION, MembersCourseNode.EMAIL_FUNCTION_COACH_ADMIN);
boolean canDownload = MembersCourseNode.EMAIL_FUNCTION_ALL.equals(downloadFct) || userCourseEnv.isAdmin() || userCourseEnv.isCoach();
IModuleConfiguration membersFrag = IModuleConfiguration.fragment("members", config); IModuleConfiguration membersFrag = IModuleConfiguration.fragment("members", config);
...@@ -95,6 +96,7 @@ public class MembersCourseNodeRunController extends BasicController { ...@@ -95,6 +96,7 @@ public class MembersCourseNodeRunController extends BasicController {
owners = Collections.emptyList(); owners = Collections.emptyList();
} }
boolean showCoaches = false;
if(membersFrag.anyTrue(MembersCourseNode.CONFIG_KEY_COACHES_ALL, MembersCourseNode.CONFIG_KEY_COACHES_COURSE) if(membersFrag.anyTrue(MembersCourseNode.CONFIG_KEY_COACHES_ALL, MembersCourseNode.CONFIG_KEY_COACHES_COURSE)
|| membersFrag.hasAnyOf(MembersCourseNode.CONFIG_KEY_COACHES_GROUP, MembersCourseNode.CONFIG_KEY_COACHES_AREA)) { || membersFrag.hasAnyOf(MembersCourseNode.CONFIG_KEY_COACHES_GROUP, MembersCourseNode.CONFIG_KEY_COACHES_AREA)) {
...@@ -104,6 +106,7 @@ public class MembersCourseNodeRunController extends BasicController { ...@@ -104,6 +106,7 @@ public class MembersCourseNodeRunController extends BasicController {
showCoaches = true; showCoaches = true;
} }
boolean showParticipants = false;
if(membersFrag.anyTrue(MembersCourseNode.CONFIG_KEY_PARTICIPANTS_ALL, MembersCourseNode.CONFIG_KEY_PARTICIPANTS_COURSE) if(membersFrag.anyTrue(MembersCourseNode.CONFIG_KEY_PARTICIPANTS_ALL, MembersCourseNode.CONFIG_KEY_PARTICIPANTS_COURSE)
|| membersFrag.hasAnyOf(MembersCourseNode.CONFIG_KEY_PARTICIPANTS_GROUP, MembersCourseNode.CONFIG_KEY_PARTICIPANTS_AREA)) { || membersFrag.hasAnyOf(MembersCourseNode.CONFIG_KEY_PARTICIPANTS_GROUP, MembersCourseNode.CONFIG_KEY_PARTICIPANTS_AREA)) {
...@@ -114,7 +117,7 @@ public class MembersCourseNodeRunController extends BasicController { ...@@ -114,7 +117,7 @@ public class MembersCourseNodeRunController extends BasicController {
} }
membersDisplayRunController = new MembersDisplayRunController(ureq, wControl, getTranslator(), courseEnv, null, membersDisplayRunController = new MembersDisplayRunController(ureq, wControl, getTranslator(), courseEnv, null,
owners, coaches, participants, new ArrayList<>(), canEmail, deduplicateList, showOwners, showCoaches, owners, coaches, participants, new ArrayList<>(), canEmail, canDownload, deduplicateList, showOwners, showCoaches,
showParticipants, false, true); showParticipants, false, true);
listenTo(membersDisplayRunController); listenTo(membersDisplayRunController);
......
...@@ -19,6 +19,9 @@ email.send=Schicken ...@@ -19,6 +19,9 @@ email.send=Schicken
email.function=Emailfunktion email.function=Emailfunktion
email.function.all=Emailfunktion f\u00FCr alle Benutzer freischalten email.function.all=Emailfunktion f\u00FCr alle Benutzer freischalten
email.function.coachAndAdmin=Emailfunktion nur f\u00FCr Betreuer and Administratoren freischalten email.function.coachAndAdmin=Emailfunktion nur f\u00FCr Betreuer and Administratoren freischalten
download.function=Downloadfunktion
download.function.all=Downloadfunktion f\u00FCr alle Benutzer freischalten
download.function.coachAndAdmin=Downloadfunktion nur f\u00FCr Betreuer and Administratoren freischalten
msg.send.ok=$org.olat.modules.co\:msg.send.ok msg.send.ok=$org.olat.modules.co\:msg.send.ok
error.msg.send.partially.nok=$org.olat.modules.co\:error.msg.send.partially.nok error.msg.send.partially.nok=$org.olat.modules.co\:error.msg.send.partially.nok
error.msg.send.invalid.rcps=$org.olat.modules.co\:error.msg.send.invalid.rcps error.msg.send.invalid.rcps=$org.olat.modules.co\:error.msg.send.invalid.rcps
...@@ -36,7 +39,7 @@ owners.to=Aministratoren von Kurs "{0}" ...@@ -36,7 +39,7 @@ owners.to=Aministratoren von Kurs "{0}"
pane.tab.accessibility=Zugang pane.tab.accessibility=Zugang
pane.tab.membersconfig=Konfiguration pane.tab.membersconfig=Konfiguration
participants.to=Teilnehmer von Kurs "{0}" participants.to=Teilnehmer von Kurs "{0}"
print.title=Fotobuch print.title=Mitgliederliste
select.members=Benutzer ausw\u00E4hlen select.members=Benutzer ausw\u00E4hlen
title_info=Teilnehmerliste title_info=Teilnehmerliste
message.want.coaches=Betreuer message.want.coaches=Betreuer
......
...@@ -19,6 +19,9 @@ email.send=Send ...@@ -19,6 +19,9 @@ email.send=Send
email.function=E-mail function email.function=E-mail function
email.function.all=Unlock e-mail function for all users email.function.all=Unlock e-mail function for all users
email.function.coachAndAdmin=Unlock e-mail function only for coach and administrators email.function.coachAndAdmin=Unlock e-mail function only for coach and administrators
download.function=Download function
download.function.all=Unlock download function for all users
download.function.coachAndAdmin=Unlock download function only for coach and administrators
members.coaches=Coach members.coaches=Coach
members.email.title=Send e-mail members.email.title=Send e-mail
members.info=Select which user group should be shown in the participant list. members.info=Select which user group should be shown in the participant list.
......
...@@ -78,8 +78,8 @@ public class GroupMembersDisplayController extends BasicController { ...@@ -78,8 +78,8 @@ public class GroupMembersDisplayController extends BasicController {
waiting = Collections.emptyList(); waiting = Collections.emptyList();
} }
membersDisplayRunController = new MembersDisplayRunController(ureq, wControl, getTranslator(), null, businessGroup, membersDisplayRunController = new MembersDisplayRunController(ureq, wControl, getTranslator(), null, businessGroup, new ArrayList<>(),
new ArrayList<>(), coaches, participants, waiting, false, true, false, showCoaches, showParticipants, showWaiting, false); coaches, participants, waiting, false, false, true, false, showCoaches, showParticipants, showWaiting, false);
listenTo(membersDisplayRunController); listenTo(membersDisplayRunController);
putInitialPanel(membersDisplayRunController.getInitialComponent()); putInitialPanel(membersDisplayRunController.getInitialComponent());
......
...@@ -68,9 +68,10 @@ public class GroupMembersRunController extends BasicController { ...@@ -68,9 +68,10 @@ public class GroupMembersRunController extends BasicController {
waiting = businessGroupService.getMembers(businessGroup, GroupRoles.waiting.name()); waiting = businessGroupService.getMembers(businessGroup, GroupRoles.waiting.name());
} else { } else {
waiting = Collections.emptyList(); waiting = Collections.emptyList();
} }
membersDisplayRunController = new MembersDisplayRunController(ureq, wControl, getTranslator(), null, businessGroup, boolean canDownload = businessGroup.isDownloadMembersLists();
new ArrayList<>(), coaches, participants, waiting, canEmail, true, false, showCoaches, showParticipants, showWaiting, true); membersDisplayRunController = new MembersDisplayRunController(ureq, wControl, getTranslator(), null, businessGroup, new ArrayList<>(),
coaches, participants, waiting, canEmail, canDownload, true, false, showCoaches, showParticipants, showWaiting, true);
listenTo(membersDisplayRunController); listenTo(membersDisplayRunController);
putInitialPanel(membersDisplayRunController.getInitialComponent()); putInitialPanel(membersDisplayRunController.getInitialComponent());
......
...@@ -106,4 +106,4 @@ members.toggle=Portrait ...@@ -106,4 +106,4 @@ members.toggle=Portrait
members.download=Herunterladen members.download=Herunterladen
select.members=Benutzer ausw\u00E4hlen select.members=Benutzer ausw\u00E4hlen
contact.external.list.example=xyz@olat.com, abc@frentix.com<br/>user@yourcompany.ch contact.external.list.example=xyz@olat.com, abc@frentix.com<br/>user@yourcompany.ch
print.title=Fotobuch print.title=Mitgliederliste
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