use of org.olat.modules.portfolio.ui.renderer.PassedCellRenderer in project OpenOLAT by OpenOLAT.
the class BinderAssessmentController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.sectionName));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.numOfPages));
if (withPassed) {
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.passed, new PassedCellRenderer()));
}
if (withScore) {
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.score, new ScoreCellRenderer()));
}
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.changeStatus, new SectionStatusCellRenderer(getTranslator())));
model = new BinderAssessmentDataModel(columnsModel);
tableEl = uifactory.addTableElement(getWindowControl(), "section-list", model, getTranslator(), formLayout);
tableEl.setCustomizeColumns(true);
tableEl.setEditMode(true);
tableEl.setAndLoadPersistedPreferences(ureq, "section-assessment");
FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator());
formLayout.add(buttonsCont);
saveButton = uifactory.addFormSubmitButton("save", buttonsCont);
saveButton.setElementCssClass("o_sel_pf_assessment_save");
saveAndDoneLink = uifactory.addFormLink("save.done", buttonsCont, Link.BUTTON);
saveAndDoneLink.setElementCssClass("o_sel_pf_assessment_save_done");
reopenLink = uifactory.addFormLink("reopen.binder", buttonsCont, Link.BUTTON);
reopenLink.setElementCssClass("o_sel_pf_assessment_reopen");
cancelButton = uifactory.addFormCancelButton("cancel", buttonsCont, ureq, getWindowControl());
}
use of org.olat.modules.portfolio.ui.renderer.PassedCellRenderer in project openolat by klemens.
the class BinderAssessmentController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.sectionName));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.numOfPages));
if (withPassed) {
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.passed, new PassedCellRenderer()));
}
if (withScore) {
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.score, new ScoreCellRenderer()));
}
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(AssessmentSectionCols.changeStatus, new SectionStatusCellRenderer(getTranslator())));
model = new BinderAssessmentDataModel(columnsModel);
tableEl = uifactory.addTableElement(getWindowControl(), "section-list", model, getTranslator(), formLayout);
tableEl.setCustomizeColumns(true);
tableEl.setEditMode(true);
tableEl.setAndLoadPersistedPreferences(ureq, "section-assessment");
FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator());
formLayout.add(buttonsCont);
saveButton = uifactory.addFormSubmitButton("save", buttonsCont);
saveButton.setElementCssClass("o_sel_pf_assessment_save");
saveAndDoneLink = uifactory.addFormLink("save.done", buttonsCont, Link.BUTTON);
saveAndDoneLink.setElementCssClass("o_sel_pf_assessment_save_done");
reopenLink = uifactory.addFormLink("reopen.binder", buttonsCont, Link.BUTTON);
reopenLink.setElementCssClass("o_sel_pf_assessment_reopen");
cancelButton = uifactory.addFormCancelButton("cancel", buttonsCont, ureq, getWindowControl());
}
Aggregations