public Section updateSection(Section section, String[] data) { log.debug("Updating Section {}", section.getEid()); section.setTitle(data[1]); section.setDescription(data[2]); section.setCategory(data[3]); if (StringUtils.isNotBlank(data[4]) && cmService.isSectionDefined(data[4])) { section.setParent(cmService.getSection(data[4])); } // Note: There's no way to change the course offering. This makes sense, though. if (cmService.isEnrollmentSetDefined(data[5])) { section.setEnrollmentSet(cmService.getEnrollmentSet(data[5])); } cmAdmin.updateSection(section); return section; }
public Section updateSection(Section section, String[] data) { log.debug("Updating Section {}", section.getEid()); section.setTitle(data[1]); section.setDescription(data[2]); section.setCategory(data[3]); if (StringUtils.isNotBlank(data[4]) && cmService.isSectionDefined(data[4])) { section.setParent(cmService.getSection(data[4])); } // Note: There's no way to change the course offering. This makes sense, though. if (cmService.isEnrollmentSetDefined(data[5])) { section.setEnrollmentSet(cmService.getEnrollmentSet(data[5])); } cmAdmin.updateSection(section); return section; }
protected Section updateSection(Section section, Element element) { if(log.isDebugEnabled()) log.debug("Updating Section + " + section.getEid()); section.setTitle(element.getChildText("title")); section.setDescription(element.getChildText("description")); section.setCategory(element.getChildText("category")); if(cmService.isSectionDefined(element.getChildText("parent-section-eid"))) { section.setParent(cmService.getSection(element.getChildText("parent-section-eid"))); } // Note: There's no way to change the course offering. This makes sense, though. if(cmService.isEnrollmentSetDefined(element.getChildText("enrollment-set-eid"))) { section.setEnrollmentSet(cmService.getEnrollmentSet(element.getChildText("enrollment-set-eid"))); } cmAdmin.updateSection(section); return section; }