use of org.olat.modules.assessment.AssessmentToolOptions in project OpenOLAT by OpenOLAT.
the class QTI21AssessedIdentityListController method doResetData.
private void doResetData(UserRequest ureq) {
if (resetDataCtrl != null)
return;
/*
if(identities == null || identities.isEmpty()) {
showWarning("warning.reset.test.data.nobody");
} */
AssessmentToolOptions asOptions = getOptions();
resetDataCtrl = new QTI21ResetDataController(ureq, getWindowControl(), this.getRepositoryEntry(), asOptions);
listenTo(resetDataCtrl);
String title = translate("reset.test.data.title");
cmc = new CloseableModalController(getWindowControl(), null, resetDataCtrl.getInitialComponent(), true, title, true);
listenTo(cmc);
cmc.activate();
}
use of org.olat.modules.assessment.AssessmentToolOptions in project OpenOLAT by OpenOLAT.
the class QTI21RuntimeController method doAssessmentTestStatistics.
private Activateable2 doAssessmentTestStatistics(UserRequest ureq) {
OLATResourceable ores = OresHelper.createOLATResourceableType("TestStatistics");
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl swControl = addToHistory(ureq, ores, null);
if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach()) {
AssessmentToolOptions asOptions = new AssessmentToolOptions();
asOptions.setAdmin(reSecurity.isEntryAdmin());
QTI21RuntimeStatisticsController ctrl = new QTI21RuntimeStatisticsController(ureq, swControl, toolbarPanel, getRepositoryEntry(), asOptions);
listenTo(ctrl);
statsToolCtr = pushController(ureq, translate("command.openteststatistic"), ctrl);
currentToolCtr = ctrl;
setActiveTool(testStatisticLink);
return statsToolCtr;
}
return null;
}
use of org.olat.modules.assessment.AssessmentToolOptions in project openolat by klemens.
the class QTI21AssessmentDetailsController method doResetData.
private void doResetData(UserRequest ureq) {
AssessmentToolOptions asOptions = new AssessmentToolOptions();
asOptions.setAdmin(reSecurity.isEntryAdmin());
asOptions.setIdentities(Collections.singletonList(assessedIdentity));
if (courseNode != null) {
resetToolCtrl = new QTI21ResetDataController(ureq, getWindowControl(), assessedUserCourseEnv.getCourseEnvironment(), asOptions, courseNode);
} else {
resetToolCtrl = new QTI21ResetDataController(ureq, getWindowControl(), entry, asOptions);
}
listenTo(resetToolCtrl);
cmc = new CloseableModalController(getWindowControl(), "close", resetToolCtrl.getInitialComponent(), true, translate("table.header.results"));
cmc.activate();
listenTo(cmc);
}
use of org.olat.modules.assessment.AssessmentToolOptions in project openolat by klemens.
the class GTAIdentityListCourseNodeController method doDownload.
private void doDownload(UserRequest ureq) {
AssessmentToolOptions asOptions = getOptions();
OLATResource courseOres = getCourseRepositoryEntry().getOlatResource();
ArchiveOptions options = new ArchiveOptions();
options.setGroup(asOptions.getGroup());
options.setIdentities(asOptions.getIdentities());
ArchiveResource resource = new ArchiveResource(courseNode, courseOres, options, getLocale());
ureq.getDispatchResult().setResultingMediaResource(resource);
}
use of org.olat.modules.assessment.AssessmentToolOptions in project openolat by klemens.
the class IQIdentityListCourseNodeController method getIdentities.
private List<Identity> getIdentities() {
AssessmentToolOptions asOptions = getOptions();
List<Identity> identities = asOptions.getIdentities();
if (group != null) {
identities = groupService.getMembers(group, GroupRoles.participant.toString());
} else if (identities != null) {
identities = asOptions.getIdentities();
} else if (asOptions.isAdmin()) {
identities = ScoreAccountingHelper.loadUsers(getCourseEnvironment());
}
return identities;
}
Aggregations