org.olat.course.assessment
Class EfficiencyStatementManager

java.lang.Object
  extended by org.olat.course.assessment.EfficiencyStatementManager
All Implemented Interfaces:
UserDataDeletable

public class EfficiencyStatementManager
extends java.lang.Object
implements UserDataDeletable

Description:
Methods to update a users efficiency statement and to retrieve such statements from the database.

Initial Date: 11.08.2005

Author:
gnaegi

Field Summary
static java.lang.String KEY_ASSESSMENT_NODES
           
static java.lang.String KEY_COURSE_TITLE
           
 
Method Summary
 void archiveUserData(Identity identity, java.io.File archiveDir)
           
 void deleteEfficiencyStatementsFromCourse(java.lang.Long courseRepoEntryKey)
          Delete all efficiency statements from the given course for all users
 void deleteUserData(Identity identity, java.lang.String newDeletedUserName)
          Delete all efficiency-statements for certain identity.
static EfficiencyStatementManager getInstance()
          Factory method
 java.lang.Boolean getPassed(java.lang.String nodeIdent, EfficiencyStatement efficiencyStatement)
          Get the passed value of a course node of a specific efficiency statment
 java.lang.Double getScore(java.lang.String nodeIdent, EfficiencyStatement efficiencyStatement)
          Get the score value of a course node of a specific efficiency statment
 EfficiencyStatement getUserEfficiencyStatement(java.lang.Long courseRepoEntryKey, Identity identity)
          Get the user efficiency statement list for this course
 void updateEfficiencyStatements(OLATResourceable ores, java.util.List<Identity> identities, boolean checkForExistingProperty)
          Create or update all efficiency statment lists for the given list of identities and this course This is called from only one thread, since the course is locked at editing (either CourseEdit or CourseDetails edit).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_ASSESSMENT_NODES

public static final java.lang.String KEY_ASSESSMENT_NODES
See Also:
Constant Field Values

KEY_COURSE_TITLE

public static final java.lang.String KEY_COURSE_TITLE
See Also:
Constant Field Values
Method Detail

getInstance

public static EfficiencyStatementManager getInstance()
Factory method

Returns:

getUserEfficiencyStatement

public EfficiencyStatement getUserEfficiencyStatement(java.lang.Long courseRepoEntryKey,
                                                      Identity identity)
Get the user efficiency statement list for this course

Parameters:
courseRepoEntryKey -
identity -
Returns:
Map containing a list of maps that contain the nodeData for this user and course using the keys defined in the AssessmentHelper and the title of the course

getPassed

public java.lang.Boolean getPassed(java.lang.String nodeIdent,
                                   EfficiencyStatement efficiencyStatement)
Get the passed value of a course node of a specific efficiency statment

Parameters:
nodeIdent -
efficiencyStatement -
Returns:
true if passed, false if not, null if node not found

getScore

public java.lang.Double getScore(java.lang.String nodeIdent,
                                 EfficiencyStatement efficiencyStatement)
Get the score value of a course node of a specific efficiency statment

Parameters:
nodeIdent -
efficiencyStatement -
Returns:
the score, null if node not found

deleteEfficiencyStatementsFromCourse

public void deleteEfficiencyStatementsFromCourse(java.lang.Long courseRepoEntryKey)
Delete all efficiency statements from the given course for all users

Parameters:
courseRepoEntryKey -

updateEfficiencyStatements

public void updateEfficiencyStatements(OLATResourceable ores,
                                       java.util.List<Identity> identities,
                                       boolean checkForExistingProperty)
Create or update all efficiency statment lists for the given list of identities and this course This is called from only one thread, since the course is locked at editing (either CourseEdit or CourseDetails edit).

Parameters:
course -
identities - List of identities
checkForExistingRecord - true: check if efficiency statement for this user exist; false: always create new one (be careful with this one!)

archiveUserData

public void archiveUserData(Identity identity,
                            java.io.File archiveDir)

deleteUserData

public void deleteUserData(Identity identity,
                           java.lang.String newDeletedUserName)
Delete all efficiency-statements for certain identity.

Specified by:
deleteUserData in interface UserDataDeletable
Parameters:
identity - Delete data for this identity.