Search in sources :

Example 6 with TestFileResource

use of org.olat.ims.qti.fileresource.TestFileResource in project openolat by klemens.

the class QTITestHandler method createEditorController.

@Override
public Controller createEditorController(RepositoryEntry re, UserRequest ureq, WindowControl wControl, TooledStackedPanel toolbar) {
    OLATResource res = re.getOlatResource();
    if (OnyxModule.isOnyxTest(res)) {
        return null;
    }
    TestFileResource fr = new TestFileResource();
    fr.overrideResourceableId(res.getResourceableId());
    // check if we can edit in restricted mode -> only typos
    List<Reference> referencees = CoreSpringFactory.getImpl(ReferenceManager.class).getReferencesTo(res);
    QTIEditorMainController editor = new QTIEditorMainController(ureq, wControl, re, referencees, fr);
    if (editor.isLockedSuccessfully()) {
        return editor;
    } else {
        return null;
    }
}
Also used : QTIEditorMainController(org.olat.ims.qti.editor.QTIEditorMainController) Reference(org.olat.resource.references.Reference) OLATResource(org.olat.resource.OLATResource) TestFileResource(org.olat.ims.qti.fileresource.TestFileResource) ReferenceManager(org.olat.resource.references.ReferenceManager)

Aggregations

TestFileResource (org.olat.ims.qti.fileresource.TestFileResource)6 Translator (org.olat.core.gui.translator.Translator)4 OLATResource (org.olat.resource.OLATResource)4 TransientIdentity (org.olat.admin.user.imp.TransientIdentity)2 Controller (org.olat.core.gui.control.Controller)2 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)2 Roles (org.olat.core.id.Roles)2 OLATRuntimeException (org.olat.core.logging.OLATRuntimeException)2 AssessmentManager (org.olat.course.assessment.AssessmentManager)2 AssessmentCourseNodeController (org.olat.course.assessment.ui.tool.AssessmentCourseNodeController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 CourseIQSecurityCallback (org.olat.course.nodes.iq.CourseIQSecurityCallback)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 NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)2 QTI12ResultDetailsController (org.olat.ims.qti.QTI12ResultDetailsController)2 QTIEditorMainController (org.olat.ims.qti.editor.QTIEditorMainController)2