+ + +
Index: lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java,v
diff -u -r1.2 -r1.3
--- lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java 7 Jun 2011 20:58:39 -0000 1.2
+++ lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java 8 Jun 2011 12:31:16 -0000 1.3
@@ -115,7 +115,8 @@
public static final String ATTR_USER_FINISHED = "userFinished";
public static final String ATTR_ITEM = "item";
- public static final String ATTR_REMOTE_TOOL_URL = "toolUrl";
+ public static final String ATTR_LAUNCH_URL = "launchUrl";
+ public static final String ATTR_SECURE_LAUNCH_URL = "secureLaunchUrl";
public static final String ATTR_REMOTE_TOOL_KEY = "toolKey";
public static final String ATTR_REMOTE_TOOL_SECRET = "toolSecret";
public static final String ATTR_BUTTON_TEXT = "buttonText";
Index: lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java,v
diff -u -r1.2 -r1.3
--- lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java 7 Jun 2011 20:58:39 -0000 1.2
+++ lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java 8 Jun 2011 12:31:16 -0000 1.3
@@ -325,8 +325,10 @@
CommonCartridgeItem resource = uploadedCartridgeResources.get(i);
- String launchUrl = request.getParameter(CommonCartridgeConstants.ATTR_REMOTE_TOOL_URL + i);
+ String launchUrl = request.getParameter(CommonCartridgeConstants.ATTR_LAUNCH_URL + i);
resource.setLaunchUrl(launchUrl);
+ String secureLaunchUrl = request.getParameter(CommonCartridgeConstants.ATTR_SECURE_LAUNCH_URL + i);
+ resource.setSecureLaunchUrl(secureLaunchUrl);
String toolKey = request.getParameter(CommonCartridgeConstants.ATTR_REMOTE_TOOL_KEY + i);
resource.setKey(toolKey);
String toolSecret = request.getParameter(CommonCartridgeConstants.ATTR_REMOTE_TOOL_SECRET + i);
@@ -1049,11 +1051,13 @@
*/
private ActionErrors validateCommonCartridgeItem(CommonCartridgeItemForm itemForm) {
ActionErrors errors = new ActionErrors();
- if (StringUtils.isBlank(itemForm.getTitle())) {
-// errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(CommonCartridgeConstants.ERROR_MSG_TITLE_BLANK));
- }
if (itemForm.getItemType() == CommonCartridgeConstants.RESOURCE_TYPE_BASIC_LTI) {
+ if (StringUtils.isBlank(itemForm.getTitle())) {
+ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
+ CommonCartridgeConstants.ERROR_MSG_TITLE_BLANK));
+ }
+
if (StringUtils.isBlank(itemForm.getUrl())) {
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
CommonCartridgeConstants.ERROR_MSG_URL_BLANK));
Index: lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js,v
diff -u -r1.1 -r1.2
--- lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js 28 May 2011 18:03:49 -0000 1.1
+++ lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js 8 Jun 2011 12:31:16 -0000 1.2
@@ -5,14 +5,6 @@
var itemAttachmentTargetDiv = "itemAttachmentArea";
var singleInstructionHeight = 40;
- function removeInstruction(idx){
- var param = $("#instructionForm").serialize() + "&removeIdx="+idx;
- removeInstructionLoading();
- $.post(removeInstructionUrl, param, function(xml) {
- removeInstructionComplete();
- document.getElementById("instructionArea").innerHTML = xml;
- });
- }
function removeItemAttachment(idx){
removeItemAttachmentLoading();
$("#" + itemAttachmentTargetDiv).load(
@@ -22,65 +14,15 @@
}
);
}
- function addInstruction(){
- var param = $("#instructionForm").serialize();
- addInstructionLoading();
- $.post(addInstructionUrl, param, function(xml) {
- addInstructionComplete();
- document.getElementById("instructionArea").innerHTML = xml;
- });
- return false;
-
- }
- function adjustInstructionsDisplayAreaHeight(adjustAmount){
- var obj = window.top.document.getElementById('reourceInputArea');
- obj.style.height=obj.contentWindow.document.body.scrollHeight+adjustAmount+'px';
- }
- function upItem(itemIdx){
- if(itemIdx == 0)
- return;
- var currId = "instructionItemDesc" + itemIdx;
- var repId = "instructionItemDesc" + (--itemIdx);
- switchValue(currId,repId);
- }
- function downItem(itemIdx,maxSize){
- if(itemIdx == (maxSize -1))
- return;
- var currId = "instructionItemDesc" + itemIdx;
- var repId = "instructionItemDesc" + (++itemIdx);
- switchValue(currId,repId);
- }
- function switchValue(currId,repId){
- var temp = document.getElementById(repId).value;
- document.getElementById(repId).value = document.getElementById(currId).value;
- document.getElementById(currId).value = temp;
- }
- function removeInstructionLoading(){
- showBusy(instructionTargetDiv);
- }
- function removeInstructionComplete(){
- hideBusy(instructionTargetDiv);
- adjustInstructionsDisplayAreaHeight(-singleInstructionHeight);
- }
function removeItemAttachmentLoading(){
showBusy(itemAttachmentTargetDiv);
}
function removeItemAttachmentComplete(){
hideBusy(itemAttachmentTargetDiv);
}
- function addInstructionLoading(){
- showBusy(instructionTargetDiv);
- }
- function addInstructionComplete(){
- hideBusy(instructionTargetDiv);
- adjustInstructionsDisplayAreaHeight(singleInstructionHeight);
- }
function submitCommonCartridgeItem(){
$("#commonCartridgeItemForm").submit();
// after submit, it direct to itemlist.jsp,
// then refresh "basic tab" commonCartridgelist and close this window.
}
- function cancelCommonCartridgeItem(){
- window.top.hideMessage();
- }
Index: lams_tool_imscc/web/pages/authoring/basic.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_imscc/web/pages/authoring/basic.jsp,v
diff -u -r1.2 -r1.3
--- lams_tool_imscc/web/pages/authoring/basic.jsp 7 Jun 2011 20:58:39 -0000 1.2
+++ lams_tool_imscc/web/pages/authoring/basic.jsp 8 Jun 2011 12:31:16 -0000 1.3
@@ -1,48 +1,14 @@
<%@ include file="/common/taglibs.jsp"%>
-