|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackboard.data.BbObject
blackboard.data.gradebook.Score
public class Score
The Score class represents a grade in a course for a specific user and Lineitem. The
critical data is the grade, but a String-based Id is provided for association of the Score with
an external attempt handler. This handler would typically be the Blackboard assessment engine,
but could easily be a third-party tool.
When manipulating Score objects, the lineitemId, grade, and courseMembershipId
attributes must be set before persisting.
Conceptually, a Score represents a value that may be calculated from one or more Attempts. An Attempt actually represents a user's interaction with a "gradeable" item. E.g., a session with a given quiz. This cardinality affects several method signatures that imply logic based on related Attempt data. In Release 6, though, only a single attempt is supported.
Because Attempts are tighly coupled to the component that generates their value, they are not directly exposed in this version of the API.
Note: Score has replaced LwScore which has been removed from the 6.0 APIs
as part of general platform development.
| Nested Class Summary | |
|---|---|
static class |
Score.AttemptLocation
Enumeration class used to indicate the physical repository for an attempt. |
| Field Summary | |
|---|---|
static DataType |
SCORE_DATA_TYPE
|
| Fields inherited from class blackboard.data.BbObject |
|---|
_bbAttributes |
| Constructor Summary | |
|---|---|
Score()
Constructs and returns a new Score object with date added and date changed initialized to the current date. |
|
Score(blackboard.data.gradebook.impl.Outcome outcome)
For internal use only. |
|
| Method Summary | |
|---|---|
protected void |
clearAttemptId()
|
java.lang.Object |
getAttemptId()
Returns a String-based Id for the external attempt handler. |
Score.AttemptLocation |
getAttemptLocation()
Returns whether the attempt associated with this score is internal to Blackboard or external. |
Id |
getCourseMembershipId()
Returns the Id of the CourseMembership for the user this Score is associated with. |
DataType |
getDataType()
Returns the DataType identifier for this object. |
java.util.Calendar |
getDateAdded()
Returns the date and time this Score was added to the gradebook. |
java.util.Calendar |
getDateChanged()
Returns the date and time this Score was modified. |
java.lang.String |
getGrade()
Returns the actual grade for this Score. |
Id |
getId()
Returns the Id associated with this BbObject. |
Id |
getLineitemId()
Returns the Id of the gradebook Lineitem this score is attached to. |
blackboard.data.gradebook.impl.Outcome |
getOutcome()
For internal use only. |
void |
setAttemptId(java.lang.Object id,
Score.AttemptLocation location)
Sets the attempt Id to be used by an external attempt handler. |
protected void |
setAttemptLocation(Score.AttemptLocation attemptLocation)
|
void |
setCourseMembershipId(Id id)
Sets the CourseMembership Id to be associated with this Score. |
void |
setDateAdded()
Sets the date and time this Score was added to the gradebook using the current time. |
void |
setDateAdded(java.util.Calendar cDateAdded)
Sets the date and time this Score was added to the gradebook using the provided Calendar. |
void |
setDateChanged()
Sets the date and time this Score was modified using the current time. |
void |
setDateChanged(java.util.Calendar cDateChanged)
Sets the date and time this Score was modified using the provided Calendar. |
protected void |
setExternalAttemptId(java.lang.String id)
Sets the attempt Id to be used by an external attempt handler. |
void |
setGrade(java.lang.String strGrade)
Sets the actual grade for this Score. |
protected void |
setInternalAttemptId(Id id)
Sets the attempt Id to be used by an internal attempt handler. |
void |
setLineitemId(Id id)
Sets the Lineitem Id this Score is related to. |
java.lang.String |
toString()
Returns the contents of this Lineitem object as a line-feed separated list of
name value pairs of this object's properties. |
void |
validate()
Validates the contents of this Score. |
| Methods inherited from class blackboard.data.BbObject |
|---|
clone, getBbAttributes, getCreatedDate, getModifiedDate, matches, persist, setCreatedDate, setId, setModifiedDate |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final DataType SCORE_DATA_TYPE
| Constructor Detail |
|---|
public Score()
public Score(blackboard.data.gradebook.impl.Outcome outcome)
| Method Detail |
|---|
public Id getId()
BbObjectId associated with this BbObject.
getId in interface IdentifiablegetId in class BbObjectId value for this BbObjectpublic blackboard.data.gradebook.impl.Outcome getOutcome()
public Id getCourseMembershipId()
public void setCourseMembershipId(Id id)
id - A valid CourseMembership Idpublic Id getLineitemId()
public void setLineitemId(Id id)
id - A valid Lineitem Idpublic java.lang.Object getAttemptId()
public void setAttemptId(java.lang.Object id,
Score.AttemptLocation location)
id - The Id of the attempt this Score is derived from.location - The location of the attempt this Score is associated with.protected void setInternalAttemptId(Id id)
id - The Id of the attempt this Score is derived from.protected void setExternalAttemptId(java.lang.String id)
id - The Id of the attempt this Score is derived from.protected void clearAttemptId()
public Score.AttemptLocation getAttemptLocation()
attemptId is set, the return is AttemptLocation.UNSET.protected void setAttemptLocation(Score.AttemptLocation attemptLocation)
public java.lang.String getGrade()
public void setGrade(java.lang.String strGrade)
strGrade - The grade information for this Scorepublic java.util.Calendar getDateAdded()
public void setDateAdded()
public void setDateAdded(java.util.Calendar cDateAdded)
cDateAdded - The date and time this Score was added to the gradebookpublic java.util.Calendar getDateChanged()
public void setDateChanged()
public void setDateChanged(java.util.Calendar cDateChanged)
cDateChanged - The date and time this Score was modifiedpublic DataType getDataType()
DataType identifier for this object. Can be used to
uniquely identify the "type" of this data object.
getDataType in interface IBbObjectgetDataType in interface IdentifiablegetDataType in class BbObjectDataType for this objectpublic java.lang.String toString()
Lineitem object as a line-feed separated list of
name value pairs of this object's properties. The line-feed character used is the one
specified by the java system property "line.separator". This method can be used for debug
purposes.
toString in class BbObjectString that represents the contents of this object
public void validate()
throws ValidationException
Score. Internal consistency
checks are also performed.
validate in interface IBbObjectvalidate in class BbObjectValidationException - If validation of this object fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||