use of org.olat.course.editor.StatusDescription in project OpenOLAT by OpenOLAT.
the class PodcastCourseNode method isConfigValid.
@Override
public StatusDescription isConfigValid() {
if (oneClickStatusCache != null) {
return oneClickStatusCache[0];
}
StatusDescription status = StatusDescription.NOERROR;
boolean invalid = config.get(CONFIG_KEY_REPOSITORY_SOFTKEY) == null;
if (invalid) {
String[] params = new String[] { this.getShortTitle() };
String shortKey = "error.no.reference.short";
String longKey = "error.no.reference.long";
String translationPackage = Util.getPackageName(PodcastNodeEditController.class);
status = new StatusDescription(ValidationStatus.ERROR, shortKey, longKey, params, translationPackage);
status.setDescriptionForUnit(getIdent());
// Set which pane is affected by error
status.setActivateableViewIdentifier(FeedNodeEditController.PANE_TAB_FEED);
}
return status;
}
use of org.olat.course.editor.StatusDescription in project OpenOLAT by OpenOLAT.
the class SPCourseNode method isConfigValid.
/**
* @see org.olat.course.nodes.CourseNode#isConfigValid()
*/
public StatusDescription isConfigValid() {
/*
* first check the one click cache
*/
if (oneClickStatusCache != null) {
return oneClickStatusCache[0];
}
String file = (String) getModuleConfiguration().get(SPEditController.CONFIG_KEY_FILE);
boolean isValid = file != null;
StatusDescription sd = StatusDescription.NOERROR;
if (!isValid) {
// FIXME: refine statusdescriptions by moving the statusdescription
// generation to the MSEditForm
String shortKey = "error.missingfile.short";
String longKey = "error.missingfile.long";
String[] params = new String[] { this.getShortTitle() };
String translPackage = Util.getPackageName(SPEditController.class);
sd = new StatusDescription(StatusDescription.ERROR, shortKey, longKey, params, translPackage);
sd.setDescriptionForUnit(getIdent());
// set which pane is affected by error
sd.setActivateableViewIdentifier(SPEditController.PANE_TAB_SPCONFIG);
}
return sd;
}
use of org.olat.course.editor.StatusDescription in project OpenOLAT by OpenOLAT.
the class ScormCourseNode method isConfigValid.
/**
* @see org.olat.course.nodes.CourseNode#isConfigValid()
*/
@Override
public StatusDescription isConfigValid() {
/*
* first check the one click cache
*/
if (oneClickStatusCache != null) {
return oneClickStatusCache[0];
}
StatusDescription sd = StatusDescription.NOERROR;
boolean isValid = ScormEditController.isModuleConfigValid(getModuleConfiguration());
if (!isValid) {
String shortKey = "error.noreference.short";
String longKey = "error.noreference.long";
String[] params = new String[] { this.getShortTitle() };
String translPackage = Util.getPackageName(ScormEditController.class);
sd = new StatusDescription(StatusDescription.ERROR, shortKey, longKey, params, translPackage);
sd.setDescriptionForUnit(getIdent());
// set which pane is affected by error
sd.setActivateableViewIdentifier(ScormEditController.PANE_TAB_CPCONFIG);
}
return sd;
}
use of org.olat.course.editor.StatusDescription in project OpenOLAT by OpenOLAT.
the class WikiCourseNode method isConfigValid.
@Override
public StatusDescription isConfigValid() {
/*
* first check the one click cache
*/
if (oneClickStatusCache != null) {
return oneClickStatusCache[0];
}
StatusDescription sd = StatusDescription.NOERROR;
boolean isValid = WikiEditController.isModuleConfigValid(getModuleConfiguration());
if (!isValid) {
String shortKey = "error.noreference.short";
String longKey = "error.noreference.long";
String[] params = new String[] { this.getShortTitle() };
String translPackage = Util.getPackageName(WikiEditController.class);
sd = new StatusDescription(StatusDescription.ERROR, shortKey, longKey, params, translPackage);
sd.setDescriptionForUnit(getIdent());
// set which pane is affected by error
sd.setActivateableViewIdentifier(WikiEditController.PANE_TAB_WIKICONFIG);
}
return sd;
}
use of org.olat.course.editor.StatusDescription in project OpenOLAT by OpenOLAT.
the class GTACourseNode method addStatusWarningDescription.
private void addStatusWarningDescription(String key, String pane, List<StatusDescription> status) {
String[] params = new String[] { getShortTitle() };
StatusDescription sd = new StatusDescription(StatusDescription.WARNING, key, key, params, PACKAGE_GTA);
sd.setDescriptionForUnit(getIdent());
sd.setActivateableViewIdentifier(pane);
status.add(sd);
}
Aggregations