Package org.sakaiproject.tool.gradebook
Class GradebookAssignment
- java.lang.Object
-
- org.sakaiproject.tool.gradebook.GradableObject
-
- org.sakaiproject.tool.gradebook.GradebookAssignment
-
- All Implemented Interfaces:
Serializable
public class GradebookAssignment extends GradableObject
An GradebookAssignment is the basic unit that composes a gradebook. It represents a single unit that, when aggregated in a gradebook, can be used as the denomenator in calculating a CourseGradeRecord.- Author:
- Josh Holtzman
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ComparatorcategoryComparatorstatic ComparatorcountedComparatorstatic ComparatordateComparatorstatic StringDEFAULT_SORTDeprecated.static ComparatorgradeEditorComparatorstatic Stringitem_type_adjustmentstatic Stringitem_type_letterstatic Stringitem_type_nonCalcstatic Stringitem_type_percentagestatic Stringitem_type_pointsstatic ComparatormeanComparatorstatic ComparatornameComparatorstatic ComparatorpointsComparatorstatic ComparatorreleasedComparatorStringselectedGradeEntryValuestatic StringSORT_BY_COUNTEDDeprecated.static StringSORT_BY_DATEDeprecated.static StringSORT_BY_EDITORDeprecated.static StringSORT_BY_MEANDeprecated.static StringSORT_BY_NAMEDeprecated.static StringSORT_BY_POINTSDeprecated.static StringSORT_BY_RELEASEDDeprecated.static StringSORT_BY_SORTINGDeprecated.-
Fields inherited from class org.sakaiproject.tool.gradebook.GradableObject
categorizedSortOrder, defaultComparator, gradebook, id, idComparator, mean, name, removed, sortingComparator, sortOrder, version
-
-
Constructor Summary
Constructors Constructor Description GradebookAssignment()GradebookAssignment(Gradebook gradebook, String name, Double pointsPossible, Date dueDate)GradebookAssignment(Gradebook gradebook, String name, Double pointsPossible, Date dueDate, boolean released)constructor to support selective release
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalculateStatistics(Collection<AssignmentGradeRecord> gradeRecords)Calculate the mean score for students with entered grades.booleangetIsCategory()BooleangetIsExtraCredit()StringgetItemType()booleangetUngraded()booleanisAssignment()booleanisCounted()booleanisCourseGrade()booleanisExternallyMaintained()BooleanisExtraCredit()booleanisHideInAllGradesTable()booleanisIncludedInCalculations()Convenience method for checking if the grade for the assignment should be included in calculations.booleanisNotCounted()BooleanisReleased()voidsetCounted(boolean counted)This cover is for the benefit of JSF checkboxes.voidsetIsExtraCredit(Boolean isExtraCredit)-
Methods inherited from class org.sakaiproject.tool.gradebook.GradableObject
assignSorting, equals, getCategorizedSortOrder, getFormattedMean, getGradebook, getId, getMean, getName, getSortOrder, getSortPosition, getVersion, hashCode, isFirst, isLast, isRemoved, setCategorizedSortOrder, setGradebook, setId, setMean, setName, setRemoved, setSortOrder, setVersion, toString
-
-
-
-
Field Detail
-
SORT_BY_DATE
@Deprecated public static String SORT_BY_DATE
Deprecated.use the SortType enum instead. This remains only for the gradebook tool
-
SORT_BY_NAME
@Deprecated public static String SORT_BY_NAME
Deprecated.
-
SORT_BY_MEAN
@Deprecated public static String SORT_BY_MEAN
Deprecated.
-
SORT_BY_POINTS
@Deprecated public static String SORT_BY_POINTS
Deprecated.
-
SORT_BY_RELEASED
@Deprecated public static String SORT_BY_RELEASED
Deprecated.
-
SORT_BY_COUNTED
@Deprecated public static String SORT_BY_COUNTED
Deprecated.
-
SORT_BY_EDITOR
@Deprecated public static String SORT_BY_EDITOR
Deprecated.
-
SORT_BY_SORTING
@Deprecated public static String SORT_BY_SORTING
Deprecated.
-
DEFAULT_SORT
@Deprecated public static String DEFAULT_SORT
Deprecated.
-
item_type_points
public static String item_type_points
-
item_type_percentage
public static String item_type_percentage
-
item_type_letter
public static String item_type_letter
-
item_type_nonCalc
public static String item_type_nonCalc
-
item_type_adjustment
public static String item_type_adjustment
-
dateComparator
public static Comparator dateComparator
-
nameComparator
public static Comparator nameComparator
-
pointsComparator
public static Comparator pointsComparator
-
meanComparator
public static Comparator meanComparator
-
releasedComparator
public static Comparator releasedComparator
-
countedComparator
public static Comparator countedComparator
-
gradeEditorComparator
public static Comparator gradeEditorComparator
-
categoryComparator
public static Comparator categoryComparator
-
selectedGradeEntryValue
public String selectedGradeEntryValue
-
-
Method Detail
-
isCourseGrade
public boolean isCourseGrade()
- Specified by:
isCourseGradein classGradableObject- Returns:
- Whether this gradable object is a course grade
-
isAssignment
public boolean isAssignment()
- Specified by:
isAssignmentin classGradableObject- Returns:
- Whether this gradable object is an assignment
- See Also:
GradableObject.isAssignment()
-
getIsCategory
public boolean getIsCategory()
- Specified by:
getIsCategoryin classGradableObject- Returns:
- Whether this gradable object is a category
- See Also:
GradableObject.getIsCategory()
-
isNotCounted
public boolean isNotCounted()
-
isCounted
public boolean isCounted()
-
setCounted
public void setCounted(boolean counted)
This cover is for the benefit of JSF checkboxes.
-
isExternallyMaintained
public boolean isExternallyMaintained()
- Returns:
- Returns the externallyMaintained.
-
isReleased
public Boolean isReleased()
- Returns:
- selective release true or false
-
calculateStatistics
public void calculateStatistics(Collection<AssignmentGradeRecord> gradeRecords)
Calculate the mean score for students with entered grades.
-
getUngraded
public boolean getUngraded()
-
getIsExtraCredit
public Boolean getIsExtraCredit()
-
setIsExtraCredit
public void setIsExtraCredit(Boolean isExtraCredit)
-
isExtraCredit
public Boolean isExtraCredit()
-
getItemType
public String getItemType()
-
isIncludedInCalculations
public boolean isIncludedInCalculations()
Convenience method for checking if the grade for the assignment should be included in calculations. This is different from just theisCounted()method for an assignment. This method does a more thorough check using other values, such as if removed, isExtraCredit, ungraded, etc in addition to the assignment's notCounted property. Now also considers category type. If categories are configured (setting 2 or 3), uncategorised items are not counted.- Returns:
- true if grades for this assignment should be included in various calculations.
-
isHideInAllGradesTable
public boolean isHideInAllGradesTable()
-
-