Search in sources :

Example 51 with AssessmentManager

use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.

the class IQSELFCourseNode method createNodeRunConstructionResult.

/**
 * @see org.olat.course.nodes.CourseNode#createNodeRunConstructionResult(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.control.WindowControl,
 *      org.olat.course.run.userview.UserCourseEnvironment,
 *      org.olat.course.run.userview.NodeEvaluation)
 */
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller runController;
    ModuleConfiguration config = getModuleConfiguration();
    AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
    boolean onyx = IQEditController.CONFIG_VALUE_QTI2.equals(config.get(IQEditController.CONFIG_KEY_TYPE_QTI));
    if (onyx) {
        Translator trans = Util.createPackageTranslator(IQEditController.class, ureq.getLocale());
        runController = MessageUIFactory.createInfoMessage(ureq, wControl, "", trans.translate("error.onyx"));
    } else {
        RepositoryEntry testEntry = getReferencedRepositoryEntry();
        if (ImsQTI21Resource.TYPE_NAME.equals(testEntry.getOlatResource().getResourceableTypeName())) {
            runController = new QTI21AssessmentRunController(ureq, wControl, userCourseEnv, this);
        } else {
            IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
            runController = new IQRunController(userCourseEnv, getModuleConfiguration(), sec, ureq, wControl, this);
        }
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, runController, this, "o_iqself_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : QTI21AssessmentRunController(org.olat.course.nodes.iq.QTI21AssessmentRunController) ModuleConfiguration(org.olat.modules.ModuleConfiguration) CourseIQSecurityCallback(org.olat.course.nodes.iq.CourseIQSecurityCallback) IQRunController(org.olat.course.nodes.iq.IQRunController) Translator(org.olat.core.gui.translator.Translator) PackageTranslator(org.olat.core.gui.translator.PackageTranslator) AssessmentManager(org.olat.course.assessment.AssessmentManager) IQSecurityCallback(org.olat.modules.iq.IQSecurityCallback) CourseIQSecurityCallback(org.olat.course.nodes.iq.CourseIQSecurityCallback) RepositoryEntry(org.olat.repository.RepositoryEntry) QTI21AssessmentRunController(org.olat.course.nodes.iq.QTI21AssessmentRunController) IQEditController(org.olat.course.nodes.iq.IQEditController) NodeEditController(org.olat.course.editor.NodeEditController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) Controller(org.olat.core.gui.control.Controller) IQRunController(org.olat.course.nodes.iq.IQRunController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 52 with AssessmentManager

use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.

the class IQSELFCourseNode method getUserAttempts.

@Override
public Integer getUserAttempts(UserCourseEnvironment userCourseEnvironment) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    return am.getNodeAttempts(this, mySelf);
}
Also used : AssessmentManager(org.olat.course.assessment.AssessmentManager) Identity(org.olat.core.id.Identity)

Example 53 with AssessmentManager

use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.

the class IQTESTCourseNode method updateUserUserComment.

/**
 * @see org.olat.course.nodes.AssessableCourseNode#updateUserUserComment(java.lang.String,
 *      org.olat.course.run.userview.UserCourseEnvironment,
 *      org.olat.core.id.Identity)
 */
@Override
public void updateUserUserComment(String userComment, UserCourseEnvironment userCourseEnvironment, Identity coachingIdentity) {
    if (userComment != null) {
        AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
        Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
        am.saveNodeComment(this, coachingIdentity, mySelf, userComment);
    }
}
Also used : AssessmentManager(org.olat.course.assessment.AssessmentManager) Identity(org.olat.core.id.Identity)

Example 54 with AssessmentManager

use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.

the class IQTESTCourseNode method updateCurrentCompletion.

@Override
public void updateCurrentCompletion(UserCourseEnvironment userCourseEnvironment, Identity identity, Double currentCompletion, AssessmentRunStatus runStatus, Role doneBy) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity assessedIdentity = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    am.updateCurrentCompletion(this, assessedIdentity, userCourseEnvironment, currentCompletion, runStatus, doneBy);
}
Also used : AssessmentManager(org.olat.course.assessment.AssessmentManager) Identity(org.olat.core.id.Identity)

Example 55 with AssessmentManager

use of org.olat.course.assessment.AssessmentManager in project OpenOLAT by OpenOLAT.

the class IQTESTCourseNode method getUserAttempts.

/**
 * @see org.olat.course.nodes.AssessableCourseNode#getUserAttempts(org.olat.course.run.userview.UserCourseEnvironment)
 */
@Override
public Integer getUserAttempts(UserCourseEnvironment userCourseEnvironment) {
    AssessmentManager am = userCourseEnvironment.getCourseEnvironment().getAssessmentManager();
    Identity mySelf = userCourseEnvironment.getIdentityEnvironment().getIdentity();
    return am.getNodeAttempts(this, mySelf);
}
Also used : AssessmentManager(org.olat.course.assessment.AssessmentManager) Identity(org.olat.core.id.Identity)

Aggregations

AssessmentManager (org.olat.course.assessment.AssessmentManager)244 Identity (org.olat.core.id.Identity)208 ScoreEvaluation (org.olat.course.run.scoring.ScoreEvaluation)34 RepositoryEntry (org.olat.repository.RepositoryEntry)20 OLATResourceable (org.olat.core.id.OLATResourceable)14 ModuleConfiguration (org.olat.modules.ModuleConfiguration)14 AssessmentEntry (org.olat.modules.assessment.AssessmentEntry)12 UserCourseEnvironment (org.olat.course.run.userview.UserCourseEnvironment)10 Date (java.util.Date)8 Controller (org.olat.core.gui.control.Controller)8 Translator (org.olat.core.gui.translator.Translator)8 IdentityEnvironment (org.olat.core.id.IdentityEnvironment)8 ICourse (org.olat.course.ICourse)8 File (java.io.File)6 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)6 Roles (org.olat.core.id.Roles)6 NodeEditController (org.olat.course.editor.NodeEditController)6 CourseNode (org.olat.course.nodes.CourseNode)6 CheckboxManager (org.olat.course.nodes.cl.CheckboxManager)6 CourseIQSecurityCallback (org.olat.course.nodes.iq.CourseIQSecurityCallback)6