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.1 -r1.2 --- lams_bb_integration/web/admin/config_proc.jsp 6 Aug 2007 07:09:36 -0000 1.1 +++ lams_bb_integration/web/admin/config_proc.jsp 21 Sep 2011 17:42:25 -0000 1.2 @@ -1,50 +1,75 @@ -<%@page import="java.util.Properties, - blackboard.platform.BbServiceManager, - blackboard.platform.plugin.PlugInUtil, - blackboard.platform.security.AccessManagerService, - org.lamsfoundation.ld.integration.blackboard.LamsPluginUtil" - - errorPage="/error.jsp" -%> - -<%@ taglib uri="/bbUI" prefix="bbUI"%> -<%@ taglib uri="/bbData" prefix="bbData"%> - +<%-- + Original Version: 2007 LAMS Foundation + Updated for Blackboard 9.1 SP6 (including new bbNG tag library) 2011 + Richard Stals (www.stals.com.au) + Edith Cowan University, Western Australia +--%> +<%-- + Process the Configuration Form for the Building Block System Administration + Save the configuration items and display a success receipt +--%> +<%@ page import="java.util.Properties"%> +<%@ page import="blackboard.platform.BbServiceManager"%> +<%@ page import="blackboard.platform.plugin.PlugInUtil"%> +<%@ page import="blackboard.platform.plugin.PlugInException"%> +<%@ page import="org.lamsfoundation.ld.integration.blackboard.LamsPluginUtil"%> +<%@ page errorPage="/error.jsp"%> +<%@ taglib uri="/bbNG" prefix="bbNG"%> + <% // SECURITY! - AccessManagerService accessManager = (AccessManagerService) BbServiceManager.lookupService(AccessManagerService.class); - if (!PlugInUtil.authorizeForSystemAdmin(request,response)){ - accessManager.sendAccessDeniedRedirect(request,response); - return; + // Authorise current user for System Admin (automatic redirect) + try{ + if (!PlugInUtil.authorizeForSystemAdmin(request, response)) + return; + } catch(PlugInException e) { + throw new RuntimeException(e); } + + // Save the Properties + + // Getthe properties object Properties p = LamsPluginUtil.getProperties(); + + // Get the LAMS2 Building Block properties from the request String lamsServerUrl = request.getParameter("lams_server_url"); String lamsServerSkey = request.getParameter("lams_server_skey"); String lamsServerId = request.getParameter("lams_server_id"); String bbReqSrc = request.getParameter("bb_req_src"); + // 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("BB_REQ_SRC", bbReqSrc); - - LamsPluginUtil.setProperties(p); //persist the properties file + + // Persist the properties object + LamsPluginUtil.setProperties(p); %> - - - LAMS Configuration - - -

Sample plugin configured

- LAMS_SERVER_URL: <%= lamsServerUrl %>
- LAMS_SERVER_SKEY: <%= lamsServerSkey %>
- LAMS_SERVER_ID: <%= lamsServerId %>
- BB_REQ_SRC: <%= bbReqSrc %> - -
- - \ No newline at end of file + <%-- Breadcrumbs It seems we need to build the full trail manually --%> + + + + + + + + <%-- Page Header --%> + + + + + <%-- Receipt --%> + +

Sample plugin configured

+ LAMS_SERVER_URL: <%= lamsServerUrl %>
+ LAMS_SERVER_SKEY: <%= lamsServerSkey %>
+ LAMS_SERVER_ID: <%= lamsServerId %>
+ BB_REQ_SRC: <%= bbReqSrc %> + + + \ No newline at end of file