use of org.olat.ims.qti.process.FilePersister in project OpenOLAT by OpenOLAT.
the class OLATUpgrade_11_0_0 method processNonPropertiesIQTESTStates.
/**
* Find if someone has started a test without getting a score, passed status...
*
* @param assessableIdentities
* @param iqNode
* @param course
* @param courseEntry
* @param nodeAssessmentMap
*/
private void processNonPropertiesIQTESTStates(List<Identity> assessableIdentities, IQTESTCourseNode iqNode, ICourse course, RepositoryEntry courseEntry, Map<AssessmentDataKey, AssessmentEntryImpl> nodeAssessmentMap, Map<AssessmentDataKey, AssessmentEntryImpl> curentNodeAssessmentMap) {
for (Identity assessedIdentity : assessableIdentities) {
if (iqTestPersisterExists(assessedIdentity, iqNode, course)) {
AssessmentDataKey key = new AssessmentDataKey(assessedIdentity, course.getResourceableId(), iqNode.getIdent());
if (curentNodeAssessmentMap.containsKey(key)) {
continue;
}
AssessmentEntryImpl nodeAssessment;
if (nodeAssessmentMap.containsKey(key)) {
nodeAssessment = nodeAssessmentMap.get(key);
} else {
nodeAssessment = createAssessmentEntry(assessedIdentity, null, course, courseEntry, iqNode.getIdent());
nodeAssessmentMap.put(key, nodeAssessment);
Long courseResourceableId = course.getResourceableId();
String resourcePath = courseResourceableId + File.separator + iqNode.getIdent();
FilePersister qtiPersister = new FilePersister(assessedIdentity, resourcePath);
nodeAssessment.setCreationDate(qtiPersister.getLastModified());
nodeAssessment.setLastModified(qtiPersister.getLastModified());
}
nodeAssessment.setAssessmentStatus(AssessmentEntryStatus.inProgress);
}
}
}
use of org.olat.ims.qti.process.FilePersister in project openolat by klemens.
the class IQTESTCourseNode method isQTI12TestRunning.
public boolean isQTI12TestRunning(Identity assessedIdentity, CourseEnvironment courseEnv) {
String resourcePath = courseEnv.getCourseResourceableId() + File.separator + getIdent();
FilePersister qtiPersister = new FilePersister(assessedIdentity, resourcePath);
return qtiPersister.exists();
}
use of org.olat.ims.qti.process.FilePersister in project OpenOLAT by OpenOLAT.
the class OLATUpgrade_11_0_0 method iqTestPersisterExists.
private boolean iqTestPersisterExists(Identity assessedIdentity, IQTESTCourseNode cNode, ICourse course) {
Long courseResourceableId = course.getResourceableId();
String resourcePath = courseResourceableId + File.separator + cNode.getIdent();
FilePersister qtiPersister = new FilePersister(assessedIdentity, resourcePath);
return qtiPersister.exists();
}
use of org.olat.ims.qti.process.FilePersister in project OpenOLAT by OpenOLAT.
the class IQTESTCourseNode method isQTI12TestRunning.
public boolean isQTI12TestRunning(Identity assessedIdentity, CourseEnvironment courseEnv) {
String resourcePath = courseEnv.getCourseResourceableId() + File.separator + getIdent();
FilePersister qtiPersister = new FilePersister(assessedIdentity, resourcePath);
return qtiPersister.exists();
}
use of org.olat.ims.qti.process.FilePersister in project openolat by klemens.
the class OLATUpgrade_11_0_0 method processNonPropertiesIQTESTStates.
/**
* Find if someone has started a test without getting a score, passed status...
*
* @param assessableIdentities
* @param iqNode
* @param course
* @param courseEntry
* @param nodeAssessmentMap
*/
private void processNonPropertiesIQTESTStates(List<Identity> assessableIdentities, IQTESTCourseNode iqNode, ICourse course, RepositoryEntry courseEntry, Map<AssessmentDataKey, AssessmentEntryImpl> nodeAssessmentMap, Map<AssessmentDataKey, AssessmentEntryImpl> curentNodeAssessmentMap) {
for (Identity assessedIdentity : assessableIdentities) {
if (iqTestPersisterExists(assessedIdentity, iqNode, course)) {
AssessmentDataKey key = new AssessmentDataKey(assessedIdentity, course.getResourceableId(), iqNode.getIdent());
if (curentNodeAssessmentMap.containsKey(key)) {
continue;
}
AssessmentEntryImpl nodeAssessment;
if (nodeAssessmentMap.containsKey(key)) {
nodeAssessment = nodeAssessmentMap.get(key);
} else {
nodeAssessment = createAssessmentEntry(assessedIdentity, null, course, courseEntry, iqNode.getIdent());
nodeAssessmentMap.put(key, nodeAssessment);
Long courseResourceableId = course.getResourceableId();
String resourcePath = courseResourceableId + File.separator + iqNode.getIdent();
FilePersister qtiPersister = new FilePersister(assessedIdentity, resourcePath);
nodeAssessment.setCreationDate(qtiPersister.getLastModified());
nodeAssessment.setLastModified(qtiPersister.getLastModified());
}
nodeAssessment.setAssessmentStatus(AssessmentEntryStatus.inProgress);
}
}
}
Aggregations