Skip to content

Commit

Permalink
SAK-40811 show groups when publishing from action select
Browse files Browse the repository at this point in the history
bgarciaentornos authored and Miguel Pellicer committed Nov 22, 2018
1 parent 5e76287 commit 78129ed
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -22,10 +22,12 @@
package org.sakaiproject.tool.assessment.ui.listener.author;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

import javax.faces.application.FacesMessage;
import javax.faces.context.ExternalContext;
@@ -480,6 +482,15 @@ else if (time instanceof java.lang.Boolean) {

String url = server + extContext.getRequestContextPath();
assessmentSettings.setPublishedUrl(url + "/servlet/Login?id=" + alias);

//SAK-40811 show groups on publish from action select
if(isFromActionSelect && "Selected Groups".equals(releaseTo) && assessmentSettings.getGroupsAuthorized() != null){
String[] groupsAuthorized = assessmentSettings.getGroupsAuthorized();
String result = Arrays.stream(groupsAuthorized)
.map(group -> getGroupName(group, assessmentSettings))
.collect(Collectors.joining(", "));
assessmentSettings.setReleaseToGroupsAsString(result);
}
}

//#4 - before going to confirm publishing, check if the title is unique

0 comments on commit 78129ed

Please sign in to comment.