org.sakaiproject.tool.gradebook
Class Assignment

java.lang.Object
  extended by org.sakaiproject.tool.gradebook.GradableObject
      extended by org.sakaiproject.tool.gradebook.Assignment
All Implemented Interfaces:
Serializable

public class Assignment
extends GradableObject

An Assignment 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
static Comparator countedComparator
           
static Comparator dateComparator
           
static String DEFAULT_SORT
           
static Comparator gradeEditorComparator
           
static String item_type_adjustment
           
static String item_type_letter
           
static String item_type_nonCalc
           
static String item_type_percentage
           
static String item_type_points
           
static Comparator meanComparator
           
static Comparator nameComparator
           
static Comparator pointsComparator
           
static Comparator releasedComparator
           
 String selectedGradeEntryValue
           
static String SORT_BY_COUNTED
           
static String SORT_BY_DATE
           
static String SORT_BY_EDITOR
           
static String SORT_BY_MEAN
           
static String SORT_BY_NAME
           
static String SORT_BY_POINTS
           
static String SORT_BY_RELEASED
           
static String SORT_BY_SORTING
           
 
Fields inherited from class org.sakaiproject.tool.gradebook.GradableObject
categoryComparator, defaultComparator, gradebook, id, idComparator, log, mean, name, removed, sortingComparator, sortOrder, version
 
Constructor Summary
Assignment()
           
Assignment(Gradebook gradebook, String name, Double pointsPossible, Date dueDate)
           
Assignment(Gradebook gradebook, String name, Double pointsPossible, Date dueDate, boolean released)
          constructor to support selective release
 
Method Summary
 void calculateStatistics(Collection<AssignmentGradeRecord> gradeRecords)
          Calculate the mean score for students with entered grades.
 Double getAssignmentWeighting()
           
 Double getAverageTotal()
           
 Category getCategory()
           
 Boolean getCountNullsAsZeros()
           
 Date getDateForDisplay()
           
 Date getDueDate()
           
 String getExternalAppName()
           
 String getExternalId()
           
 String getExternalInstructorLink()
           
 String getExternalStudentLink()
           
 boolean getIsCategory()
           
 String getItemType()
           
 Double getPointsPossible()
           
 String getSelectedGradeEntryValue()
           
 boolean getUngraded()
           
 boolean isAssignment()
           
 boolean isCounted()
           
 boolean isCourseGrade()
           
 boolean isExternallyMaintained()
           
 Boolean isExtraCredit()
           
 boolean isHideInAllGradesTable()
           
 boolean isIncludedInCalculations()
          Convenience method for checking if the grade for the assignment should be included in calculations.
 boolean isNotCounted()
           
 boolean isReleased()
           
 void setAssignmentWeighting(Double assignmentWeighting)
           
 void setAverageTotal(Double averageTotal)
           
 void setCategory(Category category)
           
 void setCounted(boolean counted)
          This cover is for the benefit of JSF checkboxes.
 void setCountNullsAsZeros(Boolean countNullsAsZeros)
           
 void setDueDate(Date dueDate)
           
 void setExternalAppName(String externalAppName)
           
 void setExternalId(String externalId)
           
 void setExternalInstructorLink(String externalInstructorLink)
           
 void setExternallyMaintained(boolean externallyMaintained)
           
 void setExternalStudentLink(String externalStudentLink)
           
 void setExtraCredit(Boolean isExtraCredit)
           
 void setHideInAllGradesTable(boolean hideInAllGradesTable)
           
 void setItemType(String itemType)
           
 void setNotCounted(boolean notCounted)
           
 void setPointsPossible(Double pointsPossible)
           
 void setReleased(boolean released)
           
 void setSelectedGradeEntryValue(String selectedGradeEntryValue)
           
 void setUngraded(boolean ungraded)
           
 
Methods inherited from class org.sakaiproject.tool.gradebook.GradableObject
assignSorting, equals, getFormattedMean, getGradebook, getId, getMean, getName, getSortOrder, getSortPosition, getVersion, hashCode, isFirst, isLast, isRemoved, setGradebook, setId, setMean, setName, setRemoved, setSortOrder, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SORT_BY_DATE

public static String SORT_BY_DATE

SORT_BY_NAME

public static String SORT_BY_NAME

SORT_BY_MEAN

public static String SORT_BY_MEAN

SORT_BY_POINTS

public static String SORT_BY_POINTS

SORT_BY_RELEASED

public static String SORT_BY_RELEASED

SORT_BY_COUNTED

public static String SORT_BY_COUNTED

SORT_BY_EDITOR

public static String SORT_BY_EDITOR

SORT_BY_SORTING

public static String SORT_BY_SORTING

DEFAULT_SORT

public static String DEFAULT_SORT

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

selectedGradeEntryValue

public String selectedGradeEntryValue
Constructor Detail

Assignment

public Assignment(Gradebook gradebook,
                  String name,
                  Double pointsPossible,
                  Date dueDate)

Assignment

public Assignment(Gradebook gradebook,
                  String name,
                  Double pointsPossible,
                  Date dueDate,
                  boolean released)
constructor to support selective release

Parameters:
gradebook -
name -
pointsPossible -
dueDate -
released -

Assignment

public Assignment()
Method Detail

isCourseGrade

public boolean isCourseGrade()
Specified by:
isCourseGrade in class GradableObject
Returns:
Whether this gradable object is a course grade

isAssignment

public boolean isAssignment()
Specified by:
isAssignment in class GradableObject
Returns:
Whether this gradable object is an assignment
See Also:
GradableObject.isAssignment()

getIsCategory

public boolean getIsCategory()
Specified by:
getIsCategory in class GradableObject
Returns:
Whether this gradable object is a category
See Also:
org.sakaiproject.tool.gradebook.GradableObject#isCategory()

getDateForDisplay

public Date getDateForDisplay()

getDueDate

public Date getDueDate()
Returns:
Returns the dueDate.

setDueDate

public void setDueDate(Date dueDate)
Parameters:
dueDate - The dueDate to set.

isNotCounted

public boolean isNotCounted()

setNotCounted

public void setNotCounted(boolean notCounted)

isCounted

public boolean isCounted()

setCounted

public void setCounted(boolean counted)
This cover is for the benefit of JSF checkboxes.


getExternalInstructorLink

public String getExternalInstructorLink()
Returns:
Returns the externalInstructorLink.

setExternalInstructorLink

public void setExternalInstructorLink(String externalInstructorLink)
Parameters:
externalInstructorLink - The externalInstructorLink to set.

isExternallyMaintained

public boolean isExternallyMaintained()
Returns:
Returns the externallyMaintained.

setExternallyMaintained

public void setExternallyMaintained(boolean externallyMaintained)
Parameters:
externallyMaintained - The externallyMaintained to set.

getExternalStudentLink

public String getExternalStudentLink()
Returns:
Returns the externalStudentLink.

setExternalStudentLink

public void setExternalStudentLink(String externalStudentLink)
Parameters:
externalStudentLink - The externalStudentLink to set.

getPointsPossible

public Double getPointsPossible()
Returns:
Returns the pointsPossible.

setPointsPossible

public void setPointsPossible(Double pointsPossible)
Parameters:
pointsPossible - The pointsPossible to set.

getExternalId

public String getExternalId()
Returns:
Returns the externalId.

setExternalId

public void setExternalId(String externalId)
Parameters:
externalId - The externalId to set.

getExternalAppName

public String getExternalAppName()
Returns:
Returns the externalAppName.

setExternalAppName

public void setExternalAppName(String externalAppName)
Parameters:
externalAppName - The externalAppName to set.

isReleased

public boolean isReleased()
Returns:
selective release true or false

setReleased

public void setReleased(boolean released)
Parameters:
released - returns wther the assignment has been released to users

calculateStatistics

public void calculateStatistics(Collection<AssignmentGradeRecord> gradeRecords)
Calculate the mean score for students with entered grades.


getCategory

public Category getCategory()

setCategory

public void setCategory(Category category)

getAverageTotal

public Double getAverageTotal()

setAverageTotal

public void setAverageTotal(Double averageTotal)

getUngraded

public boolean getUngraded()

setUngraded

public void setUngraded(boolean ungraded)

isExtraCredit

public Boolean isExtraCredit()

setExtraCredit

public void setExtraCredit(Boolean isExtraCredit)

getAssignmentWeighting

public Double getAssignmentWeighting()

setAssignmentWeighting

public void setAssignmentWeighting(Double assignmentWeighting)

getItemType

public String getItemType()

setItemType

public void setItemType(String itemType)

getCountNullsAsZeros

public Boolean getCountNullsAsZeros()

setCountNullsAsZeros

public void setCountNullsAsZeros(Boolean countNullsAsZeros)

getSelectedGradeEntryValue

public String getSelectedGradeEntryValue()

setSelectedGradeEntryValue

public void setSelectedGradeEntryValue(String selectedGradeEntryValue)

isIncludedInCalculations

public boolean isIncludedInCalculations()
Convenience method for checking if the grade for the assignment should be included in calculations. This is different from just the isCounted() 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.

Returns:
true if grades for this assignment should be included in various calculations.

isHideInAllGradesTable

public boolean isHideInAllGradesTable()

setHideInAllGradesTable

public void setHideInAllGradesTable(boolean hideInAllGradesTable)


Copyright © 2003-2013 Sakai Project. All Rights Reserved.