Search in sources :

Example 16 with AssessmentToolOptions

use of org.olat.modules.assessment.AssessmentToolOptions in project OpenOLAT by OpenOLAT.

the class IdentityListCourseNodeController method getOptions.

protected AssessmentToolOptions getOptions() {
    SearchAssessedIdentityParams params = getSearchParameters();
    AssessmentToolOptions options = new AssessmentToolOptions();
    options.setAdmin(assessmentCallback.isAdmin());
    if (group == null) {
        if (assessmentCallback.isAdmin()) {
            options.setNonMembers(params.isNonMembers());
        } else {
            List<Identity> assessedIdentities = assessmentToolManager.getAssessedIdentities(getIdentity(), params);
            options.setIdentities(assessedIdentities);
            fillAlternativeToAssessableIdentityList(options, params);
        }
    } else {
        options.setGroup(group);
    }
    return options;
}
Also used : SearchAssessedIdentityParams(org.olat.course.assessment.model.SearchAssessedIdentityParams) AssessmentToolOptions(org.olat.modules.assessment.AssessmentToolOptions) Identity(org.olat.core.id.Identity)

Example 17 with AssessmentToolOptions

use of org.olat.modules.assessment.AssessmentToolOptions in project openolat by klemens.

the class IdentityListCourseNodeController method getOptions.

protected AssessmentToolOptions getOptions() {
    SearchAssessedIdentityParams params = getSearchParameters();
    AssessmentToolOptions options = new AssessmentToolOptions();
    options.setAdmin(assessmentCallback.isAdmin());
    if (group == null) {
        if (assessmentCallback.isAdmin()) {
            options.setNonMembers(params.isNonMembers());
        } else {
            List<Identity> assessedIdentities = assessmentToolManager.getAssessedIdentities(getIdentity(), params);
            options.setIdentities(assessedIdentities);
            fillAlternativeToAssessableIdentityList(options, params);
        }
    } else {
        options.setGroup(group);
    }
    return options;
}
Also used : SearchAssessedIdentityParams(org.olat.course.assessment.model.SearchAssessedIdentityParams) AssessmentToolOptions(org.olat.modules.assessment.AssessmentToolOptions) Identity(org.olat.core.id.Identity)

Example 18 with AssessmentToolOptions

use of org.olat.modules.assessment.AssessmentToolOptions in project openolat by klemens.

the class IQIdentityListCourseNodeController method doStartCorrection.

private void doStartCorrection(UserRequest ureq) {
    AssessmentToolOptions asOptions = getOptions();
    correctionIdentitiesCtrl = new CorrectionOverviewController(ureq, getWindowControl(), stackPanel, getCourseEnvironment(), asOptions, (IQTESTCourseNode) courseNode);
    if (correctionIdentitiesCtrl.getNumberOfAssessedIdentities() == 0) {
        showWarning("grade.nobody");
        correctionIdentitiesCtrl = null;
    } else {
        listenTo(correctionIdentitiesCtrl);
        stackPanel.pushController(translate("correction.test.title"), correctionIdentitiesCtrl);
    }
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) AssessmentToolOptions(org.olat.modules.assessment.AssessmentToolOptions) CorrectionOverviewController(org.olat.ims.qti21.ui.assessment.CorrectionOverviewController)

Example 19 with AssessmentToolOptions

use of org.olat.modules.assessment.AssessmentToolOptions in project openolat by klemens.

the class IQIdentityListCourseNodeController method doConfirmPull.

private void doConfirmPull(UserRequest ureq) {
    AssessmentToolOptions asOptions = getOptions();
    RepositoryEntry testEntry = getReferencedRepositoryEntry();
    CourseEnvironment courseEnv = getCourseEnvironment();
    if (ImsQTI21Resource.TYPE_NAME.equals(testEntry.getOlatResource().getResourceableTypeName())) {
        retrieveConfirmationCtr = new QTI21RetrieveTestsController(ureq, getWindowControl(), courseEnv, asOptions, (IQTESTCourseNode) courseNode);
    } else {
        retrieveConfirmationCtr = new QTI12PullTestsToolController(ureq, getWindowControl(), courseEnv, asOptions, (IQTESTCourseNode) courseNode);
    }
    listenTo(retrieveConfirmationCtr);
    String title = translate("tool.pull");
    cmc = new CloseableModalController(getWindowControl(), null, retrieveConfirmationCtr.getInitialComponent(), true, title, true);
    listenTo(cmc);
    cmc.activate();
}
Also used : IQTESTCourseNode(org.olat.course.nodes.IQTESTCourseNode) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) CourseEnvironment(org.olat.course.run.environment.CourseEnvironment) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) AssessmentToolOptions(org.olat.modules.assessment.AssessmentToolOptions) RepositoryEntry(org.olat.repository.RepositoryEntry) QTI21RetrieveTestsController(org.olat.ims.qti21.ui.QTI21RetrieveTestsController) QTI12PullTestsToolController(org.olat.ims.qti.statistics.ui.QTI12PullTestsToolController)

Example 20 with AssessmentToolOptions

use of org.olat.modules.assessment.AssessmentToolOptions in project openolat by klemens.

the class TAIdentityListCourseNodeController method doDownload.

private void doDownload(UserRequest ureq) {
    OLATResource courseOres = getCourseRepositoryEntry().getOlatResource();
    AssessmentToolOptions asOptions = getOptions();
    ArchiveOptions options = new ArchiveOptions();
    options.setGroup(asOptions.getGroup());
    options.setIdentities(asOptions.getIdentities());
    ArchiveResource resource = new ArchiveResource(courseNode, courseOres, options, getLocale());
    ureq.getDispatchResult().setResultingMediaResource(resource);
}
Also used : AssessmentToolOptions(org.olat.modules.assessment.AssessmentToolOptions) OLATResource(org.olat.resource.OLATResource) ArchiveOptions(org.olat.course.nodes.ArchiveOptions) ArchiveResource(org.olat.course.archiver.ArchiveResource)

Aggregations

AssessmentToolOptions (org.olat.modules.assessment.AssessmentToolOptions)24 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)10 Identity (org.olat.core.id.Identity)6 IQTESTCourseNode (org.olat.course.nodes.IQTESTCourseNode)6 ArchiveResource (org.olat.course.archiver.ArchiveResource)4 ArchiveOptions (org.olat.course.nodes.ArchiveOptions)4 CourseEnvironment (org.olat.course.run.environment.CourseEnvironment)4 UserCourseEnvironment (org.olat.course.run.userview.UserCourseEnvironment)4 OLATResource (org.olat.resource.OLATResource)4 WindowControl (org.olat.core.gui.control.WindowControl)2 OLATResourceable (org.olat.core.id.OLATResourceable)2 SearchAssessedIdentityParams (org.olat.course.assessment.model.SearchAssessedIdentityParams)2 QTI12PullTestsToolController (org.olat.ims.qti.statistics.ui.QTI12PullTestsToolController)2 QTI21ResetDataController (org.olat.ims.qti21.ui.QTI21ResetDataController)2 QTI21RetrieveTestsController (org.olat.ims.qti21.ui.QTI21RetrieveTestsController)2 CorrectionOverviewController (org.olat.ims.qti21.ui.assessment.CorrectionOverviewController)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2