Package org.sakaiproject.tool.gradebook
Class AssignmentGradeRecord
- java.lang.Object
-
- org.sakaiproject.tool.gradebook.AbstractGradeRecord
-
- org.sakaiproject.tool.gradebook.AssignmentGradeRecord
-
- All Implemented Interfaces:
Serializable,Cloneable
public class AssignmentGradeRecord extends AbstractGradeRecord implements Cloneable
An AssignmentGradeRecord is a grade record that can be associated with an GradebookAssignment.- Author:
- Josh Holtzman
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<AssignmentGradeRecord>calcComparatorstatic Comparator<AssignmentGradeRecord>numericComparator-
Fields inherited from class org.sakaiproject.tool.gradebook.AbstractGradeRecord
dateRecorded, gradableObject, graderId, id, studentId, version
-
-
Constructor Summary
Constructors Constructor Description AssignmentGradeRecord()AssignmentGradeRecord(GradebookAssignment assignment, String studentId, Double grade)The graderId and dateRecorded properties will be set explicitly by the grade manager before the database is updated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssignmentGradeRecordclone()GradebookAssignmentgetAssignment()BooleangetDroppedFromGrade()BigDecimalgetEarnedWeightedPercentage()DoublegetGradeAsPercentage()Returns null if the points earned is null.StringgetLetterEarned()BigDecimalgetOverallWeight()DoublegetPercentEarned()DoublegetPointsEarned()booleanisCourseGradeRecord()BooleanisDropped()BooleanisExcludedFromGrade()booleanisUserAbleToView()voidsetDropped(Boolean isDropped)voidsetDroppedFromGrade(Boolean droppedFromGrade)voidsetEarnedWeightedPercentage(BigDecimal earnedWeightedPercentage)voidsetExcludedFromGrade(Boolean isExcludedFromGrade)voidsetLetterEarned(String letterEarned)voidsetOverallWeight(BigDecimal overallWeight)voidsetPercentEarned(Double percentEarned)voidsetPointsEarned(Double pointsEarned)voidsetUserAbleToView(boolean userAbleToView)-
Methods inherited from class org.sakaiproject.tool.gradebook.AbstractGradeRecord
getDateRecorded, getGradableObject, getGraderId, getId, getStudentId, getVersion, setDateRecorded, setGradableObject, setGraderId, setId, setStudentId, setVersion, toString
-
-
-
-
Field Detail
-
numericComparator
public static Comparator<AssignmentGradeRecord> numericComparator
-
calcComparator
public static Comparator<AssignmentGradeRecord> calcComparator
-
-
Constructor Detail
-
AssignmentGradeRecord
public AssignmentGradeRecord()
-
AssignmentGradeRecord
public AssignmentGradeRecord(GradebookAssignment assignment, String studentId, Double grade)
The graderId and dateRecorded properties will be set explicitly by the grade manager before the database is updated.- Parameters:
assignment- The assignment this grade record is associated withstudentId- The student id for whom this grade record belongsgrade- The grade, or points earned
-
-
Method Detail
-
getPointsEarned
public Double getPointsEarned()
- Specified by:
getPointsEarnedin classAbstractGradeRecord- Returns:
- Returns the pointsEarned
-
setPointsEarned
public void setPointsEarned(Double pointsEarned)
- Parameters:
pointsEarned- The pointsEarned to set.
-
getGradeAsPercentage
public Double getGradeAsPercentage()
Returns null if the points earned is null. Otherwise, returns earned / points possible * 100.- Specified by:
getGradeAsPercentagein classAbstractGradeRecord- See Also:
AbstractGradeRecord.getGradeAsPercentage()
-
isCourseGradeRecord
public boolean isCourseGradeRecord()
- Specified by:
isCourseGradeRecordin classAbstractGradeRecord- Returns:
- Whether this is a course grade record
- See Also:
AbstractGradeRecord.isCourseGradeRecord()
-
getAssignment
public GradebookAssignment getAssignment()
-
getPercentEarned
public Double getPercentEarned()
-
setPercentEarned
public void setPercentEarned(Double percentEarned)
-
getLetterEarned
public String getLetterEarned()
-
setLetterEarned
public void setLetterEarned(String letterEarned)
-
isUserAbleToView
public boolean isUserAbleToView()
-
setUserAbleToView
public void setUserAbleToView(boolean userAbleToView)
-
clone
public AssignmentGradeRecord clone()
-
isExcludedFromGrade
public Boolean isExcludedFromGrade()
-
setExcludedFromGrade
public void setExcludedFromGrade(Boolean isExcludedFromGrade)
-
getEarnedWeightedPercentage
public BigDecimal getEarnedWeightedPercentage()
-
setEarnedWeightedPercentage
public void setEarnedWeightedPercentage(BigDecimal earnedWeightedPercentage)
-
isDropped
public Boolean isDropped()
-
setDropped
public void setDropped(Boolean isDropped)
-
getOverallWeight
public BigDecimal getOverallWeight()
-
setOverallWeight
public void setOverallWeight(BigDecimal overallWeight)
-
getDroppedFromGrade
public Boolean getDroppedFromGrade()
-
setDroppedFromGrade
public void setDroppedFromGrade(Boolean droppedFromGrade)
-
-