Search in sources :

Example 1 with QTI21AssessmentDetailsController

use of org.olat.ims.qti21.ui.QTI21AssessmentDetailsController in project OpenOLAT by OpenOLAT.

the class IQTESTCourseNode method getDetailsEditController.

/**
 * @see org.olat.course.nodes.AssessableCourseNode#getDetailsEditController(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.control.WindowControl,
 *      org.olat.course.run.userview.UserCourseEnvironment)
 */
@Override
public Controller getDetailsEditController(UserRequest ureq, WindowControl wControl, BreadcrumbPanel stackPanel, UserCourseEnvironment coachCourseEnv, UserCourseEnvironment assessedUserCourseEnv) {
    Controller detailsCtrl = null;
    RepositoryEntry ref = getReferencedRepositoryEntry();
    if (ref != null) {
        OLATResource resource = ref.getOlatResource();
        Long courseResourceableId = assessedUserCourseEnv.getCourseEnvironment().getCourseResourceableId();
        Identity assessedIdentity = assessedUserCourseEnv.getIdentityEnvironment().getIdentity();
        if (ImsQTI21Resource.TYPE_NAME.equals(resource.getResourceableTypeName())) {
            RepositoryEntry courseEntry = assessedUserCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
            detailsCtrl = new QTI21AssessmentDetailsController(ureq, wControl, (TooledStackedPanel) stackPanel, courseEntry, this, coachCourseEnv, assessedUserCourseEnv);
        } else if (OnyxModule.isOnyxTest(ref.getOlatResource())) {
            Translator trans = Util.createPackageTranslator(IQEditController.class, ureq.getLocale());
            detailsCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, "", trans.translate("error.onyx"));
        } else {
            detailsCtrl = new QTI12ResultDetailsController(ureq, wControl, courseResourceableId, getIdent(), coachCourseEnv, assessedIdentity, ref, AssessmentInstance.QMD_ENTRY_TYPE_ASSESS);
        }
    }
    return detailsCtrl;
}
Also used : QTI21AssessmentDetailsController(org.olat.ims.qti21.ui.QTI21AssessmentDetailsController) TooledStackedPanel(org.olat.core.gui.components.stack.TooledStackedPanel) Translator(org.olat.core.gui.translator.Translator) IQEditController(org.olat.course.nodes.iq.IQEditController) QTI12ResultDetailsController(org.olat.ims.qti.QTI12ResultDetailsController) OLATResource(org.olat.resource.OLATResource) RepositoryEntry(org.olat.repository.RepositoryEntry) QTI21AssessmentRunController(org.olat.course.nodes.iq.QTI21AssessmentRunController) IQIdentityListCourseNodeController(org.olat.course.nodes.iq.IQIdentityListCourseNodeController) IQRunController(org.olat.course.nodes.iq.IQRunController) QTI21AssessmentDetailsController(org.olat.ims.qti21.ui.QTI21AssessmentDetailsController) IQPreviewController(org.olat.course.nodes.iq.IQPreviewController) IQEditController(org.olat.course.nodes.iq.IQEditController) NodeEditController(org.olat.course.editor.NodeEditController) QTI12ResultDetailsController(org.olat.ims.qti.QTI12ResultDetailsController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) Controller(org.olat.core.gui.control.Controller) Identity(org.olat.core.id.Identity)

Example 2 with QTI21AssessmentDetailsController

use of org.olat.ims.qti21.ui.QTI21AssessmentDetailsController in project openolat by klemens.

the class IQTESTCourseNode method getDetailsEditController.

/**
 * @see org.olat.course.nodes.AssessableCourseNode#getDetailsEditController(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.control.WindowControl,
 *      org.olat.course.run.userview.UserCourseEnvironment)
 */
@Override
public Controller getDetailsEditController(UserRequest ureq, WindowControl wControl, BreadcrumbPanel stackPanel, UserCourseEnvironment coachCourseEnv, UserCourseEnvironment assessedUserCourseEnv) {
    Controller detailsCtrl = null;
    RepositoryEntry ref = getReferencedRepositoryEntry();
    if (ref != null) {
        OLATResource resource = ref.getOlatResource();
        Long courseResourceableId = assessedUserCourseEnv.getCourseEnvironment().getCourseResourceableId();
        Identity assessedIdentity = assessedUserCourseEnv.getIdentityEnvironment().getIdentity();
        if (ImsQTI21Resource.TYPE_NAME.equals(resource.getResourceableTypeName())) {
            RepositoryEntry courseEntry = assessedUserCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
            detailsCtrl = new QTI21AssessmentDetailsController(ureq, wControl, (TooledStackedPanel) stackPanel, courseEntry, this, coachCourseEnv, assessedUserCourseEnv);
        } else if (OnyxModule.isOnyxTest(ref.getOlatResource())) {
            Translator trans = Util.createPackageTranslator(IQEditController.class, ureq.getLocale());
            detailsCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, "", trans.translate("error.onyx"));
        } else {
            detailsCtrl = new QTI12ResultDetailsController(ureq, wControl, courseResourceableId, getIdent(), coachCourseEnv, assessedIdentity, ref, AssessmentInstance.QMD_ENTRY_TYPE_ASSESS);
        }
    }
    return detailsCtrl;
}
Also used : QTI21AssessmentDetailsController(org.olat.ims.qti21.ui.QTI21AssessmentDetailsController) TooledStackedPanel(org.olat.core.gui.components.stack.TooledStackedPanel) Translator(org.olat.core.gui.translator.Translator) IQEditController(org.olat.course.nodes.iq.IQEditController) QTI12ResultDetailsController(org.olat.ims.qti.QTI12ResultDetailsController) OLATResource(org.olat.resource.OLATResource) RepositoryEntry(org.olat.repository.RepositoryEntry) QTI21AssessmentRunController(org.olat.course.nodes.iq.QTI21AssessmentRunController) IQIdentityListCourseNodeController(org.olat.course.nodes.iq.IQIdentityListCourseNodeController) IQRunController(org.olat.course.nodes.iq.IQRunController) QTI21AssessmentDetailsController(org.olat.ims.qti21.ui.QTI21AssessmentDetailsController) IQPreviewController(org.olat.course.nodes.iq.IQPreviewController) IQEditController(org.olat.course.nodes.iq.IQEditController) NodeEditController(org.olat.course.editor.NodeEditController) QTI12ResultDetailsController(org.olat.ims.qti.QTI12ResultDetailsController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) Controller(org.olat.core.gui.control.Controller) Identity(org.olat.core.id.Identity)

Aggregations

TooledStackedPanel (org.olat.core.gui.components.stack.TooledStackedPanel)2 Controller (org.olat.core.gui.control.Controller)2 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)2 Translator (org.olat.core.gui.translator.Translator)2 Identity (org.olat.core.id.Identity)2 AssessmentCourseNodeController (org.olat.course.assessment.ui.tool.AssessmentCourseNodeController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 IQEditController (org.olat.course.nodes.iq.IQEditController)2 IQIdentityListCourseNodeController (org.olat.course.nodes.iq.IQIdentityListCourseNodeController)2 IQPreviewController (org.olat.course.nodes.iq.IQPreviewController)2 IQRunController (org.olat.course.nodes.iq.IQRunController)2 QTI21AssessmentRunController (org.olat.course.nodes.iq.QTI21AssessmentRunController)2 QTI12ResultDetailsController (org.olat.ims.qti.QTI12ResultDetailsController)2 QTI21AssessmentDetailsController (org.olat.ims.qti21.ui.QTI21AssessmentDetailsController)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 OLATResource (org.olat.resource.OLATResource)2