Interface ExternalAssignmentProvider
-
public interface ExternalAssignmentProviderProvider model to integrate external assessment sources with the gradebook. Its present use is to provide advice about activity grouping and visibility so that learners are not shown activities in which they cannot participate. https://jira.sakaiproject.org/browse/SAK-19668- Since:
- 2.9.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,List<String>>getAllExternalAssignments(String gradebookUid, Collection<String> studentIds)Retrieve all assignments for a gradebook that are marked as externally maintained and are (potentially variably) visible to a set of users.StringgetAppKey()Get the application identifier for this provider.List<String>getExternalAssignmentsForCurrentUser(String gradebookUid)Retrieve all assignments for a gradebook that are marked as externally maintained and are visible to the current user.booleanisAssignmentDefined(String externalAppName, String externalId)Check if an assignment/assessment exists with the given identifier.booleanisAssignmentGrouped(String id)Check if the given assignment is grouped.booleanisAssignmentVisible(String id, String userId)Check if the given assignment is visible to the given user.
-
-
-
Method Detail
-
getAppKey
String getAppKey()
Get the application identifier for this provider. This must be unique to the external tool/service for proper operation.
-
isAssignmentDefined
boolean isAssignmentDefined(String externalAppName, String externalId)
Check if an assignment/assessment exists with the given identifier. If the externalAppName is not the tool's responsibility or if the id is not recognized as matching for this service, false is expected to be returned.- Parameters:
externalId-
-
isAssignmentGrouped
boolean isAssignmentGrouped(String id)
Check if the given assignment is grouped. Note that this will be a prefixed ID and must be parsed.- Parameters:
id- The prefixed external ID as registered with Gradebook
-
isAssignmentVisible
boolean isAssignmentVisible(String id, String userId)
Check if the given assignment is visible to the given user. The primary use of this check is to see if groups are in effect for the assignment and whether or not the user can see the item.- Parameters:
id- The prefixed external ID as registered with GradebookuserId- The internal user ID for the user to check
-
getExternalAssignmentsForCurrentUser
List<String> getExternalAssignmentsForCurrentUser(String gradebookUid)
Retrieve all assignments for a gradebook that are marked as externally maintained and are visible to the current user.- Parameters:
gradebookUid- The gradebook's unique identifier- Returns:
- A list of IDs (as for externalId) of assignments visible to the current user
-
getAllExternalAssignments
Map<String,List<String>> getAllExternalAssignments(String gradebookUid, Collection<String> studentIds)
Retrieve all assignments for a gradebook that are marked as externally maintained and are (potentially variably) visible to a set of users.- Parameters:
gradebookUid- The gradebook's unique identifierstudentIds- The collection of user IDs to search/filter for- Returns:
- A map of Student ID to list of external IDs of assignments visible to each user
-
-