org.sakaiproject.component.legacy.assignment
Class BaseAssignmentService.BaseAssignmentSubmission

java.lang.Object
  extended byorg.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignmentSubmission
All Implemented Interfaces:
AssignmentSubmission, Entity
Direct Known Subclasses:
BaseAssignmentService.BaseAssignmentSubmissionEdit
Enclosing class:
BaseAssignmentService

public class BaseAssignmentService.BaseAssignmentSubmission
extends Object
implements AssignmentSubmission

AssignmentSubmission implementation


Field Summary
protected  String m_assignment
           
protected  String m_context
           
protected  List m_feedbackAttachments
           
protected  String m_feedbackComment
           
protected  String m_feedbackText
           
protected  String m_grade
           
protected  boolean m_graded
           
protected  boolean m_gradeReleased
           
protected  boolean m_honorPledgeFlag
           
protected  String m_id
           
protected  ResourcePropertiesEdit m_properties
           
protected  boolean m_returned
           
protected  boolean m_submitted
           
protected  List m_submittedAttachments
           
protected  String m_submittedText
           
protected  List m_submitters
           
protected  Time m_timeLastModified
           
protected  Time m_timeReturned
           
protected  Time m_timeSubmitted
           
protected  String STATUS_DRAFT
           
protected  String STATUS_GRADED
           
protected  String STATUS_RETURNED
           
protected  String STATUS_SUBMITTED
           
 
Fields inherited from interface org.sakaiproject.service.legacy.entity.Entity
SEPARATOR
 
Constructor Summary
BaseAssignmentService.BaseAssignmentSubmission(AssignmentSubmission submission)
          Copy constructor.
BaseAssignmentService.BaseAssignmentSubmission(Element el)
          Reads the AssignmentSubmission's attribute values from xml.
BaseAssignmentService.BaseAssignmentSubmission(String id, String context, String assignId)
          Constructor used by addSubmission.
 
Method Summary
 int compareTo(Object obj)
          Compare this object with the specified object for order.
 boolean equals(Object obj)
          Are these objects equal?
 Assignment getAssignment()
          Access the Assignment for this Submission
 String getAssignmentId()
          Access the Id for the Assignment for this Submission
 String getContext()
          Access the AssignmentSubmission's context at the time of creation.
 List getFeedbackAttachments()
          Access the list of attachments returned to the students in the process of grading this assignment; usually a modified or annotated version of the attachment submitted.
 String getFeedbackComment()
          Get the general comments by the grader
 String getFeedbackText()
          Access the text part of the instructors feedback; usually an annotated copy of the submittedText
 String getGrade()
          Access the grade recieved.
 boolean getGraded()
          Get whether this Submission has been graded.
 String getGradeDisplay()
          Access the grade recieved.
 boolean getGradeReleased()
          Get whether the grade has been released.
 boolean getHonorPledgeFlag()
          Access the checked status of the honor pledge flag.
 String getId()
          Access the id of the resource.
 ResourceProperties getProperties()
          Access the resource's properties.
 String getReference()
          Access the internal reference which can be used to access the resource from within the system.
 String getReference(String rootProperty)
          Access the alternate internal reference which can be used to access the entity from within the system.
 boolean getReturned()
          Get whether this Submission was rejected by the grader.
 String getStatus()
          Returns the status of the submission : Not Started, submitted, returned or graded.
 boolean getSubmitted()
          Get whether this is a final submission.
 List getSubmittedAttachments()
          Access the list of attachments to this response to the Assignment.
 String getSubmittedText()
          Text submitted in response to the Assignment.
 List getSubmitterIds()
          Access the list of Users who submitted this response to the Assignment.
 User[] getSubmitters()
          Access the list of Users who submitted this response to the Assignment.
 Time getTimeLastModified()
          Get the time of last modification;
 Time getTimeReturned()
          Get the time on which the graded submission was returned; null means the response is not yet graded.
 Time getTimeSubmitted()
          Set the time at which this response was submitted; null signifies the response is unsubmitted.
 String getUrl()
          Access the URL which can be used to access the resource.
 String getUrl(String rootProperty)
          Access the alternate URL which can be used to access the entity.
 int hashCode()
          Make a hash code that reflects the equals() logic as well.
protected  void setAll(AssignmentSubmission submission)
           
 Element toXml(Document doc, Stack stack)
          Takes the AssignmentContent's attribute values and puts them into the xml document.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_DRAFT

protected final String STATUS_DRAFT
See Also:
Constant Field Values

STATUS_SUBMITTED

protected final String STATUS_SUBMITTED
See Also:
Constant Field Values

STATUS_RETURNED

protected final String STATUS_RETURNED
See Also:
Constant Field Values

STATUS_GRADED

protected final String STATUS_GRADED
See Also:
Constant Field Values

m_properties

protected ResourcePropertiesEdit m_properties

m_id

protected String m_id

m_assignment

protected String m_assignment

m_context

protected String m_context

m_submitters

protected List m_submitters

m_timeSubmitted

protected Time m_timeSubmitted

m_timeReturned

protected Time m_timeReturned

m_timeLastModified

protected Time m_timeLastModified

m_submittedAttachments

protected List m_submittedAttachments

m_feedbackAttachments

protected List m_feedbackAttachments

m_submittedText

protected String m_submittedText

m_feedbackComment

protected String m_feedbackComment

m_feedbackText

protected String m_feedbackText

m_grade

protected String m_grade

m_submitted

protected boolean m_submitted

m_returned

protected boolean m_returned

m_graded

protected boolean m_graded

m_gradeReleased

protected boolean m_gradeReleased

m_honorPledgeFlag

protected boolean m_honorPledgeFlag
Constructor Detail

BaseAssignmentService.BaseAssignmentSubmission

public BaseAssignmentService.BaseAssignmentSubmission(AssignmentSubmission submission)
Copy constructor.


BaseAssignmentService.BaseAssignmentSubmission

public BaseAssignmentService.BaseAssignmentSubmission(String id,
                                                      String context,
                                                      String assignId)
Constructor used by addSubmission.


BaseAssignmentService.BaseAssignmentSubmission

public BaseAssignmentService.BaseAssignmentSubmission(Element el)
Reads the AssignmentSubmission's attribute values from xml.

Method Detail

toXml

public Element toXml(Document doc,
                     Stack stack)
Takes the AssignmentContent's attribute values and puts them into the xml document.

Specified by:
toXml in interface Entity
Parameters:
doc - - The xml document.
stack - The DOM elements, the top of which is the containing element of the new "entity" element.
Returns:
The newly added element.

setAll

protected void setAll(AssignmentSubmission submission)

getUrl

public String getUrl()
Access the URL which can be used to access the resource.

Specified by:
getUrl in interface Entity
Returns:
The URL which can be used to access the resource.

getReference

public String getReference()
Access the internal reference which can be used to access the resource from within the system.

Specified by:
getReference in interface Entity
Returns:
The the internal reference which can be used to access the resource from within the system.

getReference

public String getReference(String rootProperty)
Description copied from interface: Entity
Access the alternate internal reference which can be used to access the entity from within the system.

Specified by:
getReference in interface Entity
Parameters:
rootProperty - The name of the entity property whose value controls which alternate reference is requested. If null, the native 'raw' reference is requested.
Returns:
The the alternate internal reference which can be used to access the entity from within the system.

getUrl

public String getUrl(String rootProperty)
Description copied from interface: Entity
Access the alternate URL which can be used to access the entity.

Specified by:
getUrl in interface Entity
Parameters:
rootProperty - The name of the entity property whose value controls which alternate reference URL is requested. If null, the native 'raw' URL is requested.
Returns:
The alternate URL which can be used to access the entity.

getId

public String getId()
Access the id of the resource.

Specified by:
getId in interface Entity
Returns:
The id.

getProperties

public ResourceProperties getProperties()
Access the resource's properties.

Specified by:
getProperties in interface Entity
Returns:
The resource's properties.

getContext

public String getContext()
Access the AssignmentSubmission's context at the time of creation.

Specified by:
getContext in interface AssignmentSubmission
Returns:
String - the context string.

getAssignment

public Assignment getAssignment()
Access the Assignment for this Submission

Specified by:
getAssignment in interface AssignmentSubmission
Returns:
the Assignment

getAssignmentId

public String getAssignmentId()
Access the Id for the Assignment for this Submission

Specified by:
getAssignmentId in interface AssignmentSubmission
Returns:
String - the Assignment Id

getSubmitted

public boolean getSubmitted()
Get whether this is a final submission.

Specified by:
getSubmitted in interface AssignmentSubmission
Returns:
True if a final submission, false if still a draft.

getSubmitters

public User[] getSubmitters()
Access the list of Users who submitted this response to the Assignment.

Specified by:
getSubmitters in interface AssignmentSubmission
Returns:
Array of User objects.

getSubmitterIds

public List getSubmitterIds()
Access the list of Users who submitted this response to the Assignment.

Specified by:
getSubmitterIds in interface AssignmentSubmission
Returns:
FlexStringArray of user ids.

getTimeSubmitted

public Time getTimeSubmitted()
Set the time at which this response was submitted; null signifies the response is unsubmitted.

Specified by:
getTimeSubmitted in interface AssignmentSubmission
Returns:
Time of submission.

getGradeReleased

public boolean getGradeReleased()
Get whether the grade has been released.

Specified by:
getGradeReleased in interface AssignmentSubmission
Returns:
True if the Submissions's grade has been released, false otherwise.

getGrade

public String getGrade()
Access the grade recieved.

Specified by:
getGrade in interface AssignmentSubmission
Returns:
The Submission's grade..

getGradeDisplay

public String getGradeDisplay()
Access the grade recieved.

Specified by:
getGradeDisplay in interface AssignmentSubmission
Returns:
The Submission's grade..

getTimeLastModified

public Time getTimeLastModified()
Get the time of last modification;

Specified by:
getTimeLastModified in interface AssignmentSubmission
Returns:
The time of last modification.

getSubmittedText

public String getSubmittedText()
Text submitted in response to the Assignment.

Specified by:
getSubmittedText in interface AssignmentSubmission
Returns:
The text of the submission.

getSubmittedAttachments

public List getSubmittedAttachments()
Access the list of attachments to this response to the Assignment.

Specified by:
getSubmittedAttachments in interface AssignmentSubmission
Returns:
ReferenceVector of the list of attachments as Reference objects;

getFeedbackComment

public String getFeedbackComment()
Get the general comments by the grader

Specified by:
getFeedbackComment in interface AssignmentSubmission
Returns:
The text of the grader's comments; may be null.

getFeedbackText

public String getFeedbackText()
Access the text part of the instructors feedback; usually an annotated copy of the submittedText

Specified by:
getFeedbackText in interface AssignmentSubmission
Returns:
The text of the grader's feedback.

getFeedbackAttachments

public List getFeedbackAttachments()
Access the list of attachments returned to the students in the process of grading this assignment; usually a modified or annotated version of the attachment submitted.

Specified by:
getFeedbackAttachments in interface AssignmentSubmission
Returns:
ReferenceVector of the Resource objects pointing to the attachments.

getReturned

public boolean getReturned()
Get whether this Submission was rejected by the grader.

Specified by:
getReturned in interface AssignmentSubmission
Returns:
True if this response was rejected by the grader, false otherwise.

getGraded

public boolean getGraded()
Get whether this Submission has been graded.

Specified by:
getGraded in interface AssignmentSubmission
Returns:
True if the submission has been graded, false otherwise.

getTimeReturned

public Time getTimeReturned()
Get the time on which the graded submission was returned; null means the response is not yet graded.

Specified by:
getTimeReturned in interface AssignmentSubmission
Returns:
the time (may be null)

getHonorPledgeFlag

public boolean getHonorPledgeFlag()
Access the checked status of the honor pledge flag.

Specified by:
getHonorPledgeFlag in interface AssignmentSubmission
Returns:
True if the honor pledge is checked, false otherwise.

getStatus

public String getStatus()
Returns the status of the submission : Not Started, submitted, returned or graded.

Specified by:
getStatus in interface AssignmentSubmission
Returns:
The Submission's status.

equals

public boolean equals(Object obj)
Are these objects equal? If they are both AssignmentSubmission objects, and they have matching id's, they are.

Returns:
true if they are equal, false if not.

hashCode

public int hashCode()
Make a hash code that reflects the equals() logic as well. We want two objects, even if different instances, if they have the same id to hash the same.


compareTo

public int compareTo(Object obj)
Compare this object with the specified object for order.

Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.