Index: lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/web/controller/LearningController.java =================================================================== diff -u -r3f1a86b9c8e984b056e2a7f8b931a2e32da83d21 -r53041ab71ac581668c14bdf40f65be5ea5f26961 --- lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/web/controller/LearningController.java (.../LearningController.java) (revision 3f1a86b9c8e984b056e2a7f8b931a2e32da83d21) +++ lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/web/controller/LearningController.java (.../LearningController.java) (revision 53041ab71ac581668c14bdf40f65be5ea5f26961) @@ -241,6 +241,7 @@ request.setAttribute(DokumaranConstants.ATTR_SECONDS_LEFT, secondsLeft); boolean isTimeLimitExceeded = dokumaranService.checkTimeLimitExceeded(dokumaran); + request.setAttribute("timeLimitExceeded", isTimeLimitExceeded); String padId = session.getPadId(); //in case of non-leader or finished lock or isTimeLimitExceeded - show Etherpad in readonly mode @@ -250,7 +251,6 @@ if (padId == null) { return "pages/learning/notconfigured"; } - sessionMap.put(DokumaranConstants.ATTR_HAS_EDIT_RIGHT, false); } request.setAttribute(DokumaranConstants.ATTR_PAD_ID, padId); Index: lams_tool_doku/web/pages/learning/learning.jsp =================================================================== diff -u -r3f1a86b9c8e984b056e2a7f8b931a2e32da83d21 -r53041ab71ac581668c14bdf40f65be5ea5f26961 --- lams_tool_doku/web/pages/learning/learning.jsp (.../learning.jsp) (revision 3f1a86b9c8e984b056e2a7f8b931a2e32da83d21) +++ lams_tool_doku/web/pages/learning/learning.jsp (.../learning.jsp) (revision 53041ab71ac581668c14bdf40f65be5ea5f26961) @@ -53,7 +53,7 @@ var src = msg.data.location.substring(0, msg.data.location.indexOf('?')), iframe = $('iframe[src^="' + src + '"]'), // height should be no less than 200 px - height = Math.max(200, msg.data.height - (${hasEditRight} ? 0 : 64)); + height = Math.max(200, msg.data.height - (${hasEditRight and not timeLimitExceeded} ? 0 : 64)); iframe.height(height); } }); @@ -62,18 +62,13 @@ 'padId':'${padId}', 'host':'${etherpadServerUrl}', 'lang':'${fn:toLowerCase(localeLanguage)}', - 'showControls':'${hasEditRight}', + 'showControls':'${hasEditRight and not timeLimitExceeded}', 'showChat':'${dokumaran.showChat}', 'showLineNumbers':'${dokumaran.showLineNumbers}', 'height':'' + ($(window).height() - 200) ,'userName':' ' }); - // hide finish button for non-leaders until leader will finish activity - if (${mode != 'author' && !hasEditRight && !sessionMap.userFinished && !sessionMap.isLeaderResponseFinalized}) { - $("#finish-button").hide(); - } - if (${secondsLeft > 0}) { displayCountdown() } @@ -242,6 +237,9 @@ + + <%-- show no button for non-leaders until leader will finish activity --%> +