Index: lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java =================================================================== diff -u -r52a6369ce66a2ea70d38bfa2e627dfcde6354b10 -r3cad400f1bc8872b8f674aa1c008cecd128fe4fd --- lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java (.../LdTemplateController.java) (revision 52a6369ce66a2ea70d38bfa2e627dfcde6354b10) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java (.../LdTemplateController.java) (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; +import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.lamsfoundation.lams.authoring.service.AuthoringService; import org.lamsfoundation.lams.authoring.service.IAuthoringFullService; @@ -714,12 +715,13 @@ } /** - * Helper method to create a chat tool content. Only title and instructions are needed but we support - * lock on finished and filterKeywords in case it is wanted. The keywords should be a comma deliminated string. + * Helper method to create a chat tool content. Only title and instructions are needed but we support lock on + * finished and filterKeywords in case it is wanted. The keywords should be a comma deliminated string. */ - protected Long createChatToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, String filterKeywords) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, null, null); + protected Long createChatToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, + String filterKeywords) throws IOException { + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + null, null); toolContentJSON.put("filterKeywords", filterKeywords); return authoringService.createToolContent(user, LdTemplateController.CHAT_TOOL_SIGNATURE, toolContentJSON); } @@ -757,8 +759,8 @@ boolean allowRichTextEditor, boolean allowNewTopic, boolean allowRateMessages, boolean allowUpload, boolean limitedMaxCharacters, Integer maxCharacters, ArrayNode topics) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, allowRichTextEditor, user); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + allowRichTextEditor, user); toolContentJSON.set("topics", topics); toolContentJSON.put("allowNewTopic", allowNewTopic); toolContentJSON.put("allowRateMessages", allowRateMessages); @@ -788,8 +790,7 @@ */ protected Long createLeaderSelectionToolContent(UserDTO user, String title, String instructions) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, - null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, null); return authoringService.createToolContent(user, LdTemplateController.LEADER_TOOL_SIGNATURE, toolContentJSON); } @@ -810,8 +811,8 @@ */ protected Long createNotebookToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, boolean allowRichTextEditor) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, allowRichTextEditor, null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + allowRichTextEditor, null); return authoringService.createToolContent(user, LdTemplateController.NOTEBOOK_TOOL_SIGNATURE, toolContentJSON); } @@ -827,12 +828,11 @@ } /** - * Helper method to create a noticeboard tool content. Only title and content are needed for noticeboard! + * Helper method to create a noticeboard tool content. Only title and content are needed for noticeboard! */ protected Long createNoticeboardToolContent(UserDTO user, String title, String content) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, null, - null, null, null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, null, null, null, null); toolContentJSON.put("content", content != null ? content : ""); return authoringService.createToolContent(user, LdTemplateController.NOTICEBOARD_TOOL_SIGNATURE, toolContentJSON); @@ -857,8 +857,8 @@ protected Long createQAToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, boolean allowRichTextEditor, boolean oneQuestionPerPage, boolean showOtherLearnersAnswers, boolean showOtherLearnersNames, ArrayNode questions) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, allowRichTextEditor, null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + allowRichTextEditor, null); toolContentJSON.set(RestTags.QUESTIONS, questions); toolContentJSON.put("questionsSequenced", oneQuestionPerPage); toolContentJSON.put("showOtherAnswers", showOtherLearnersAnswers); @@ -884,8 +884,7 @@ protected Long createMCQToolContent(UserDTO user, String title, String instructions, boolean useSelectLeaderToolOuput, boolean enableConfidenceLevel, boolean prefixAnswersWithLetters, ArrayNode questions) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, - null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, null); toolContentJSON.put(RestTags.USE_SELECT_LEADER_TOOL_OUTPUT, useSelectLeaderToolOuput); toolContentJSON.set(RestTags.QUESTIONS, questions); toolContentJSON.put(RestTags.ENABLE_CONFIDENCE_LEVELS, enableConfidenceLevel); @@ -909,12 +908,15 @@ /** * Helper method to create a mindmap tool content. */ - protected Long createMindmapToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, - boolean multiUserMode) throws IOException { + protected Long createMindmapToolContent(UserDTO user, String title, String instructions, String rootNodeName, + boolean lockWhenFinished, boolean multiUserMode) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, null, null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + null, null); toolContentJSON.put("multiUserMode", multiUserMode); + if (StringUtils.isNotBlank(rootNodeName)) { + toolContentJSON.put("rootNodeName", rootNodeName); + } return authoringService.createToolContent(user, LdTemplateController.MINDMAP_TOOL_SIGNATURE, toolContentJSON); } @@ -939,11 +941,10 @@ */ protected Long createResourcesToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, boolean runContentAutomatically, boolean allowLearnerAddURL, boolean allowLearnerAddFile, - boolean notifyInstructors, Integer minResourcesToView, ArrayNode resources) - throws IOException { + boolean notifyInstructors, Integer minResourcesToView, ArrayNode resources) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, null, user); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + null, user); toolContentJSON.put("allowAddFiles", allowLearnerAddFile); toolContentJSON.put("allowAddUrls", allowLearnerAddURL); toolContentJSON.put("notifyTeachersOnAssigmentSumbit", notifyInstructors); @@ -1037,8 +1038,7 @@ boolean useSelectLeaderToolOuput, boolean enableDiscussionSentiment, Integer confidenceLevelsActivityUiid, Long qbCollectionUid, ArrayNode questions) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, - null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, null); toolContentJSON.set(RestTags.QUESTIONS, questions); if (confidenceLevelsActivityUiid != null) { toolContentJSON.put(RestTags.CONFIDENCE_LEVELS_ACTIVITY_UIID, confidenceLevelsActivityUiid); @@ -1076,11 +1076,10 @@ * one heading. */ protected Long createScribeToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, - boolean autoSelectScribe, boolean showAggregatedReports, ArrayNode questions) - throws IOException { + boolean autoSelectScribe, boolean showAggregatedReports, ArrayNode questions) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, null, null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + null, null); toolContentJSON.set(RestTags.QUESTIONS, questions); toolContentJSON.put("autoSelectScribe", autoSelectScribe); toolContentJSON.put("showAggregatedReports", showAggregatedReports); @@ -1106,8 +1105,8 @@ protected Long createSubmitToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, Boolean limitUpload, Integer limitUploadNumber) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, null, user); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + null, user); if (limitUploadNumber != null) { toolContentJSON.put("limitUpload", limitUpload != null ? limitUpload : true); toolContentJSON.put("limitUploadNumber", limitUploadNumber); @@ -1134,8 +1133,8 @@ protected Long createSurveyToolContent(UserDTO user, String title, String instructions, Boolean lockWhenFinished, ArrayNode questions) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, null, user); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + null, user); toolContentJSON.set("questions", questions); return authoringService.createToolContent(user, LdTemplateController.SURVEY_TOOL_SIGNATURE, toolContentJSON); } @@ -1159,8 +1158,7 @@ protected Long createVoteToolContent(UserDTO user, String title, String instructions, ArrayNode answers, Boolean showResults) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, - null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, null); toolContentJSON.set(RestTags.ANSWERS, answers); toolContentJSON.put("showResults", showResults); return authoringService.createToolContent(user, LdTemplateController.VOTE_TOOL_SIGNATURE, toolContentJSON); @@ -1184,8 +1182,8 @@ protected Long createWikiToolContent(UserDTO user, String title, String instructions, boolean lockWhenFinished, ArrayNode pages) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - lockWhenFinished, null, null); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, lockWhenFinished, + null, null); toolContentJSON.set("pages", pages); return authoringService.createToolContent(user, LdTemplateController.WIKI_TOOL_SIGNATURE, toolContentJSON); } @@ -1208,9 +1206,9 @@ * * The criterias entry should be ArrayNode as defined in PeerReviewCriters object. */ - protected Long createPeerReviewToolContent(UserDTO user, String title, String instructions, ArrayNode criterias) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, - null, null, user); + protected Long createPeerReviewToolContent(UserDTO user, String title, String instructions, ArrayNode criterias) + throws IOException { + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, instructions, null, null, user); toolContentJSON.set("criterias", criterias); return authoringService.createToolContent(user, LdTemplateController.PEER_REVIEW_TOOL_SIGNATURE, toolContentJSON); @@ -1235,8 +1233,7 @@ boolean selectLeaderToolOutput, boolean galleryWalkEnabled, boolean galleryWalkReadOnly, String galleryWalkInstructions) throws IOException { - ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, description, - null, null, user); + ObjectNode toolContentJSON = AuthoringService.createStandardToolContent(title, description, null, null, user); toolContentJSON.put(RestTags.USE_SELECT_LEADER_TOOL_OUTPUT, selectLeaderToolOutput); toolContentJSON.put(RestTags.LOCK_WHEN_FINISHED, true); toolContentJSON.put("etherpadInstructions", instructions); Index: lams_central/web/templates/pbl/aiPblAnalysisContentTemplate.html =================================================================== diff -u --- lams_central/web/templates/pbl/aiPblAnalysisContentTemplate.html (revision 0) +++ lams_central/web/templates/pbl/aiPblAnalysisContentTemplate.html (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -0,0 +1,57 @@ +
+ + +
+
+
+
+

Define your own Learning Objectives as a Team

+ +

Looking at the case (see other tab above), with your team define:

+ +
    +
  • +

    Consensus on Key Term Definitions.

    +
  • +
  • +

    What your learning objectives will be.

    +
  • +
  • +

    Determine your Research Plan.

    +
  • +
  • +

    Any questions or doubts to be raise for the PBL Facilitator.

    +
  • +
  • +

    Others...

    +
  • +
+ +

 

+ +
+
+
Need a Mindmap? Use the Mindmap available as support activity
+
+
+
+
+
+ +
+
+
+

[authoring.pbl.ld.problem]

+ +
[problem.content]
+ +

[authoring.pbl.ld.problem.questions]

+
[problem.document]
+
+
+
+
+
\ No newline at end of file Index: lams_central/web/templates/pbl/aiPblAnalysisDocumentTemplate.html =================================================================== diff -u --- lams_central/web/templates/pbl/aiPblAnalysisDocumentTemplate.html (revision 0) +++ lams_central/web/templates/pbl/aiPblAnalysisDocumentTemplate.html (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -0,0 +1,21 @@ +

Key Terms Definition
+(Terms that you might require a clear definition)
+-
+-
+- +

+

Learning Objectives
+-
+-
+- +

+

Research Plan Guide
+-
+-
+- +

+

Questions for Facilitator(s)
+-
+-
+- +

\ No newline at end of file Index: lams_central/web/templates/pbl/aiPblDiscussionContentTemplate.html =================================================================== diff -u --- lams_central/web/templates/pbl/aiPblDiscussionContentTemplate.html (revision 0) +++ lams_central/web/templates/pbl/aiPblDiscussionContentTemplate.html (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -0,0 +1,15 @@ +
+
+

Share your research

+ +

Using the previously created Learning Objectives and Research Plan, share your learning with the rest of the team.

+ +

Make sure you ensure that in this activity you clarify any knowledge gaps you might have regarding the case. 

+ +

You can use the "Mindmap" activity to create a shared idea tree if that is helpful. 

+ +

Once everyone in your team has shared their research and findings on each learning objective (make sure you haven't missed any), start drafting the final report. 

+
+ +
 
+
\ No newline at end of file Index: lams_central/web/templates/pbl/aiPblDiscussionDocumentTemplate.html =================================================================== diff -u --- lams_central/web/templates/pbl/aiPblDiscussionDocumentTemplate.html (revision 0) +++ lams_central/web/templates/pbl/aiPblDiscussionDocumentTemplate.html (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -0,0 +1,13 @@ +

Learning Objectives
+Learning Objective 1
+-
+-
+- +Learning Objective 2
+-
+-
+- +

+

Draft Report
+(Start typing here the first draft for your report, in the next activity you'll be asked to type the full and final report for your team) +

\ No newline at end of file Index: lams_central/web/templates/pbl/aiPblIntroductionTemplate.html =================================================================== diff -u --- lams_central/web/templates/pbl/aiPblIntroductionTemplate.html (revision 0) +++ lams_central/web/templates/pbl/aiPblIntroductionTemplate.html (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -0,0 +1,14 @@ +

Problem Based Learning

+ +

[authoring.introduction.template.1]

+ +

[authoring.introduction.template.2]

+ +
    +
  1. Team Formation: Firstly, teams will be formed. For the rest of the lesson you will work closely with your teammates to discuss your individual ideas and decide on the best approach as a group.
  2. +
  3. Problem Introduction: Then a challenging scenario will be presented to you, which requires solving. There will be also several facilitating questions to help.
  4. +
  5. Initial Brainstorming: You will start by individually brainstorming ideas. Different approaches to the problem should be considered, and any initial thoughts or solutions that come to mind should be noted down.
  6. +
  7. Research Phase: Research will be conducted to gather information, data, and resources. This will help in better understanding the problem and potential solutions.
  8. +
  9. Analysis and Discussion: With the research gathered, the team will reconvene to analyze the findings. Discussion will focus on what has been learned, identifying any gaps in understanding, and refining the approach accordingly.
  10. +
  11. Solution Development: Teams will then work collaboratively to develop a comprehensive solution using the insights gained from research and discussions.
  12. +
\ No newline at end of file Index: lams_central/web/templates/pbl/aiPblProblemTemplate.html =================================================================== diff -u --- lams_central/web/templates/pbl/aiPblProblemTemplate.html (revision 0) +++ lams_central/web/templates/pbl/aiPblProblemTemplate.html (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -0,0 +1,8 @@ +
+

[authoring.pbl.ld.problem]

+ +
[problem.content]
+ +

[authoring.pbl.ld.problem.questions]

+
[problem.document]
+
\ No newline at end of file Index: lams_central/web/templates/pbl/aiPblReportTemplate.html =================================================================== diff -u --- lams_central/web/templates/pbl/aiPblReportTemplate.html (revision 0) +++ lams_central/web/templates/pbl/aiPblReportTemplate.html (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -0,0 +1,9 @@ +
+
+

Team Report

+ +

Now, please type your team report below

+
+ +
 
+
\ No newline at end of file Index: lams_central/web/templates/pbl/aiPblResearchTemplate.html =================================================================== diff -u --- lams_central/web/templates/pbl/aiPblResearchTemplate.html (revision 0) +++ lams_central/web/templates/pbl/aiPblResearchTemplate.html (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -0,0 +1,23 @@ + +
+
+
+
+

Research Resources & Notes

+ +

 

+
+
+
+
+ +
 
+ +
 
+ +
Use this activity to individually collect resources and research notes.
+ +
 
+ +
 
\ No newline at end of file Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java =================================================================== diff -u -r0356b71a54403d2a4f45a3b90e5fab4fc3c11dd7 -r3cad400f1bc8872b8f674aa1c008cecd128fe4fd --- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java (.../ResourceServiceImpl.java) (revision 0356b71a54403d2a4f45a3b90e5fab4fc3c11dd7) +++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java (.../ResourceServiceImpl.java) (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -1172,31 +1172,33 @@ // **************************** Handle topic ********************* ArrayNode resources = JsonUtil.optArray(toolContentJSON, "resources"); Set itemList = new LinkedHashSet<>(); - for (JsonNode itemData : resources) { - ResourceItem item = new ResourceItem(); - item.setTitle(JsonUtil.optString(itemData, "title")); - item.setType(JsonUtil.optInt(itemData, "type").shortValue()); - item.setCreateBy(resourceUser); - item.setCreateDate(updateDate); - item.setComplete(false); - item.setCreateByAuthor(true); - item.setHide(false); - item.setOrderId(JsonUtil.optInt(itemData, RestTags.DISPLAY_ORDER)); + if (resources != null) { + for (JsonNode itemData : resources) { + ResourceItem item = new ResourceItem(); + item.setTitle(JsonUtil.optString(itemData, "title")); + item.setType(JsonUtil.optInt(itemData, "type").shortValue()); + item.setCreateBy(resourceUser); + item.setCreateDate(updateDate); + item.setComplete(false); + item.setCreateByAuthor(true); + item.setHide(false); + item.setOrderId(JsonUtil.optInt(itemData, RestTags.DISPLAY_ORDER)); - item.setInstructions(JsonUtil.optString(itemData, "instructions")); - item.setFileName(JsonUtil.optString(itemData, "name")); - item.setFileType(JsonUtil.optString(itemData, "fileType")); - item.setFileUuid(JsonUtil.optLong(itemData, "crUuid")); - item.setFileVersionId(JsonUtil.optLong(itemData, "crVersionId")); - item.setUrl(JsonUtil.optString(itemData, "url")); + item.setInstructions(JsonUtil.optString(itemData, "instructions")); + item.setFileName(JsonUtil.optString(itemData, "name")); + item.setFileType(JsonUtil.optString(itemData, "fileType")); + item.setFileUuid(JsonUtil.optLong(itemData, "crUuid")); + item.setFileVersionId(JsonUtil.optLong(itemData, "crVersionId")); + item.setUrl(JsonUtil.optString(itemData, "url")); - // TODO files - need to save it somehow, validate the file size, etc. Needed for websites, files & LO - if ((item.getFileName() != null) || (item.getFileUuid() != null)) { - throw new IOException( - "Only URLS supported via REST interface currently - files and learning objects are not supported."); - } + // TODO files - need to save it somehow, validate the file size, etc. Needed for websites, files & LO + if ((item.getFileName() != null) || (item.getFileUuid() != null)) { + throw new IOException( + "Only URLS supported via REST interface currently - files and learning objects are not supported."); + } - itemList.add(item); + itemList.add(item); + } } resource.setResourceItems(itemList); Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java =================================================================== diff -u -r0356b71a54403d2a4f45a3b90e5fab4fc3c11dd7 -r3cad400f1bc8872b8f674aa1c008cecd128fe4fd --- lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java (.../MindmapService.java) (revision 0356b71a54403d2a4f45a3b90e5fab4fc3c11dd7) +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java (.../MindmapService.java) (revision 3cad400f1bc8872b8f674aa1c008cecd128fe4fd) @@ -1015,15 +1015,20 @@ // content.setMindmapExportContent(exportContent) only set by export, not by authoring saveOrUpdateMindmap(content); - // creating default nodes for current mindmap - String rootNodeName = getMindmapMessageService().getMessage("node.root.defaultName"); - String childNodeName1 = getMindmapMessageService().getMessage("node.child1.defaultName"); - String childNodeName2 = getMindmapMessageService().getMessage("node.child2.defaultName"); - - MindmapNode rootMindmapNode = saveMindmapNode(null, null, 1l, rootNodeName, "ffffff", null, content, null); - saveOrUpdateMindmapNode(rootMindmapNode); - saveMindmapNode(null, rootMindmapNode, 2l, childNodeName1, "ffffff", null, content, null); - saveMindmapNode(null, rootMindmapNode, 3l, childNodeName2, "ffffff", null, content, null); + String rootNodeName = JsonUtil.optString(toolContentJSON, "rootNodeName"); + if (rootNodeName == null) { + // creating default nodes for current mindmap + rootNodeName = getMindmapMessageService().getMessage("node.root.defaultName"); + String childNodeName1 = getMindmapMessageService().getMessage("node.child1.defaultName"); + String childNodeName2 = getMindmapMessageService().getMessage("node.child2.defaultName"); + MindmapNode rootMindmapNode = saveMindmapNode(null, null, 1l, rootNodeName, "ffffff", null, content, null); + saveOrUpdateMindmapNode(rootMindmapNode); + saveMindmapNode(null, rootMindmapNode, 2l, childNodeName1, "ffffff", null, content, null); + saveMindmapNode(null, rootMindmapNode, 3l, childNodeName2, "ffffff", null, content, null); + } else { + MindmapNode rootMindmapNode = saveMindmapNode(null, null, 1l, rootNodeName, "ffffff", null, content, null); + saveOrUpdateMindmapNode(rootMindmapNode); + } } @Override