Search in sources :

Example 1 with AccessRightsEvent

use of org.olat.modules.portfolio.ui.event.AccessRightsEvent in project OpenOLAT by OpenOLAT.

the class AccessRightsEditController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (removeLink == source) {
        fireEvent(ureq, new AccessRightsEvent(AccessRightsEvent.REMOVE_ALL_RIGHTS));
    } else if (selectAll == source) {
        binderRow.setCoach();
        binderRow.recalculate();
    } else if (deselectAll == source) {
        binderRow.unsetCoach();
        binderRow.unsetReviewer();
        for (SectionAccessRightsRow sectionRow : binderRow.getSections()) {
            sectionRow.unsetCoach();
            sectionRow.unsetReviewer();
            for (PortfolioElementAccessRightsRow pageRow : sectionRow.getPages()) {
                pageRow.unsetCoach();
                pageRow.unsetReviewer();
            }
        }
    } else if (source instanceof MultipleSelectionElement) {
        binderRow.recalculate();
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) AccessRightsEvent(org.olat.modules.portfolio.ui.event.AccessRightsEvent)

Example 2 with AccessRightsEvent

use of org.olat.modules.portfolio.ui.event.AccessRightsEvent in project openolat by klemens.

the class AccessRightsEditController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (removeLink == source) {
        fireEvent(ureq, new AccessRightsEvent(AccessRightsEvent.REMOVE_ALL_RIGHTS));
    } else if (selectAll == source) {
        binderRow.setCoach();
        binderRow.recalculate();
    } else if (deselectAll == source) {
        binderRow.unsetCoach();
        binderRow.unsetReviewer();
        for (SectionAccessRightsRow sectionRow : binderRow.getSections()) {
            sectionRow.unsetCoach();
            sectionRow.unsetReviewer();
            for (PortfolioElementAccessRightsRow pageRow : sectionRow.getPages()) {
                pageRow.unsetCoach();
                pageRow.unsetReviewer();
            }
        }
    } else if (source instanceof MultipleSelectionElement) {
        binderRow.recalculate();
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) AccessRightsEvent(org.olat.modules.portfolio.ui.event.AccessRightsEvent)

Aggregations

MultipleSelectionElement (org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement)2 AccessRightsEvent (org.olat.modules.portfolio.ui.event.AccessRightsEvent)2