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

OO-821: fix some RSs in Project broker by import of "responsibles"

parent 793476d8
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,7 @@ public class ImportMemberMailController extends StepFormBasicController {
mailTemplate = BusinessGroupMailing.getDefaultTemplate(defaultGroupType, group, getIdentity());
} else if(defaultRepoType != null) {
mailTemplate = RepositoryMailing.getDefaultTemplate(defaultRepoType, repoEntry, getIdentity());
} else if(hasCouresRights(e)) {
} else if(hasCourseRights(e)) {
mailTemplate = RepositoryMailing.createAddParticipantMailTemplate(repoEntry, getIdentity());
} else {
mailTemplate = BusinessGroupMailing.getDefaultTemplate(MailType.addParticipant, null, getIdentity());
......@@ -81,8 +81,8 @@ public class ImportMemberMailController extends StepFormBasicController {
initForm (ureq);
}
private boolean hasCouresRights(MemberPermissionChangeEvent e) {
return ((e.getRepoOwner() != null && e.getRepoOwner().booleanValue())
private boolean hasCourseRights(MemberPermissionChangeEvent e) {
return e != null && ((e.getRepoOwner() != null && e.getRepoOwner().booleanValue())
|| (e.getRepoParticipant() != null && e.getRepoParticipant().booleanValue())
|| (e.getRepoTutor() != null && e.getRepoTutor().booleanValue()));
}
......
......@@ -46,7 +46,7 @@ import org.olat.group.ui.main.MemberPermissionChangeEvent;
public class BusinessGroupMailing {
public static MailType getDefaultTemplateType(MemberPermissionChangeEvent event) {
if(event.size() == 1) {
if(event != null && event.size() == 1) {
List<BusinessGroupMembershipChange> changes = event.getGroupChanges();
if(changes.size() == 1) {
BusinessGroupMembershipChange change = changes.get(0);
......
......@@ -49,7 +49,7 @@ import org.olat.group.ui.main.MemberPermissionChangeEvent;
public class RepositoryMailing {
public static Type getDefaultTemplateType(MemberPermissionChangeEvent event) {
if(event.size() == 1) {
if(event != null && event.size() == 1) {
if(event.getRepoTutor() != null && event.getRepoTutor().booleanValue()) {
return Type.addTutor;
} else if(event.getRepoParticipant() != null && event.getRepoParticipant().booleanValue()) {
......
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