use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.
the class IQIdentityListCourseNodeController method initMultiSelectionTools.
@Override
protected void initMultiSelectionTools(UserRequest ureq, FormLayoutContainer formLayout) {
// bulk
super.initMultiSelectionTools(ureq, formLayout);
RepositoryEntry testEntry = getReferencedRepositoryEntry();
if (((IQTESTCourseNode) courseNode).hasQTI21TimeLimit(testEntry)) {
extraTimeButton = uifactory.addFormLink("extra.time", formLayout, Link.BUTTON);
extraTimeButton.setIconLeftCSS("o_icon o_icon_extra_time");
}
boolean qti21 = isTestQTI21();
boolean onyx = !qti21 && OnyxModule.isOnyxTest(testEntry.getOlatResource());
statsButton = uifactory.addFormLink("button.stats", formLayout, Link.BUTTON);
statsButton.setIconLeftCSS("o_icon o_icon-fw o_icon_statistics_tool");
if (!coachCourseEnv.isCourseReadOnly()) {
if (!onyx) {
pullButton = uifactory.addFormLink("retrieve.tests.title", formLayout, Link.BUTTON);
pullButton.setIconLeftCSS("o_icon o_icon_pull");
}
if (qti21) {
if (assessmentCallback.isAdmin()) {
resetButton = uifactory.addFormLink("tool.delete.data", formLayout, Link.BUTTON);
resetButton.setIconLeftCSS("o_icon o_icon_delete_item");
}
if (qtiService.needManualCorrection(testEntry) || IQEditController.CORRECTION_MANUAL.equals(courseNode.getModuleConfiguration().getStringValue(IQEditController.CONFIG_CORRECTION_MODE))) {
correctionButton = uifactory.addFormLink("correction.test.title", formLayout, Link.BUTTON);
correctionButton.setIconLeftCSS("o_icon o_icon-fw o_icon_correction");
}
if (courseNode.getModuleConfiguration().getBooleanSafe(IQEditController.CONFIG_DIGITAL_SIGNATURE, false)) {
validateButton = uifactory.addFormLink("validate.xml.signature", formLayout, Link.BUTTON);
validateButton.setIconLeftCSS("o_icon o_icon-fw o_icon_correction");
}
}
}
if (!onyx) {
exportResultsButton = uifactory.addFormLink("button.export", formLayout, Link.BUTTON);
exportResultsButton.setIconLeftCSS("o_icon o_icon-fw o_icon_export");
}
}
use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.
the class IQIdentityListCourseNodeController method loadModel.
@Override
protected void loadModel(UserRequest ureq) {
super.loadModel(ureq);
if (((IQTESTCourseNode) courseNode).hasQTI21TimeLimit(getReferencedRepositoryEntry())) {
Map<Long, ExtraTimeInfos> extraTimeInfos = getExtraTimes();
List<AssessedIdentityElementRow> rows = usersTableModel.getObjects();
for (AssessedIdentityElementRow row : rows) {
row.setDetails(extraTimeInfos.get(row.getIdentityKey()));
}
}
if (pullButton != null) {
boolean enabled = isTestRunning();
pullButton.setEnabled(enabled);
}
}
use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.
the class IQIdentityListCourseNodeController method doConfirmResetData.
private void doConfirmResetData(UserRequest ureq) {
AssessmentToolOptions asOptions = getOptions();
CourseEnvironment courseEnv = getCourseEnvironment();
resetDataCtrl = new QTI21ResetDataController(ureq, getWindowControl(), courseEnv, asOptions, (IQTESTCourseNode) courseNode);
listenTo(resetDataCtrl);
String title = translate("tool.reset");
cmc = new CloseableModalController(getWindowControl(), null, resetDataCtrl.getInitialComponent(), true, title, true);
listenTo(cmc);
cmc.activate();
}
use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.
the class QTI21IdentityListCourseNodeToolsController method doConfirmDeleteData.
private void doConfirmDeleteData(UserRequest ureq) {
resetDataCtrl = new QTI21ResetDataController(ureq, getWindowControl(), courseEntry, (IQTESTCourseNode) courseNode, assessedIdentity);
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.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.
the class QTI21AssessmentRunController method doDownloadSignature.
private void doDownloadSignature(UserRequest ureq) {
MediaResource resource = null;
if (courseNode instanceof IQTESTCourseNode) {
IQTESTCourseNode testCourseNode = (IQTESTCourseNode) courseNode;
AssessmentEntry assessmentEntry = testCourseNode.getUserAssessmentEntry(userCourseEnv);
AssessmentTestSession session = qtiService.getAssessmentTestSession(assessmentEntry.getAssessmentId());
File signature = qtiService.getAssessmentResultSignature(session);
if (signature.exists()) {
resource = new DownloadeableMediaResource(signature);
}
}
if (resource == null) {
resource = new NotFoundMediaResource();
}
ureq.getDispatchResult().setResultingMediaResource(resource);
}
Aggregations