Search in sources :

Example 1 with AssessmentTestSessionImpl

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;
}
Also used : AssessmentTestSessionImpl(org.olat.ims.qti21.model.jpa.AssessmentTestSessionImpl) Date(java.util.Date)

Example 2 with AssessmentTestSessionImpl

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;
}
Also used : AssessmentTestSessionImpl(org.olat.ims.qti21.model.jpa.AssessmentTestSessionImpl) Date(java.util.Date)

Aggregations

Date (java.util.Date)2 AssessmentTestSessionImpl (org.olat.ims.qti21.model.jpa.AssessmentTestSessionImpl)2