org.sakaiproject.tool.assessment.shared.impl.grading
Class GradingSectionAwareServiceImpl

java.lang.Object
  extended by org.sakaiproject.tool.assessment.shared.impl.grading.GradingSectionAwareServiceImpl
All Implemented Interfaces:
GradingSectionAwareServiceAPI

public class GradingSectionAwareServiceImpl
extends Object
implements GradingSectionAwareServiceAPI

The GradingServiceAPI implements the shared interface to get grading information.

Author:
Ed Smiley

Constructor Summary
GradingSectionAwareServiceImpl()
           
 
Method Summary
 List findMatchingEnrollments(String Uid, String searchString, String optionalSectionUid, String userUid)
           
 List getAvailableEnrollments(String Uid, String userUid)
           
 List getAvailableSections(String Uid, String userUid)
           
 List getGroupReleaseEnrollments(String Uid, String userUid, String publishedAssessmentId)
          added by gopalrc - Jan 2008
 List getSectionEnrollments(String Uid, String sectionUid, String userUid)
          The section enrollment list will not be returned unless the user has access to it.
 List getSectionEnrollmentsTrusted(String sectionUid)
           
 boolean isSectionMemberInRoleStudent(String sectionId, String studentId)
           
 boolean isUserAbleToEdit(String Uid, String userUid)
           
 boolean isUserAbleToGrade(String siteId, String userUid)
           
 boolean isUserAbleToGradeAll(String siteId, String userUid)
           
 boolean isUserAbleToGradeSection(String sectionUid, String userUid)
           
 boolean isUserGradable(String Uid, String userUid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradingSectionAwareServiceImpl

public GradingSectionAwareServiceImpl()
Method Detail

isUserAbleToGrade

public boolean isUserAbleToGrade(String siteId,
                                 String userUid)
Specified by:
isUserAbleToGrade in interface GradingSectionAwareServiceAPI

isUserAbleToGradeAll

public boolean isUserAbleToGradeAll(String siteId,
                                    String userUid)
Specified by:
isUserAbleToGradeAll in interface GradingSectionAwareServiceAPI

isUserAbleToGradeSection

public boolean isUserAbleToGradeSection(String sectionUid,
                                        String userUid)
Specified by:
isUserAbleToGradeSection in interface GradingSectionAwareServiceAPI

isUserAbleToEdit

public boolean isUserAbleToEdit(String Uid,
                                String userUid)
Specified by:
isUserAbleToEdit in interface GradingSectionAwareServiceAPI

isUserGradable

public boolean isUserGradable(String Uid,
                              String userUid)
Specified by:
isUserGradable in interface GradingSectionAwareServiceAPI

getAvailableEnrollments

public List getAvailableEnrollments(String Uid,
                                    String userUid)
Specified by:
getAvailableEnrollments in interface GradingSectionAwareServiceAPI
Returns:
an EnrollmentRecord list for each student that the current user is allowed to grade.

getAvailableSections

public List getAvailableSections(String Uid,
                                 String userUid)
Specified by:
getAvailableSections in interface GradingSectionAwareServiceAPI
Returns:
a CourseSection list for each group that the current user belongs to.

getSectionEnrollments

public List getSectionEnrollments(String Uid,
                                  String sectionUid,
                                  String userUid)
The section enrollment list will not be returned unless the user has access to it.

Specified by:
getSectionEnrollments in interface GradingSectionAwareServiceAPI
Returns:
an EnrollmentRecord list for all the students in the given group.

getSectionEnrollmentsTrusted

public List getSectionEnrollmentsTrusted(String sectionUid)
Specified by:
getSectionEnrollmentsTrusted in interface GradingSectionAwareServiceAPI

getGroupReleaseEnrollments

public List getGroupReleaseEnrollments(String Uid,
                                       String userUid,
                                       String publishedAssessmentId)
added by gopalrc - Jan 2008

Specified by:
getGroupReleaseEnrollments in interface GradingSectionAwareServiceAPI
Returns:
an EnrollmentRecord list for each student that the current user is allowed to grade, who is in at least one of the release groups for this published assessment.

findMatchingEnrollments

public List findMatchingEnrollments(String Uid,
                                    String searchString,
                                    String optionalSectionUid,
                                    String userUid)
Specified by:
findMatchingEnrollments in interface GradingSectionAwareServiceAPI
Parameters:
searchString - a substring search for student name or display UID; the exact rules are up to the implementation
optionalSectionUid - null if the search should be made across all sections
Returns:
an EnrollmentRecord list for all matching available students.

isSectionMemberInRoleStudent

public boolean isSectionMemberInRoleStudent(String sectionId,
                                            String studentId)
Specified by:
isSectionMemberInRoleStudent in interface GradingSectionAwareServiceAPI
Parameters:
sectionId -
studentId -
Returns:
whether a student belongs to a section


Copyright © 2005-2012 Sakai Project. All Rights Reserved.