Search in sources :

Example 1 with TaxonomyLevelManagedFlag

use of org.olat.modules.taxonomy.TaxonomyLevelManagedFlag in project OpenOLAT by OpenOLAT.

the class EditTaxonomyCompetenceController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    String fullName = userManager.getUserDisplayName(competence.getIdentity());
    uifactory.addStaticTextElement("taxonomy.competence.fullName", fullName, formLayout);
    TaxonomyCompetenceTypes competenceType = competence.getCompetenceType();
    String type = translate(competenceType.name());
    uifactory.addStaticTextElement("taxonomy.competence.type", type, formLayout);
    TaxonomyLevelManagedFlag marker = TaxonomyLevelManagedFlag.getCorrespondingFlag(competenceType);
    expirationEl = uifactory.addDateChooser("taxonomy.competence.expiration", competence.getExpiration(), formLayout);
    expirationEl.setEnabled(!TaxonomyLevelManagedFlag.isManaged(taxonomyLevel, marker));
    FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator());
    formLayout.add(buttonsCont);
    uifactory.addFormCancelButton("cancel", buttonsCont, ureq, getWindowControl());
    if (expirationEl.isEnabled()) {
        // save only if there is something to update
        uifactory.addFormSubmitButton("save", buttonsCont);
    }
}
Also used : FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) TaxonomyCompetenceTypes(org.olat.modules.taxonomy.TaxonomyCompetenceTypes) TaxonomyLevelManagedFlag(org.olat.modules.taxonomy.TaxonomyLevelManagedFlag)

Example 2 with TaxonomyLevelManagedFlag

use of org.olat.modules.taxonomy.TaxonomyLevelManagedFlag in project openolat by klemens.

the class EditTaxonomyCompetenceController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    String fullName = userManager.getUserDisplayName(competence.getIdentity());
    uifactory.addStaticTextElement("taxonomy.competence.fullName", fullName, formLayout);
    TaxonomyCompetenceTypes competenceType = competence.getCompetenceType();
    String type = translate(competenceType.name());
    uifactory.addStaticTextElement("taxonomy.competence.type", type, formLayout);
    TaxonomyLevelManagedFlag marker = TaxonomyLevelManagedFlag.getCorrespondingFlag(competenceType);
    expirationEl = uifactory.addDateChooser("taxonomy.competence.expiration", competence.getExpiration(), formLayout);
    expirationEl.setEnabled(!TaxonomyLevelManagedFlag.isManaged(taxonomyLevel, marker));
    FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator());
    formLayout.add(buttonsCont);
    uifactory.addFormCancelButton("cancel", buttonsCont, ureq, getWindowControl());
    if (expirationEl.isEnabled()) {
        // save only if there is something to update
        uifactory.addFormSubmitButton("save", buttonsCont);
    }
}
Also used : FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) TaxonomyCompetenceTypes(org.olat.modules.taxonomy.TaxonomyCompetenceTypes) TaxonomyLevelManagedFlag(org.olat.modules.taxonomy.TaxonomyLevelManagedFlag)

Example 3 with TaxonomyLevelManagedFlag

use of org.olat.modules.taxonomy.TaxonomyLevelManagedFlag in project openolat by klemens.

the class IdentityCompetenceRow method isManaged.

public boolean isManaged() {
    TaxonomyLevel level = competence.getTaxonomyLevel();
    TaxonomyCompetenceTypes competenceType = competence.getCompetenceType();
    TaxonomyLevelManagedFlag marker = TaxonomyLevelManagedFlag.getCorrespondingFlag(competenceType);
    return TaxonomyLevelManagedFlag.isManaged(level, marker);
}
Also used : TaxonomyLevel(org.olat.modules.taxonomy.TaxonomyLevel) TaxonomyCompetenceTypes(org.olat.modules.taxonomy.TaxonomyCompetenceTypes) TaxonomyLevelManagedFlag(org.olat.modules.taxonomy.TaxonomyLevelManagedFlag)

Example 4 with TaxonomyLevelManagedFlag

use of org.olat.modules.taxonomy.TaxonomyLevelManagedFlag in project OpenOLAT by OpenOLAT.

the class IdentityCompetenceRow method isManaged.

public boolean isManaged() {
    TaxonomyLevel level = competence.getTaxonomyLevel();
    TaxonomyCompetenceTypes competenceType = competence.getCompetenceType();
    TaxonomyLevelManagedFlag marker = TaxonomyLevelManagedFlag.getCorrespondingFlag(competenceType);
    return TaxonomyLevelManagedFlag.isManaged(level, marker);
}
Also used : TaxonomyLevel(org.olat.modules.taxonomy.TaxonomyLevel) TaxonomyCompetenceTypes(org.olat.modules.taxonomy.TaxonomyCompetenceTypes) TaxonomyLevelManagedFlag(org.olat.modules.taxonomy.TaxonomyLevelManagedFlag)

Aggregations

TaxonomyCompetenceTypes (org.olat.modules.taxonomy.TaxonomyCompetenceTypes)4 TaxonomyLevelManagedFlag (org.olat.modules.taxonomy.TaxonomyLevelManagedFlag)4 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)2 TaxonomyLevel (org.olat.modules.taxonomy.TaxonomyLevel)2