| org.sakaiproject.service.gradebook.shared.GradebookService
All known Subclasses: org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl,
GradebookService | public interface GradebookService (Code) | | This is the externally exposed API of the gradebook application.
This interface is principally intended for clients of application services --
that is, clients who want to "act like the Gradebook would" to automate what
would normally be done in the UI, including any authorization checks.
As a result, these methods may throw security exceptions. Call the service's
authorization-check methods if you want to avoid them.
WARNING: For documentation of the deprecated methods, please see the
service interfaces which own them.
|
Method Summary | |
public void | addAssignment(String gradebookUid, Assignment assignmentDefinition) Create a new Gradebook-managed assignment. | public void | addExternalAssessment(String gradebookUid, String externalId, String externalUrl, String title, double points, Date dueDate, String externalServiceDescription) | public void | addGradebook(String uid, String name) | public void | deleteGradebook(String uid) | public Assignment | getAssignment(String gradebookUid, String assignmentName) | public Double | getAssignmentScore(String gradebookUid, String assignmentName, String studentUid) | public CommentDefinition | getAssignmentScoreComment(String gradebookUid, String assignmentName, String studentUid) Get the comment (if any) currently provided for the given combination
of student and assignment. | public List | getAssignments(String gradebookUid) | public String | getGradebookDefinitionXml(String gradebookUid) Get an archivable definition of gradebook data suitable for migration
between sites. | public boolean | isAssignmentDefined(String gradebookUid, String assignmentTitle) Check to see if an assignment with the given name already exists in the
given gradebook. | public boolean | isExternalAssignmentDefined(String gradebookUid, String externalId) | public boolean | isGradebookDefined(String gradebookUid) Checks to see whether a gradebook with the given uid exists. | public boolean | isUserAbleToGradeStudent(String gradebookUid, String studentUid) Check to see if the current user is allowed to grade the given student in
the given gradebook. | public void | mergeGradebookDefinitionXml(String toGradebookUid, String fromGradebookXml) Attempt to merge archived gradebook data (notably the assignnments) into a new gradebook.
Assignment definitions whose names match assignments that are already in
the targeted gradebook will be skipped.
Imported assignments will not automatically be released to students, even if they
were released in the original gradebook.
Externally managed assessments will not be imported, since such imports
should be handled by the external assessment engine.
If possible, the targeted gradebook's selected grading scale will be set
to match the archived grading scale. | public void | removeExternalAssessment(String gradebookUid, String externalId) | public void | setAssignmentScore(String gradebookUid, String assignmentName, String studentUid, Double score, String clientServiceDescription) Besides the declared exceptions, possible runtime exceptions include:
- SecurityException - If the current user is not authorized to grade
the student, or if the assignment is externally maintained.
| public void | setAssignmentScoreComment(String gradebookUid, String assignmentName, String studentUid, String comment) Provide a student-viewable comment on the score (or lack of score) associated
with the given assignment. | public void | setAvailableGradingScales(Collection gradingScaleDefinitions) | public void | setDefaultGradingScale(String uid) | public void | updateAssignment(String gradebookUid, String assignmentName, Assignment assignmentDefinition) Modify the definition of an existing Gradebook-managed assignment.
Clients should be aware that it's allowed to change the points value of an
assignment even if students have already been scored on it. | public void | updateExternalAssessment(String gradebookUid, String externalId, String externalUrl, String title, double points, Date dueDate) | public void | updateExternalAssessmentScore(String gradebookUid, String externalId, String studentUid, Double points) | public void | updateExternalAssessmentScores(String gradebookUid, String externalId, Map studentUidsToScores) |
addAssignment | public void addAssignment(String gradebookUid, Assignment assignmentDefinition)(Code) | | Create a new Gradebook-managed assignment.
Parameters: assignmentDefinition - |
getAssignmentScore | public Double getAssignmentScore(String gradebookUid, String assignmentName, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException(Code) | | Besides the declared exceptions, possible runtime exceptions include:
- SecurityException - If the current user is not authorized to view
the student's score
Returns the current score for the student, or null if no scorehas been assigned yet. |
getAssignments | public List getAssignments(String gradebookUid) throws GradebookNotFoundException(Code) | | Returns a list of Assignment objects describing the assignmentsthat are currently defined in the given gradebook. |
getGradebookDefinitionXml | public String getGradebookDefinitionXml(String gradebookUid)(Code) | | Get an archivable definition of gradebook data suitable for migration
between sites. Assignment definitions and the currently selected grading
scale are included. Student view options and all information related
to specific students or instructors (such as scores) are not.
Parameters: gradebookUid - a versioned XML string |
isAssignmentDefined | public boolean isAssignmentDefined(String gradebookUid, String assignmentTitle) throws GradebookNotFoundException(Code) | | Check to see if an assignment with the given name already exists in the
given gradebook. This will give clients a chance to avoid the
ConflictingAssignmentNameException.
|
isGradebookDefined | public boolean isGradebookDefined(String gradebookUid)(Code) | | Checks to see whether a gradebook with the given uid exists.
Parameters: gradebookUid - The gradebook UID to check Whether the gradebook exists |
isUserAbleToGradeStudent | public boolean isUserAbleToGradeStudent(String gradebookUid, String studentUid)(Code) | | Check to see if the current user is allowed to grade the given student in
the given gradebook. This will give clients a chance to avoid a security
exception.
|
mergeGradebookDefinitionXml | public void mergeGradebookDefinitionXml(String toGradebookUid, String fromGradebookXml)(Code) | | Attempt to merge archived gradebook data (notably the assignnments) into a new gradebook.
Assignment definitions whose names match assignments that are already in
the targeted gradebook will be skipped.
Imported assignments will not automatically be released to students, even if they
were released in the original gradebook.
Externally managed assessments will not be imported, since such imports
should be handled by the external assessment engine.
If possible, the targeted gradebook's selected grading scale will be set
to match the archived grading scale. If there are any mismatches that make
this impossible, the existing grading scale will be left alone, but assignment
imports will still happen.
Parameters: toGradebookUid - Parameters: fromGradebookXml - |
setAssignmentScore | public void setAssignmentScore(String gradebookUid, String assignmentName, String studentUid, Double score, String clientServiceDescription) throws GradebookNotFoundException, AssessmentNotFoundException(Code) | | Besides the declared exceptions, possible runtime exceptions include:
- SecurityException - If the current user is not authorized to grade
the student, or if the assignment is externally maintained.
- StaleObjectModificationException - If the student's scores have been
edited by someone else during this transaction.
Parameters: clientServiceDescription - What to display as the programmatic source of the score (e.g.,"Message Center"). |
updateAssignment | public void updateAssignment(String gradebookUid, String assignmentName, Assignment assignmentDefinition)(Code) | | Modify the definition of an existing Gradebook-managed assignment.
Clients should be aware that it's allowed to change the points value of an
assignment even if students have already been scored on it. Any existing
scores will not be adjusted.
This method cannot be used to modify the defintions of externally-managed
assessments or to make Gradebook-managed assignments externally managed.
Parameters: assignmentName - the name of the assignment that needs to be changed Parameters: assignmentDefinition - the new properties of the assignment |
|
|