Search in sources :

Example 1 with ArtefactWizzardStepsController

use of org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController in project OpenOLAT by OpenOLAT.

the class CertificateAndEfficiencyStatementListController method doCollectArtefact.

private void doCollectArtefact(UserRequest ureq, String title, Long efficiencyStatementKey) {
    EPArtefactHandler<?> artHandler = portfolioModule.getArtefactHandler(EfficiencyStatementArtefact.ARTEFACT_TYPE);
    if (artHandler != null && artHandler.isEnabled() && assessedIdentity.equals(getIdentity())) {
        AbstractArtefact artefact = artHandler.createArtefact();
        // only author can create artefact
        artefact.setAuthor(getIdentity());
        // no business path becouse we cannot launch an efficiency statement
        artefact.setCollectionDate(new Date());
        artefact.setTitle(translate("artefact.title", new String[] { title }));
        EfficiencyStatement fullStatement = esm.getUserEfficiencyStatementByKey(efficiencyStatementKey);
        artHandler.prefillArtefactAccordingToSource(artefact, fullStatement);
        ePFCollCtrl = new ArtefactWizzardStepsController(ureq, getWindowControl(), artefact, (VFSContainer) null);
        listenTo(ePFCollCtrl);
    }
}
Also used : ArtefactWizzardStepsController(org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController) VFSContainer(org.olat.core.util.vfs.VFSContainer) AbstractArtefact(org.olat.portfolio.model.artefacts.AbstractArtefact) Date(java.util.Date) EfficiencyStatement(org.olat.course.assessment.EfficiencyStatement) CertificateAndEfficiencyStatement(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementListModel.CertificateAndEfficiencyStatement)

Example 2 with ArtefactWizzardStepsController

use of org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController in project OpenOLAT by OpenOLAT.

the class CertificateAndEfficiencyStatementController method popupArtefactCollector.

/**
 * opens the collect-artefact wizard
 *
 * @param ureq
 */
private void popupArtefactCollector(UserRequest ureq) {
    EPArtefactHandler<?> artHandler = portfolioModule.getArtefactHandler(EfficiencyStatementArtefact.ARTEFACT_TYPE);
    if (artHandler != null && artHandler.isEnabled()) {
        AbstractArtefact artefact = artHandler.createArtefact();
        // only author can create artefact
        artefact.setAuthor(getIdentity());
        // no business path becouse we cannot launch an efficiency statement
        artefact.setCollectionDate(new Date());
        artefact.setTitle(translate("artefact.title", new String[] { efficiencyStatement.getCourseTitle() }));
        artHandler.prefillArtefactAccordingToSource(artefact, efficiencyStatement);
        ePFCollCtrl = new ArtefactWizzardStepsController(ureq, getWindowControl(), artefact, (VFSContainer) null);
        listenTo(ePFCollCtrl);
        // set flag for js-window-resizing (see velocity)
        mainVC.contextPut("collectwizard", true);
    }
}
Also used : ArtefactWizzardStepsController(org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController) VFSContainer(org.olat.core.util.vfs.VFSContainer) AbstractArtefact(org.olat.portfolio.model.artefacts.AbstractArtefact) Date(java.util.Date)

Example 3 with ArtefactWizzardStepsController

use of org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController in project openolat by klemens.

the class CertificateAndEfficiencyStatementListController method doCollectArtefact.

private void doCollectArtefact(UserRequest ureq, String title, Long efficiencyStatementKey) {
    EPArtefactHandler<?> artHandler = portfolioModule.getArtefactHandler(EfficiencyStatementArtefact.ARTEFACT_TYPE);
    if (artHandler != null && artHandler.isEnabled() && assessedIdentity.equals(getIdentity())) {
        AbstractArtefact artefact = artHandler.createArtefact();
        // only author can create artefact
        artefact.setAuthor(getIdentity());
        // no business path becouse we cannot launch an efficiency statement
        artefact.setCollectionDate(new Date());
        artefact.setTitle(translate("artefact.title", new String[] { title }));
        EfficiencyStatement fullStatement = esm.getUserEfficiencyStatementByKey(efficiencyStatementKey);
        artHandler.prefillArtefactAccordingToSource(artefact, fullStatement);
        ePFCollCtrl = new ArtefactWizzardStepsController(ureq, getWindowControl(), artefact, (VFSContainer) null);
        listenTo(ePFCollCtrl);
    }
}
Also used : ArtefactWizzardStepsController(org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController) VFSContainer(org.olat.core.util.vfs.VFSContainer) AbstractArtefact(org.olat.portfolio.model.artefacts.AbstractArtefact) Date(java.util.Date) EfficiencyStatement(org.olat.course.assessment.EfficiencyStatement) CertificateAndEfficiencyStatement(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementListModel.CertificateAndEfficiencyStatement)

Example 4 with ArtefactWizzardStepsController

use of org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController in project openolat by klemens.

the class CertificateAndEfficiencyStatementController method popupArtefactCollector.

/**
 * opens the collect-artefact wizard
 *
 * @param ureq
 */
private void popupArtefactCollector(UserRequest ureq) {
    EPArtefactHandler<?> artHandler = portfolioModule.getArtefactHandler(EfficiencyStatementArtefact.ARTEFACT_TYPE);
    if (artHandler != null && artHandler.isEnabled()) {
        AbstractArtefact artefact = artHandler.createArtefact();
        // only author can create artefact
        artefact.setAuthor(getIdentity());
        // no business path becouse we cannot launch an efficiency statement
        artefact.setCollectionDate(new Date());
        artefact.setTitle(translate("artefact.title", new String[] { efficiencyStatement.getCourseTitle() }));
        artHandler.prefillArtefactAccordingToSource(artefact, efficiencyStatement);
        ePFCollCtrl = new ArtefactWizzardStepsController(ureq, getWindowControl(), artefact, (VFSContainer) null);
        listenTo(ePFCollCtrl);
        // set flag for js-window-resizing (see velocity)
        mainVC.contextPut("collectwizard", true);
    }
}
Also used : ArtefactWizzardStepsController(org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController) VFSContainer(org.olat.core.util.vfs.VFSContainer) AbstractArtefact(org.olat.portfolio.model.artefacts.AbstractArtefact) Date(java.util.Date)

Aggregations

Date (java.util.Date)4 VFSContainer (org.olat.core.util.vfs.VFSContainer)4 AbstractArtefact (org.olat.portfolio.model.artefacts.AbstractArtefact)4 ArtefactWizzardStepsController (org.olat.portfolio.ui.artefacts.collect.ArtefactWizzardStepsController)4 EfficiencyStatement (org.olat.course.assessment.EfficiencyStatement)2 CertificateAndEfficiencyStatement (org.olat.course.certificate.ui.CertificateAndEfficiencyStatementListModel.CertificateAndEfficiencyStatement)2