Search in sources :

Example 6 with HighScoreRunController

use of org.olat.course.highscore.ui.HighScoreRunController in project OpenOLAT by OpenOLAT.

the class PortfolioCourseNodeRunController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    infosContainer = FormLayoutContainer.createDefaultFormLayout("infos", getTranslator());
    formLayout.add(infosContainer);
    String assessmentPage = velocity_root + "/assessment_infos.html";
    assessmentInfosContainer = FormLayoutContainer.createCustomFormLayout("assessmentInfos", getTranslator(), assessmentPage);
    assessmentInfosContainer.setVisible(false);
    formLayout.add(assessmentInfosContainer);
    VelocityContainer mainVC = ((FormLayoutContainer) formLayout).getFormItemComponent();
    if (courseNode.getModuleConfiguration().getBooleanSafe(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD, false)) {
        HighScoreRunController highScoreCtr = new HighScoreRunController(ureq, getWindowControl(), userCourseEnv, courseNode, this.mainForm);
        if (highScoreCtr.isViewHighscore()) {
            Component highScoreComponent = highScoreCtr.getInitialComponent();
            mainVC.put("highScore", highScoreComponent);
        }
    }
    Object text = config.get(PortfolioCourseNodeConfiguration.NODE_TEXT);
    String explanation = (text instanceof String) ? (String) text : "";
    if (StringHelper.containsNonWhitespace(explanation)) {
        uifactory.addStaticTextElement("explanation.text", explanation, infosContainer);
    }
    String deadlineconfig = (String) config.get(PortfolioCourseNodeConfiguration.DEADLINE_TYPE);
    if (!DeadlineType.none.name().equals(deadlineconfig) && deadlineconfig != null) {
        // show deadline-config
        String deadLineLabel = "map.deadline." + deadlineconfig + ".label";
        String deadLineInfo = "";
        if (deadlineconfig.equals(DeadlineType.absolut.name())) {
            Formatter f = Formatter.getInstance(getLocale());
            deadLineInfo = f.formatDate((Date) config.get(PortfolioCourseNodeConfiguration.DEADLINE_DATE));
        } else {
            deadLineInfo = getDeadlineRelativeInfo();
        }
        deadlineDateText = uifactory.addStaticTextElement("deadline", deadLineLabel, deadLineInfo, infosContainer);
    }
    if (templateMap != null || templateBinder != null) {
        updateUI(ureq);
    }
}
Also used : Formatter(org.olat.core.util.Formatter) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) HighScoreRunController(org.olat.course.highscore.ui.HighScoreRunController) Component(org.olat.core.gui.components.Component) Date(java.util.Date) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Example 7 with HighScoreRunController

use of org.olat.course.highscore.ui.HighScoreRunController in project OpenOLAT by OpenOLAT.

the class GTACoachedGroupGradingController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    assessmentFormButton = uifactory.addFormLink("coach.assessment", "coach.assessment", null, formLayout, Link.BUTTON);
    assessmentFormButton.setCustomEnabledLinkCSS("btn btn-primary");
    assessmentFormButton.setIconLeftCSS("o_icon o_icon o_icon_submit");
    assessmentFormButton.setElementCssClass("o_sel_course_gta_assessment_button");
    assessmentFormButton.setVisible(!coachCourseEnv.isCourseReadOnly() && (assignedTask == null || assignedTask.getTaskStatus() != TaskProcess.graded));
    reopenButton = uifactory.addFormLink("coach.reopen", "coach.reopen", null, formLayout, Link.BUTTON);
    reopenButton.setElementCssClass("o_sel_course_gta_reopen_button");
    reopenButton.setVisible(!coachCourseEnv.isCourseReadOnly() && assignedTask != null && assignedTask.getTaskStatus() == TaskProcess.graded);
    if (formLayout instanceof FormLayoutContainer) {
        ModuleConfiguration config = gtaNode.getModuleConfiguration();
        FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD, config.get(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD));
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_HAS_PASSED_FIELD, config.get(MSCourseNode.CONFIG_KEY_HAS_PASSED_FIELD));
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE, AssessmentHelper.getRoundedScore(config.getFloatEntry(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE)));
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_SCORE_MIN, AssessmentHelper.getRoundedScore(config.getFloatEntry(MSCourseNode.CONFIG_KEY_SCORE_MIN)));
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_SCORE_MAX, AssessmentHelper.getRoundedScore(config.getFloatEntry(MSCourseNode.CONFIG_KEY_SCORE_MAX)));
        if (config.getBooleanSafe(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD, false)) {
            HighScoreRunController highScoreCtr = new HighScoreRunController(ureq, getWindowControl(), coachCourseEnv, gtaNode);
            if (highScoreCtr.isViewHighscore()) {
                Component highScoreComponent = highScoreCtr.getInitialComponent();
                layoutCont.put("highScore", highScoreComponent);
            }
        }
    }
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    if (isAdministrativeUser) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.username.i18nKey(), Cols.username.ordinal()));
    }
    int i = 0;
    for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
        int colIndex = GTACoachedGroupGradingController.USER_PROPS_OFFSET + i++;
        if (userPropertyHandler == null)
            continue;
        String propName = userPropertyHandler.getName();
        boolean visible = userManager.isMandatoryUserProperty(GTACoachedGroupGradingController.USER_PROPS_ID, userPropertyHandler);
        if (visible) {
            FlexiColumnModel col;
            if (UserConstants.FIRSTNAME.equals(propName) || UserConstants.LASTNAME.equals(propName)) {
                col = new DefaultFlexiColumnModel(userPropertyHandler.i18nColumnDescriptorLabelKey(), colIndex, userPropertyHandler.getName(), true, propName, new StaticFlexiCellRenderer(userPropertyHandler.getName(), new TextFlexiCellRenderer()));
            } else {
                col = new DefaultFlexiColumnModel(true, userPropertyHandler.i18nColumnDescriptorLabelKey(), colIndex, true, propName);
            }
            columnsModel.addFlexiColumnModel(col);
        }
    }
    if (withPassed) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.passedVal.i18nKey(), Cols.passedVal.ordinal(), new PassedCellRenderer()));
    }
    if (withScore) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.scoreVal.i18nKey(), Cols.scoreVal.ordinal()));
    }
    if (withComment) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.commentVal.i18nKey(), Cols.commentVal.ordinal()));
    }
    model = new GroupAssessmentModel(gtaNode, userPropertyHandlers, getLocale(), columnsModel);
    table = uifactory.addTableElement(getWindowControl(), "group-list", model, getTranslator(), formLayout);
    table.setCustomizeColumns(true);
    table.setAndLoadPersistedPreferences(ureq, "gtagroup-assessment");
}
Also used : ModuleConfiguration(org.olat.modules.ModuleConfiguration) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) FlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiColumnModel) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) HighScoreRunController(org.olat.course.highscore.ui.HighScoreRunController) StaticFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) TextFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer) Component(org.olat.core.gui.components.Component) PassedCellRenderer(org.olat.course.assessment.bulk.PassedCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler)

Example 8 with HighScoreRunController

use of org.olat.course.highscore.ui.HighScoreRunController in project OpenOLAT by OpenOLAT.

the class LTIRunController method doRun.

/**
 * Helper to initialize the LTI run view after user has accepted data exchange.
 * @param ureq
 */
private void doRun(UserRequest ureq) {
    if (display == LTIDisplayOptions.window) {
        // Use other container for popup opening. Rest of code is the same
        run = createVelocityContainer("runPopup");
    } else if (display == LTIDisplayOptions.fullscreen) {
        run = createVelocityContainer("run");
        back = LinkFactory.createLinkBack(run, this);
        run.put("back", back);
    } else {
        run = createVelocityContainer("run");
    }
    // push title and learning objectives, only visible on intro page
    run.contextPut("menuTitle", courseNode.getShortTitle());
    run.contextPut("displayTitle", courseNode.getLongTitle());
    startPage = createVelocityContainer("overview");
    startPage.contextPut("menuTitle", courseNode.getShortTitle());
    startPage.contextPut("displayTitle", courseNode.getLongTitle());
    if (courseNode.getModuleConfiguration().getBooleanSafe(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD, false)) {
        HighScoreRunController highScoreCtr = new HighScoreRunController(ureq, getWindowControl(), userCourseEnv, courseNode);
        if (highScoreCtr.isViewHighscore()) {
            Component highScoreComponent = highScoreCtr.getInitialComponent();
            startPage.put("highScore", highScoreComponent);
        }
    }
    startButton = LinkFactory.createButton("start", startPage, this);
    startButton.setPrimary(true);
    Boolean assessable = config.getBooleanEntry(BasicLTICourseNode.CONFIG_KEY_HAS_SCORE_FIELD);
    if (assessable != null && assessable.booleanValue()) {
        startPage.contextPut("isassessable", assessable);
        Integer attempts = courseNode.getUserAttempts(userCourseEnv);
        startPage.contextPut("attempts", attempts);
        ScoreEvaluation eval = courseNode.getUserScoreEvaluation(userCourseEnv);
        Float cutValue = config.getFloatEntry(BasicLTICourseNode.CONFIG_KEY_PASSED_CUT_VALUE);
        if (cutValue != null) {
            startPage.contextPut("hasPassedValue", Boolean.TRUE);
            startPage.contextPut("passed", eval.getPassed());
        }
        startPage.contextPut("score", eval.getScore());
        startPage.contextPut("hasScore", Boolean.TRUE);
        boolean resultsVisible = eval.getUserVisible() == null || eval.getUserVisible().booleanValue();
        startPage.contextPut("resultsVisible", resultsVisible);
        mainPanel.setContent(startPage);
    }
    // only run when user as already accepted to data exchange or no data
    // has to be exchanged or when it is configured to not show the accept
    // dialog,
    createExchangeDataProperties();
    String dataExchangeHash = createHashFromExchangeDataProperties();
    Boolean skipAcceptLaunchPage = config.getBooleanEntry(BasicLTICourseNode.CONFIG_SKIP_ACCEPT_LAUNCH_PAGE);
    if (dataExchangeHash == null || checkHasDataExchangeAccepted(dataExchangeHash) || (skipAcceptLaunchPage != null && skipAcceptLaunchPage.booleanValue())) {
        Boolean skipLaunchPage = config.getBooleanEntry(BasicLTICourseNode.CONFIG_SKIP_LAUNCH_PAGE);
        if (skipLaunchPage != null && skipLaunchPage.booleanValue()) {
            // start the content immediately
            openBasicLTIContent(ureq);
        } else {
            // or show the start button
            mainPanel.setContent(startPage);
        }
    } else {
        doAskDataExchange();
    }
}
Also used : ScoreEvaluation(org.olat.course.run.scoring.ScoreEvaluation) HighScoreRunController(org.olat.course.highscore.ui.HighScoreRunController) Component(org.olat.core.gui.components.Component)

Example 9 with HighScoreRunController

use of org.olat.course.highscore.ui.HighScoreRunController in project openolat by klemens.

the class QTI21AssessmentRunController method initAssessment.

private void initAssessment(UserRequest ureq) {
    // config : show score info
    boolean enableScoreInfo = config.getBooleanSafe(IQEditController.CONFIG_KEY_ENABLESCOREINFO);
    mainVC.contextPut("enableScoreInfo", Boolean.valueOf(enableScoreInfo));
    // configuration data
    int maxAttempts = deliveryOptions.getMaxAttempts();
    if (maxAttempts > 0) {
        mainVC.contextPut("attemptsConfig", Integer.valueOf(maxAttempts));
    } else {
        mainVC.contextPut("attemptsConfig", Boolean.FALSE);
    }
    // configure date period
    mainVC.contextPut("blockDate", Boolean.valueOf(blockedBasedOnDate()));
    // time limit
    Long timeLimit = getAssessmentTestMaxTimeLimit();
    if (timeLimit != null) {
        mainVC.contextPut("timeLimit", Formatter.formatHourAndSeconds(timeLimit.longValue() * 1000l));
    }
    if (courseNode instanceof AssessableCourseNode) {
        AssessableCourseNode assessableCourseNode = (AssessableCourseNode) courseNode;
        if (assessableCourseNode.hasScoreConfigured() || userCourseEnv.isCoach()) {
            HighScoreRunController highScoreCtr = new HighScoreRunController(ureq, getWindowControl(), userCourseEnv, courseNode);
            if (highScoreCtr.isViewHighscore()) {
                Component highScoreComponent = highScoreCtr.getInitialComponent();
                mainVC.put("highScore", highScoreComponent);
            }
        }
    }
    // user data
    if (courseNode instanceof SelfAssessableCourseNode) {
        SelfAssessableCourseNode acn = (SelfAssessableCourseNode) courseNode;
        ScoreEvaluation scoreEval = acn.getUserScoreEvaluation(userCourseEnv);
        Integer attempts = acn.getUserAttempts(userCourseEnv);
        if (scoreEval != null) {
            mainVC.contextPut("resultsVisible", Boolean.TRUE);
            mainVC.contextPut("hasResults", Boolean.TRUE);
            mainVC.contextPut("score", AssessmentHelper.getRoundedScore(scoreEval.getScore()));
            mainVC.contextPut("hasPassedValue", (scoreEval.getPassed() == null ? Boolean.FALSE : Boolean.TRUE));
            mainVC.contextPut("passed", scoreEval.getPassed());
            // at least one attempt
            mainVC.contextPut("attempts", attempts);
            mainVC.contextPut("showChangeLog", Boolean.TRUE && enableScoreInfo);
            exposeResults(ureq, true);
        } else {
            exposeResults(ureq, false);
        }
    } else if (courseNode instanceof IQTESTCourseNode) {
        IQTESTCourseNode testCourseNode = (IQTESTCourseNode) courseNode;
        AssessmentEntry assessmentEntry = testCourseNode.getUserAssessmentEntry(userCourseEnv);
        if (assessmentEntry == null) {
            mainVC.contextPut("blockAfterSuccess", Boolean.FALSE);
            mainVC.contextPut("score", null);
            mainVC.contextPut("hasPassedValue", Boolean.FALSE);
            mainVC.contextPut("passed", Boolean.FALSE);
            mainVC.contextPut("comment", null);
            mainVC.contextPut("attempts", 0);
            mainVC.contextPut("showChangeLog", Boolean.FALSE);
        } else {
            Boolean passed = assessmentEntry.getPassed();
            // block if test passed (and config set to check it)
            Boolean blocked = Boolean.FALSE;
            boolean blockAfterSuccess = deliveryOptions.isBlockAfterSuccess();
            if (blockAfterSuccess && passed != null && passed.booleanValue()) {
                blocked = Boolean.TRUE;
            }
            mainVC.contextPut("blockAfterSuccess", blocked);
            boolean resultsVisible = assessmentEntry.getUserVisibility() == null || assessmentEntry.getUserVisibility().booleanValue();
            mainVC.contextPut("resultsVisible", resultsVisible);
            mainVC.contextPut("score", AssessmentHelper.getRoundedScore(assessmentEntry.getScore()));
            mainVC.contextPut("hasPassedValue", (passed == null ? Boolean.FALSE : Boolean.TRUE));
            mainVC.contextPut("passed", passed);
            if (resultsVisible) {
                if (testCourseNode.hasCommentConfigured()) {
                    StringBuilder comment = Formatter.stripTabsAndReturns(testCourseNode.getUserUserComment(userCourseEnv));
                    if (comment != null && comment.length() > 0) {
                        mainVC.contextPut("comment", StringHelper.xssScan(comment));
                        mainVC.contextPut("in-comment", isPanelOpen(ureq, "comment", true));
                    }
                }
                if (testCourseNode.hasIndividualAsssessmentDocuments()) {
                    List<File> docs = testCourseNode.getIndividualAssessmentDocuments(userCourseEnv);
                    String mapperUri = registerCacheableMapper(ureq, null, new DocumentsMapper(docs));
                    mainVC.contextPut("docsMapperUri", mapperUri);
                    mainVC.contextPut("docs", docs);
                    mainVC.contextPut("in-assessmentDocuments", isPanelOpen(ureq, "assessmentDocuments", true));
                }
            }
            Integer attempts = assessmentEntry.getAttempts();
            mainVC.contextPut("attempts", attempts == null ? new Integer(0) : attempts);
            boolean showChangelog = (!anonym && enableScoreInfo && resultsVisible && isResultVisible(config));
            mainVC.contextPut("showChangeLog", showChangelog);
            if (deliveryOptions.isDigitalSignature()) {
                AssessmentTestSession session = qtiService.getAssessmentTestSession(assessmentEntry.getAssessmentId());
                if (session != null) {
                    File signature = qtiService.getAssessmentResultSignature(session);
                    if (signature != null && signature.exists()) {
                        signatureDownloadLink = LinkFactory.createLink("digital.signature.download.link", mainVC, this);
                        signatureDownloadLink.setIconLeftCSS("o_icon o_icon-fw o_icon_download");
                        signatureDownloadLink.setTarget("_blank");
                        Date issueDate = qtiService.getAssessmentResultSignatureIssueDate(session);
                        if (issueDate != null) {
                            mainVC.contextPut("signatureIssueDate", Formatter.getInstance(getLocale()).formatDateAndTime(issueDate));
                        }
                    }
                }
            }
            exposeResults(ureq, resultsVisible);
        }
    }
}
Also used : AssessmentTestSession(org.olat.ims.qti21.AssessmentTestSession) ScoreEvaluation(org.olat.course.run.scoring.ScoreEvaluation) HighScoreRunController(org.olat.course.highscore.ui.HighScoreRunController) DocumentsMapper(org.olat.course.nodes.ms.DocumentsMapper) AssessmentEntry(org.olat.modules.assessment.AssessmentEntry) Date(java.util.Date) AssessableCourseNode(org.olat.course.nodes.AssessableCourseNode) SelfAssessableCourseNode(org.olat.course.nodes.SelfAssessableCourseNode) IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) List(java.util.List) Component(org.olat.core.gui.components.Component) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) File(java.io.File) SelfAssessableCourseNode(org.olat.course.nodes.SelfAssessableCourseNode)

Example 10 with HighScoreRunController

use of org.olat.course.highscore.ui.HighScoreRunController in project openolat by klemens.

the class GTACoachedGroupGradingController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    assessmentFormButton = uifactory.addFormLink("coach.assessment", "coach.assessment", null, formLayout, Link.BUTTON);
    assessmentFormButton.setCustomEnabledLinkCSS("btn btn-primary");
    assessmentFormButton.setIconLeftCSS("o_icon o_icon o_icon_submit");
    assessmentFormButton.setElementCssClass("o_sel_course_gta_assessment_button");
    assessmentFormButton.setVisible(!coachCourseEnv.isCourseReadOnly() && (assignedTask == null || assignedTask.getTaskStatus() != TaskProcess.graded));
    reopenButton = uifactory.addFormLink("coach.reopen", "coach.reopen", null, formLayout, Link.BUTTON);
    reopenButton.setElementCssClass("o_sel_course_gta_reopen_button");
    reopenButton.setVisible(!coachCourseEnv.isCourseReadOnly() && assignedTask != null && assignedTask.getTaskStatus() == TaskProcess.graded);
    if (formLayout instanceof FormLayoutContainer) {
        ModuleConfiguration config = gtaNode.getModuleConfiguration();
        FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD, config.get(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD));
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_HAS_PASSED_FIELD, config.get(MSCourseNode.CONFIG_KEY_HAS_PASSED_FIELD));
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE, AssessmentHelper.getRoundedScore(config.getFloatEntry(MSCourseNode.CONFIG_KEY_PASSED_CUT_VALUE)));
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_SCORE_MIN, AssessmentHelper.getRoundedScore(config.getFloatEntry(MSCourseNode.CONFIG_KEY_SCORE_MIN)));
        layoutCont.contextPut(MSCourseNode.CONFIG_KEY_SCORE_MAX, AssessmentHelper.getRoundedScore(config.getFloatEntry(MSCourseNode.CONFIG_KEY_SCORE_MAX)));
        if (config.getBooleanSafe(MSCourseNode.CONFIG_KEY_HAS_SCORE_FIELD, false)) {
            HighScoreRunController highScoreCtr = new HighScoreRunController(ureq, getWindowControl(), coachCourseEnv, gtaNode);
            if (highScoreCtr.isViewHighscore()) {
                Component highScoreComponent = highScoreCtr.getInitialComponent();
                layoutCont.put("highScore", highScoreComponent);
            }
        }
    }
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    if (isAdministrativeUser) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.username.i18nKey(), Cols.username.ordinal()));
    }
    int i = 0;
    for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
        int colIndex = GTACoachedGroupGradingController.USER_PROPS_OFFSET + i++;
        if (userPropertyHandler == null)
            continue;
        String propName = userPropertyHandler.getName();
        boolean visible = userManager.isMandatoryUserProperty(GTACoachedGroupGradingController.USER_PROPS_ID, userPropertyHandler);
        if (visible) {
            FlexiColumnModel col;
            if (UserConstants.FIRSTNAME.equals(propName) || UserConstants.LASTNAME.equals(propName)) {
                col = new DefaultFlexiColumnModel(userPropertyHandler.i18nColumnDescriptorLabelKey(), colIndex, userPropertyHandler.getName(), true, propName, new StaticFlexiCellRenderer(userPropertyHandler.getName(), new TextFlexiCellRenderer()));
            } else {
                col = new DefaultFlexiColumnModel(true, userPropertyHandler.i18nColumnDescriptorLabelKey(), colIndex, true, propName);
            }
            columnsModel.addFlexiColumnModel(col);
        }
    }
    if (withPassed) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.passedVal.i18nKey(), Cols.passedVal.ordinal(), new PassedCellRenderer()));
    }
    if (withScore) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.scoreVal.i18nKey(), Cols.scoreVal.ordinal()));
    }
    if (withComment) {
        columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.commentVal.i18nKey(), Cols.commentVal.ordinal()));
    }
    model = new GroupAssessmentModel(gtaNode, userPropertyHandlers, getLocale(), columnsModel);
    table = uifactory.addTableElement(getWindowControl(), "group-list", model, getTranslator(), formLayout);
    table.setCustomizeColumns(true);
    table.setAndLoadPersistedPreferences(ureq, "gtagroup-assessment");
}
Also used : ModuleConfiguration(org.olat.modules.ModuleConfiguration) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) FlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiColumnModel) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) HighScoreRunController(org.olat.course.highscore.ui.HighScoreRunController) StaticFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) TextFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer) Component(org.olat.core.gui.components.Component) PassedCellRenderer(org.olat.course.assessment.bulk.PassedCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler)

Aggregations

Component (org.olat.core.gui.components.Component)12 HighScoreRunController (org.olat.course.highscore.ui.HighScoreRunController)12 Date (java.util.Date)6 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)6 ScoreEvaluation (org.olat.course.run.scoring.ScoreEvaluation)6 File (java.io.File)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 List (java.util.List)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 DefaultFlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)2 FlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiColumnModel)2 FlexiTableColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel)2 StaticFlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer)2 TextFlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer)2 VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)2 SyntheticUserRequest (org.olat.core.gui.util.SyntheticUserRequest)2 Formatter (org.olat.core.util.Formatter)2 PassedCellRenderer (org.olat.course.assessment.bulk.PassedCellRenderer)2 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)2