Search in sources :

Example 6 with AssessmentNodeData

use of org.olat.course.assessment.model.AssessmentNodeData in project openolat by klemens.

the class AssessmentHelper method getAssessmentNodeDataList.

/**
 * Add all assessable nodes and the scoring data to a list. Each item in the list is an object array
 * that has the following data:
 * @param recursionLevel
 * @param courseNode
 * @param userCourseEnv
 * @param discardEmptyNodes
 * @param discardComments
 * @return list of object arrays or null if empty
 */
public static List<AssessmentNodeData> getAssessmentNodeDataList(UserCourseEnvironment userCourseEnv, AssessmentNodesLastModified lastModifications, boolean followUserVisibility, boolean discardEmptyNodes, boolean discardComments) {
    List<AssessmentNodeData> data = new ArrayList<AssessmentNodeData>(50);
    ScoreAccounting scoreAccounting = userCourseEnv.getScoreAccounting();
    scoreAccounting.evaluateAll();
    getAssessmentNodeDataList(0, userCourseEnv.getCourseEnvironment().getRunStructure().getRootNode(), scoreAccounting, userCourseEnv, followUserVisibility, discardEmptyNodes, discardComments, data, lastModifications);
    return data;
}
Also used : ArrayList(java.util.ArrayList) ScoreAccounting(org.olat.course.run.scoring.ScoreAccounting) AssessmentNodeData(org.olat.course.assessment.model.AssessmentNodeData)

Example 7 with AssessmentNodeData

use of org.olat.course.assessment.model.AssessmentNodeData in project openolat by klemens.

the class IdentityAssessmentOverviewController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            AssessmentNodeData nodeData = tableModel.getObject(se.getIndex());
            if (CMD_SELECT_NODE.equals(cmd)) {
                CourseNode node = runStructure.getNode(nodeData.getIdent());
                selectedCourseNode = (AssessableCourseNode) node;
                fireEvent(ureq, EVENT_NODE_SELECTED);
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) AssessableCourseNode(org.olat.course.nodes.AssessableCourseNode) CourseNode(org.olat.course.nodes.CourseNode) AssessmentNodeData(org.olat.course.assessment.model.AssessmentNodeData)

Example 8 with AssessmentNodeData

use of org.olat.course.assessment.model.AssessmentNodeData in project openolat by klemens.

the class CertificateAndEfficiencyStatementController method selectCourseInfos.

private void selectCourseInfos(UserRequest ureq) {
    if (courseDetailsCtrl == null) {
        List<Map<String, Object>> assessmentNodes = efficiencyStatement.getAssessmentNodes();
        List<AssessmentNodeData> assessmentNodeList = AssessmentHelper.assessmentNodeDataMapToList(assessmentNodes);
        courseDetailsCtrl = new IdentityAssessmentOverviewController(ureq, getWindowControl(), assessmentNodeList);
        listenTo(courseDetailsCtrl);
    }
    mainVC.put("segmentCmp", courseDetailsCtrl.getInitialComponent());
}
Also used : IdentityAssessmentOverviewController(org.olat.course.assessment.ui.tool.IdentityAssessmentOverviewController) Map(java.util.Map) AssessmentNodeData(org.olat.course.assessment.model.AssessmentNodeData)

Example 9 with AssessmentNodeData

use of org.olat.course.assessment.model.AssessmentNodeData in project openolat by klemens.

the class SelectTestOrSurveyController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            AssessmentNodeData data = tableModel.getObject(se.getIndex());
            archiver.setData(data);
            if (validateFormLogic(ureq)) {
                fireEvent(ureq, new SelectTestOrSurveyEvent(archiver, data));
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) AssessmentNodeData(org.olat.course.assessment.model.AssessmentNodeData)

Example 10 with AssessmentNodeData

use of org.olat.course.assessment.model.AssessmentNodeData in project OpenOLAT by OpenOLAT.

the class CertificateAndEfficiencyStatementController method selectCourseInfos.

private void selectCourseInfos(UserRequest ureq) {
    if (courseDetailsCtrl == null) {
        List<Map<String, Object>> assessmentNodes = efficiencyStatement.getAssessmentNodes();
        List<AssessmentNodeData> assessmentNodeList = AssessmentHelper.assessmentNodeDataMapToList(assessmentNodes);
        courseDetailsCtrl = new IdentityAssessmentOverviewController(ureq, getWindowControl(), assessmentNodeList);
        listenTo(courseDetailsCtrl);
    }
    mainVC.put("segmentCmp", courseDetailsCtrl.getInitialComponent());
}
Also used : IdentityAssessmentOverviewController(org.olat.course.assessment.ui.tool.IdentityAssessmentOverviewController) Map(java.util.Map) AssessmentNodeData(org.olat.course.assessment.model.AssessmentNodeData)

Aggregations

AssessmentNodeData (org.olat.course.assessment.model.AssessmentNodeData)22 CourseNode (org.olat.course.nodes.CourseNode)14 ArrayList (java.util.ArrayList)8 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)6 TACourseNode (org.olat.course.nodes.TACourseNode)6 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)4 ICourse (org.olat.course.ICourse)4 AssessmentNodesLastModified (org.olat.course.assessment.model.AssessmentNodesLastModified)4 ScoreAccounting (org.olat.course.run.scoring.ScoreAccounting)4 BigDecimal (java.math.BigDecimal)2 Date (java.util.Date)2 Map (java.util.Map)2 CustomRenderColumnDescriptor (org.olat.core.gui.components.table.CustomRenderColumnDescriptor)2 DefaultColumnDescriptor (org.olat.core.gui.components.table.DefaultColumnDescriptor)2 TableController (org.olat.core.gui.components.table.TableController)2 TableEvent (org.olat.core.gui.components.table.TableEvent)2 TableGuiConfiguration (org.olat.core.gui.components.table.TableGuiConfiguration)2 Identity (org.olat.core.id.Identity)2 AssessmentChangedEvent (org.olat.course.assessment.AssessmentChangedEvent)2 IndentedNodeRenderer (org.olat.course.assessment.IndentedNodeRenderer)2