Skip to content
Snippets Groups Projects
Commit f06ee63f authored by srosse's avatar srosse
Browse files

Merge OpenOLAT 10.5 to OpenOLAT default branch with 8a045b2ca17ff85c54836416f388c6ca19f889eb

parents 9b95a965 7a796f2d
No related branches found
No related tags found
No related merge requests found
Showing
with 34 additions and 24 deletions
...@@ -290,11 +290,12 @@ public class FolderRunController extends BasicController implements Activateable ...@@ -290,11 +290,12 @@ public class FolderRunController extends BasicController implements Activateable
} }
boolean isGuest = ureq.getUserSession().getRoles().isGuestOnly();
folderComponent = new FolderComponent(ureq, "foldercomp", rootContainer, filter, customLinkTreeModel, externContainerForCopy); folderComponent = new FolderComponent(ureq, "foldercomp", rootContainer, filter, customLinkTreeModel, externContainerForCopy);
folderComponent.setCanMail(ureq.getUserSession().getRoles().isGuestOnly() ? false : canMail); // guests can never send mail folderComponent.setCanMail(isGuest ? false : canMail); // guests can never send mail
folderComponent.addListener(this); folderComponent.addListener(this);
folderContainer.put("foldercomp", folderComponent); folderContainer.put("foldercomp", folderComponent);
if (displayWebDAVLink) { if (displayWebDAVLink && !isGuest) {
WebDAVModule webDAVModule = CoreSpringFactory.getImpl(WebDAVModule.class); WebDAVModule webDAVModule = CoreSpringFactory.getImpl(WebDAVModule.class);
if (webDAVModule.isEnabled() && webDAVModule.isLinkEnabled() && displayWebDAVLink) { if (webDAVModule.isEnabled() && webDAVModule.isLinkEnabled() && displayWebDAVLink) {
folderContainer.contextPut("webdavhttp", FolderManager.getWebDAVHttp()); folderContainer.contextPut("webdavhttp", FolderManager.getWebDAVHttp());
......
...@@ -574,16 +574,17 @@ public class UserSessionManager implements GenericEventListener { ...@@ -574,16 +574,17 @@ public class UserSessionManager implements GenericEventListener {
* @param sessionTimeoutInSec * @param sessionTimeoutInSec
*/ */
public void setGlobalSessionTimeout(int sessionTimeoutInSec) { public void setGlobalSessionTimeout(int sessionTimeoutInSec) {
authUserSessions.forEach(session -> { UserSession[] currentSessions = authUserSessions.toArray(new UserSession[0]);
for(int i=currentSessions.length; i-->0; ) {
try{ try{
SessionInfo sessionInfo = session.getSessionInfo(); SessionInfo sessionInfo = currentSessions[i].getSessionInfo();
if(sessionInfo != null && sessionInfo.getSession() != null) { if(sessionInfo != null && sessionInfo.getSession() != null) {
sessionInfo.getSession().setMaxInactiveInterval(sessionTimeoutInSec); sessionInfo.getSession().setMaxInactiveInterval(sessionTimeoutInSec);
} }
} catch(Throwable th){ } catch(Throwable th){
log.error("error setting sesssionTimeout", th); log.error("error setting sesssionTimeout", th);
} }
}); }
} }
/** /**
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
*/ */
package org.olat.course.nodes.members; package org.olat.course.nodes.members;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.olat.core.gui.UserRequest; import org.olat.core.gui.UserRequest;
...@@ -57,25 +56,24 @@ public class MembersPrintController extends BasicController { ...@@ -57,25 +56,24 @@ public class MembersPrintController extends BasicController {
mainVC.contextPut("avatarBaseURL", avatarBaseURL); mainVC.contextPut("avatarBaseURL", avatarBaseURL);
mainVC.contextPut("userPropertyHandlers", userPropertyHandlers); mainVC.contextPut("userPropertyHandlers", userPropertyHandlers);
List<Member> members = new ArrayList<>();
if(owners != null && owners.size() > 0) { if(owners != null && owners.size() > 0) {
members.addAll(owners); initFormMemberList("owners", translate("members.owners"), owners);
} }
if(coaches != null && coaches.size() > 0) { if(coaches != null && coaches.size() > 0) {
members.addAll(coaches); initFormMemberList("coaches", translate("members.coaches"), coaches);
} }
if(participants != null && participants.size() > 0) { if(participants != null && participants.size() > 0) {
members.addAll(participants); initFormMemberList("participants", translate("members.participants"), participants);
} }
initFormMemberList("members", members);
MainPanel mainPanel = new MainPanel("membersPrintPanel"); MainPanel mainPanel = new MainPanel("membersPrintPanel");
mainPanel.setContent(mainVC); mainPanel.setContent(mainVC);
putInitialPanel(mainPanel); putInitialPanel(mainPanel);
} }
private void initFormMemberList(String name, List<Member> members) { private void initFormMemberList(String name, String label, List<Member> members) {
VelocityContainer listVC = createVelocityContainer("printList"); VelocityContainer listVC = createVelocityContainer("printList");
listVC.contextPut("label", label);
listVC.contextPut("avatarBaseURL", avatarBaseURL); listVC.contextPut("avatarBaseURL", avatarBaseURL);
listVC.contextPut("members", members); listVC.contextPut("members", members);
listVC.contextPut("userPropertyHandlers", userPropertyHandlers); listVC.contextPut("userPropertyHandlers", userPropertyHandlers);
......
...@@ -3,8 +3,14 @@ ...@@ -3,8 +3,14 @@
</div> </div>
<h1>$r.translate("print.title")</h1> <h1>$r.translate("print.title")</h1>
<h3>$courseTitle</h3> <h3>$courseTitle</h3>
#if($r.available("members")) #if($r.available("owners"))
$r.render("members") $r.render("owners")
#end
#if($r.available("coaches"))
$r.render("coaches")
#end
#if($r.available("participants"))
$r.render("participants")
#end #end
<script type='text/javascript'> <script type='text/javascript'>
/* <![CDATA[ */ /* <![CDATA[ */
......
<div class="clearfix">
<h4>$label</h4>
#foreach($member in $members) #foreach($member in $members)
<div class="o_cmember col-xs-3 col-sm-3 col-md-3"> <div class="o_cmember col-xs-3 col-sm-3 col-md-3">
<div class="clearfix"> <div class="clearfix">
...@@ -26,3 +28,4 @@ ...@@ -26,3 +28,4 @@
<div class="clearfix"> </div> <div class="clearfix"> </div>
#end #end
#end #end
</div>
\ No newline at end of file
...@@ -50,7 +50,7 @@ doCompile () { ...@@ -50,7 +50,7 @@ doCompile () {
UPDATE=$UPDATECMD UPDATE=$UPDATECMD
if [ $1 = "." ]; if [ $1 = "." ];
then then
TARGET="openolat" TARGET="light"
if [[ "--watch" == $UPDATECMD && ! -z $THEMES ]]; then UPDATE="--update"; fi if [[ "--watch" == $UPDATECMD && ! -z $THEMES ]]; then UPDATE="--update"; fi
fi fi
echo "Compiling SASS: $TARGET $STYLE" echo "Compiling SASS: $TARGET $STYLE"
......
This diff is collapsed.
This diff is collapsed.
...@@ -143,6 +143,7 @@ ul.o_dropdown { ...@@ -143,6 +143,7 @@ ul.o_dropdown {
.o_thumbnail{ .o_thumbnail{
width:200px; width:200px;
height:200px; height:200px;
display: inline-block; /* render centered if title larger than image */
background-color: #fff; background-color: #fff;
margin: 0 -5px; /* remove ugly border */ margin: 0 -5px; /* remove ugly border */
} }
......
This diff is collapsed.
source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment