Index: lams_bb_integration/WEB-INF/web.xml =================================================================== diff -u -r15727fba2560b07c19aa85591b35791515be1a8e -r23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d --- lams_bb_integration/WEB-INF/web.xml (.../web.xml) (revision 15727fba2560b07c19aa85591b35791515be1a8e) +++ lams_bb_integration/WEB-INF/web.xml (.../web.xml) (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -4,7 +4,7 @@ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> - + UserDataServlet org.lamsfoundation.ld.integration.blackboard.UserDataServlet @@ -42,6 +42,10 @@ org.lamsfoundation.ld.integration.blackboard.GradebookSyncServlet + OpenLamsPageServlet + org.lamsfoundation.ld.integration.blackboard.OpenLamsPageServlet + + RenderDesignImageServlet org.lamsfoundation.ld.integration.blackboard.RenderDesignImageServlet @@ -50,6 +54,10 @@ org.lamsfoundation.ld.integration.blackboard.StartLessonServlet + StartLessonAjaxServlet + org.lamsfoundation.ld.integration.blackboard.StartLessonAjaxServlet + + UpdateServerUrlServlet org.lamsfoundation.ld.integration.blackboard.UpdateServerUrlServlet @@ -89,13 +97,21 @@ GradebookSyncServlet /GradebookSync - + + OpenLamsPageServlet + /openLamsPage + + RenderDesignImageServlet /RenderImage StartLessonServlet + /StartLessonServlet + + + StartLessonAjaxServlet /StartLesson Index: lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/OpenLamsPageServlet.java =================================================================== diff -u --- lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/OpenLamsPageServlet.java (revision 0) +++ lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/OpenLamsPageServlet.java (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -0,0 +1,247 @@ +package org.lamsfoundation.ld.integration.blackboard; +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.lamsfoundation.ld.integration.util.LamsSecurityUtil; + +import blackboard.base.InitializationException; +import blackboard.data.course.Course; +import blackboard.data.course.CourseMembership; +import blackboard.data.user.User; +import blackboard.persist.BbPersistenceManager; +import blackboard.persist.Id; +import blackboard.persist.KeyNotFoundException; +import blackboard.persist.PersistenceException; +import blackboard.persist.course.CourseMembershipDbLoader; +import blackboard.platform.BbServiceException; +import blackboard.platform.BbServiceManager; +import blackboard.platform.context.Context; +import blackboard.platform.context.ContextManager; +import blackboard.platform.persistence.PersistenceServiceFactory; +import blackboard.platform.plugin.PlugInException; +import blackboard.platform.plugin.PlugInUtil; + +/** + * Launches LAMS pages: author, learner and monitor one. + */ +public class OpenLamsPageServlet extends HttpServlet { + + private static final long serialVersionUID = -351131323404991332L; + private static Logger logger = Logger.getLogger(OpenLamsPageServlet.class); + + public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + process(request, response); + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + process(request, response); + } + + private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + ContextManager ctxMgr = null; + try { + // get Blackboard context + ctxMgr = (ContextManager) BbServiceManager.lookupService(ContextManager.class); + Context ctx = ctxMgr.getContext(); + + String method = request.getParameter("method"); + // -----------------------Assessment Author functions --------------------------- + if (method.equals("openAuthor")) { + openAuthor(request, response, ctx); + + } else if (method.equals("openPreview")) { + openPreview(request, response, ctx); + + } else if (method.equals("openLearner")) { + openLearner(request, response, ctx); + + } else if (method.equals("openMonitor")) { + openMonitor(request, response, ctx); + } + + } catch (InitializationException e) { + throw new ServletException(e); + } catch (BbServiceException e) { + throw new ServletException(e); + } catch (PersistenceException e) { + throw new ServletException(e); + } finally { + // make sure context is released + if (ctxMgr != null) { + ctxMgr.releaseContext(); + } + } + + } + + private void openAuthor(HttpServletRequest request, HttpServletResponse response, Context ctx) + throws InitializationException, BbServiceException, PersistenceException, IOException { + // Authorise current user for Course Control Panel (automatic redirect) + try { + if (!PlugInUtil.authorizeForCourseControlPanel(request, response)) + return; + } catch (PlugInException e) { + throw new RuntimeException(e); + } + + // construct Login Request URL for authoring LAMS Lessons + String authorUrl = LamsSecurityUtil.generateRequestURL(ctx, "author", null); + authorUrl += "&isPostMessageToParent=true"; + + response.sendRedirect(authorUrl); + } + + /** + * Starts preview lesson on LAMS server. Launches it. + */ + private void openPreview(HttpServletRequest request, HttpServletResponse response, Context ctx) + throws InitializationException, BbServiceException, PersistenceException, IOException { + // Authorize current user for Course Control Panel (automatic redirect) + try { + if (!PlugInUtil.authorizeForCourseControlPanel(request, response)) + return; + } catch (PlugInException e) { + throw new RuntimeException(e); + } + + // Get the form parameters and convert into correct data types + String strTitle = request.getParameter("title").trim(); + String strLdId = request.getParameter("ldId").trim(); + long ldId = Long.parseLong(strLdId); + + // start lesson-preview in LAMS and get back the lesson ID + User user = ctx.getUser(); + Long lsId = LamsSecurityUtil.startLesson(user, "Previews", ldId, strTitle, "", true); + // error checking + if (lsId == -1) { + response.sendRedirect("lamsServerDown.jsp"); + System.exit(1); + } + + // redirect to preview lesson + String previewUrl = LamsSecurityUtil.generateRequestURL(ctx, "learnerStrictAuth", "" + lsId); + response.sendRedirect(previewUrl); + } + + private void openLearner(HttpServletRequest request, HttpServletResponse response, Context ctx) + throws InitializationException, BbServiceException, PersistenceException, IOException { + // Authorise current user for Course Access (automatic redirect) + try { + if (!PlugInUtil.authorizeForCourse(request, response)) + return; + } catch (PlugInException e) { + throw new RuntimeException(e); + } + + // Get Course ID and Session User ID + BbPersistenceManager bbPm = PersistenceServiceFactory.getInstance().getDbPersistenceManager(); + String course_idstr = request.getParameter("course_id"); + Id course_id = bbPm.generateId(Course.DATA_TYPE, course_idstr); + User sessionUser = ctx.getUser(); + Id sessionUserId = sessionUser.getId(); + // Get the membership data to determine the User's Role + CourseMembership courseMembership = null; + CourseMembership.Role courseRole = null; + CourseMembershipDbLoader sessionCourseMembershipLoader = (CourseMembershipDbLoader) bbPm + .getLoader(CourseMembershipDbLoader.TYPE); + try { + courseMembership = sessionCourseMembershipLoader.loadByCourseAndUserId(course_id, sessionUserId); + courseRole = courseMembership.getRole(); + } catch (KeyNotFoundException e) { + // There is no membership record. + e.printStackTrace(); + } catch (PersistenceException pe) { + // There is no membership record. + pe.printStackTrace(); + } + + // if the user is not an Instructor, Teaching Assistant or Student - Access Denied + if (!(courseRole.equals(CourseMembership.Role.INSTRUCTOR) + || courseRole.equals(CourseMembership.Role.TEACHING_ASSISTANT) + || courseRole.equals(CourseMembership.Role.COURSE_BUILDER) + || courseRole.equals(CourseMembership.Role.STUDENT))) { + response.sendRedirect("notAllowed.jsp"); + return; + } + + // Get the Login Request URL for authoring LAMS Lessons + String lsid = request.getParameter("lsid"); + String learnerUrl = LamsSecurityUtil.generateRequestURL(ctx, "learnerStrictAuth", lsid); + + response.sendRedirect(learnerUrl); + } + + private void openMonitor(HttpServletRequest request, HttpServletResponse response, Context ctx) + throws IOException, PersistenceException { + // Authorize current user for Course Control Panel (automatic redirect) + try { + if (!PlugInUtil.authorizeForCourseControlPanel(request, response)) + return; + } catch (PlugInException e) { + throw new RuntimeException(e); + } + + // Get Course ID and Session User ID + BbPersistenceManager bbPm = PersistenceServiceFactory.getInstance().getDbPersistenceManager(); + CourseMembershipDbLoader sessionCourseMembershipLoader = CourseMembershipDbLoader.Default.getInstance(); + String course_idstr = request.getParameter("course_id"); + Id course_id = bbPm.generateId(Course.DATA_TYPE, course_idstr); + User sessionUser = ctx.getUser(); + Id sessionUserId = sessionUser.getId(); + // Get the membership data to determine the User's Role + CourseMembership courseMembership = null; + CourseMembership.Role courseRole = null; + + try { + courseMembership = sessionCourseMembershipLoader.loadByCourseAndUserId(course_id, sessionUserId); + courseRole = courseMembership.getRole(); + } catch (KeyNotFoundException e) { + // There is no membership record. + e.printStackTrace(); + } catch (PersistenceException pe) { + // There is no membership record. + pe.printStackTrace(); + } + + // if the user is not an Instructor or Teaching Assistant - Access Denied + if (!(courseRole.equals(CourseMembership.Role.INSTRUCTOR) + || courseRole.equals(CourseMembership.Role.TEACHING_ASSISTANT) + || courseRole.equals(CourseMembership.Role.COURSE_BUILDER))) { + response.sendRedirect("notAllowed.jsp"); + } + + // construct Login Request URL for monitoring LAMS Lessons + String lsid = request.getParameter("lsid"); + String monitorUrl = LamsSecurityUtil.generateRequestURL(ctx, "monitor", lsid); + response.sendRedirect(monitorUrl); + } + +} Index: lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/StartLessonAjaxServlet.java =================================================================== diff -u --- lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/StartLessonAjaxServlet.java (revision 0) +++ lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/StartLessonAjaxServlet.java (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -0,0 +1,94 @@ +package org.lamsfoundation.ld.integration.blackboard; +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +import java.io.IOException; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.lamsfoundation.ld.integration.util.BlackboardUtil; + +import blackboard.data.user.User; +import blackboard.platform.BbServiceManager; +import blackboard.platform.context.ContextManager; + +/** + * Starts a lesson, returning the BB Content Id in JSON. Based on start_lesson_proc but uses the username + * parameter as a basis for identifying the user. + * Return a server error rather than throw an exception as this will be consumed by AJAX call or the like. + */ +public class StartLessonAjaxServlet extends HttpServlet { + + private static final long serialVersionUID = -351131323404991332L; + private static Logger logger = Logger.getLogger(StartLessonAjaxServlet.class); + + public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { + process(request, response); + } + + public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { + process(request, response); + } + + protected void process(HttpServletRequest request, HttpServletResponse response) throws IOException { + + ContextManager ctxMgr = null; + try { + // get Blackboard context + ctxMgr = (ContextManager) BbServiceManager.lookupService(ContextManager.class); + + String courseIdStr = request.getParameter("course_id"); + String contentIdStr = request.getParameter("content_id"); + String strTitle = BlackboardUtil.getTrimmedString(request, "title"); + String strSequenceID = BlackboardUtil.getTrimmedString(request, "sequence_id"); + + if ( courseIdStr == null || contentIdStr == null || strSequenceID.length()==0 || strTitle.length() == 0) { + response.sendError(HttpServletResponse.SC_BAD_REQUEST, + "Unable to create error - parameter missing. course_id, content_id, sequence_id and title required"); + } else { + + String username = request.getParameter("username"); + User user = BlackboardUtil.loadUserFromDB(username); + + String bbContentId = BlackboardUtil.storeBlackboardContent(request, response, user); + + response.setContentType("application/json;charset=UTF-8"); + response.getWriter().print("{\"content_id\":" + bbContentId + "}"); + } + + } catch (Exception e) { + logger.error("Unable to start lesson "+e.getMessage(), e); + response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unable to start lesson "+e.getMessage()); + } finally { + // make sure context is released + if (ctxMgr != null) { + ctxMgr.releaseContext(); + } + } + + } + +} + Index: lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/StartLessonServlet.java =================================================================== diff -u -r4cbb8f0a143a5ceed24a3de664315b501a8cbbdf -r23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d --- lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/StartLessonServlet.java (.../StartLessonServlet.java) (revision 4cbb8f0a143a5ceed24a3de664315b501a8cbbdf) +++ lams_bb_integration/src/org/lamsfoundation/ld/integration/blackboard/StartLessonServlet.java (.../StartLessonServlet.java) (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -19,76 +19,101 @@ * * http://www.gnu.org/licenses/gpl.txt * **************************************************************** - */ + */ import java.io.IOException; +import java.text.ParseException; +import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.xml.parsers.ParserConfigurationException; import org.apache.log4j.Logger; import org.lamsfoundation.ld.integration.util.BlackboardUtil; +import org.xml.sax.SAXException; +import blackboard.base.InitializationException; +import blackboard.data.ValidationException; +import blackboard.data.content.CourseDocument; +import blackboard.data.course.Course; import blackboard.data.user.User; +import blackboard.persist.BbPersistenceManager; +import blackboard.persist.Id; +import blackboard.persist.PersistenceException; +import blackboard.platform.BbServiceException; import blackboard.platform.BbServiceManager; +import blackboard.platform.context.Context; import blackboard.platform.context.ContextManager; +import blackboard.platform.persistence.PersistenceServiceFactory; +import blackboard.platform.plugin.PlugInException; +import blackboard.platform.plugin.PlugInUtil; /** - * Starts a lesson, returning the BB Content Id in JSON. Based on start_lesson_proc but uses the username - * parameter as a basis for identifying the user. - * Return a server error rather than throw an exception as this will be consumed by AJAX call or the like. + * Starts LAMS lesson and stores its relevant content in Blackboard. */ public class StartLessonServlet extends HttpServlet { private static final long serialVersionUID = -351131323404991332L; private static Logger logger = Logger.getLogger(StartLessonServlet.class); - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { - process(request, response); - } - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { - process(request, response); - } + public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + // Authorize current user for Course Control Panel (automatic redirect) + try { + if (!PlugInUtil.authorizeForCourseControlPanel(request, response)) + return; + } catch (PlugInException e) { + throw new RuntimeException(e); + } + + BbPersistenceManager bbPm = PersistenceServiceFactory.getInstance().getDbPersistenceManager(); - protected void process(HttpServletRequest request, HttpServletResponse response) throws IOException { - ContextManager ctxMgr = null; try { // get Blackboard context ctxMgr = (ContextManager) BbServiceManager.lookupService(ContextManager.class); + Context ctx = ctxMgr.getContext(); + //store newly created LAMS lesson + User user = ctx.getUser(); + BlackboardUtil.storeBlackboardContent(request, response, user); + + // constuct strReturnUrl String courseIdStr = request.getParameter("course_id"); String contentIdStr = request.getParameter("content_id"); - String strTitle = BlackboardUtil.getTrimmedString(request, "title"); - String strSequenceID = BlackboardUtil.getTrimmedString(request, "sequence_id"); - - if ( courseIdStr == null || contentIdStr == null || strSequenceID.length()==0 || strTitle.length() == 0) { - response.sendError(HttpServletResponse.SC_BAD_REQUEST, - "Unable to create error - parameter missing. course_id, content_id, sequence_id and title required"); - } else { + // internal Blackboard IDs for the course and parent content item + Id courseId = bbPm.generateId(Course.DATA_TYPE, courseIdStr); + Id folderId = bbPm.generateId(CourseDocument.DATA_TYPE, contentIdStr); + String returnUrl = PlugInUtil.getEditableContentReturnURL(folderId, courseId); + request.setAttribute("returnUrl", returnUrl); - String username = request.getParameter("username"); - User user = BlackboardUtil.loadUserFromDB(username); - - String bbContentId = BlackboardUtil.storeBlackboardContent(request, response, user); - - response.setContentType("application/json;charset=UTF-8"); - response.getWriter().print("{\"content_id\":" + bbContentId + "}"); - } - - } catch (Exception e) { - logger.error("Unable to start lesson "+e.getMessage(), e); - response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unable to start lesson "+e.getMessage()); + } catch (PersistenceException e) { + throw new ServletException(e); + } catch (ParseException e) { + throw new ServletException(e); + } catch (ValidationException e) { + throw new ServletException(e); + } catch (ParserConfigurationException e) { + throw new ServletException(e); + } catch (SAXException e) { + throw new ServletException(e); + } catch (InitializationException e) { + throw new ServletException(e); + } catch (BbServiceException e) { + throw new ServletException(e); } finally { - // make sure context is released - if (ctxMgr != null) { - ctxMgr.releaseContext(); - } + // important. make sure context is not released as otherwise tag will throw an exception +// if (ctxMgr != null) { +// ctxMgr.releaseContext(); +// } } + + request.getRequestDispatcher("/modules/startLessonSuccess.jsp").forward(request, response); + } + public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + doGet(request, response); } } - Index: lams_bb_integration/web/modules/create.jsp =================================================================== diff -u -rad162da27085fe8316d8b6a6a85c473c3e9dbe5a -r23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d --- lams_bb_integration/web/modules/create.jsp (.../create.jsp) (revision ad162da27085fe8316d8b6a6a85c473c3e9dbe5a) +++ lams_bb_integration/web/modules/create.jsp (.../create.jsp) (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -11,7 +11,7 @@ Then the user must select a LAMS lesson before proceeding to Step 2. Step 1 - create.jsp - Step 2 - start_lesson_proc.jsp + Step 2 - /StartLessonServlet (StartLessonServlet.java) --%> <%@ page import="blackboard.platform.plugin.PlugInUtil"%> <%@ page import="blackboard.platform.plugin.PlugInException"%> @@ -131,7 +131,7 @@ <%-- Form to Collect ID of Selected LAMS Sequence --%> -
+ "> "> @@ -219,7 +219,7 @@ // Open the LAMS Seuence Author Window function openAuthor() { - var authorUrl = 'openAuthor.jsp?course_id=<%=request.getParameter("course_id")%>&content_id=<%=request.getParameter("content_id")%>'; + var authorUrl = '../openLamsPage?method=openAuthor&course_id=<%=request.getParameter("course_id")%>&content_id=<%=request.getParameter("content_id")%>'; if(authorWin && !authorWin.closed){ try { @@ -248,7 +248,7 @@ // Open the LAMS Seuence Preview Window function openPreview() { - var previewUrl = "preview.jsp?course_id=<%=request.getParameter("course_id")%>&ldId=" + document.getElementsByName("sequence_id")[0].value + "&title=" + document.lesson_form.title.value; + var previewUrl = "../openLamsPage?method=openPreview&course_id=<%=request.getParameter("course_id")%>&ldId=" + document.getElementsByName("sequence_id")[0].value + "&title=" + document.lesson_form.title.value; if (previewWin && !previewWin.closed) { try { Index: lams_bb_integration/web/modules/delete.jsp =================================================================== diff -u -r60e3807f78aa28e63cf1da381fc37cf621549beb -r23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d --- lams_bb_integration/web/modules/delete.jsp (.../delete.jsp) (revision 60e3807f78aa28e63cf1da381fc37cf621549beb) +++ lams_bb_integration/web/modules/delete.jsp (.../delete.jsp) (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -44,9 +44,9 @@ throw new RuntimeException(e); } + //remove Lineitem object from Blackboard DB String bbContentId = request.getParameter("content_id"); String courseId = request.getParameter("course_id"); - LineitemUtil.removeLineitem(bbContentId, courseId); %> Index: lams_bb_integration/web/modules/lamsServerDown.jsp =================================================================== diff -u -r9d05eb517e00791c6e11d35d250f6c70e8959229 -r23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d --- lams_bb_integration/web/modules/lamsServerDown.jsp (.../lamsServerDown.jsp) (revision 9d05eb517e00791c6e11d35d250f6c70e8959229) +++ lams_bb_integration/web/modules/lamsServerDown.jsp (.../lamsServerDown.jsp) (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -13,8 +13,8 @@ <%@ taglib uri="/bbNG" prefix="bbNG"%> -

Did not get a response from the LAMS server. Please contact your systems administrator.

+ iconUrl="/images/ci/icons/receiptfail_u.gif" + title="LAMS Server Timeout"> +

Did not get a response from the LAMS server. Please contact your systems administrator.

\ No newline at end of file Index: lams_bb_integration/web/modules/learnermonitor.jsp =================================================================== diff -u -rad162da27085fe8316d8b6a6a85c473c3e9dbe5a -r23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d --- lams_bb_integration/web/modules/learnermonitor.jsp (.../learnermonitor.jsp) (revision ad162da27085fe8316d8b6a6a85c473c3e9dbe5a) +++ lams_bb_integration/web/modules/learnermonitor.jsp (.../learnermonitor.jsp) (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -255,7 +255,7 @@ // Open the Lesson as a Learner function openLearner() { - var learnerUrl = 'openLearner.jsp?course_id=<%=request.getParameter("course_id")%>&content_id=<%=request.getParameter("content_id")%>&lsid=<%=request.getParameter("lsid")%>'; + var learnerUrl = '../openLamsPage?method=openLearner&course_id=<%=request.getParameter("course_id")%>&content_id=<%=request.getParameter("content_id")%>&lsid=<%=request.getParameter("lsid")%>'; if (learnerWin && !learnerWin.closed) { try { learnerWin.focus(); @@ -276,7 +276,7 @@ // Open the Lesson Monitor function openMonitor() { - var monitorUrl = 'openMonitor.jsp?course_id=<%=request.getParameter("course_id")%>&content_id=<%=request.getParameter("content_id")%>&lsid=<%=request.getParameter("lsid")%>'; + var monitorUrl = '../openLamsPage?method=openMonitor&course_id=<%=request.getParameter("course_id")%>&content_id=<%=request.getParameter("content_id")%>&lsid=<%=request.getParameter("lsid")%>'; if(monitorWin && !monitorWin.closed) { try { monitorWin.focus(); Index: lams_bb_integration/web/modules/modify.jsp =================================================================== diff -u -r60e3807f78aa28e63cf1da381fc37cf621549beb -r23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d --- lams_bb_integration/web/modules/modify.jsp (.../modify.jsp) (revision 60e3807f78aa28e63cf1da381fc37cf621549beb) +++ lams_bb_integration/web/modules/modify.jsp (.../modify.jsp) (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -33,8 +33,6 @@ <% - String NOT_AVAILABLE = "Item is not available.
"; - // Authorise current user for Course Control Panel (automatic redirect) try{ if (!PlugInUtil.authorizeForCourseControlPanel(request, response)) @@ -43,19 +41,17 @@ throw new RuntimeException(e); } - // Get the Course Document (Lams Lesson) + // retrive the LAMS lesson BbPersistenceManager bbPm = PersistenceServiceFactory.getInstance().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 bbContent = (Content)courseDocumentLoader.loadById( contentId ); - // Get the Item Attributes + // get LAMS lessons's properties Calendar startDate = bbContent.getStartDate(); Calendar endDate = bbContent.getEndDate(); FormattedText description = bbContent.getBody(); - //String description = desc.getText().replaceFirst(NOT_AVAILABLE, ""); //remove the NOT_AVAILABLE substring - %> <%-- Breadcrumbs --%> Index: lams_bb_integration/web/modules/notAllowed.jsp =================================================================== diff -u -r9d05eb517e00791c6e11d35d250f6c70e8959229 -r23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d --- lams_bb_integration/web/modules/notAllowed.jsp (.../notAllowed.jsp) (revision 9d05eb517e00791c6e11d35d250f6c70e8959229) +++ lams_bb_integration/web/modules/notAllowed.jsp (.../notAllowed.jsp) (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -13,8 +13,8 @@ <%@ taglib uri="/bbNG" prefix="bbNG"%> -

Your current user privileges do not allow you to access this content.

+ iconUrl="/images/ci/icons/receiptfail_u.gif" + title="Access Denied"> +

Your current user privileges do not allow you to access this content.

\ No newline at end of file Fisheye: Tag 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d refers to a dead (removed) revision in file `lams_bb_integration/web/modules/openAuthor.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d refers to a dead (removed) revision in file `lams_bb_integration/web/modules/openLearner.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d refers to a dead (removed) revision in file `lams_bb_integration/web/modules/openMonitor.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d refers to a dead (removed) revision in file `lams_bb_integration/web/modules/preview.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_bb_integration/web/modules/startLessonSuccess.jsp =================================================================== diff -u --- lams_bb_integration/web/modules/startLessonSuccess.jsp (revision 0) +++ lams_bb_integration/web/modules/startLessonSuccess.jsp (revision 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d) @@ -0,0 +1,34 @@ +<%@ page contentType="text/html; charset=utf-8" language="java"%> +<%@ page isELIgnored="false" %> + + +<%-- + 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 +--%> +<%@ page errorPage="/error.jsp"%> +<%@ taglib uri="/bbNG" prefix="bbNG"%> + + + <%-- Breadcrumbs --%> + + + + + <%-- Page Header --%> + + + + + <%-- Receipt --%> + + + Content successfully added. + + + Fisheye: Tag 23bceeb5d0afd5c6f7ab96f06103fd9742b3dc5d refers to a dead (removed) revision in file `lams_bb_integration/web/modules/start_lesson_proc.jsp'. Fisheye: No comparison available. Pass `N' to diff?