Index: lams_bb_integration/RELEASE_NOTES.TXT =================================================================== RCS file: /usr/local/cvsroot/lams_bb_integration/RELEASE_NOTES.TXT,v diff -u -r1.19 -r1.20 --- lams_bb_integration/RELEASE_NOTES.TXT 22 Jul 2015 00:57:50 -0000 1.19 +++ lams_bb_integration/RELEASE_NOTES.TXT 29 Jul 2015 10:44:31 -0000 1.20 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/Attic/LamsPluginUtil.java,v diff -u -r1.3 -r1.4 --- lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsPluginUtil.java 3 Dec 2014 20:35:43 -0000 1.3 +++ lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsPluginUtil.java 29 Jul 2015 10:44:31 -0000 1.4 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/Attic/LamsSecurityUtil.java,v diff -u -r1.33 -r1.34 --- lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsSecurityUtil.java 20 Jul 2015 01:10:20 -0000 1.33 +++ lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/LamsSecurityUtil.java 29 Jul 2015 10:44:31 -0000 1.34 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_bb_integration/web/admin/config.jsp,v diff -u -r1.5 -r1.6 --- lams_bb_integration/web/admin/config.jsp 3 Dec 2014 20:35:43 -0000 1.5 +++ lams_bb_integration/web/admin/config.jsp 29 Jul 2015 10:44:31 -0000 1.6 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_bb_integration/web/admin/Attic/config_proc.jsp,v diff -u -r1.3 -r1.4 --- lams_bb_integration/web/admin/config_proc.jsp 3 Dec 2014 20:35:43 -0000 1.3 +++ lams_bb_integration/web/admin/config_proc.jsp 29 Jul 2015 10:44:31 -0000 1.4 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_bb_integration/web/modules/Attic/start_lesson_proc.jsp,v diff -u -r1.14 -r1.15 --- lams_bb_integration/web/modules/start_lesson_proc.jsp 11 Jun 2015 23:44:29 -0000 1.14 +++ lams_bb_integration/web/modules/start_lesson_proc.jsp 29 Jul 2015 10:44:31 -0000 1.15 @@ -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);