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

OO-1174: add the list of roles wanted to retrieve the members of the group to...

OO-1174: add the list of roles wanted to retrieve the members of the group to delete, add a translator fallback for the mail template
parent 2f554e84
No related branches found
No related tags found
No related merge requests found
......@@ -757,7 +757,8 @@ public class BusinessGroupServiceImpl implements BusinessGroupService, UserDataD
@Override
public MailerResult deleteBusinessGroupWithMail(BusinessGroup businessGroupTodelete, String businessPath, Identity deletedBy, Locale locale) {
List<Identity> users = businessGroupRelationDAO.getMembers(businessGroupTodelete);
List<Identity> users = businessGroupRelationDAO.getMembers(businessGroupTodelete,
GroupRoles.coach.name(), GroupRoles.participant.name(), GroupRoles.waiting.name());
// now delete the group first
deleteBusinessGroup(businessGroupTodelete);
dbInstance.commit();
......
......@@ -52,6 +52,7 @@ import org.olat.core.util.mail.MailTemplate;
import org.olat.group.BusinessGroup;
import org.olat.group.BusinessGroupService;
import org.olat.group.BusinessGroupShort;
import org.olat.group.ui.main.BusinessGroupListController;
import org.olat.repository.RepositoryEntryShort;
......@@ -196,7 +197,8 @@ public class BGMailHelper {
actor.getUser().getProperty(UserConstants.EMAIL, null)// 2x for compatibility with old i18m properties
};
Locale locale = I18nManager.getInstance().getLocaleOrDefault(actor.getUser().getPreferences().getLanguage());
Translator trans = Util.createPackageTranslator(BGMailHelper.class, locale);
Translator trans = Util.createPackageTranslator(BGMailHelper.class, locale,
Util.createPackageTranslator(BusinessGroupListController.class, locale));
String subject = trans.translate(subjectKey);
String body = trans.translate(bodyKey, bodyArgs);
......
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