<%-- 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 --%> <%-- Step 1 For Modifing an existing LAMS Lesson Set the various attributes for the LAMS lesson in Blackboard Step 1 - modify.jsp Step 2 - modify_proc.jsp --%> <%@ page import="java.util.*"%> <%@ page import="java.util.Date"%> <%@ page import="java.util.Calendar"%> <%@ page import="java.text.SimpleDateFormat"%> <%@ page import="blackboard.data.*"%> <%@ page import="blackboard.persist.*"%> <%@ page import="blackboard.data.course.*"%> <%@ page import="blackboard.data.user.*"%> <%@ page import="blackboard.persist.course.*"%> <%@ page import="blackboard.data.content.*"%> <%@ page import="blackboard.persist.content.*"%> <%@ page import="blackboard.db.*"%> <%@ page import="blackboard.base.*"%> <%@ page import="blackboard.platform.*"%> <%@ page import="blackboard.platform.plugin.*"%> <%@ page errorPage="/error.jsp"%> <%@ taglib uri="/bbNG" prefix="bbNG"%> <% String NOT_AVAILABLE = "Item is not available.
"; // Authorise current user for Course Control Panel (automatic redirect) try{ if (!PlugInUtil.authorizeForCourseControlPanel(request, response)) return; } catch(PlugInException e) { throw new RuntimeException(e); } // Get the Course Document (Lams Lesson) BbPersistenceManager bbPm = BbServiceManager.getPersistenceService().getDbPersistenceManager(); Container bbContainer = bbPm.getContainer(); Id contentId = new PkId( bbContainer, CourseDocument.DATA_TYPE, request.getParameter("content_id") ); ContentDbLoader courseDocumentLoader = (ContentDbLoader) bbPm.getLoader( ContentDbLoader.TYPE ); Content courseDoc = (Content)courseDocumentLoader.loadById( contentId ); // Get the Item Attributes Calendar startDate = courseDoc.getStartDate(); Calendar endDate = courseDoc.getEndDate(); FormattedText desc = courseDoc.getBody(); String description = desc.getText().replaceFirst(NOT_AVAILABLE, ""); //remove the NOT_AVAILABLE substring %> <%-- Breadcrumbs --%> <%-- Page Header --%> <%-- Form for the LAMS Lesson Attributes --%>
"> "> >Yes >No >Yes >No >Yes >No <%-- Show start and end dates if they have been set If non ehave been set, leave the tags out so that Blackboard puts the default dates in --%> <% if(startDate==null && endDate==null) { %> <% } else if(endDate==null) { %> <% } else if(startDate==null) { %> <% } else { %> <% } %>