Index: lams_admin/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_admin/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_admin/web/WEB-INF/tags/Page.tag 16 Jun 2016 03:10:20 -0000 1.1.2.1 +++ lams_admin/web/WEB-INF/tags/Page.tag 28 Jul 2016 03:44:11 -0000 1.1.2.2 @@ -1,49 +1,291 @@ <%@ tag body-content="scriptless"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> <%@ attribute name="type" required="true" rtexprvalue="true"%> <%@ attribute name="style" required="false" rtexprvalue="true"%> <%@ attribute name="title" required="false" rtexprvalue="true"%> <%@ attribute name="titleHelpURL" required="false" rtexprvalue="true"%> <%@ attribute name="headingContent" required="false" rtexprvalue="true"%> +<%@ attribute name="hideProgressBar" required="false" rtexprvalue="true"%> + + - -
-
+ + <%-- Combined tab and navigation bar used in authoring and monitoring --%> +
+
+ +
+
+
+
+ + + <%-- Learner --%> + + <%-- Try to get authoring preview/learning/monitoring from the tool activity so we don't show the progress bar in monitoring --%> + + + + + + + + + + + <%-- only have sidebar and presence in learner --%> + + + + <%-- Links placed in body instead of head. Ugly, but it works. --%> + + + - - - - - -
- -
-
- - - ${titleHelpURL} - -
- - + + + + + + <%-- Desperately try to get tool session ID from the tool activity --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+ + + ${titleHelpURL} + +
+ + + +
+
+
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file Index: lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java,v diff -u -r1.60.2.25 -r1.60.2.26 --- lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java 27 Jun 2016 10:01:31 -0000 1.60.2.25 +++ lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java 28 Jul 2016 03:44:15 -0000 1.60.2.26 @@ -186,24 +186,13 @@ req.setAttribute(AttributeNames.PARAM_MODE, mode); } - req.setAttribute(AttributeNames.PARAM_LESSON_ID, String.valueOf(lessonId)); - req.setAttribute("allowRestart", lesson.getAllowLearnerRestart()); - req.setAttribute(AttributeNames.PARAM_PRESENCE_ENABLED, - String.valueOf(lesson.getLearnerPresenceAvailable())); - req.setAttribute(AttributeNames.PARAM_PRESENCE_IM_ENABLED, String.valueOf(lesson.getLearnerImAvailable())); - req.setAttribute(AttributeNames.PARAM_TITLE, lesson.getLessonName()); - - /* Date Format for Chat room append */ - DateFormat sfm = new SimpleDateFormat("yyyyMMdd_HHmmss"); - req.setAttribute(AttributeNames.PARAM_CREATE_DATE_TIME, sfm.format(lesson.getCreateDateTime())); - - // forward to /lams/learning/main.jsp + // forward to the next (possibly first) activity. String serverURLContextPath = Configuration.get(ConfigurationKeys.SERVER_URL_CONTEXT_PATH); serverURLContextPath = serverURLContextPath.startsWith("/") ? serverURLContextPath : "/" + serverURLContextPath; serverURLContextPath += serverURLContextPath.endsWith("/") ? "" : "/"; getServlet().getServletContext().getContext(serverURLContextPath + "learning") - .getRequestDispatcher("/main.jsp").forward(req, res); + .getRequestDispatcher("/content.do?lessonID="+lessonId).forward(req, res); return null; } catch (Exception e) { Index: lams_central/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.5 -r1.1.2.6 --- lams_central/web/WEB-INF/tags/Page.tag 16 Jun 2016 03:13:27 -0000 1.1.2.5 +++ lams_central/web/WEB-INF/tags/Page.tag 28 Jul 2016 03:44:15 -0000 1.1.2.6 @@ -1,49 +1,291 @@ <%@ tag body-content="scriptless"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> <%@ attribute name="type" required="true" rtexprvalue="true"%> <%@ attribute name="style" required="false" rtexprvalue="true"%> <%@ attribute name="title" required="false" rtexprvalue="true"%> <%@ attribute name="titleHelpURL" required="false" rtexprvalue="true"%> <%@ attribute name="headingContent" required="false" rtexprvalue="true"%> +<%@ attribute name="hideProgressBar" required="false" rtexprvalue="true"%> + + - -
-
+ + <%-- Combined tab and navigation bar used in authoring and monitoring --%> +
+
+ +
+
+
+
+ + + <%-- Learner --%> + + <%-- Try to get authoring preview/learning/monitoring from the tool activity so we don't show the progress bar in monitoring --%> + + + + + + + + + + + <%-- only have sidebar and presence in learner --%> + + + + <%-- Links placed in body instead of head. Ugly, but it works. --%> + + + - - - - - -
- -
-
- - - ${titleHelpURL} - -
- - + + + + + + <%-- Desperately try to get tool session ID from the tool activity --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+ + + ${titleHelpURL} + +
+ + + +
+
+
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file Index: lams_central/web/comments/allview.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/comments/allview.jsp,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_central/web/comments/allview.jsp 27 Apr 2016 00:05:37 -0000 1.1.2.1 +++ lams_central/web/comments/allview.jsp 28 Jul 2016 03:44:15 -0000 1.1.2.2 @@ -23,5 +23,5 @@
\ No newline at end of file Index: lams_central/web/comments/topicview.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/comments/topicview.jsp,v diff -u -r1.5.2.5 -r1.5.2.6 --- lams_central/web/comments/topicview.jsp 27 Apr 2016 00:05:37 -0000 1.5.2.5 +++ lams_central/web/comments/topicview.jsp 28 Jul 2016 03:44:15 -0000 1.5.2.6 @@ -162,7 +162,7 @@
-
+
Index: lams_central/web/css/defaultHTML_learner.css =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/css/defaultHTML_learner.css,v diff -u -r1.32.2.23 -r1.32.2.24 --- lams_central/web/css/defaultHTML_learner.css 25 Jul 2016 04:29:16 -0000 1.32.2.23 +++ lams_central/web/css/defaultHTML_learner.css 28 Jul 2016 03:44:15 -0000 1.32.2.24 @@ -328,4 +328,138 @@ } #criterias-table td { vertical-align:middle; +} + +/* .....NavBar: Icon only with coloring/layout.....*/ + +/*small/medium side display*/ +@media (min-width: 768px) { + + /*Allow content to be next to Nav*/ + .navcontent{ + position: absolute; + width: calc(100% - 40px); /*keeps 100% minus nav size*/ + margin-left: 40px; + float: right; + min-height:100%; + } + + /* darker outline than usual */ + nav.sidebar{ + border-radius: 0px; + box-shadow: 0 1px 1px rgba(8, 8, 8, 0.88); + } + + /*Center Brand*/ + nav.sidebar.navbar.sidebar>.container .navbar-brand, .navbar>.container-fluid .navbar-brand { + margin-left: 0px; + } + /*Center Brand*/ + nav.sidebar .navbar-brand, nav.sidebar .navbar-header{ + text-align: center; + width: 100%; + margin-left: 0px; + } + + /*Format Icons*/ + nav.sidebar a{ + padding:10px 10px 10px 12px; + } + + nav.sidebar.slidesidemenu{ + padding:10px 10px 10px 12px; + } + /*Hide text when compressed*/ + nav.sidebar p{ + padding-right: 35px; + text-align: center; + } + + /* colour in top box to match panel heading */ + nav.sidebar .navbar-nav > li:first-child{ + background-color:#f5f5f5 !important; + } + + /*adds border to bottom nav boxes except for the last box */ + nav.sidebar .navbar-nav > li{ + border-bottom: 1px #e5e5e5 solid; + background-color:#fff; + } + + nav.sidebar .navbar-nav > li:last-child{ + border-bottom: 0px; + } + + /*allows nav box to use 100% width, style to be like panel */ + nav.sidebar .navbar-collapse, nav.sidebar .container-fluid{ + padding: 0 0px 0 0px; + border:2px solid transparent; + box-shadow:0 1px 1px rgba(0,0,0,0.05) + } + + /*gives sidebar width/height*/ + nav.sidebar{ + width: 180px; + height: 100%; + margin-left: -135px; + float: left; + z-index: 8000; + margin-top: 0px; + margin-bottom: 0px; + } + + /*give sidebar 100% width;*/ + nav.sidebar li { + width: 100%; + } + + /* Move nav to full on mouse over*/ + nav.sidebar.expandmenu { + margin-left: 0; + } + +/* nav.sidebar:hover{ + margin-left: 0px; + } + */ + /*for hiden things when navbar hidden*/ + .forAnimate{ + opacity: 0; + } + +} + +/* .....NavBar: Fully showing nav bar..... */ + +@media (min-width: 1330px) { + + /*Allow content to be next to Nav*/ + .navcontent{ + position: absolute; + width: calc(100% - 180px); /*keeps 100% minus nav size*/ + margin-left: 170px; + float: right; + } + + /*Show all nav*/ + nav.sidebar{ + margin-left: 0px; + float: left; + } + /*Show hidden items on nav*/ + nav.sidebar .forAnimate{ + opacity: 1; + } +} + +nav.sidebar .navbar-nav .open .dropdown-menu>li>a:hover, nav.sidebar .navbar-nav .open .dropdown-menu>li>a:focus { + color: #CCC; + background-color: transparent; +} + +nav:hover .forAnimate{ + opacity: 1; +} +section{ + padding-left: 15px; } \ No newline at end of file Index: lams_central/web/includes/javascript/openUrls.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/openUrls.js,v diff -u -r1.38.2.6 -r1.38.2.7 --- lams_central/web/includes/javascript/openUrls.js 16 Mar 2016 12:14:10 -0000 1.38.2.6 +++ lams_central/web/includes/javascript/openUrls.js 28 Jul 2016 03:44:15 -0000 1.38.2.7 @@ -103,13 +103,13 @@ function openLearner( lessonId ) { if (isMac) { - learnWin = window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=' + learner_width + ',height=' + learner_height + ',resizable,status=yes'); + learnWin = window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=' + learner_width + ',height=' + learner_height + ',resizable,scrollbars=yes,status=yes'); } else { if (learnWin && !learnWin.closed ) { learnWin.location = 'home.do?method=learner&lessonID='+lessonId; learnWin.focus(); } else { - learnWin = window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=' + learner_width + ',height=' + learner_height + ',resizable,status=yes'); + learnWin = window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=' + learner_width + ',height=' + learner_height + ',resizable,scrollbars=yes,status=yes'); } } } @@ -121,15 +121,15 @@ */ function openLearnerShortenedUrl( lessonId ) { if (isMac) { - learnWin = window.open('../home.do?method=learner&lessonID='+lessonId,'lWindow','width=' + learner_width + ',height=' + learner_height + ',resizable,status=yes'); + learnWin = window.open('../home.do?method=learner&lessonID='+lessonId,'lWindow','width=' + learner_width + ',height=' + learner_height + ',resizable,scrollbars=yes,status=yes'); } else { if (learnWin && !learnWin.closed ) { learnWin.location = '../home.do?method=learner&lessonID='+lessonId; learnWin.focus(); } else { - learnWin = window.open('../home.do?method=learner&lessonID='+lessonId,'lWindow','width=' + learner_width + ',height=' + learner_height + ',resizable,status=yes'); + learnWin = window.open('../home.do?method=learner&lessonID='+lessonId,'lWindow','width=' + learner_width + ',height=' + learner_height + ',resizable,scrollbars=yes,status=yes'); } - } + } } function openSysadmin() { Index: lams_central/web/includes/javascript/progressBar.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/progressBar.js,v diff -u -r1.13.2.7 -r1.13.2.8 --- lams_central/web/includes/javascript/progressBar.js 9 Nov 2015 18:54:14 -0000 1.13.2.7 +++ lams_central/web/includes/javascript/progressBar.js 28 Jul 2016 03:44:16 -0000 1.13.2.8 @@ -1,8 +1,10 @@  //------- GLOBAL VARIABLES ---------- //IMPORTANT: set following variables on the page which imports this JS file -var isHorizontalBar = isHorizontalBar || false, +var lessonId = lessonId || null, + toolSessionId = toolSessionId || null, + progressPanelEnabled = progressPanelEnabled || false, + isHorizontalBar = isHorizontalBar || false, hasContentFrame = hasContentFrame || true, - isTouchInterface = isTouchInterface || false, hasDialog = hasDialog || false, presenceEnabled = presenceEnabled || false, REVIEW_ACTIVITY_TITLE = REVIEW_ACTIVITY_TITLE || 'Review activity', @@ -109,50 +111,7 @@ } } -// adjusts elements after window resize -function resizeElements() { - var width = $('#controlFrame').is(":visible")? $(window).width() - 160 : $(window).width(); - var height = $(window).height(); - if (hasContentFrame) { - // resize main content frame, if it is present - var position = (isTouchInterface) ? 'static' : 'fixed'; - $('#contentFrame').css({ - 'width' : width + "px", - 'height' : height + "px", - 'position' : position - }); - } - - // do the real resizing; applicable only for Learner page - if (!isHorizontalBar && progressPanelEnabled) { - if (hasContentFrame && !controlFramePadding) { - // calculate only once in the beginning - // there will be miscalculations when trying to repeat this - // in the middle of resizing - controlFramePadding = $('#controlFrame').outerHeight(true) - - $('#controlFrame').height(); - } - - // calculate immutable chunks and what is left goes for progress bar - var progressBarHeight = height - controlFramePadding; - $('.progressStaticHeight').each(function() { - var elem = $(this); - // are notebook and/or support activities hidden? - if (elem.is(':visible')) { - progressBarHeight -= elem.outerHeight(true); - } - }); - - $('#progressBarDiv').height(progressBarHeight); - } - - if (presenceEnabled) { - // resize chat frame only if it exists - resizeChat(); - } -} - // double click triggers also single click event, this method helps function handleClicks(elem, click, dblClick) { var handler = function(event) { @@ -1045,6 +1004,7 @@ data : { 'method' : 'getLearnerProgress', 'lessonID' : lessonId, + 'toolSessionID' : toolSessionId, 'userID' : bar.userId }, cache : false, @@ -1068,6 +1028,20 @@ return; } + if (typeof LABELS == "undefined" && result.messages) { + LABELS = { + CURRENT_ACTIVITY : result.messages["label.learner.progress.activity.current.tooltip"], + COMPLETED_ACTIVITY : result.messages["label.learner.progress.activity.completed.tooltip"], + ATTEMPTED_ACTIVITY : result.messages["label.learner.progress.activity.attempted.tooltip"], + TOSTART_ACTIVITY : result.messages["label.learner.progress.activity.tostart.tooltip"], + SUPPORT_ACTIVITY : result.messages["label.learner.progress.activity.support.tooltip"], + CONFIRM_RESTART : result.messages["message.learner.progress.restart.confirm"], + RESTART: result.messages["message.lesson.restart.button"], + NOTEBOOK: result.messages["label.learner.progress.notebook"], + EXIT : result.messages["button.exit"] + }; + } + bar.currentActivityId = result.currentActivityId; isPreview = result.isPreview; @@ -1194,13 +1168,18 @@ }); } - resizeElements(); // scroll to the current activity if (!isHorizontalBar) { $('#' + bar.containerId).scrollTop( Math.max((currentActivityIndex - 1) * 60,0) ); } + + //callback function + if (typeof onProgressBarLoaded === "function") { + // safe to use the function + onProgressBarLoaded(); + } } }); Index: lams_learning/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_learning/conf/language/lams/ApplicationResources.properties,v diff -u -r1.59.2.5 -r1.59.2.6 --- lams_learning/conf/language/lams/ApplicationResources.properties 27 Jun 2016 10:02:06 -0000 1.59.2.5 +++ lams_learning/conf/language/lams/ApplicationResources.properties 28 Jul 2016 03:49:02 -0000 1.59.2.6 @@ -43,6 +43,7 @@ mynotes.title =My Notes mynotes.view.all.button =View All mynotes.add.new.button =Add New +mynotes.add.new.current.lesson.button =Add New In Current Lesson mynotes.notebook.save.button =Save to Notebook mynotes.journal.save.button =Save to Journal mynotes.signature.JOURNAL.heading =Journal Index: lams_learning/src/java/org/lamsfoundation/lams/learning/learningApplicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/learningApplicationContext.xml,v diff -u -r1.32.2.9 -r1.32.2.10 --- lams_learning/src/java/org/lamsfoundation/lams/learning/learningApplicationContext.xml 16 Mar 2016 12:12:43 -0000 1.32.2.9 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/learningApplicationContext.xml 28 Jul 2016 03:45:04 -0000 1.32.2.10 @@ -11,12 +11,26 @@ --> - + org.lamsfoundation.lams.monitoring.ApplicationResources + + + + + + + org.lamsfoundation.lams.learning.ApplicationResources + + + + + + + Index: lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerServiceProxy.java =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerServiceProxy.java,v diff -u -r1.8.16.4 -r1.8.16.5 --- lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerServiceProxy.java 27 Jun 2016 10:02:06 -0000 1.8.16.4 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/service/LearnerServiceProxy.java 28 Jul 2016 03:45:04 -0000 1.8.16.5 @@ -21,7 +21,6 @@ * **************************************************************** */ - package org.lamsfoundation.lams.learning.service; import javax.servlet.ServletContext; @@ -30,6 +29,7 @@ import org.lamsfoundation.lams.lesson.service.ILessonService; import org.lamsfoundation.lams.tool.service.ILamsToolService; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; +import org.lamsfoundation.lams.util.MessageService; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; @@ -48,7 +48,7 @@ /** * Return the learner domain service object. It will delegate to the Spring * helper method to retrieve the proper bean from Spring bean factory. - * + * * @param servletContext * the servletContext for current application * @return learner service object. @@ -61,7 +61,7 @@ * Return the user management domain service object. It will delegate to * the Spring helper method to retrieve the proper bean from Spring bean * factory - * + * * @param servletContext * the servletContext for current application * @return user management service object @@ -73,7 +73,7 @@ /** * Return the lams tool domain service object. It will delegate to the * Spring helper method to retrieve the proper bean from Spring bean factory. - * + * * @param serlvetContext * the servletContext for current application * @return tool service object @@ -86,9 +86,17 @@ return (ILessonService) LearnerServiceProxy.getDomainService(servletContext, "lessonService"); } + public static final MessageService getMessageService(ServletContext servletContext) { + return (MessageService) LearnerServiceProxy.getDomainService(servletContext, "learningMessageService"); + } + + public static final MessageService getMonitoringMessageService(ServletContext servletContext) { + return (MessageService) LearnerServiceProxy.getDomainService(servletContext, "monitoringMessageService"); + } + /** * Return the activity mapping service object. - * + * * @param serlvetContext * the servletContext for current application * @return the activity mapping service object. @@ -99,7 +107,7 @@ /** * Retrieve the proper Spring bean from bean factory. - * + * * @param servletContext * the servletContext for current application * @return the Spring service bean. Index: lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/LearnerAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/LearnerAction.java,v diff -u -r1.52.2.13 -r1.52.2.14 --- lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/LearnerAction.java 27 Jun 2016 10:02:06 -0000 1.52.2.13 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/LearnerAction.java 28 Jul 2016 03:45:26 -0000 1.52.2.14 @@ -54,11 +54,13 @@ import org.lamsfoundation.lams.lesson.LearnerProgressArchive; import org.lamsfoundation.lams.lesson.Lesson; import org.lamsfoundation.lams.lesson.service.ILessonService; +import org.lamsfoundation.lams.tool.ToolSession; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; import org.lamsfoundation.lams.util.Configuration; import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsDispatchAction; import org.lamsfoundation.lams.web.session.SessionManager; @@ -89,6 +91,18 @@ // --------------------------------------------------------------------- private static Logger log = Logger.getLogger(LearnerAction.class); + private static JSONObject progressBarMessages = null; + + private static final String[] MONITOR_MESSAGE_KEYS = new String[] { + "label.learner.progress.activity.current.tooltip", "label.learner.progress.activity.completed.tooltip", + "label.learner.progress.activity.attempted.tooltip", "label.learner.progress.activity.tostart.tooltip", + "label.learner.progress.activity.support.tooltip"}; + + private static final String[] LEARNER_MESSAGE_KEYS = new String[] { + "message.learner.progress.restart.confirm", "message.lesson.restart.button", + "label.learner.progress.notebook", "button.exit"}; + + // --------------------------------------------------------------------- // Class level constants - Struts forward // --------------------------------------------------------------------- @@ -244,15 +258,25 @@ monitorId = userId; } - Long lessonId = WebUtil.readLongParam(request, AttributeNames.PARAM_LESSON_ID); + JSONObject responseJSON = new JSONObject(); + Long lessonId = WebUtil.readLongParam(request, AttributeNames.PARAM_LESSON_ID, true); + if (lessonId == null) { + // depending on when this is called, there may only be a toolSessionId known, not the lessonId. + Long toolSessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + ToolSession toolSession = LearnerServiceProxy.getLamsToolService(getServlet().getServletContext()) + .getToolSession(toolSessionId); + lessonId = toolSession.getLesson().getLessonId(); + } + + responseJSON.put("messages", getProgressBarMessages()); + ICoreLearnerService learnerService = LearnerServiceProxy.getLearnerService(getServlet().getServletContext()); Object[] ret = learnerService.getStructuredActivityURLs(learnerId, lessonId); if (ret == null) { response.setStatus(HttpServletResponse.SC_NO_CONTENT); return null; } - JSONObject responseJSON = new JSONObject(); responseJSON.put("currentActivityId", ret[1]); responseJSON.put("isPreview", ret[2]); for (ActivityURL activity : (List) ret[0]) { @@ -374,4 +398,53 @@ return activityJSON; } + + private JSONObject getProgressBarMessages() throws JSONException { + if (progressBarMessages == null) { + progressBarMessages = new JSONObject(); + MessageService messageService = LearnerServiceProxy.getMonitoringMessageService(getServlet().getServletContext()); + for (String key : MONITOR_MESSAGE_KEYS) { + String value = messageService.getMessage(key); + progressBarMessages.put(key, value); + } + messageService = LearnerServiceProxy.getMessageService(getServlet().getServletContext()); + for (String key : LEARNER_MESSAGE_KEYS) { + String value = messageService.getMessage(key); + progressBarMessages.put(key, value); + } + } + return progressBarMessages; + } + + /** + * Gets the lesson details based on lesson id or the current tool session + */ + public ActionForward getLessonDetails(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws JSONException, IOException { + + JSONObject responseJSON = new JSONObject(); + Lesson lesson = null; + + Long lessonID = WebUtil.readLongParam(request, AttributeNames.PARAM_LESSON_ID, true); + if ( lessonID != null ) { + lesson = LearnerServiceProxy.getLearnerService(getServlet().getServletContext()).getLesson(lessonID); + + } else { + Long toolSessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + ToolSession toolSession = LearnerServiceProxy.getLamsToolService(getServlet().getServletContext()) + .getToolSession(toolSessionId); + lesson = toolSession.getLesson(); + } + + responseJSON.put(AttributeNames.PARAM_LESSON_ID, lesson.getLessonId()); + responseJSON.put(AttributeNames.PARAM_TITLE, lesson.getLessonName()); + responseJSON.put("allowRestart", lesson.getAllowLearnerRestart()); + responseJSON.put(AttributeNames.PARAM_PRESENCE_ENABLED, lesson.getLearnerPresenceAvailable()); + responseJSON.put(AttributeNames.PARAM_PRESENCE_IM_ENABLED, lesson.getLearnerImAvailable()); + + response.setContentType("application/json;charset=utf-8"); + response.getWriter().print(responseJSON.toString()); + + return null; + } } \ No newline at end of file Index: lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/LessonCompleteActivityAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/LessonCompleteActivityAction.java,v diff -u -r1.7.2.6 -r1.7.2.7 --- lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/LessonCompleteActivityAction.java 27 Jun 2016 10:02:06 -0000 1.7.2.6 +++ lams_learning/src/java/org/lamsfoundation/lams/learning/web/action/LessonCompleteActivityAction.java 28 Jul 2016 03:45:27 -0000 1.7.2.7 @@ -74,9 +74,7 @@ if (lessonFinishCallbackUrl != null) { request.setAttribute("lessonFinishUrl", lessonFinishCallbackUrl); } - if (learnerProgress.getLesson().getAllowLearnerRestart()) { request.setAttribute("lessonID", learnerProgress.getLesson().getLessonId()); - } return mapping.findForward("lessonComplete"); } Index: lams_learning/web/lessonComplete.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/lessonComplete.jsp,v diff -u -r1.26.2.5 -r1.26.2.6 --- lams_learning/web/lessonComplete.jsp 8 Jul 2016 07:03:41 -0000 1.26.2.5 +++ lams_learning/web/lessonComplete.jsp 28 Jul 2016 03:47:27 -0000 1.26.2.6 @@ -27,6 +27,8 @@ <%@ taglib uri="tags-fmt" prefix="fmt"%> <%@ taglib uri="tags-lams" prefix="lams"%> + + - + @@ -64,8 +66,7 @@ - <%-- lessonID is set in CompleteActivityAction and LessonCompleteActivityAction only if lesson.allowLearnerRestart is on --%> - +
Index: lams_learning/web/loadToolActivity.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/loadToolActivity.jsp,v diff -u -r1.28.2.1 -r1.28.2.2 --- lams_learning/web/loadToolActivity.jsp 12 Mar 2016 23:48:18 -0000 1.28.2.1 +++ lams_learning/web/loadToolActivity.jsp 28 Jul 2016 03:47:15 -0000 1.28.2.2 @@ -30,6 +30,7 @@ + @@ -65,7 +66,9 @@ Fisheye: Tag 1.31.2.12 refers to a dead (removed) revision in file `lams_learning/web/main.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_learning/web/presenceChat.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/presenceChat.jsp,v diff -u -r1.5.2.1 -r1.5.2.2 --- lams_learning/web/presenceChat.jsp 29 Jan 2016 08:41:39 -0000 1.5.2.1 +++ lams_learning/web/presenceChat.jsp 28 Jul 2016 03:47:15 -0000 1.5.2.2 @@ -1,52 +1,73 @@ -<%-- css --%> - - + -<%-- javascript --%> - - - +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> -<%-- initial html / presence.js adds on html into here --%> -
- <%-- only pop the message box if im is enabled --%> - -
- -
-
-
- - " class="sendButton" - onclick="javascript:sendMessage(groupChatInfo.nick)" /> -
-
-
- + + - <%-- always pop the roster --%> -
-
-
+ <%-- css --%> + + + + <%-- javascript --%> + + + + + + + + + <%-- initial html / presence.js adds on html into here --%> +
+ <%-- only pop the message box if im is enabled --%> + +
+
    +
  • + +
  • +
+
+
+
+ + " class="sendButton" + onclick="javascript:sendMessage(groupChatInfo.nick)" /> +
+
+
+
+ + <%-- always pop the roster --%> +
+
+
+
-
\ No newline at end of file + + +
\ No newline at end of file Index: lams_learning/web/requestURL.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/requestURL.jsp,v diff -u -r1.9.12.2 -r1.9.12.3 --- lams_learning/web/requestURL.jsp 9 Feb 2016 18:53:04 -0000 1.9.12.2 +++ lams_learning/web/requestURL.jsp 28 Jul 2016 03:47:15 -0000 1.9.12.3 @@ -32,13 +32,12 @@ Index: lams_learning/web/welcome.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/welcome.jsp,v diff -u -r1.14.12.2 -r1.14.12.3 --- lams_learning/web/welcome.jsp 10 Jul 2016 03:56:21 -0000 1.14.12.2 +++ lams_learning/web/welcome.jsp 28 Jul 2016 03:47:15 -0000 1.14.12.3 @@ -22,14 +22,16 @@ <%@ taglib uri="tags-bean" prefix="bean"%> <%@ taglib uri="tags-fmt" prefix="fmt"%> <%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams" %> - + Index: lams_learning/web/WEB-INF/web.xml =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/Attic/web.xml,v diff -u -r1.39.2.7 -r1.39.2.8 --- lams_learning/web/WEB-INF/web.xml 6 Jun 2016 08:44:29 -0000 1.39.2.7 +++ lams_learning/web/WEB-INF/web.xml 28 Jul 2016 03:47:36 -0000 1.39.2.8 @@ -10,7 +10,7 @@ messageSource - learningMessageSource + monitoringMessageSource Index: lams_learning/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_learning/web/WEB-INF/tags/Page.tag 12 Mar 2016 23:48:18 -0000 1.1.2.1 +++ lams_learning/web/WEB-INF/tags/Page.tag 28 Jul 2016 03:46:50 -0000 1.1.2.2 @@ -1,36 +1,291 @@ <%@ tag body-content="scriptless"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> <%@ attribute name="type" required="true" rtexprvalue="true"%> <%@ attribute name="style" required="false" rtexprvalue="true"%> <%@ attribute name="title" required="false" rtexprvalue="true"%> <%@ attribute name="titleHelpURL" required="false" rtexprvalue="true"%> <%@ attribute name="headingContent" required="false" rtexprvalue="true"%> +<%@ attribute name="hideProgressBar" required="false" rtexprvalue="true"%> + + - -
-
+ + <%-- Combined tab and navigation bar used in authoring and monitoring --%> +
+
-
- -
-
- - - - + +
+
+
+ + + + <%-- Learner --%> + + <%-- Try to get authoring preview/learning/monitoring from the tool activity so we don't show the progress bar in monitoring --%> + + + + + + + + + + + <%-- only have sidebar and presence in learner --%> + + + + <%-- Links placed in body instead of head. Ugly, but it works. --%> + + + + + + + + + + <%-- Desperately try to get tool session ID from the tool activity --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: lams_learning/web/css/presence.css =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/css/presence.css,v diff -u -r1.2.2.1 -r1.2.2.2 --- lams_learning/web/css/presence.css 29 Jan 2016 08:41:39 -0000 1.2.2.1 +++ lams_learning/web/css/presence.css 28 Jul 2016 03:45:39 -0000 1.2.2.2 @@ -4,7 +4,7 @@ #presenceChat { position: absolute; - width: 600px; + width: 640px; height: 300px; right: 18px; z-index: 10; @@ -88,10 +88,8 @@ } .messageInput { - float: left; - width: 85%; + width: 80%; } .sendButton { - float: left; } \ No newline at end of file Fisheye: Tag 1.6.2.3 refers to a dead (removed) revision in file `lams_learning/web/includes/javascript/main.js'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_learning/web/includes/javascript/presence.js =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/includes/javascript/presence.js,v diff -u -r1.4.2.1 -r1.4.2.2 --- lams_learning/web/includes/javascript/presence.js 29 Jan 2016 08:41:39 -0000 1.4.2.1 +++ lams_learning/web/includes/javascript/presence.js 28 Jul 2016 03:45:39 -0000 1.4.2.2 @@ -1,6 +1,9 @@ $(document).ready(function (){ presenceChat = $("#presenceChat"); rosterDiv = $("#presenceUserListings"); + $( window ).resize(function() { + resizeChat(); + }); // if presence IM is enabled if (presenceEnabled) { @@ -174,21 +177,24 @@ } function resizeChat() { + // refresh the window height windowHeight = $(window).height() - 30; // if presence is shown if (presenceShown) { // set presence chat to maximized height presenceChat.css({ - 'top' : windowHeight - 270 + "px" + 'top' : windowHeight - 300 + "px", + 'position' : 'absolute' }); } // otherwise else { // set presence chat to minimized height presenceChat.css({ - 'top' : windowHeight + "px" + 'top' : windowHeight + "px", + 'position' : 'fixed' }); } } @@ -266,7 +272,6 @@ messageInput.val(''); messageInput.focus(); - var data = { 'type' : 'message', 'lessonID' : lessonId, @@ -293,7 +298,7 @@ presenceShown = false; } else { presenceChat.animate({ - top : windowHeight - 270 + "px" + top : windowHeight - 300 + "px" }, 1000); presenceShown = true; } Index: lams_learning/web/notebook/addnew.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/notebook/addnew.jsp,v diff -u -r1.4.16.1 -r1.4.16.2 --- lams_learning/web/notebook/addnew.jsp 13 Mar 2016 00:43:30 -0000 1.4.16.1 +++ lams_learning/web/notebook/addnew.jsp 28 Jul 2016 03:46:37 -0000 1.4.16.2 @@ -44,7 +44,7 @@ - + Index: lams_learning/web/notebook/view.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/notebook/view.jsp,v diff -u -r1.4.16.1 -r1.4.16.2 --- lams_learning/web/notebook/view.jsp 13 Mar 2016 00:43:30 -0000 1.4.16.1 +++ lams_learning/web/notebook/view.jsp 28 Jul 2016 03:46:37 -0000 1.4.16.2 @@ -52,7 +52,7 @@ - + Index: lams_learning/web/notebook/viewall.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/notebook/viewall.jsp,v diff -u -r1.8.2.3 -r1.8.2.4 --- lams_learning/web/notebook/viewall.jsp 25 Jun 2016 00:56:27 -0000 1.8.2.3 +++ lams_learning/web/notebook/viewall.jsp 28 Jul 2016 03:46:38 -0000 1.8.2.4 @@ -38,7 +38,16 @@ - + + + + + +
+ +
+
Index: lams_learning/web/notebook/viewalljournals.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/notebook/viewalljournals.jsp,v diff -u -r1.4.16.1 -r1.4.16.2 --- lams_learning/web/notebook/viewalljournals.jsp 13 Mar 2016 00:43:30 -0000 1.4.16.1 +++ lams_learning/web/notebook/viewalljournals.jsp 28 Jul 2016 03:46:37 -0000 1.4.16.2 @@ -28,7 +28,7 @@ - +

Index: lams_monitoring/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_monitoring/web/WEB-INF/tags/Page.tag 30 May 2016 11:46:05 -0000 1.1.2.1 +++ lams_monitoring/web/WEB-INF/tags/Page.tag 28 Jul 2016 03:44:24 -0000 1.1.2.2 @@ -1,49 +1,291 @@ <%@ tag body-content="scriptless"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> <%@ attribute name="type" required="true" rtexprvalue="true"%> <%@ attribute name="style" required="false" rtexprvalue="true"%> <%@ attribute name="title" required="false" rtexprvalue="true"%> <%@ attribute name="titleHelpURL" required="false" rtexprvalue="true"%> <%@ attribute name="headingContent" required="false" rtexprvalue="true"%> +<%@ attribute name="hideProgressBar" required="false" rtexprvalue="true"%> + + - -
-
+ + <%-- Combined tab and navigation bar used in authoring and monitoring --%> +
+
+ +
+
+
+
+ + + <%-- Learner --%> + + <%-- Try to get authoring preview/learning/monitoring from the tool activity so we don't show the progress bar in monitoring --%> + + + + + + + + + + + <%-- only have sidebar and presence in learner --%> + + + + <%-- Links placed in body instead of head. Ugly, but it works. --%> + + + - - - - - -
- -
-
- - - - -
- - + + + + + + <%-- Desperately try to get tool session ID from the tool activity --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+ + + ${titleHelpURL} + +
+ + + +
+
+
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file