Index: lams_central/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -r5bc88174180046cd153cfc46a0c8ef13675bd4bf -rbca8248580df6c46e6a8462d80e4341598cd9f28
--- lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 5bc88174180046cd153cfc46a0c8ef13675bd4bf)
+++ lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision bca8248580df6c46e6a8462d80e4341598cd9f28)
@@ -825,8 +825,10 @@
authoring.msg.close.cancel.save = Do you want to close this window without saving?
authoring.msg.list.cancel.save = Do you want to return to the wizard list without saving?
authoring.fla.page.menu.new.template = Use Learning Design Wizards
+authoring.fla.page.menu.new.ai = Use AI Wizard
authoring.template.list.introduction = Select a teaching strategy to explore it.
authoring.learning.design.templates = Learning Design Wizards
+authoring.learning.design.ai.wizard = Learning Design AI Wizard
authoring.template.successful = Your design has been saved as {0}.
authoring.label.sequence.title = Name
authoring.error.question.correct.num = RAT Questions: One of the answers for Question {0} needs to be correct.
Index: lams_central/src/java/org/lamsfoundation/lams/authoring/web/AuthoringController.java
===================================================================
diff -u -ra40a77e307317e8038ed9e6b8699c18386286497 -rbca8248580df6c46e6a8462d80e4341598cd9f28
--- lams_central/src/java/org/lamsfoundation/lams/authoring/web/AuthoringController.java (.../AuthoringController.java) (revision a40a77e307317e8038ed9e6b8699c18386286497)
+++ lams_central/src/java/org/lamsfoundation/lams/authoring/web/AuthoringController.java (.../AuthoringController.java) (revision bca8248580df6c46e6a8462d80e4341598cd9f28)
@@ -72,6 +72,7 @@
import org.lamsfoundation.lams.usermanagement.exception.UserException;
import org.lamsfoundation.lams.usermanagement.exception.WorkspaceFolderException;
import org.lamsfoundation.lams.usermanagement.service.IUserManagementService;
+import org.lamsfoundation.lams.util.Configuration;
import org.lamsfoundation.lams.util.FileUtil;
import org.lamsfoundation.lams.util.JsonUtil;
import org.lamsfoundation.lams.util.WebUtil;
@@ -136,10 +137,13 @@
request.setAttribute("access", JsonUtil.toString(accessList));
request.setAttribute("licenses", authoringService.getAvailableLicenses());
- boolean canSetReadOnly = userManagementService.isUserAppAdmin()
- || userManagementService.isUserGlobalGroupManager();
+ boolean canSetReadOnly =
+ userManagementService.isUserAppAdmin() || userManagementService.isUserGlobalGroupManager();
request.setAttribute("canSetReadOnly", canSetReadOnly);
+ boolean aiEnabled = Configuration.isLamsModuleAvailable(Configuration.AI_MODULE_CLASS);
+ request.setAttribute(AttributeNames.ATTR_IS_AI_ENABLED, aiEnabled);
+
return "authoring/authoring";
}
@@ -223,8 +227,8 @@
try {
authoringService.finishEditOnFly(learningDesignID, getUserId(), cancelled);
} catch (Exception e) {
- String errorMsg = "Error occured ending EditOnFly" + e.getMessage() + " learning design id "
- + learningDesignID;
+ String errorMsg =
+ "Error occured ending EditOnFly" + e.getMessage() + " learning design id " + learningDesignID;
log.error(errorMsg, e);
throw new IOException(e);
}
@@ -320,8 +324,8 @@
// if learning library ID is not set explicitly, derive it from tool
learningLibraryID = tool.getLearningLibraryId();
}
- WebApplicationContext wac = WebApplicationContextUtils
- .getRequiredWebApplicationContext(applicationContext.getServletContext());
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(
+ applicationContext.getServletContext());
ToolContentManager toolManager = (ToolContentManager) wac.getBean(tool.getServiceName());
String title = toolManager.getToolContentTitle(toolContentID);
if (title == null || title.trim().length() == 0) {
@@ -419,8 +423,7 @@
}
/**
- * Updates an existing activity coordinates.
- * It is run when SVG gets recreated in Monitoring or Add Lesson dialog
+ * Updates an existing activity coordinates. It is run when SVG gets recreated in Monitoring or Add Lesson dialog
* and activities need to be rearranged as one of them is a branching designed in the old Flash Authoring.
*/
@ResponseBody
Index: lams_central/web/authoring/authoring.jsp
===================================================================
diff -u -r3eab31a1109437bc25679e6ebe38be0a350e17ac -rbca8248580df6c46e6a8462d80e4341598cd9f28
--- lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 3eab31a1109437bc25679e6ebe38be0a350e17ac)
+++ lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision bca8248580df6c46e6a8462d80e4341598cd9f28)
@@ -135,6 +135,8 @@
INPUT_DETACHED_ERROR : decoderDiv.html('