/** * Update section from the extracted properties. * Note: you need to do a save when you are done. * @param section the section, which will be persisted * @param sectionMap the extracted properties */ public void updateSection(SectionFacade section, Map sectionMap) { section.setTitle(TextFormat.convertPlaintextToFormattedTextNoHighUnicode((String) sectionMap.get("title"))); section.setDescription(makeFCKAttachment((String) sectionMap.get("description"))); // Add Section MetaData section.addSectionMetaData(SectionMetaDataIfc.KEYWORDS, (String) sectionMap.get("keyword")); section.addSectionMetaData(SectionMetaDataIfc.OBJECTIVES, (String) sectionMap.get("objective")); section.addSectionMetaData(SectionMetaDataIfc.RUBRICS, (String) sectionMap.get("rubric")); // SAM-2781: if you are importing from before Sakai 11, this will be null String qorderString = (String) sectionMap.get("questions-ordering"); if (StringUtils.isNotBlank(qorderString) && StringUtils.isNumeric(qorderString)) { section.addSectionMetaData(SectionDataIfc.QUESTIONS_ORDERING, qorderString); } else { section.addSectionMetaData(SectionDataIfc.QUESTIONS_ORDERING, SectionDataIfc.AS_LISTED_ON_ASSESSMENT_PAGE.toString()); } }
/** * Update section from the extracted properties. * Note: you need to do a save when you are done. * @param section the section, which will be persisted * @param sectionMap the extracted properties */ public void updateSection(SectionFacade section, Map sectionMap) { section.setTitle(TextFormat.convertPlaintextToFormattedTextNoHighUnicode((String) sectionMap.get("title"))); section.setDescription(makeFCKAttachment((String) sectionMap.get("description"))); // Add Section MetaData section.addSectionMetaData(SectionMetaDataIfc.KEYWORDS, (String) sectionMap.get("keyword")); section.addSectionMetaData(SectionMetaDataIfc.OBJECTIVES, (String) sectionMap.get("objective")); section.addSectionMetaData(SectionMetaDataIfc.RUBRICS, (String) sectionMap.get("rubric")); // SAM-2781: if you are importing from before Sakai 11, this will be null String qorderString = (String) sectionMap.get("questions-ordering"); if (StringUtils.isNotBlank(qorderString) && StringUtils.isNumeric(qorderString)) { section.addSectionMetaData(SectionDataIfc.QUESTIONS_ORDERING, qorderString); } else { section.addSectionMetaData(SectionDataIfc.QUESTIONS_ORDERING, SectionDataIfc.AS_LISTED_ON_ASSESSMENT_PAGE.toString()); } }
section.addSectionMetaData(SectionDataIfc.QUESTIONS_RANDOM_DRAW_DATE, df.format(new Date()));
section.addSectionMetaData(SectionDataIfc.QUESTIONS_RANDOM_DRAW_DATE, df.format(new Date()));