use of org.olat.ims.qti21.model.jpa.AssessmentTestSessionImpl in project OpenOLAT by OpenOLAT.
the class AssessmentTestSessionDAO method createAndPersistTestSession.
public AssessmentTestSession createAndPersistTestSession(RepositoryEntry testEntry, RepositoryEntry repositoryEntry, String subIdent, AssessmentEntry assessmentEntry, Identity identity, String anonymousIdentifier, boolean authorMode) {
AssessmentTestSessionImpl testSession = new AssessmentTestSessionImpl();
Date now = new Date();
testSession.setCreationDate(now);
testSession.setLastModified(now);
testSession.setTestEntry(testEntry);
testSession.setRepositoryEntry(repositoryEntry);
testSession.setSubIdent(subIdent);
testSession.setAssessmentEntry(assessmentEntry);
testSession.setAuthorMode(authorMode);
testSession.setExploded(false);
testSession.setIdentity(identity);
testSession.setAnonymousIdentifier(anonymousIdentifier);
testSession.setStorage(createSessionStorage(testSession));
dbInstance.getCurrentEntityManager().persist(testSession);
return testSession;
}
use of org.olat.ims.qti21.model.jpa.AssessmentTestSessionImpl in project openolat by klemens.
the class AssessmentTestSessionDAO method createAndPersistTestSession.
public AssessmentTestSession createAndPersistTestSession(RepositoryEntry testEntry, RepositoryEntry repositoryEntry, String subIdent, AssessmentEntry assessmentEntry, Identity identity, String anonymousIdentifier, boolean authorMode) {
AssessmentTestSessionImpl testSession = new AssessmentTestSessionImpl();
Date now = new Date();
testSession.setCreationDate(now);
testSession.setLastModified(now);
testSession.setTestEntry(testEntry);
testSession.setRepositoryEntry(repositoryEntry);
testSession.setSubIdent(subIdent);
testSession.setAssessmentEntry(assessmentEntry);
testSession.setAuthorMode(authorMode);
testSession.setExploded(false);
testSession.setIdentity(identity);
testSession.setAnonymousIdentifier(anonymousIdentifier);
testSession.setStorage(createSessionStorage(testSession));
dbInstance.getCurrentEntityManager().persist(testSession);
return testSession;
}
Aggregations