Index: lams_bb_integration/RELEASE_NOTES.TXT =================================================================== diff -u -rb03188c4b319a222caa3deeb09f9e7f41f8cc176 -rc42107bc1dd1796f8effeecef9366f0be5795923 --- lams_bb_integration/RELEASE_NOTES.TXT (.../RELEASE_NOTES.TXT) (revision b03188c4b319a222caa3deeb09f9e7f41f8cc176) +++ lams_bb_integration/RELEASE_NOTES.TXT (.../RELEASE_NOTES.TXT) (revision c42107bc1dd1796f8effeecef9366f0be5795923) @@ -93,3 +93,5 @@ =================== * LDEV-3456: Supports deleting learning designs. * LDEV-3513: Transform lineitemId parameter stored in some older versions to the format required now +* LDEV-3510: LAMS Lessons always appear at the top of the content list - should able to be moved further down the list. +* LDEV-3521: Supporting an alternative URL for LAMS where needed for mixed https/http integrations. Index: lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsPluginUtil.java =================================================================== diff -u -ra8f2859ee903c129921e653ce789dca19cc60f1f -rc42107bc1dd1796f8effeecef9366f0be5795923 --- lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsPluginUtil.java (.../LamsPluginUtil.java) (revision a8f2859ee903c129921e653ce789dca19cc60f1f) +++ lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsPluginUtil.java (.../LamsPluginUtil.java) (revision c42107bc1dd1796f8effeecef9366f0be5795923) @@ -50,6 +50,7 @@ public static final String PROP_LAMS_URL = "LAMS_SERVER_URL"; public static final String PROP_REQ_SRC = "BB_REQ_SRC"; public static final String PROP_LAMS_SERVER_TIME_REFRESH_INTERVAL = "LAMS_SERVER_TIME_REFRESH_INTERVAL"; + public static final String PROP_ALT_LAMS_URL = "LAMS_ALT_SERVER_URL"; private static Properties lamsProperties = null; Index: lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsSecurityUtil.java =================================================================== diff -u -ra992ac61e8e1ba2366392c77d1783147f48dbc5c -rc42107bc1dd1796f8effeecef9366f0be5795923 --- lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsSecurityUtil.java (.../LamsSecurityUtil.java) (revision a992ac61e8e1ba2366392c77d1783147f48dbc5c) +++ lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsSecurityUtil.java (.../LamsSecurityUtil.java) (revision c42107bc1dd1796f8effeecef9366f0be5795923) @@ -72,6 +72,24 @@ private static final String DUMMY_COURSE = "Previews"; /** + * Generates login requests to LAMS for author, monitor and learner, using the alternative URL. + * + * @param ctx + * the blackboard contect, contains session data + * @param method + * the mehtod to request of LAMS "author", "monitor", "learnerStrictAuth" + * @param lsid + * lesson id. It is expected to be present in case of "monitor" and "learnerStrictAuth" + * @return a url pointing to the LAMS lesson, monitor, author session + * @throws IOException + * @throws PersistenceException + * @throws Exception + */ + public static String generateRequestAltURL(Context ctx, String method, String lsid) throws PersistenceException, IOException { + return generateRequestURLForServer(ctx, method, lsid, getAltServerAddress()); + } + + /** * Generates login requests to LAMS for author, monitor and learner * * @param ctx @@ -86,8 +104,10 @@ * @throws Exception */ public static String generateRequestURL(Context ctx, String method, String lsid) throws PersistenceException, IOException { + return generateRequestURLForServer(ctx, method, lsid, getServerAddress()); + } - String serverAddr = getServerAddress(); + private static String generateRequestURLForServer(Context ctx, String method, String lsid, String serverAddr) throws PersistenceException, IOException { String serverId = getServerID(); String reqSrc = getReqSrc(); @@ -828,6 +848,14 @@ } /** + * @return gets alternative server address from the lams.properties file + */ + public static String getAltServerAddress() { + return LamsPluginUtil.getProperties().getProperty(LamsPluginUtil.PROP_ALT_LAMS_URL); + } + + + /** * @return gets server id from the lams.properties file */ public static String getServerID() { Index: lams_bb_integration/web/admin/config.jsp =================================================================== diff -u -ra8f2859ee903c129921e653ce789dca19cc60f1f -rc42107bc1dd1796f8effeecef9366f0be5795923 --- lams_bb_integration/web/admin/config.jsp (.../config.jsp) (revision a8f2859ee903c129921e653ce789dca19cc60f1f) +++ lams_bb_integration/web/admin/config.jsp (.../config.jsp) (revision c42107bc1dd1796f8effeecef9366f0be5795923) @@ -33,6 +33,7 @@ String SecretKey = p.getProperty("LAMS_SERVER_SKEY", ""); String ReqSrc = p.getProperty("BB_REQ_SRC"); String lamsServerTimeRefreshInterval = p.getProperty("LAMS_SERVER_TIME_REFRESH_INTERVAL"); + String lamsAltServerUrl = p.getProperty("LAMS_ALT_SERVER_URL", "https://"); //Add port to the url if the port is in the blackboard url int bbport = request.getServerPort(); @@ -71,6 +72,9 @@ + + +

For further information on how to configure these settings, see this tutorial.

Index: lams_bb_integration/web/admin/config_proc.jsp =================================================================== diff -u -ra8f2859ee903c129921e653ce789dca19cc60f1f -rc42107bc1dd1796f8effeecef9366f0be5795923 --- lams_bb_integration/web/admin/config_proc.jsp (.../config_proc.jsp) (revision a8f2859ee903c129921e653ce789dca19cc60f1f) +++ lams_bb_integration/web/admin/config_proc.jsp (.../config_proc.jsp) (revision c42107bc1dd1796f8effeecef9366f0be5795923) @@ -37,13 +37,15 @@ String lamsServerId = request.getParameter("lams_server_id"); String bbReqSrc = request.getParameter("bb_req_src"); String lamsServerTimeRefreshInterval = request.getParameter("lams_server_time_refresh_interval"); + String lamsAltServerUrl = request.getParameter("lams_alt_server_url"); // Save the properties to Blackboard p.setProperty(LamsPluginUtil.PROP_LAMS_URL, lamsServerUrl); p.setProperty(LamsPluginUtil.PROP_LAMS_SECRET_KEY, lamsServerSkey); p.setProperty(LamsPluginUtil.PROP_LAMS_SERVER_ID, lamsServerId); p.setProperty(LamsPluginUtil.PROP_REQ_SRC, bbReqSrc); p.setProperty(LamsPluginUtil.PROP_LAMS_SERVER_TIME_REFRESH_INTERVAL, lamsServerTimeRefreshInterval); + p.setProperty(LamsPluginUtil.PROP_ALT_LAMS_URL, lamsAltServerUrl); // Persist the properties object LamsPluginUtil.setProperties(p); @@ -71,8 +73,9 @@ LAMS_SERVER_URL: <%= lamsServerUrl %>
LAMS_SERVER_SKEY: <%= lamsServerSkey %>
LAMS_SERVER_ID: <%= lamsServerId %>
- BB_REQ_SRC: <%= bbReqSrc %> - LAMS_SERVER_TIME_REFRESH_INTERVAL: <%= lamsServerTimeRefreshInterval %> + BB_REQ_SRC: <%= bbReqSrc %>
+ LAMS_SERVER_TIME_REFRESH_INTERVAL: <%= lamsServerTimeRefreshInterval %>
+ LAMS_ALT_SERVER_URL: <%= lamsAltServerUrl %> \ No newline at end of file Index: lams_bb_integration/web/modules/start_lesson_proc.jsp =================================================================== diff -u -r068e4100028edf75e5f748dd330c8996b13b7d46 -rc42107bc1dd1796f8effeecef9366f0be5795923 --- lams_bb_integration/web/modules/start_lesson_proc.jsp (.../start_lesson_proc.jsp) (revision 068e4100028edf75e5f748dd330c8996b13b7d46) +++ lams_bb_integration/web/modules/start_lesson_proc.jsp (.../start_lesson_proc.jsp) (revision c42107bc1dd1796f8effeecef9366f0be5795923) @@ -48,7 +48,7 @@ <% //Set the new LAMS Lesson Content Object - ExternalLink bbContent = new blackboard.data.content.ExternalLink(); + CourseDocument bbContent = new blackboard.data.content.CourseDocument(); // Authorise current user for Course Control Panel (automatic redirect) try{ @@ -134,6 +134,8 @@ bbContent.setRenderType(Content.RenderType.URL); bbContent.setBody(description); + + bbContent.setLaunchInNewWindow(true); // Start the Lesson in LAMS (via Webservices) and capture the lesson ID final long LamsLessonIdLong = LamsSecurityUtil.startLesson(ctx, ldId, strTitle, strDescription, false);