Index: site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
===================================================================
--- site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java (revision 4738)
+++ site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java (revision 4745)
@@ -7975,8 +7975,9 @@
if (participantsMap.containsKey(userId))
{
participant = (Participant) participantsMap.get(userId);
- if (participant.section.indexOf(sectionTitle) == -1)
+ if (!participant.getSectionEidList().contains(sectionTitle)) {
participant.section = participant.section.concat(",
" + sectionTitle);
+ }
}
else
{
@@ -7987,7 +7988,7 @@
participant.regId = "";
participant.removeable = false;
participant.role = member.getRole()!=null?member.getRole().getId():"";
- participant.section = sectionTitle;
+ participant.addSectionEidToList(sectionTitle);
participant.uniqname = userId;
}
@@ -7996,7 +7997,7 @@
} catch (UserNotDefinedException exception) {
// deal with missing user quietly without throwing a
// warning message
- M_log.warn(exception.getMessage());
+ M_log.warn(exception);
}
}
}
@@ -8033,8 +8034,9 @@
{
participant = (Participant) participantsMap.get(userId);
//does this section contain the eid already
- if (participant.section.indexOf(sectionTitle) == -1)
- participant.section = participant.section.concat(",
" + sectionTitle);
+ if (!participant.getSectionEidList().contains(sectionTitle)) {
+ participant.addSectionEidToList(sectionTitle);
+ }
participant.credits = participant.credits.concat(",
" + e.getCredits());
}
else
@@ -8046,7 +8048,7 @@
participant.regId = "";
participant.removeable = false;
participant.role = member.getRole()!=null?member.getRole().getId():"";
- participant.section = sectionTitle;
+ participant.addSectionEidToList(sectionTitle);
participant.uniqname = userId;
}
participantsMap.put(userId, participant);
@@ -10864,6 +10866,8 @@
/** The section */
public String section = NULL_STRING;
+ private Set sectionEidList;
+
/** The regestration id */
public String regId = NULL_STRING;
@@ -10896,8 +10900,34 @@
} // getCredits
public String getSection() {
- return section;
+ if (sectionEidList == null)
+ return "";
+
+ StringBuilder sb = new StringBuilder();
+ Iterator it = sectionEidList.iterator();
+ for (int i = 0; i < sectionEidList.size(); i ++) {
+ String sectionEid = (String)it.next();
+ if (i < 0)
+ sb.append(",
");
+ sb.append(sectionEid);
+ }
+
+ return sb.toString();
} // getSection
+
+ public Set getSectionEidList() {
+ if (sectionEidList == null)
+ sectionEidList = new HashSet();
+
+ return sectionEidList;
+ }
+
+ public void addSectionEidToList(String eid) {
+ if (sectionEidList == null)
+ sectionEidList = new HashSet();
+
+ sectionEidList.add(eid);
+ }
public String getRegId() {
return regId;