Index: lams_tool_doku/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r8e8e7b3f0982e5e772b90202f01d43f1ee52962d -r3f1a86b9c8e984b056e2a7f8b931a2e32da83d21 --- lams_tool_doku/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 8e8e7b3f0982e5e772b90202f01d43f1ee52962d) +++ lams_tool_doku/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 3f1a86b9c8e984b056e2a7f8b931a2e32da83d21) @@ -106,10 +106,13 @@ monitoring.summary.gallery.walk.finish.confirm = Are you sure you want to finish Gallery Walk? label.gallery.walk = Gallery Walk label.gallery.walk.wait.finish = The Gallery Walk activity has not been set as completed by the teacher. If you have completed, please contact the teacher for assistance. +label.gallery.walk.wait.finish.preview = Continue to Gallery Walk summary. Since you are in preview mode, you can do it immediately. Regular learners get this message would need to wait for a teacher to finish Gallery Walk on monitoring screen. +label.gallery.walk.preview = You are in preview mode. You only see your own group. Regular learners would see other groups' work and would be able to comment on it and rate it. label.rating = Rating label.pad.rating.title = Other groups' rating label.average.rating = Average rating {0}/{1} votes label.your.rating = Your rating {0}, average rating {1}/{2} votes label.gallery.walk.your.group = (Your group) label.gallery.walk.ratings.header = Ratings label.gallery.walk.wait.start = As part of this activity, the teacher has planned for you to view and maybe comment on the work of other teams. The activity of seeing and commenting on others' work is called Gallery Walk. Please wait for the teacher to start the Gallery Walk. If this is taking too long, please contact the teacher for assistance. +label.gallery.walk.wait.start.preview = Continue to Gallery Walk. Since you are in preview mode, you can do it immediately. Regular learners get this message would need to wait for a teacher to start Gallery Walk on monitoring screen. \ No newline at end of file Index: lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/web/controller/LearningController.java =================================================================== diff -u -r8e8e7b3f0982e5e772b90202f01d43f1ee52962d -r3f1a86b9c8e984b056e2a7f8b931a2e32da83d21 --- lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/web/controller/LearningController.java (.../LearningController.java) (revision 8e8e7b3f0982e5e772b90202f01d43f1ee52962d) +++ lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/web/controller/LearningController.java (.../LearningController.java) (revision 3f1a86b9c8e984b056e2a7f8b931a2e32da83d21) @@ -26,8 +26,10 @@ import java.io.IOException; import java.net.URISyntaxException; import java.util.ArrayList; +import java.util.Collection; import java.util.Date; import java.util.List; +import java.util.Set; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; @@ -144,8 +146,8 @@ return "pages/learning/waitforleader"; } if (dokumaran.getTimeLimit() > 0 && dokumaran.getTimeLimitLaunchedDate() == null) { - if (dokumaran.isTimeLimitManualStart() && !mode.isAuthor()) { - // time limit is set but hasn't yet launched by a teacher - show waitForTimeLimitLaunch page + if (dokumaran.isTimeLimitManualStart() && (mode == null || !mode.isAuthor())) { + // time limit is set but hasn't yet launched by a teac1her - show waitForTimeLimitLaunch page return "pages/learning/waitForTimeLimitLaunch"; } // there is no manual start, so the first learner that enters starts the timer @@ -161,6 +163,7 @@ sessionMap.put(DokumaranConstants.ATTR_REFLECTION_ON, dokumaran.isReflectOnActivity()); sessionMap.put(AttributeNames.ATTR_IS_LAST_ACTIVITY, dokumaranService.isLastActivity(toolSessionId)); sessionMap.put(DokumaranConstants.ATTR_DOKUMARAN, dokumaran); + sessionMap.put(AttributeNames.ATTR_MODE, mode); // get the API key from the config table and add it to the session String etherpadServerUrl = Configuration.get(ConfigurationKeys.ETHERPAD_SERVER_URL); @@ -182,6 +185,23 @@ sessionMap.put(DokumaranConstants.ATTR_REFLECTION_INSTRUCTION, dokumaran.getReflectInstructions()); sessionMap.put(DokumaranConstants.ATTR_REFLECTION_ENTRY, entryText); + if (dokumaran.isGalleryWalkEnabled() && mode != null && mode.isAuthor()) { + String[] galleryWalkParameterValuesArray = request.getParameterValues("galleryWalk"); + if (galleryWalkParameterValuesArray != null) { + Collection galleryWalkParameterValues = Set.of(galleryWalkParameterValuesArray); + + if (!dokumaran.isGalleryWalkStarted() && galleryWalkParameterValues.contains("forceStart")) { + dokumaran.setGalleryWalkStarted(true); + dokumaranService.saveOrUpdate(dokumaran); + } + + if (!dokumaran.isGalleryWalkFinished() && galleryWalkParameterValues.contains("forceFinish")) { + dokumaran.setGalleryWalkFinished(true); + dokumaranService.saveOrUpdate(dokumaran); + } + } + } + if (dokumaran.isGalleryWalkStarted()) { List groupList = dokumaranService.getSummary(dokumaran.getContentId(), user.getUserId()); request.setAttribute(DokumaranConstants.ATTR_SUMMARY_LIST, groupList); @@ -194,7 +214,6 @@ return "pages/learning/galleryWalk"; } - sessionMap.put(AttributeNames.ATTR_MODE, mode); // check whether finish lock is on/off boolean finishedLock = dokumaran.getLockWhenFinished() && (user != null) && user.isSessionFinished(); sessionMap.put(DokumaranConstants.ATTR_TITLE, dokumaran.getTitle()); Index: lams_tool_doku/web/pages/learning/galleryWalk.jsp =================================================================== diff -u -r3db92c115d59863057a7e6bad8126d1cd1b319ee -r3f1a86b9c8e984b056e2a7f8b931a2e32da83d21 --- lams_tool_doku/web/pages/learning/galleryWalk.jsp (.../galleryWalk.jsp) (revision 3db92c115d59863057a7e6bad8126d1cd1b319ee) +++ lams_tool_doku/web/pages/learning/galleryWalk.jsp (.../galleryWalk.jsp) (revision 3f1a86b9c8e984b056e2a7f8b931a2e32da83d21) @@ -35,6 +35,10 @@ #gallery-walk-rating-table th:first-child, #gallery-walk-rating-table td:first-child { text-align: right; } + + #gallery-walk-preview-info { + margin-bottom: 20px; + } @@ -121,6 +125,17 @@

+ + + + +
@@ -161,8 +176,18 @@
- Index: lams_tool_doku/web/pages/learning/learning.jsp =================================================================== diff -u -r3db92c115d59863057a7e6bad8126d1cd1b319ee -r3f1a86b9c8e984b056e2a7f8b931a2e32da83d21 --- lams_tool_doku/web/pages/learning/learning.jsp (.../learning.jsp) (revision 3db92c115d59863057a7e6bad8126d1cd1b319ee) +++ lams_tool_doku/web/pages/learning/learning.jsp (.../learning.jsp) (revision 3f1a86b9c8e984b056e2a7f8b931a2e32da83d21) @@ -69,8 +69,8 @@ ,'userName':' ' }); - //hide finish button for non-leaders until leader will finish activity - if (${!hasEditRight && !sessionMap.userFinished && !sessionMap.isLeaderResponseFinalized}) { + // hide finish button for non-leaders until leader will finish activity + if (${mode != 'author' && !hasEditRight && !sessionMap.userFinished && !sessionMap.isLeaderResponseFinalized}) { $("#finish-button").hide(); } @@ -221,8 +221,18 @@
- @@ -251,12 +261,12 @@
- + + + + - - -