use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.
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 klemens.
the class IQIdentityListCourseNodeController method initStatusColumns.
@Override
protected void initStatusColumns(FlexiTableColumnModel columnsModel) {
super.initStatusColumns(columnsModel);
IQTESTCourseNode testCourseNode = (IQTESTCourseNode) courseNode;
if (testCourseNode != null && testCourseNode.hasCompletion()) {
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(IdentityCourseElementCols.currentCompletion));
}
RepositoryEntry qtiTestEntry = getReferencedRepositoryEntry();
if (testCourseNode != null && testCourseNode.hasQTI21TimeLimit(qtiTestEntry)) {
int timeLimitInSeconds = testCourseNode.getQTI21TimeLimitMaxInSeconds(qtiTestEntry);
boolean suspendEnabled = isSuspendEnable();
FlexiCellRenderer renderer = new ExtraTimeCellRenderer(!suspendEnabled, timeLimitInSeconds, getLocale());
String header = suspendEnabled ? "table.header.extra.time" : "table.header.end.date";
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(header, IdentityCourseElementCols.details.ordinal(), renderer));
}
}
use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.
the class IQIdentityListCourseNodeController method doExportResults.
private void doExportResults(UserRequest ureq) {
List<Identity> identities = getIdentities();
if (identities != null && !identities.isEmpty()) {
MediaResource resource;
CourseEnvironment courseEnv = getCourseEnvironment();
if (isTestQTI21()) {
resource = new QTI21ResultsExportMediaResource(courseEnv, identities, (IQTESTCourseNode) courseNode, getLocale());
} else {
resource = new QTI12ResultsExportMediaResource(courseEnv, getLocale(), identities, (IQTESTCourseNode) courseNode);
}
ureq.getDispatchResult().setResultingMediaResource(resource);
} else {
showWarning("error.no.assessed.users");
}
}
use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.
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 klemens.
the class IQIdentityListCourseNodeController method doLaunchStatistics.
private void doLaunchStatistics(UserRequest ureq) {
Controller statisticsCtrl;
RepositoryEntry testEntry = getReferencedRepositoryEntry();
if (ImsQTI21Resource.TYPE_NAME.equals(testEntry.getOlatResource().getResourceableTypeName())) {
statisticsCtrl = new QTI21StatisticsToolController(ureq, getWindowControl(), stackPanel, getCourseEnvironment(), getOptions(), (IQTESTCourseNode) courseNode);
} else {
statisticsCtrl = new QTI12StatisticsToolController(ureq, getWindowControl(), stackPanel, getCourseEnvironment(), getOptions(), (IQTESTCourseNode) courseNode);
}
listenTo(statisticsCtrl);
stackPanel.pushController(translate("button.stats"), statisticsCtrl);
}
Aggregations