Search in sources :

Example 1 with NotCorrectedFlexiCellRenderer

use of org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer in project openolat by klemens.

the class CorrectionIdentityAssessmentItemListController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    stackPanel.addListener(this);
    if (formLayout instanceof FormLayoutContainer) {
        FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;
        layoutCont.contextPut("title", title);
    }
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.section));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.itemTitle, "select"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false, IdentityItemCols.itemKeywords, "select"));
    Translator qti21Translator = Util.createPackageTranslator(AssessmentTestComposerController.class, getLocale());
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.itemType, new QuestionTypeFlexiCellRenderer(qti21Translator)));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.score, new ScoreCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.answered, "answered"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.autoCorrected, "corrected", new AutoCorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.corrected, "corrected", new CorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.notCorrected, "notCorrected", new NotCorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.toReview, "toReview", new ToReviewFlexiCellRenderer()));
    tableModel = new CorrectionIdentityAssessmentItemTableModel(columnsModel, getLocale());
    tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, getTranslator(), formLayout);
    tableEl.setExportEnabled(true);
    tableEl.setAndLoadPersistedPreferences(ureq, "corr-identity-assessment-item-list");
    if (saveEnabled) {
        uifactory.addFormCancelButton("cancel", formLayout, ureq, getWindowControl());
        saveButton = uifactory.addFormLink("save", formLayout, Link.BUTTON);
    }
}
Also used : CorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.CorrectedFlexiCellRenderer) AutoCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.AutoCorrectedFlexiCellRenderer) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) ScoreCellRenderer(org.olat.modules.assessment.ui.ScoreCellRenderer) Translator(org.olat.core.gui.translator.Translator) ToReviewFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.ToReviewFlexiCellRenderer) QuestionTypeFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.QuestionTypeFlexiCellRenderer) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) AutoCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.AutoCorrectedFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Example 2 with NotCorrectedFlexiCellRenderer

use of org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer in project openolat by klemens.

the class CorrectionIdentityListController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    if (anonymous) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.user, "select"));
    } else {
        if (isAdministrativeUser) {
            columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.username, "select"));
        }
        int colPos = USER_PROPS_OFFSET;
        for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
            if (userPropertyHandler == null)
                continue;
            String propName = userPropertyHandler.getName();
            boolean visible = userManager.isMandatoryUserProperty(USER_PROPS_ID, userPropertyHandler);
            FlexiColumnModel col = new DefaultFlexiColumnModel(visible, userPropertyHandler.i18nColumnDescriptorLabelKey(), colPos, "select", true, propName);
            columnsModel.addFlexiColumnModel(col);
            colPos++;
        }
    }
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.score, new ScoreCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.answered));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.notAnswered));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.autoCorrected, new CorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.corrected, new CorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.notCorrected, new NotCorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.toReview, new ToReviewFlexiCellRenderer()));
    tableModel = new CorrectionIdentityTableModel(columnsModel, getLocale());
    tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, getTranslator(), formLayout);
    tableEl.setExportEnabled(true);
    tableEl.setMultiSelect(true);
    tableEl.setSelectAllEnable(true);
    saveTestsButton = uifactory.addFormLink("save.tests", formLayout, Link.BUTTON);
}
Also used : CorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.CorrectedFlexiCellRenderer) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) ScoreCellRenderer(org.olat.modules.assessment.ui.ScoreCellRenderer) ToReviewFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.ToReviewFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) FlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiColumnModel) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler)

Example 3 with NotCorrectedFlexiCellRenderer

use of org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer in project OpenOLAT by OpenOLAT.

the class CorrectionIdentityListController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    if (anonymous) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.user, "select"));
    } else {
        if (isAdministrativeUser) {
            columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.username, "select"));
        }
        int colPos = USER_PROPS_OFFSET;
        for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
            if (userPropertyHandler == null)
                continue;
            String propName = userPropertyHandler.getName();
            boolean visible = userManager.isMandatoryUserProperty(USER_PROPS_ID, userPropertyHandler);
            FlexiColumnModel col = new DefaultFlexiColumnModel(visible, userPropertyHandler.i18nColumnDescriptorLabelKey(), colPos, "select", true, propName);
            columnsModel.addFlexiColumnModel(col);
            colPos++;
        }
    }
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.score, new ScoreCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.answered));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.notAnswered));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.autoCorrected, new CorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.corrected, new CorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.notCorrected, new NotCorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCols.toReview, new ToReviewFlexiCellRenderer()));
    tableModel = new CorrectionIdentityTableModel(columnsModel, getLocale());
    tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, getTranslator(), formLayout);
    tableEl.setExportEnabled(true);
    tableEl.setMultiSelect(true);
    tableEl.setSelectAllEnable(true);
    saveTestsButton = uifactory.addFormLink("save.tests", formLayout, Link.BUTTON);
}
Also used : CorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.CorrectedFlexiCellRenderer) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) ScoreCellRenderer(org.olat.modules.assessment.ui.ScoreCellRenderer) ToReviewFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.ToReviewFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) FlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiColumnModel) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler)

Example 4 with NotCorrectedFlexiCellRenderer

use of org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer in project OpenOLAT by OpenOLAT.

the class CorrectionAssessmentItemListController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.section));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.itemTitle, "select"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false, ItemCols.itemKeywords, "select"));
    Translator qti21Translator = Util.createPackageTranslator(AssessmentTestComposerController.class, getLocale());
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.itemType, new QuestionTypeFlexiCellRenderer(qti21Translator)));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.answered, "answered"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.notAnswered, "notAnswered"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.autoCorrected, "autoCorrected", new AutoCorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.corrected, "corrected", new CorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.notCorrected, "notCorrected", new NotCorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(ItemCols.toReview, "toReview", new ToReviewFlexiCellRenderer()));
    DefaultFlexiColumnModel toolsCol = new DefaultFlexiColumnModel(ItemCols.tools);
    toolsCol.setAlwaysVisible(true);
    columnsModel.addFlexiColumnModel(toolsCol);
    tableModel = new CorrectionAssessmentItemTableModel(columnsModel, getLocale());
    tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, getTranslator(), formLayout);
    tableEl.setExportEnabled(true);
    tableEl.setAndLoadPersistedPreferences(ureq, "corr-assessment-item-list");
    saveTestsButton = uifactory.addFormLink("save.tests", formLayout, Link.BUTTON);
}
Also used : CorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.CorrectedFlexiCellRenderer) AutoCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.AutoCorrectedFlexiCellRenderer) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) Translator(org.olat.core.gui.translator.Translator) ToReviewFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.ToReviewFlexiCellRenderer) QuestionTypeFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.QuestionTypeFlexiCellRenderer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) AutoCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.AutoCorrectedFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Example 5 with NotCorrectedFlexiCellRenderer

use of org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer in project OpenOLAT by OpenOLAT.

the class CorrectionIdentityAssessmentItemListController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    stackPanel.addListener(this);
    if (formLayout instanceof FormLayoutContainer) {
        FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;
        layoutCont.contextPut("title", title);
    }
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.section));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.itemTitle, "select"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false, IdentityItemCols.itemKeywords, "select"));
    Translator qti21Translator = Util.createPackageTranslator(AssessmentTestComposerController.class, getLocale());
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.itemType, new QuestionTypeFlexiCellRenderer(qti21Translator)));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.score, new ScoreCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.answered, "answered"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.autoCorrected, "corrected", new AutoCorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.corrected, "corrected", new CorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.notCorrected, "notCorrected", new NotCorrectedFlexiCellRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityItemCols.toReview, "toReview", new ToReviewFlexiCellRenderer()));
    tableModel = new CorrectionIdentityAssessmentItemTableModel(columnsModel, getLocale());
    tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, getTranslator(), formLayout);
    tableEl.setExportEnabled(true);
    tableEl.setAndLoadPersistedPreferences(ureq, "corr-identity-assessment-item-list");
    if (saveEnabled) {
        uifactory.addFormCancelButton("cancel", formLayout, ureq, getWindowControl());
        saveButton = uifactory.addFormLink("save", formLayout, Link.BUTTON);
    }
}
Also used : CorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.CorrectedFlexiCellRenderer) AutoCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.AutoCorrectedFlexiCellRenderer) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) ScoreCellRenderer(org.olat.modules.assessment.ui.ScoreCellRenderer) Translator(org.olat.core.gui.translator.Translator) ToReviewFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.ToReviewFlexiCellRenderer) QuestionTypeFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.QuestionTypeFlexiCellRenderer) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) AutoCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.AutoCorrectedFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Aggregations

DefaultFlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)6 FlexiTableColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel)6 CorrectedFlexiCellRenderer (org.olat.ims.qti21.ui.assessment.components.CorrectedFlexiCellRenderer)6 NotCorrectedFlexiCellRenderer (org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer)6 ToReviewFlexiCellRenderer (org.olat.ims.qti21.ui.assessment.components.ToReviewFlexiCellRenderer)6 Translator (org.olat.core.gui.translator.Translator)4 AutoCorrectedFlexiCellRenderer (org.olat.ims.qti21.ui.assessment.components.AutoCorrectedFlexiCellRenderer)4 QuestionTypeFlexiCellRenderer (org.olat.ims.qti21.ui.assessment.components.QuestionTypeFlexiCellRenderer)4 ScoreCellRenderer (org.olat.modules.assessment.ui.ScoreCellRenderer)4 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)2 FlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiColumnModel)2 UserPropertyHandler (org.olat.user.propertyhandlers.UserPropertyHandler)2