| org.sakaiproject.assignment.api.AssignmentService
All known Subclasses: org.sakaiproject.assignment.impl.BaseAssignmentService,
AssignmentService | public interface AssignmentService extends EntityProducer(Code) | |
AssignmentService is the service that handles assignments.
Each Assignment has an associated AssignmentContent (an AssignmentContent can belong to more the one Assignment) and a list of AssignmentSubmission (the student responses to the Assignment).
|
Method Summary | |
public AssignmentEdit | addAssignment(String context) Creates and adds a new Assignment to the service.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public AssignmentContentEdit | addAssignmentContent(String context) Creates and adds a new AssignmentContent to the service.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public AssignmentEdit | addDuplicateAssignment(String context, String assignmentReference) Creates and adds a new Assignment to the service which is a copy of an existing Assignment.
Parameters: context - -From DefaultId.getChannel(RunData) Parameters: assignmentReference - -The reference of the Assignment to be duplicated. | public AssignmentContentEdit | addDuplicateAssignmentContent(String context, String contentReference) Creates and adds a new AssignmentContent to the service which is a copy of an existing AssignmentContent.
Parameters: context - -From DefaultId.getChannel(RunData) Parameters: contentId - -The id of the AssignmentContent to be duplicated. | public AssignmentSubmissionEdit | addSubmission(String context, String assignmentId) Adds an AssignmentSubmission to the service.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public boolean | allowAddAssignment(String context) Check permissions for adding an Assignment.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public boolean | allowAddAssignmentContent(String context) Check permissions for adding an AssignmentContent.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public List | allowAddAssignmentUsers(String context) Get the List of Users who can add assignment
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | boolean | allowAddSiteAssignment(String context) Check if the user has permission to add a site-wide (not grouped) assignment.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public boolean | allowAddSubmission(String context) Check permissions for add AssignmentSubmission
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public List | allowAddSubmissionUsers(String assignmentReference) Get the List of Users who can addSubmission() for this assignment. | public boolean | allowGetAssignment(String assignmentReference) Check permissions for reading an Assignment.
Parameters: assignmentReference - -The Assignment's reference. | public boolean | allowGetAssignmentContent(String contentReference) Check permissions for get AssignmentContent
Parameters: contentReference - -The AssignmentContent reference. | public boolean | allowGetSubmission(String submissionReference) Check permissions for reading a Submission.
Parameters: submissionReference - -The Submission's reference. | public boolean | allowGradeSubmission(String submissionReference) Check permissions for grading Submission
Parameters: submissionReference - -The Submission's reference. | public boolean | allowRemoveAssignment(String assignmentReference) Check permissions for removing an Assignment.
Parameters: assignmentReference - -The Assignment's reference. | public boolean | allowRemoveAssignmentContent(String contentReference) Check permissions for remove Assignment content
Parameters: contentReference - -The AssignmentContent reference. | public boolean | allowRemoveSubmission(String submissionReference) Check permissions for remove Submission
Parameters: submissionReference - -The Submission's reference. | public boolean | allowUpdateAssignment(String assignmentReference) Check permissions for updating an Assignment.
Parameters: assignmentReference - -The Assignment's reference. | public boolean | allowUpdateAssignmentContent(String contentReference) Check permissions for updating AssignmentContent
Parameters: contentReference - -The AssignmentContent reference. | public boolean | allowUpdateSubmission(String submissionReference) Check permissions for updating Submission.
Parameters: submissionReference - -The Submission's reference. | public String | assignmentReference(String context, String id) Access the internal reference which can be used to assess security clearance.
Parameters: id - The assignment id string. | public void | cancelEdit(AssignmentEdit assignment) Cancel the changes made to a AssignmentEdit object, and release the lock. | public void | cancelEdit(AssignmentContentEdit content) Cancel the changes made to a AssignmentContentEdit object, and release the lock. | public void | cancelEdit(AssignmentSubmissionEdit submission) Cancel the changes made to a AssignmentSubmissionEdit object, and release the lock. | public void | commitEdit(AssignmentEdit assignment) Commit the changes made to a AssignmentEdit object, and release the lock. | public void | commitEdit(AssignmentContentEdit content) Commit the changes made to a AssignmentContentEdit object, and release the lock. | public void | commitEdit(AssignmentSubmissionEdit submission) Commit the changes made to a AssignmentSubmissionEdit object, and release the lock. | public String | contentReference(String context, String id) Access the internal reference which can be used to access the resource from within the system.
Parameters: id - The content id string. | public AssignmentEdit | editAssignment(String id) Get a locked assignment object for editing. | public AssignmentContentEdit | editAssignmentContent(String id) Get a locked AssignmentContent object for editing. | public AssignmentSubmissionEdit | editSubmission(String id) Get a locked AssignmentSubmission object for editing. | public boolean | getAllowGroupAssignments() | public boolean | getAllowGroupAssignmentsInGradebook() | public Assignment | getAssignment(String assignmentId) Access the Assignment with the specified id.
Parameters: assignmentId - -The id of the Assignment. | public AssignmentContent | getAssignmentContent(String contentId) Access the AssignmentContent with the specified id.
Parameters: contentId - -The id of the AssignmentContent. | public Iterator | getAssignmentContents(User owner) Access list of all AssignmentContents created by the User.
Parameters: owner - -The User who's AssignmentContents are requested. | public Iterator | getAssignments(AssignmentContent content) Access all the Assignments which have the specified AssignmentContent.
Parameters: content - -The particular AssignmentContent. | public Iterator | getAssignmentsForContext(String context) Access all the Assignemnts associated with a group.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public byte[] | getGradesSpreadsheet(String ref) Access the grades spreadsheet for the reference, either for an assignment or all assignments in a context.
Parameters: ref - The reference, either to a specific assignment, or just to an assignment context. | Collection | getGroupsAllowAddAssignment(String context) Get the collection of Groups defined for the context of this site that the end user has add assignment permissions in.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public List | getListAssignmentsForContext(String context) Access all the Assignemnts that are not deleted and self-drafted ones
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). | public AssignmentSubmission | getSubmission(String submissionId) Access the AssignmentSubmission with the specified id.
Parameters: submissionId - -The id of the AssignmentSubmission. | public AssignmentSubmission | getSubmission(String assignmentId, User person) Access a User's AssignmentSubmission to a particular Assignment.
Parameters: assignmentId - -The id of the assignment. Parameters: person - -The User who's Submission you would like. | public Iterator | getSubmissions(Assignment assignment) Get the submissions for an assignment.
Parameters: assignment - -the Assignment who's submissions you would like. | public byte[] | getSubmissionsZip(String ref) Access the submissions zip for the assignment reference.
Parameters: ref - The assignment reference. | public String | gradesSpreadsheetReference(String context, String assignmentId) | public AssignmentEdit | mergeAssignment(Element el) Add a new assignment to the directory, from a definition in XML. | public AssignmentContentEdit | mergeAssignmentContent(Element el) Add a new AssignmentContent to the directory, from a definition in XML. | public AssignmentSubmissionEdit | mergeSubmission(Element el) Add a new AssignmentSubmission to the directory, from a definition in XML. | public void | removeAssignment(AssignmentEdit assignment) Removes this Assignment and all references to it. | public void | removeAssignmentContent(AssignmentContentEdit content) | public void | removeSubmission(AssignmentSubmissionEdit submission) | public String | submissionReference(String context, String id, String assignmentId) Access the internal reference which can be used to access the resource from within the system.
Parameters: id - The submission id string. | public String | submissionsZipReference(String context, String assignmentId) |
APPLICATION_ID | final static String APPLICATION_ID(Code) | | The type string for this application: should not change over time as it may be stored in various parts of persistent entities.
|
REFERENCE_ROOT | final public static String REFERENCE_ROOT(Code) | | This string starts the references to resources in this service.
|
REF_TYPE_ASSIGNMENT | final public static String REF_TYPE_ASSIGNMENT(Code) | | The Reference type for an assignment.
|
REF_TYPE_ASSIGNMENT_GROUPS | final public static String REF_TYPE_ASSIGNMENT_GROUPS(Code) | | The Reference type for an assignment where site groups are to be considered in security computation.
|
REF_TYPE_CONTENT | final public static String REF_TYPE_CONTENT(Code) | | The Reference type for a content.
|
REF_TYPE_GRADES | final public static String REF_TYPE_GRADES(Code) | | The Reference type for a grade spreadsheet.
|
REF_TYPE_SITE_GROUPS | final public static String REF_TYPE_SITE_GROUPS(Code) | | The Reference type for a site where site groups are to be considered in security computation.
|
REF_TYPE_SUBMISSION | final public static String REF_TYPE_SUBMISSION(Code) | | The Reference type for a submission.
|
REF_TYPE_SUBMISSIONS | final public static String REF_TYPE_SUBMISSIONS(Code) | | The Reference type for a submissions zip.
|
SECURE_ACCESS_ASSIGNMENT | final public static String SECURE_ACCESS_ASSIGNMENT(Code) | | Security lock for accessing an assignment.
|
SECURE_ACCESS_ASSIGNMENT_CONTENT | final public static String SECURE_ACCESS_ASSIGNMENT_CONTENT(Code) | | Security lock for accessing an assignment content.
|
SECURE_ACCESS_ASSIGNMENT_SUBMISSION | final public static String SECURE_ACCESS_ASSIGNMENT_SUBMISSION(Code) | | Security lock for accessing an assignment submission.
|
SECURE_ADD_ASSIGNMENT | final public static String SECURE_ADD_ASSIGNMENT(Code) | | Security lock for adding an assignment.
|
SECURE_ADD_ASSIGNMENT_CONTENT | final public static String SECURE_ADD_ASSIGNMENT_CONTENT(Code) | | Security lock for adding an assignment.
|
SECURE_ADD_ASSIGNMENT_SUBMISSION | final public static String SECURE_ADD_ASSIGNMENT_SUBMISSION(Code) | | Security lock for adding an assignment submission.
|
SECURE_ALL_GROUPS | final public static String SECURE_ALL_GROUPS(Code) | | Security function giving the user permission to all groups, if granted to at the site level.
|
SECURE_GRADE_ASSIGNMENT_SUBMISSION | final public static String SECURE_GRADE_ASSIGNMENT_SUBMISSION(Code) | | Security lock for grading submission
|
SECURE_REMOVE_ASSIGNMENT | final public static String SECURE_REMOVE_ASSIGNMENT(Code) | | Security lock for removing an assignment.
|
SECURE_REMOVE_ASSIGNMENT_CONTENT | final public static String SECURE_REMOVE_ASSIGNMENT_CONTENT(Code) | | Security lock for removing an assignment content.
|
SECURE_REMOVE_ASSIGNMENT_SUBMISSION | final public static String SECURE_REMOVE_ASSIGNMENT_SUBMISSION(Code) | | Security lock for removing an assignment submission.
|
SECURE_UPDATE_ASSIGNMENT | final public static String SECURE_UPDATE_ASSIGNMENT(Code) | | Security lock for updating an assignment.
|
SECURE_UPDATE_ASSIGNMENT_CONTENT | final public static String SECURE_UPDATE_ASSIGNMENT_CONTENT(Code) | | Security lock for updating an assignment content.
|
SECURE_UPDATE_ASSIGNMENT_SUBMISSION | final public static String SECURE_UPDATE_ASSIGNMENT_SUBMISSION(Code) | | Security lock for updating an assignment submission.
|
addAssignment | public AssignmentEdit addAssignment(String context) throws PermissionException(Code) | | Creates and adds a new Assignment to the service.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). AssignmentEdit The new Assignment object. throws: IdInvalidException - if the id contains prohibited characers. throws: IdUsedException - if the id is already used in the service. throws: PermissionException - if current User does not have permission to do this. |
addAssignmentContent | public AssignmentContentEdit addAssignmentContent(String context) throws PermissionException(Code) | | Creates and adds a new AssignmentContent to the service.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). AssignmentContentEdit The new AssignmentContent object. throws: PermissionException - if current User does not have permission to do this. |
addDuplicateAssignmentContent | public AssignmentContentEdit addDuplicateAssignmentContent(String context, String contentReference) throws IdInvalidException, PermissionException, IdUnusedException(Code) | | Creates and adds a new AssignmentContent to the service which is a copy of an existing AssignmentContent.
Parameters: context - -From DefaultId.getChannel(RunData) Parameters: contentId - -The id of the AssignmentContent to be duplicated. AssignmentContentEdit The new AssignmentContentEdit object, or null if the original does not exist. throws: PermissionException - if current User does not have permission to do this. |
allowAddAssignment | public boolean allowAddAssignment(String context)(Code) | | Check permissions for adding an Assignment.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). True if the current User is allowed to add an Assignment, false if not. |
allowAddAssignmentContent | public boolean allowAddAssignmentContent(String context)(Code) | | Check permissions for adding an AssignmentContent.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). True if the current User is allowed to add an AssignmentContent, false if not. |
allowAddAssignmentUsers | public List allowAddAssignmentUsers(String context)(Code) | | Get the List of Users who can add assignment
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). the List (User) of users who can add assignment |
allowAddSiteAssignment | boolean allowAddSiteAssignment(String context)(Code) | | Check if the user has permission to add a site-wide (not grouped) assignment.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). true if the user has permission to add a channel-wide (not grouped) assignment. |
allowAddSubmission | public boolean allowAddSubmission(String context)(Code) | | Check permissions for add AssignmentSubmission
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). True if the current User is allowed to add an AssignmentSubmission, false if not. |
allowAddSubmissionUsers | public List allowAddSubmissionUsers(String assignmentReference)(Code) | | Get the List of Users who can addSubmission() for this assignment.
Parameters: assignmentReference - -a reference to an assignment the List (User) of users who can addSubmission() for this assignment. |
allowGetAssignment | public boolean allowGetAssignment(String assignmentReference)(Code) | | Check permissions for reading an Assignment.
Parameters: assignmentReference - -The Assignment's reference. True if the current User is allowed to get the Assignment, false if not. |
allowGetAssignmentContent | public boolean allowGetAssignmentContent(String contentReference)(Code) | | Check permissions for get AssignmentContent
Parameters: contentReference - -The AssignmentContent reference. True if the current User is allowed to get the AssignmentContent, false if not. |
allowGetSubmission | public boolean allowGetSubmission(String submissionReference)(Code) | | Check permissions for reading a Submission.
Parameters: submissionReference - -The Submission's reference. True if the current User is allowed to get the AssignmentSubmission, false if not. |
allowGradeSubmission | public boolean allowGradeSubmission(String submissionReference)(Code) | | Check permissions for grading Submission
Parameters: submissionReference - -The Submission's reference. True if the current User is allowed to grade the AssignmentSubmission, false if not. |
allowRemoveAssignment | public boolean allowRemoveAssignment(String assignmentReference)(Code) | | Check permissions for removing an Assignment.
Parameters: assignmentReference - -The Assignment's reference. True if the current User is allowed to remove the Assignment, false if not. |
allowRemoveAssignmentContent | public boolean allowRemoveAssignmentContent(String contentReference)(Code) | | Check permissions for remove Assignment content
Parameters: contentReference - -The AssignmentContent reference. True if the current User is allowed to remove the AssignmentContent, false if not. |
allowRemoveSubmission | public boolean allowRemoveSubmission(String submissionReference)(Code) | | Check permissions for remove Submission
Parameters: submissionReference - -The Submission's reference. True if the current User is allowed to remove the AssignmentSubmission, false if not. |
allowUpdateAssignment | public boolean allowUpdateAssignment(String assignmentReference)(Code) | | Check permissions for updating an Assignment.
Parameters: assignmentReference - -The Assignment's reference. True if the current User is allowed to update the Assignment, false if not. |
allowUpdateAssignmentContent | public boolean allowUpdateAssignmentContent(String contentReference)(Code) | | Check permissions for updating AssignmentContent
Parameters: contentReference - -The AssignmentContent reference. True if the current User is allowed to update the AssignmentContent, false if not. |
allowUpdateSubmission | public boolean allowUpdateSubmission(String submissionReference)(Code) | | Check permissions for updating Submission.
Parameters: submissionReference - -The Submission's reference. True if the current User is allowed to update the AssignmentSubmission, false if not. |
assignmentReference | public String assignmentReference(String context, String id)(Code) | | Access the internal reference which can be used to assess security clearance.
Parameters: id - The assignment id string. The the internal reference which can be used to access the resource from within the system. |
cancelEdit | public void cancelEdit(AssignmentEdit assignment)(Code) | | Cancel the changes made to a AssignmentEdit object, and release the lock. The AssignmentEdit is disabled, and not to be used after this call.
Parameters: assignment - The AssignmentEdit object to commit. |
cancelEdit | public void cancelEdit(AssignmentContentEdit content)(Code) | | Cancel the changes made to a AssignmentContentEdit object, and release the lock. The AssignmentContentEdit is disabled, and not to be used after this call.
Parameters: content - The AssignmentContentEdit object to commit. |
cancelEdit | public void cancelEdit(AssignmentSubmissionEdit submission)(Code) | | Cancel the changes made to a AssignmentSubmissionEdit object, and release the lock. The AssignmentSubmissionEdit is disabled, and not to be used after this call.
Parameters: submission - The AssignmentSubmissionEdit object to commit. |
commitEdit | public void commitEdit(AssignmentEdit assignment)(Code) | | Commit the changes made to a AssignmentEdit object, and release the lock. The AssignmentEdit is disabled, and not to be used after this call.
Parameters: assignment - The AssignmentEdit object to commit. |
commitEdit | public void commitEdit(AssignmentContentEdit content)(Code) | | Commit the changes made to a AssignmentContentEdit object, and release the lock. The AssignmentContentEdit is disabled, and not to be used after this call.
Parameters: content - The AssignmentContentEdit object to commit. |
commitEdit | public void commitEdit(AssignmentSubmissionEdit submission)(Code) | | Commit the changes made to a AssignmentSubmissionEdit object, and release the lock. The AssignmentSubmissionEdit is disabled, and not to be used after this call.
Parameters: submission - The AssignmentSubmissionEdit object to commit. |
contentReference | public String contentReference(String context, String id)(Code) | | Access the internal reference which can be used to access the resource from within the system.
Parameters: id - The content id string. The the internal reference which can be used to access the resource from within the system. |
getAllowGroupAssignments | public boolean getAllowGroupAssignments()(Code) | | Whether assignment could be assigned to groups
|
getAllowGroupAssignmentsInGradebook | public boolean getAllowGroupAssignmentsInGradebook()(Code) | | Whether assignment with group access can be added to gradebook
|
getAssignmentContents | public Iterator getAssignmentContents(User owner)(Code) | | Access list of all AssignmentContents created by the User.
Parameters: owner - -The User who's AssignmentContents are requested. Iterator over all AssignmentContents owned by this User. |
getAssignments | public Iterator getAssignments(AssignmentContent content)(Code) | | Access all the Assignments which have the specified AssignmentContent.
Parameters: content - -The particular AssignmentContent. Iterator over all the Assignments with the specified AssignmentContent. |
getAssignmentsForContext | public Iterator getAssignmentsForContext(String context)(Code) | | Access all the Assignemnts associated with a group.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). Iterator over all the Assignments associated with a group. |
getGradesSpreadsheet | public byte[] getGradesSpreadsheet(String ref) throws IdUnusedException, PermissionException(Code) | | Access the grades spreadsheet for the reference, either for an assignment or all assignments in a context.
Parameters: ref - The reference, either to a specific assignment, or just to an assignment context. The grades spreadsheet bytes. throws: IdUnusedException - if there is no object with this id. throws: PermissionException - if the current user is not allowed to access this. |
getGroupsAllowAddAssignment | Collection getGroupsAllowAddAssignment(String context)(Code) | | Get the collection of Groups defined for the context of this site that the end user has add assignment permissions in.
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). The Collection (Group) of groups defined for the context of this site that the end user has add assignment permissions in, empty if none. |
getListAssignmentsForContext | public List getListAssignmentsForContext(String context)(Code) | | Access all the Assignemnts that are not deleted and self-drafted ones
Parameters: context - -Describes the portlet context - generated with DefaultId.getChannel(). List All the Assignments will be listed |
getSubmission | public AssignmentSubmission getSubmission(String assignmentId, User person) throws IdUnusedException, PermissionException(Code) | | Access a User's AssignmentSubmission to a particular Assignment.
Parameters: assignmentId - -The id of the assignment. Parameters: person - -The User who's Submission you would like. AssignmentSubmission The user's submission for that Assignment, or null if one does not exist. throws: IdUnusedException - if the assignmentId does not correspond to an existing Assignment. throws: PermissionException - if the current user is not allowed to read this. |
getSubmissions | public Iterator getSubmissions(Assignment assignment)(Code) | | Get the submissions for an assignment.
Parameters: assignment - -the Assignment who's submissions you would like. Iterator over all the submissions for an Assignment. |
gradesSpreadsheetReference | public String gradesSpreadsheetReference(String context, String assignmentId)(Code) | | Get the String to form an assignment grade spreadsheet
Parameters: context - The assignment context String Parameters: assignmentId - The id for the assignment object; when null, indicates all assignment in that context |
submissionReference | public String submissionReference(String context, String id, String assignmentId)(Code) | | Access the internal reference which can be used to access the resource from within the system.
Parameters: id - The submission id string. The the internal reference which can be used to access the resource from within the system. |
submissionsZipReference | public String submissionsZipReference(String context, String assignmentId)(Code) | | Get the string to form an assignment submissions zip file
Parameters: context - The assignment context String Parameters: assignmentId - The id for the assignment object; |
|
|