Search in sources :

Example 81 with StatusDescription

use of org.olat.course.editor.StatusDescription in project openolat by klemens.

the class EditScoreCalculationEasyForm method getInvalidNodeDescriptions.

/**
 * @return Returns a list with the invalid node descriptions,
 * 				("invalid" is a node that is not associated with a test resource)
 */
public List<String> getInvalidNodeDescriptions() {
    List<String> testElemWithNoResource = new ArrayList<String>();
    List<String> selectedNodesIds = new ArrayList<String>(scoreNodeIdents.getSelectedKeys());
    for (Iterator<CourseNode> nodeIter = assessableNodesList.iterator(); nodeIter.hasNext(); ) {
        CourseNode node = nodeIter.next();
        if (selectedNodesIds.contains(node.getIdent())) {
            StatusDescription isConfigValid = node.isConfigValid();
            if (isConfigValid != null && isConfigValid.isError()) {
                String nodeDescription = node.getShortName() + " (Id:" + node.getIdent() + ")";
                if (!testElemWithNoResource.contains(nodeDescription)) {
                    testElemWithNoResource.add(nodeDescription);
                }
            }
        }
    }
    return testElemWithNoResource;
}
Also used : StatusDescription(org.olat.course.editor.StatusDescription) ArrayList(java.util.ArrayList) CourseNode(org.olat.course.nodes.CourseNode)

Example 82 with StatusDescription

use of org.olat.course.editor.StatusDescription in project openolat by klemens.

the class CourseEditorTreeNode method getIconDecorator1CssClass.

@Override
public String getIconDecorator1CssClass() {
    StatusDescription sd = cn.isConfigValid();
    String cssClass = null;
    if (deleted) {
        cssClass = "o_middel";
    } else if (sd.isError()) {
        cssClass = "o_miderr";
    } else if (!sd.isError() && dirty) {
        cssClass = "o_midpub";
    }
    return cssClass;
}
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