Index: lams_build/lib/lams/lams-central.jar =================================================================== diff -u -r5943e05705f7614c7c1c29d13ce50deacdc46cc0 -r0e9eca8da006863730e793b75a47803bc6142c67 Binary files differ Index: lams_central/.classpath =================================================================== diff -u -rf32bc3c30b8ea0463d84b4dbdc112f77a400297a -r0e9eca8da006863730e793b75a47803bc6142c67 --- lams_central/.classpath (.../.classpath) (revision f32bc3c30b8ea0463d84b4dbdc112f77a400297a) +++ lams_central/.classpath (.../.classpath) (revision 0e9eca8da006863730e793b75a47803bc6142c67) @@ -7,7 +7,7 @@ - + Index: lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java =================================================================== diff -u -r792f30e164500b758d9eeac2dcf19853be4dfd9f -r0e9eca8da006863730e793b75a47803bc6142c67 --- lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java (.../LdTemplateController.java) (revision 792f30e164500b758d9eeac2dcf19853be4dfd9f) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/template/web/LdTemplateController.java (.../LdTemplateController.java) (revision 0e9eca8da006863730e793b75a47803bc6142c67) @@ -38,10 +38,6 @@ import org.apache.http.client.HttpClient; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.log4j.Logger; -import org.apache.struts.action.ActionForm; -import org.apache.struts.action.ActionForward; -import org.apache.struts.action.ActionMapping; -import org.apache.struts.actions.DispatchAction; import org.lamsfoundation.lams.authoring.service.IAuthoringService; import org.lamsfoundation.lams.authoring.template.Option; import org.lamsfoundation.lams.authoring.template.TextUtil; @@ -80,7 +76,7 @@ */ @Controller public abstract class LdTemplateController { - + @Autowired WebApplicationContext applictionContext; @@ -144,8 +140,7 @@ @RequestMapping("") @ResponseBody - public final String unspecified( HttpServletRequest request, - HttpServletResponse response) throws Exception { + public final String unspecified(HttpServletRequest request, HttpServletResponse response) throws Exception { ObjectNode responseJSON = null; try { responseJSON = createLearningDesign(request); @@ -322,7 +317,7 @@ * * @throws IOException * @ - * @throws + * @throws * HttpException */ protected ObjectNode saveLearningDesign(String templateCode, String userEnteredTitleString, @@ -933,8 +928,8 @@ String activityTitle) { return createToolActivity(uiid, order, layoutCoords, LdTemplateController.QA_TOOL_SIGNATURE, - LdTemplateController.QA_ICON, toolContentID, contentFolderID, groupingUIID, parentUIID, parentActivityType, - activityTitle != null ? activityTitle : "Q&A", Activity.CATEGORY_RESPONSE); + LdTemplateController.QA_ICON, toolContentID, contentFolderID, groupingUIID, parentUIID, + parentActivityType, activityTitle != null ? activityTitle : "Q&A", Activity.CATEGORY_RESPONSE); } /** @@ -958,8 +953,9 @@ String activityTitle) { return createToolActivity(uiid, order, layoutCoords, LdTemplateController.MCQ_TOOL_SIGNATURE, - LdTemplateController.MCQ_ICON, toolContentID, contentFolderID, groupingUIID, parentUIID, parentActivityType, - activityTitle != null ? activityTitle : "Multiple Choice", Activity.CATEGORY_ASSESSMENT); + LdTemplateController.MCQ_ICON, toolContentID, contentFolderID, groupingUIID, parentUIID, + parentActivityType, activityTitle != null ? activityTitle : "Multiple Choice", + Activity.CATEGORY_ASSESSMENT); } /** @@ -1065,8 +1061,8 @@ protected ObjectNode createResourceLearningObject(String title, String description, String[] instructions, File file, int displayOrder) throws IOException { - ObjectNode obj = createResourceItem(title, LdTemplateController.RESOURCE_TYPE_LEARNING_OBJECT, instructions, file, - displayOrder); + ObjectNode obj = createResourceItem(title, LdTemplateController.RESOURCE_TYPE_LEARNING_OBJECT, instructions, + file, displayOrder); obj.put("description", description); return obj; } @@ -1304,7 +1300,8 @@ private ILamsCoreToolService getLamsCoreToolService() { if (LdTemplateController.lamsCoreToolService == null) { LdTemplateController.lamsCoreToolService = (ILamsCoreToolService) WebApplicationContextUtils - .getRequiredWebApplicationContext(applictionContext.getServletContext()).getBean("lamsCoreToolService"); + .getRequiredWebApplicationContext(applictionContext.getServletContext()) + .getBean("lamsCoreToolService"); } return LdTemplateController.lamsCoreToolService; } @@ -1356,26 +1353,36 @@ String forward = request.getParameter("forward"); String path; switch (forward) { - case ("init") : path = "authoring/template/tbl/tbl"; - break; - case ("question") : path = "authoring/template/tool/mcquestion"; - break; - case ("questionoption") : path = "authoring/template/tool/mcoption"; - break; - case ("redooption") : path = "authoring/template/tool/mcredooption"; - break; - case ("assess") : path = "authoring/template/tool/assessment"; - break; - case ("assessmcq") : path = "authoring/template/tool/assessmcq"; - break; - case ("assessredooption") : path = "authoring/template/tool/assessredooption"; - break; - case ("assessoption") : path = "authoring/template/tool/assessoption"; - break; - case ("peerreviewstar") : path = "authoring/template/tool/peerreviewstar"; - break; - default : path = null; - break; + case ("init"): + path = "authoring/template/tbl/tbl"; + break; + case ("question"): + path = "authoring/template/tool/mcquestion"; + break; + case ("questionoption"): + path = "authoring/template/tool/mcoption"; + break; + case ("redooption"): + path = "authoring/template/tool/mcredooption"; + break; + case ("assess"): + path = "authoring/template/tool/assessment"; + break; + case ("assessmcq"): + path = "authoring/template/tool/assessmcq"; + break; + case ("assessredooption"): + path = "authoring/template/tool/assessredooption"; + break; + case ("assessoption"): + path = "authoring/template/tool/assessoption"; + break; + case ("peerreviewstar"): + path = "authoring/template/tool/peerreviewstar"; + break; + default: + path = null; + break; } return (path != null && path.length() > 0 ? path : "authoring/template/tool/mcquestion"); } @@ -1414,7 +1421,7 @@ TreeMap optionsMap = getOptions(request, questionNumber, useAssessmentVersion); optionsMap.remove(delete); // reorder the displayOrder and setup the return value - LinkedList