Search in sources :

Example 1 with ClassPathResourceLocator

use of uk.ac.ed.ph.jqtiplus.xmlutils.locators.ClassPathResourceLocator in project OpenOLAT by OpenOLAT.

the class QTI21ServiceImpl method afterPropertiesSet.

@Override
public void afterPropertiesSet() throws Exception {
    final List<JqtiExtensionPackage<?>> extensionPackages = new ArrayList<JqtiExtensionPackage<?>>();
    /* Enable MathAssess extensions if requested */
    if (qtiModule.isMathAssessExtensionEnabled()) {
        log.info("Enabling the MathAssess extensions");
        extensionPackages.add(new MathAssessExtensionPackage(xsltStylesheetCache));
        extensionPackages.add(new OpenOLATExtensionPackage(xsltStylesheetCache));
    }
    jqtiExtensionManager = new JqtiExtensionManager(extensionPackages);
    xsltStylesheetManager = new XsltStylesheetManager(new ClassPathResourceLocator(), xsltStylesheetCache);
    jqtiExtensionManager.init();
    Cacher cacher = coordinatorManager.getInstance().getCoordinator().getCacher();
    assessmentTestsCache = cacher.getCache("QTIWorks", "assessmentTests");
    assessmentItemsCache = cacher.getCache("QTIWorks", "assessmentItems");
}
Also used : JqtiExtensionManager(uk.ac.ed.ph.jqtiplus.JqtiExtensionManager) JqtiExtensionPackage(uk.ac.ed.ph.jqtiplus.JqtiExtensionPackage) ArrayList(java.util.ArrayList) MathAssessExtensionPackage(uk.ac.ed.ph.qtiworks.mathassess.MathAssessExtensionPackage) ClassPathResourceLocator(uk.ac.ed.ph.jqtiplus.xmlutils.locators.ClassPathResourceLocator) Cacher(org.olat.core.util.coordinate.Cacher) XsltStylesheetManager(uk.ac.ed.ph.jqtiplus.xmlutils.xslt.XsltStylesheetManager)

Example 2 with ClassPathResourceLocator

use of uk.ac.ed.ph.jqtiplus.xmlutils.locators.ClassPathResourceLocator in project openolat by klemens.

the class QTI21ServiceImpl method afterPropertiesSet.

@Override
public void afterPropertiesSet() throws Exception {
    final List<JqtiExtensionPackage<?>> extensionPackages = new ArrayList<JqtiExtensionPackage<?>>();
    /* Enable MathAssess extensions if requested */
    if (qtiModule.isMathAssessExtensionEnabled()) {
        log.info("Enabling the MathAssess extensions");
        extensionPackages.add(new MathAssessExtensionPackage(xsltStylesheetCache));
        extensionPackages.add(new OpenOLATExtensionPackage(xsltStylesheetCache));
    }
    jqtiExtensionManager = new JqtiExtensionManager(extensionPackages);
    xsltStylesheetManager = new XsltStylesheetManager(new ClassPathResourceLocator(), xsltStylesheetCache);
    jqtiExtensionManager.init();
    Cacher cacher = coordinatorManager.getInstance().getCoordinator().getCacher();
    assessmentTestsCache = cacher.getCache("QTIWorks", "assessmentTests");
    assessmentItemsCache = cacher.getCache("QTIWorks", "assessmentItems");
}
Also used : JqtiExtensionManager(uk.ac.ed.ph.jqtiplus.JqtiExtensionManager) JqtiExtensionPackage(uk.ac.ed.ph.jqtiplus.JqtiExtensionPackage) ArrayList(java.util.ArrayList) MathAssessExtensionPackage(uk.ac.ed.ph.qtiworks.mathassess.MathAssessExtensionPackage) ClassPathResourceLocator(uk.ac.ed.ph.jqtiplus.xmlutils.locators.ClassPathResourceLocator) Cacher(org.olat.core.util.coordinate.Cacher) XsltStylesheetManager(uk.ac.ed.ph.jqtiplus.xmlutils.xslt.XsltStylesheetManager)

Aggregations

ArrayList (java.util.ArrayList)2 Cacher (org.olat.core.util.coordinate.Cacher)2 JqtiExtensionManager (uk.ac.ed.ph.jqtiplus.JqtiExtensionManager)2 JqtiExtensionPackage (uk.ac.ed.ph.jqtiplus.JqtiExtensionPackage)2 ClassPathResourceLocator (uk.ac.ed.ph.jqtiplus.xmlutils.locators.ClassPathResourceLocator)2 XsltStylesheetManager (uk.ac.ed.ph.jqtiplus.xmlutils.xslt.XsltStylesheetManager)2 MathAssessExtensionPackage (uk.ac.ed.ph.qtiworks.mathassess.MathAssessExtensionPackage)2