use of org.olat.modules.ModuleConfiguration in project OpenOLAT by OpenOLAT.
the class PFCourseNode method updateModuleConfig.
public void updateModuleConfig(boolean participantbox, boolean coachbox, boolean alterfile, boolean limitcount, int filecount, boolean timeframe, Date start, Date end) {
ModuleConfiguration config = getModuleConfiguration();
config.setBooleanEntry(CONFIG_KEY_PARTICIPANTBOX, participantbox);
config.setBooleanEntry(CONFIG_KEY_COACHBOX, coachbox);
config.setBooleanEntry(CONFIG_KEY_ALTERFILE, alterfile);
config.setBooleanEntry(CONFIG_KEY_LIMITCOUNT, limitcount);
if (limitcount) {
config.set(CONFIG_KEY_FILECOUNT, filecount);
}
config.setBooleanEntry(CONFIG_KEY_TIMEFRAME, timeframe);
if (timeframe) {
config.set(CONFIG_KEY_DATESTART, start);
config.set(CONFIG_KEY_DATEEND, end);
}
}
use of org.olat.modules.ModuleConfiguration in project OpenOLAT by OpenOLAT.
the class PFCourseNode method isInDropboxTimeFrame.
public boolean isInDropboxTimeFrame() {
ModuleConfiguration config = getModuleConfiguration();
Date start = config.getBooleanEntry(CONFIG_KEY_DATESTART) != null ? (Date) config.getDateValue(CONFIG_KEY_DATESTART) : new Date();
Date end = config.getBooleanEntry(CONFIG_KEY_DATEEND) != null ? (Date) config.getDateValue(CONFIG_KEY_DATEEND) : new Date();
Date current = new Date();
return start.before(current) && end.after(current);
}
use of org.olat.modules.ModuleConfiguration in project OpenOLAT by OpenOLAT.
the class ProjectBrokerCourseNode method getCutValueConfiguration.
/**
* @see org.olat.course.nodes.AssessableCourseNode#getCutValueConfiguration()
*/
@Override
public Float getCutValueConfiguration() {
if (!hasPassedConfigured()) {
throw new OLATRuntimeException(ProjectBrokerCourseNode.class, "getCutValue not defined when hasPassed set to false", null);
}
ModuleConfiguration config = getModuleConfiguration();
Float cut = (Float) config.get(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE);
return cut;
}
use of org.olat.modules.ModuleConfiguration in project OpenOLAT by OpenOLAT.
the class ProjectBrokerCourseNode method getMinScoreConfiguration.
/**
* @see org.olat.course.nodes.AssessableCourseNode#getMinScoreConfiguration()
*/
@Override
public Float getMinScoreConfiguration() {
if (!hasScoreConfigured()) {
throw new OLATRuntimeException(ProjectBrokerCourseNode.class, "getMinScore not defined when hasScore set to false", null);
}
ModuleConfiguration config = getModuleConfiguration();
Float min = (Float) config.get(MSCourseNode.CONFIG_KEY_SCORE_MIN);
return min;
}
use of org.olat.modules.ModuleConfiguration in project OpenOLAT by OpenOLAT.
the class ProjectBrokerCourseNode method getMaxScoreConfiguration.
/**
* @see org.olat.course.nodes.AssessableCourseNode#getMaxScoreConfiguration()
*/
@Override
public Float getMaxScoreConfiguration() {
if (!hasScoreConfigured()) {
throw new OLATRuntimeException(ProjectBrokerCourseNode.class, "getMaxScore not defined when hasScore set to false", null);
}
ModuleConfiguration config = getModuleConfiguration();
Float max = (Float) config.get(MSCourseNode.CONFIG_KEY_SCORE_MAX);
return max;
}
Aggregations