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

Merge OpenOLAT 10.3 to OpenOLAT default branch with cc906a16c98b2ab6b5fbdd632ef6c0c9b2d41929

parents 25ca64e1 03263926
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ public class CourseConfig implements Serializable, Cloneable { ...@@ -72,7 +72,7 @@ public class CourseConfig implements Serializable, Cloneable {
/** /**
* current config file version * current config file version
*/ */
transient private final static int CURRENTVERSION = 9; transient private final static int CURRENTVERSION = 10;
/** /**
* Log levels * Log levels
*/ */
...@@ -238,7 +238,7 @@ public class CourseConfig implements Serializable, Cloneable { ...@@ -238,7 +238,7 @@ public class CourseConfig implements Serializable, Cloneable {
if (!configuration.containsKey(CERTIFICATE_MANUAL_ENABLED)) configuration.put(CERTIFICATE_MANUAL_ENABLED, Boolean.FALSE); if (!configuration.containsKey(CERTIFICATE_MANUAL_ENABLED)) configuration.put(CERTIFICATE_MANUAL_ENABLED, Boolean.FALSE);
if (!configuration.containsKey(CERTIFICATE_TEMPLATE)) configuration.put(CERTIFICATE_TEMPLATE, ""); if (!configuration.containsKey(CERTIFICATE_TEMPLATE)) configuration.put(CERTIFICATE_TEMPLATE, "");
if (!configuration.containsKey(RECERTIFICATION_ENABLED)) configuration.put(RECERTIFICATION_ENABLED, Boolean.FALSE); if (!configuration.containsKey(RECERTIFICATION_ENABLED)) configuration.put(RECERTIFICATION_ENABLED, Boolean.FALSE);
if (!configuration.containsKey(RECERTIFICATION_TIMELAPSE)) configuration.put(RECERTIFICATION_TIMELAPSE, ""); if (!configuration.containsKey(RECERTIFICATION_TIMELAPSE)) configuration.put(RECERTIFICATION_TIMELAPSE, new Integer(0));
this.version = 10; this.version = 10;
} }
...@@ -426,30 +426,6 @@ public class CourseConfig implements Serializable, Cloneable { ...@@ -426,30 +426,6 @@ public class CourseConfig implements Serializable, Cloneable {
public void setManualCertificationEnabled(boolean enabled) { public void setManualCertificationEnabled(boolean enabled) {
configuration.put(CERTIFICATE_MANUAL_ENABLED, new Boolean(enabled)); configuration.put(CERTIFICATE_MANUAL_ENABLED, new Boolean(enabled));
} }
/*
public PDFCertificatesOptions getPdfCertificateOption2() {
PDFCertificatesOptions option;
String opt = (String)configuration.get(CERTIFICATE_ENABLED);
if(StringHelper.containsNonWhitespace(opt)) {
try {
option = PDFCertificatesOptions.valueOf(opt);
} catch (Exception e) {
log.error("", e);
option = PDFCertificatesOptions.none;
}
} else {
option = PDFCertificatesOptions.none;
}
return option;
}
public void setPdfCertificateOption(PDFCertificatesOptions option) {
configuration.put(PDF_CERTIFICATE_ENABLED, option.name());
}*/
/** /**
* @return true if the efficency statement is enabled * @return true if the efficency statement is enabled
...@@ -467,8 +443,11 @@ public class CourseConfig implements Serializable, Cloneable { ...@@ -467,8 +443,11 @@ public class CourseConfig implements Serializable, Cloneable {
} }
public int getRecertificationTimelapse() { public int getRecertificationTimelapse() {
Integer timelapse = (Integer)configuration.get(RECERTIFICATION_TIMELAPSE); Object timelapse = configuration.get(RECERTIFICATION_TIMELAPSE);
return timelapse == null ? 0 : timelapse.intValue(); if(timelapse instanceof Integer) {
return ((Integer)timelapse).intValue();
}
return 0;
} }
public void setRecertificationTimelapse(int timelapse) { public void setRecertificationTimelapse(int timelapse) {
......
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