use of org.olat.core.util.prefs.Preferences in project openolat by klemens.
the class CheckListRunController method saveOpenPanel.
private void saveOpenPanel(UserRequest ureq, String panelId, boolean newValue) {
Preferences guiPrefs = ureq.getUserSession().getGuiPreferences();
if (guiPrefs != null) {
guiPrefs.putAndSave(CheckListRunController.class, getOpenPanelId(panelId), Boolean.valueOf(newValue));
}
flc.getFormItemComponent().contextPut("in-" + panelId, Boolean.valueOf(newValue));
}
use of org.olat.core.util.prefs.Preferences in project openolat by klemens.
the class IQRunController method isPanelOpen.
private boolean isPanelOpen(UserRequest ureq, String panelId, boolean def) {
Preferences guiPrefs = ureq.getUserSession().getGuiPreferences();
Boolean showConfig = (Boolean) guiPrefs.get(IQRunController.class, getOpenPanelId(panelId));
return showConfig == null ? def : showConfig.booleanValue();
}
use of org.olat.core.util.prefs.Preferences in project openolat by klemens.
the class QTI21AssessmentRunController method isPanelOpen.
private boolean isPanelOpen(UserRequest ureq, String panelId, boolean def) {
Preferences guiPrefs = ureq.getUserSession().getGuiPreferences();
Boolean showConfig = (Boolean) guiPrefs.get(QTI21AssessmentRunController.class, getOpenPanelId(panelId));
return showConfig == null ? def : showConfig.booleanValue();
}
use of org.olat.core.util.prefs.Preferences in project openolat by klemens.
the class MSCourseNodeRunController method isPanelOpen.
private boolean isPanelOpen(UserRequest ureq, String panelId, boolean def) {
Preferences guiPrefs = ureq.getUserSession().getGuiPreferences();
Boolean showConfig = (Boolean) guiPrefs.get(MSCourseNodeRunController.class, getOpenPanelId(panelId));
return showConfig == null ? def : showConfig.booleanValue();
}
use of org.olat.core.util.prefs.Preferences in project openolat by klemens.
the class ToggleBoxController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (source == toggleButton) {
Preferences prefs = ureq.getUserSession().getGuiPreferences();
toggleStatus = new Boolean(!toggleStatus.booleanValue());
prefs.putAndSave(this.getClass(), key, toggleStatus);
updateUI();
} else if (source == hideButton) {
Preferences prefs = ureq.getUserSession().getGuiPreferences();
toggleStatus = Boolean.FALSE;
prefs.putAndSave(this.getClass(), key, toggleStatus);
updateUI();
} else if (source == mainVC) {
if ("hide".equals(event.getCommand())) {
Preferences prefs = ureq.getUserSession().getGuiPreferences();
toggleStatus = Boolean.FALSE;
prefs.putAndSave(this.getClass(), key, toggleStatus);
updateUI();
}
}
}
Aggregations