Search in sources :

Example 1 with StatusDescription

use of org.olat.course.editor.StatusDescription in project OpenOLAT by OpenOLAT.

the class MSCourseNode 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];
    }
    boolean isValid = MSEditFormController.isConfigValid(getModuleConfiguration());
    StatusDescription sd = StatusDescription.NOERROR;
    if (!isValid) {
        // FIXME: refine statusdescriptions by moving the statusdescription
        // generation to the MSEditForm
        String shortKey = "error.missingconfig.short";
        String longKey = "error.missingconfig.long";
        String[] params = new String[] { this.getShortTitle() };
        sd = new StatusDescription(StatusDescription.ERROR, shortKey, longKey, params, PACKAGE_MS);
        sd.setDescriptionForUnit(getIdent());
        // set which pane is affected by error
        sd.setActivateableViewIdentifier(MSCourseNodeEditController.PANE_TAB_CONFIGURATION);
    }
    return sd;
}
Also used : StatusDescription(org.olat.course.editor.StatusDescription)

Example 2 with StatusDescription

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;
}
Also used : StatusDescription(org.olat.course.editor.StatusDescription)

Example 3 with StatusDescription

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;
}
Also used : StatusDescription(org.olat.course.editor.StatusDescription)

Example 4 with StatusDescription

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;
}
Also used : StatusDescription(org.olat.course.editor.StatusDescription)

Example 5 with StatusDescription

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;
}
Also used : StatusDescription(org.olat.course.editor.StatusDescription)

Aggregations

StatusDescription (org.olat.course.editor.StatusDescription)82 ArrayList (java.util.ArrayList)20 ModuleConfiguration (org.olat.modules.ModuleConfiguration)10 List (java.util.List)4 Condition (org.olat.course.condition.Condition)4 PublishProcess (org.olat.course.editor.PublishProcess)4 PublishSetInformations (org.olat.course.editor.PublishSetInformations)4 CourseNode (org.olat.course.nodes.CourseNode)4 CourseEditorTreeModel (org.olat.course.tree.CourseEditorTreeModel)4 BusinessGroupService (org.olat.group.BusinessGroupService)4 ChecklistEditController (de.bps.course.nodes.cl.ChecklistEditController)2 VCEditController (de.bps.course.nodes.vc.VCEditController)2 VCProvider (de.bps.course.nodes.vc.provider.VCProvider)2 Checklist (de.bps.olat.modules.cl.Checklist)2 Checkpoint (de.bps.olat.modules.cl.Checkpoint)2 File (java.io.File)2 FileNotFoundException (java.io.FileNotFoundException)2 IOException (java.io.IOException)2 IdentityRef (org.olat.basesecurity.IdentityRef)2 CollaborationTools (org.olat.collaboration.CollaborationTools)2