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

Merge OpenOLAT 9.4 to OpenOLAT default branch with dc6067ce2aaa68ea31c5824f177c17a5ccf55936

parents 5ec24057 bc1fc24a
No related branches found
No related tags found
No related merge requests found
...@@ -1165,6 +1165,18 @@ public class BaseFullWebappController extends BasicController implements ChiefCo ...@@ -1165,6 +1165,18 @@ public class BaseFullWebappController extends BasicController implements ChiefCo
} }
} }
public boolean hasStaticSite(Class<? extends SiteInstance> type) {
boolean hasSite = false;
if(sites != null && sites.size() > 0) {
for(SiteInstance site:sites) {
if(site.getClass().equals(type)) {
hasSite = true;
}
}
}
return hasSite;
}
/** /**
* [used by velocity] helper for velocity * [used by velocity] helper for velocity
* *
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
package org.olat.core.gui.control; package org.olat.core.gui.control;
import org.olat.core.gui.components.Window; import org.olat.core.gui.components.Window;
import org.olat.core.gui.control.navigation.SiteInstance;
import org.olat.core.gui.components.htmlheader.jscss.CustomCSS; import org.olat.core.gui.components.htmlheader.jscss.CustomCSS;
/** /**
* Description: <br> * Description: <br>
...@@ -73,5 +74,11 @@ public interface ChiefController extends Controller { ...@@ -73,5 +74,11 @@ public interface ChiefController extends Controller {
* *
*/ */
public void removeCurrentCustomCSSFromView(); public void removeCurrentCustomCSSFromView();
/**
* Check if the static site of a specific type is available
* @param type
* @return
*/
public boolean hasStaticSite(Class<? extends SiteInstance> type);
} }
\ No newline at end of file
...@@ -44,6 +44,7 @@ import org.olat.core.gui.control.DefaultChiefController; ...@@ -44,6 +44,7 @@ import org.olat.core.gui.control.DefaultChiefController;
import org.olat.core.gui.control.Event; import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowBackOffice; import org.olat.core.gui.control.WindowBackOffice;
import org.olat.core.gui.control.info.WindowControlInfo; import org.olat.core.gui.control.info.WindowControlInfo;
import org.olat.core.gui.control.navigation.SiteInstance;
import org.olat.core.gui.translator.PackageTranslator; import org.olat.core.gui.translator.PackageTranslator;
import org.olat.core.gui.translator.Translator; import org.olat.core.gui.translator.Translator;
import org.olat.core.helpers.Settings; import org.olat.core.helpers.Settings;
...@@ -256,6 +257,11 @@ public class ExceptionWindowController extends DefaultChiefController { ...@@ -256,6 +257,11 @@ public class ExceptionWindowController extends DefaultChiefController {
// //
} }
@Override
public boolean hasStaticSite(Class<? extends SiteInstance> type){
return false;
}
/** /**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
* org.olat.core.gui.components.Component, org.olat.core.gui.control.Event) * org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
......
...@@ -496,7 +496,9 @@ public class QTIEditHelper { ...@@ -496,7 +496,9 @@ public class QTIEditHelper {
content.getElements().addAll(mat.getElements()); content.getElements().addAll(mat.getElements());
} }
// assure material always has some content // assure material always has some content
if (content.getElements().size() == 0) content.getElements().add(new Mattext("[blank]")); if (content.getElements().size() == 0) {
content.getElements().add(new Mattext(""));
}
choice.setContent(content); choice.setContent(content);
choices.add(choice); choices.add(choice);
} }
......
...@@ -39,6 +39,7 @@ import org.olat.core.gui.control.ChiefController; ...@@ -39,6 +39,7 @@ import org.olat.core.gui.control.ChiefController;
import org.olat.core.gui.control.DefaultChiefController; import org.olat.core.gui.control.DefaultChiefController;
import org.olat.core.gui.control.Event; import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowBackOffice; import org.olat.core.gui.control.WindowBackOffice;
import org.olat.core.gui.control.navigation.SiteInstance;
import org.olat.core.gui.translator.Translator; import org.olat.core.gui.translator.Translator;
import org.olat.core.helpers.Settings; import org.olat.core.helpers.Settings;
import org.olat.core.logging.OLog; import org.olat.core.logging.OLog;
...@@ -94,6 +95,11 @@ public class MessageWindowController extends DefaultChiefController { ...@@ -94,6 +95,11 @@ public class MessageWindowController extends DefaultChiefController {
w.setContentPane(msg); w.setContentPane(msg);
setWindow(w); setWindow(w);
} }
@Override
public boolean hasStaticSite(Class<? extends SiteInstance> type) {
return false;
}
@Override @Override
public void addBodyCssClass(String cssClass) { public void addBodyCssClass(String cssClass) {
......
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