use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.
the class QTI21IdentityListCourseNodeToolsController method doConfirmPullSession.
private void doConfirmPullSession(UserRequest ureq, AssessmentTestSession session) {
retrieveConfirmationCtr = new QTI21RetrieveTestsController(ureq, getWindowControl(), session, (IQTESTCourseNode) courseNode);
listenTo(retrieveConfirmationCtr);
String title = translate("tool.pull");
cmc = new CloseableModalController(getWindowControl(), null, retrieveConfirmationCtr.getInitialComponent(), true, title, true);
listenTo(cmc);
cmc.activate();
}
use of org.olat.course.nodes.IQTESTCourseNode in project OpenOLAT by OpenOLAT.
the class QTI21ResetDataController method formOK.
@Override
protected void formOK(UserRequest ureq) {
if (courseNode instanceof IQTESTCourseNode) {
IQTESTCourseNode testCourseNode = (IQTESTCourseNode) courseNode;
RepositoryEntry testEntry = courseNode.getReferencedRepositoryEntry();
RepositoryEntry courseEntry = courseEnv.getCourseGroupManager().getCourseEntry();
ICourse course = CourseFactory.loadCourse(courseEntry);
archiveData(course, options);
qtiService.deleteAssessmentTestSession(identities, testEntry, courseEntry, courseNode.getIdent());
for (Identity identity : identities) {
ScoreEvaluation scoreEval = new ScoreEvaluation(null, null, AssessmentEntryStatus.notStarted, null, Boolean.FALSE, 0.0d, AssessmentRunStatus.notStarted, null);
IdentityEnvironment ienv = new IdentityEnvironment(identity, studentRoles);
UserCourseEnvironment uce = new UserCourseEnvironmentImpl(ienv, courseEnv);
testCourseNode.updateUserScoreEvaluation(scoreEval, uce, getIdentity(), false, Role.coach);
testCourseNode.updateCurrentCompletion(uce, getIdentity(), null, AssessmentRunStatus.notStarted, Role.coach);
}
} else if (assessedEntry != null) {
archiveData(assessedEntry);
qtiService.deleteAssessmentTestSession(identities, assessedEntry, null, null);
}
fireEvent(ureq, Event.CHANGED_EVENT);
}
use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.
the class OLATUpgrade_11_0_0 method postCopyPassedScore.
/**
* Used if a passed or score value was set.
* @param nodeAssessment
* @param course
*/
private void postCopyPassedScore(AssessmentEntry entry, ICourse course) {
String nodeIdent = entry.getSubIdent();
CourseNode courseNode = course.getRunStructure().getNode(nodeIdent);
if (courseNode instanceof GTACourseNode) {
//
} else if (courseNode instanceof TACourseNode) {
entry.setAssessmentStatus(AssessmentEntryStatus.done);
} else if (courseNode instanceof IQTESTCourseNode) {
//
} else if (courseNode instanceof PortfolioCourseNode) {
entry.setAssessmentStatus(AssessmentEntryStatus.done);
} else if (courseNode instanceof MSCourseNode) {
entry.setAssessmentStatus(AssessmentEntryStatus.done);
} else if (courseNode instanceof BasicLTICourseNode) {
entry.setAssessmentStatus(AssessmentEntryStatus.done);
} else if (courseNode instanceof ScormCourseNode) {
entry.setAssessmentStatus(AssessmentEntryStatus.done);
}
}
use of org.olat.course.nodes.IQTESTCourseNode 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);
}
}
use of org.olat.course.nodes.IQTESTCourseNode in project openolat by klemens.
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);
}
}
Aggregations