Gradebook¶
Gradebook¶
-
class
dlkit.services.grading.
Gradebook
(provider_manager, catalog, runtime, proxy, **kwargs)¶ Bases:
dlkit.osid.objects.OsidCatalog
,dlkit.osid.sessions.OsidSession
A gradebook defines a collection of grade entries.
-
get_gradebook_record
(gradebook_record_type)¶ Gets the gradebook record corresponding to the given
Gradebook
recordType
.This method is used to retrieve an object implementing the requested record. The
gradebook_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(gradebook_record_type)
istrue
.Parameters: gradebook_record_type ( osid.type.Type
) – a gradebook record typeReturns: the gradebook record Return type: osid.grading.records.GradebookRecord
Raise: NullArgument
–gradebook_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(gradebook_record_type)
isfalse
compliance: mandatory – This method must be implemented.
-
Grade System Lookup Methods¶
Gradebook.
gradebook_id
¶Gets the
Gradebook
Id
associated with this session.
Returns: the Gradebook Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gradebook.
gradebook
¶Gets the
Gradebook
associated with this session.
Returns: the Gradebook
associated with this sessionReturn type: osid.grading.Gradebook
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_lookup_grade_systems
()¶Tests if this user can perform
GradeSystem
lookups.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: false
if lookup methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
use_comparative_grade_system_view
()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_plenary_grade_system_view
()¶A complete view of the
GradeSystem
returns is desired.Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_federated_gradebook_view
()¶Federates the view for methods in this session.
A federated view will include grade entries in gradebooks which are children of this gradebook in the gradebook hierarchy.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_isolated_gradebook_view
()¶Isolates the view for methods in this session.
An isolated view restricts searches to this gradebook only.
compliance: mandatory – This method is must be implemented.
Gradebook.
get_grade_system
(grade_system_id)¶Gets the
GradeSystem
specified by itsId
.In plenary mode, the exact
Id
is found or aNotFound
results. Otherwise, the returnedGradeSystem
may have a differentId
than requested, such as the case where a duplicateId
was assigned to aGradeSystem
and retained for compatibility.
Parameters: grade_system_id ( osid.id.Id
) –Id
of theGradeSystem
Returns: the grade system Return type: osid.grading.GradeSystem
Raise: NotFound
–grade_system_id
not foundRaise: NullArgument
–grade_system_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method is must be implemented.
Gradebook.
get_grade_system_by_grade
(grade_id)¶Gets the
GradeSystem
by aGrade
Id
.
Parameters: grade_id ( osid.id.Id
) –Id
of aGrade
Returns: the grade system Return type: osid.grading.GradeSystem
Raise: NotFound
–grade_id
not foundRaise: NullArgument
–grade_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method is must be implemented.
Gradebook.
get_grade_systems_by_ids
(grade_system_ids)¶Gets a
GradeSystemList
corresponding to the givenIdList
.In plenary mode, the returned list contains all of the systems specified in the
Id
list, in the order of the list, including duplicates, or an error results if anId
in the supplied list is not found or inaccessible. Otherwise, inaccessibleGradeSystems
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: grade_system_ids ( osid.id.IdList
) – the list ofIds
to retrieveReturns: the returned GradeSystem
listReturn type: osid.grading.GradeSystemList
Raise: NotFound
– anId was
not foundRaise: NullArgument
–grade_system_ids
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_systems_by_genus_type
(grade_system_genus_type)¶Gets a
GradeSystemList
corresponding to the given grade system genusType
which does not include systems of genus types derived from the specifiedType
.In plenary mode, the returned list contains all known systems or an error results. Otherwise, the returned list may contain only those systems that are accessible through this session.
Parameters: grade_system_genus_type ( osid.type.Type
) – a grade system genus typeReturns: the returned GradeSystem
listReturn type: osid.grading.GradeSystemList
Raise: NullArgument
–grade_system_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_systems_by_parent_genus_type
(grade_system_genus_type)¶Gets a
GradeSystemList
corresponding to the given grade system genusType
and include any additional systems with genus types derived from the specifiedType
.In plenary mode, the returned list contains all known systems or an error results. Otherwise, the returned list may contain only those systems that are accessible through this session.
Parameters: grade_system_genus_type ( osid.type.Type
) – a grade system genus typeReturns: the returned GradeSystem
listReturn type: osid.grading.GradeSystemList
Raise: NullArgument
–grade_system_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_systems_by_record_type
(grade_system_record_type)¶Gets a
GradeSystemList
containing the given grade recordType
.In plenary mode, the returned list contains all known systems or an error results. Otherwise, the returned list may contain only those systems that are accessible through this session.
Parameters: grade_system_record_type ( osid.type.Type
) – a grade system record typeReturns: the returned GradeSystem
listReturn type: osid.grading.GradeSystemList
Raise: NullArgument
–grade_system_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
grade_systems
¶Gets all
GradeSystems
.In plenary mode, the returned list contains all known grade systems or an error results. Otherwise, the returned list may contain only those grade systems that are accessible through this session.
Returns: a GradeSystemList
Return type: osid.grading.GradeSystemList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Grade System Query Methods¶
Gradebook.
gradebook_id
Gets the
Gradebook
Id
associated with this session.
Returns: the Gradebook Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gradebook.
gradebook
Gets the
Gradebook
associated with this session.
Returns: the Gradebook
associated with this sessionReturn type: osid.grading.Gradebook
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_search_grade_systems
()¶Tests if this user can perform
GradeSystem
searches.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.
Returns: false
if search methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
use_federated_gradebook_view
()Federates the view for methods in this session.
A federated view will include grade entries in gradebooks which are children of this gradebook in the gradebook hierarchy.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_isolated_gradebook_view
()Isolates the view for methods in this session.
An isolated view restricts searches to this gradebook only.
compliance: mandatory – This method is must be implemented.
Gradebook.
grade_system_query
¶Gets a grade system query.
Returns: a grade system query Return type: osid.grading.GradeSystemQuery
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_systems_by_query
(grade_system_query)¶Gets a list of
GradeSystem
objects matching the given grade system query.
Parameters: grade_system_query ( osid.grading.GradeSystemQuery
) – the grade system queryReturns: the returned GradeSystemList
Return type: osid.grading.GradeSystemList
Raise: NullArgument
–grade_system_query
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_system_query
is not of this servicecompliance: mandatory – This method must be implemented.
Grade System Admin Methods¶
Gradebook.
gradebook_id
Gets the
Gradebook
Id
associated with this session.
Returns: the Gradebook Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gradebook.
gradebook
Gets the
Gradebook
associated with this session.
Returns: the Gradebook
associated with this sessionReturn type: osid.grading.Gradebook
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_create_grade_systems
()¶Tests if this user can create
GradeSystems
.A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a
GradeSystem
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: false
ifGradeSystem
creation is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
can_create_grade_system_with_record_types
(grade_system_record_types)¶Tests if this user can create a single
GradeSystem
using the desired record types.While
GradingManager.getGradeSystemRecordTypes()
can be used to examine which records are supported, this method tests which record(s) are required for creating a specificGradeSystem
. Providing an empty array tests if aGradeSystem
can be created with no records.
Parameters: grade_system_record_types ( osid.type.Type[]
) – array of grade system typesReturns: true
ifGradeSystem
creation using the specifiedTypes
is supported,false
otherwiseReturn type: boolean
Raise: NullArgument
–grade_system_record_types
isnull
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_system_form_for_create
(grade_system_record_types)¶Gets the grade system form for creating new grade systems.
A new form should be requested for each create transaction.
Parameters: grade_system_record_types ( osid.type.Type[]
) – array of grade system typesReturns: the grade system form Return type: osid.grading.GradeSystemForm
Raise: NullArgument
–grade_system_record_types
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
Gradebook.
create_grade_system
(grade_system_form)¶Creates a new
GradeSystem
.
Parameters: grade_system_form ( osid.grading.GradeSystemForm
) – the form for thisGradeSystem
Returns: the new GradeSystem
Return type: osid.grading.GradeSystem
Raise: IllegalState
–grade_system_form
already used in a create transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–grade_system_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_system_form
did not originate fromget_grade_system_form_for_create()
compliance: mandatory – This method must be implemented.
Gradebook.
can_update_grade_systems
()¶Tests if this user can update
GradeSystems
.A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a
GradeSystem
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: false
ifGradeSystem
modification is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_system_form_for_update
(grade_system_id)¶Gets the grade system form for updating an existing grade system.
A new grade system form should be requested for each update transaction.
Parameters: grade_system_id ( osid.id.Id
) – theId
of theGradeSystem
Returns: the grade system form Return type: osid.grading.GradeSystemForm
Raise: NotFound
–grade_system_id
is not foundRaise: NullArgument
–grade_system_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
update_grade_system
(grade_system_form)¶Updates an existing grade system.
Parameters: grade_system_form ( osid.grading.GradeSystemForm
) – the form containing the elements to be updatedRaise: IllegalState
–grade_system_form
already used in an update transactionRaise: InvalidArgument
– the form contains an invalid valueRaise: NullArgument
–grade_system_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_system_form
did not originate fromget_grade_system_form_for_update()
compliance: mandatory – This method must be implemented.
Gradebook.
can_delete_grade_systems
()¶Tests if this user can delete grade systems.
A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a
GradeSystem
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: false
ifGradeSystem
deletion is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
delete_grade_system
(grade_system_id)¶Deletes a
GradeSystem
.
Parameters: grade_system_id ( osid.id.Id
) – theId
of theGradeSystem
to removeRaise: NotFound
–grade_system_id
not foundRaise: NullArgument
–grade_system_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_manage_grade_system_aliases
()¶Tests if this user can manage
Id
aliases forGradeSystems
.A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: false
ifGradeSystem
aliasing is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
alias_grade_system
(grade_system_id, alias_id)¶Adds an
Id
to aGradeSystem
for the purpose of creating compatibility.The primary
Id
of theGradeSystem
is determined by the provider. The newId
performs as an alias to the primaryId
. If the alias is a pointer to another grade system, it is reassigned to the given grade systemId
.
Parameters:
- grade_system_id (
osid.id.Id
) – theId
of aGradeSystem
- alias_id (
osid.id.Id
) – the aliasId
Raise:
AlreadyExists
–alias_id
is already assignedRaise:
NotFound
–grade_system_id
not foundRaise:
NullArgument
–grade_system_id
oralias_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_create_grades
(grade_system_id)¶Tests if this user can create
Grade
s for aGradeSystem
.A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a
GradeSystem
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Parameters: grade_system_id ( osid.id.Id
) – theId
of aGradeSystem
Returns: false
ifGrade
creation is not authorized,true
otherwiseReturn type: boolean
Raise: NullArgument
–grade_system_id
isnull
compliance: mandatory – This method must be implemented.
Gradebook.
can_create_grade_with_record_types
(grade_system_id, grade_record_types)¶Tests if this user can create a single
Grade
using the desired record types.While
GradingManager.getGradeRecordTypes()
can be used to examine which records are supported, this method tests which record(s) are required for creating a specificGrade
. Providing an empty array tests if aGrade
can be created with no records.
Parameters:
- grade_system_id (
osid.id.Id
) – theId
of aGradeSystem
- grade_record_types (
osid.type.Type[]
) – array of grade recod typesReturns:
true
ifGrade
creation using the specifiedTypes
is supported,false
otherwiseReturn type:
boolean
Raise:
NullArgument
–grade_system_id
orgrade_record_types
isnull
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_form_for_create
(grade_system_id, grade_record_types)¶Gets the grade form for creating new grades.
A new form should be requested for each create transaction.
Parameters:
- grade_system_id (
osid.id.Id
) – theId
of aGradeSystem
- grade_record_types (
osid.type.Type[]
) – array of grade recod typesReturns: the grade form
Return type:
osid.grading.GradeForm
Raise:
NotFound
–grade_system_id
is not foundRaise:
NullArgument
–grade_system_id
orgrade_record_types
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failureRaise:
Unsupported
– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
Gradebook.
create_grade
(grade_form)¶Creates a new
Grade
.
Parameters: grade_form ( osid.grading.GradeForm
) – the form for thisGrade
Returns: the new Grade
Return type: osid.grading.Grade
Raise: IllegalState
–grade_form
already used in a create transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–grade_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_form
did not originate fromget_grade_form_for_create()
compliance: mandatory – This method must be implemented.
Gradebook.
can_update_grades
(grade_system_id)¶Tests if this user can update
Grades
.A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a
Grade
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Parameters: grade_system_id ( osid.id.Id
) – theId
of aGradeSystem
Returns: false
ifGrade
modification is not authorized,true
otherwiseReturn type: boolean
Raise: NullArgument
–grade_system_id
isnull
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_form_for_update
(grade_id)¶Gets the grade form for updating an existing grade.
A new grade form should be requested for each update transaction.
Parameters: grade_id ( osid.id.Id
) – theId
of theGrade
Returns: the grade form Return type: osid.grading.GradeForm
Raise: NotFound
–grade_id
is not foundRaise: NullArgument
–grade_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
update_grade
(grade_form)¶Updates an existing grade.
Parameters: grade_form ( osid.grading.GradeForm
) – the form containing the elements to be updatedRaise: IllegalState
–grade_form
already used in an update transactionRaise: InvalidArgument
– the form contains an invalid valueRaise: NullArgument
–grade_id
orgrade_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_form
did not originate fromget_grade_form_for_update()
compliance: mandatory – This method must be implemented.
Gradebook.
can_delete_grades
(grade_system_id)¶Tests if this user can delete grades.
A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a
Grade
will result in aPermissionDenied
. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Parameters: grade_system_id ( osid.id.Id
) – theId
of aGradeSystem
Returns: false
ifGrade
deletion is not authorized,true
otherwiseReturn type: boolean
Raise: NullArgument
–grade_system_id
isnull
compliance: mandatory – This method must be implemented.
Gradebook.
delete_grade
(grade_id)¶Deletes a
Grade
.
Parameters: grade_id ( osid.id.Id
) – theId
of theGrade
to removeRaise: NotFound
–grade_id
not foundRaise: NullArgument
–grade_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_manage_grade_aliases
()¶Tests if this user can manage
Id
aliases forGrades
.A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: false
ifGrade
aliasing is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
alias_grade
(grade_id, alias_id)¶Adds an
Id
to aGrade
for the purpose of creating compatibility.The primary
Id
of theGrade
is determined by the provider. The newId
performs as an alias to the primaryId
. If the alias is a pointer to another grade, it is reassigned to the given gradeId
.
Parameters:
- grade_id (
osid.id.Id
) – theId
of aGrade
- alias_id (
osid.id.Id
) – the aliasId
Raise:
AlreadyExists
–alias_id
is already assignedRaise:
NotFound
–grade_id
not foundRaise:
NullArgument
–grade_id
oralias_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Grade Entry Lookup Methods¶
Gradebook.
gradebook_id
Gets the
Gradebook
Id
associated with this session.
Returns: the Gradebook Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gradebook.
gradebook
Gets the
Gradebook
associated with this session.
Returns: the Gradebook
associated with this sessionReturn type: osid.grading.Gradebook
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_lookup_grade_entries
()¶Tests if this user can perform
GradeEntry
lookups.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: false
if lookup methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
use_comparative_grade_entry_view
()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_plenary_grade_entry_view
()¶A complete view of the
GradeEntry
returns is desired.Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_federated_gradebook_view
()Federates the view for methods in this session.
A federated view will include grade entries in gradebooks which are children of this gradebook in the gradebook hierarchy.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_isolated_gradebook_view
()Isolates the view for methods in this session.
An isolated view restricts searches to this gradebook only.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_effective_grade_entry_view
()¶Only grade entries whose effective dates are current are returned by methods in this session.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_any_effective_grade_entry_view
()¶All grade entries of any effective dates are returned by methods in this session.
compliance: mandatory – This method is must be implemented.
Gradebook.
get_grade_entry
(grade_entry_id)¶Gets the
GradeEntry
specified by itsId
.
Parameters: grade_entry_id ( osid.id.Id
) –Id
of theGradeEntry
Returns: the grade entry Return type: osid.grading.GradeEntry
Raise: NotFound
–grade_entry_id
not foundRaise: NullArgument
–grade_entry_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method is must be implemented.
Gradebook.
get_grade_entries_by_ids
(grade_entry_ids)¶Gets a
GradeEntryList
corresponding to the givenIdList
.
Parameters: grade_entry_ids ( osid.id.IdList
) – the list ofIds
to retrieveReturns: the returned GradeEntry
listReturn type: osid.grading.GradeEntryList
Raise: NotFound
– anId was
not foundRaise: NullArgument
–grade_entry_ids
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_by_genus_type
(grade_entry_genus_type)¶Gets a
GradeEntryList
corresponding to the given grade entry genusType
which does not include grade entries of genus types derived from the specifiedType
.
Parameters: grade_entry_genus_type ( osid.type.Type
) – a grade entry genus typeReturns: the returned GradeEntry
listReturn type: osid.grading.GradeEntryList
Raise: NullArgument
–grade_entry_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_by_parent_genus_type
(grade_entry_genus_type)¶Gets a
GradeEntryList
corresponding to the given grade entry genusType
and include any additional grade entry with genus types derived from the specifiedType
.
Parameters: grade_entry_genus_type ( osid.type.Type
) – a grade entry genus typeReturns: the returned GradeEntry
listReturn type: osid.grading.GradeEntryList
Raise: NullArgument
–grade_entry_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_by_record_type
(grade_entry_record_type)¶Gets a
GradeEntryList
containing the given grade entry recordType
.
Parameters: grade_entry_record_type ( osid.type.Type
) – a grade entry record typeReturns: the returned GradeEntry
listReturn type: osid.grading.GradeEntryList
Raise: NullArgument
–grade_entry_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_on_date
(from_, to)¶Gets a
GradeEntryList
effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- from (
osid.calendaring.DateTime
) – start of date range- to (
osid.calendaring.DateTime
) – end of date rangeReturns: the returned
GradeEntry
listReturn type:
osid.grading.GradeEntryList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–from or to
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_for_gradebook_column
(gradebook_column_id)¶Gets a
GradeEntryList
for the gradebook column.
Parameters: gradebook_column_id ( osid.id.Id
) – a gradebook columnId
Returns: the returned GradeEntry
listReturn type: osid.grading.GradeEntryList
Raise: NullArgument
–gradebook_column_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_for_gradebook_column_on_date
(gradebook_column_id, from_, to)¶Gets a
GradeEntryList
for the given gradebook column and effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- gradebook_column_id (
osid.id.Id
) – a gradebook columnId
- from (
osid.calendaring.DateTime
) – start of date range- to (
osid.calendaring.DateTime
) – end of date rangeReturns: the returned
GradeEntry
listReturn type:
osid.grading.GradeEntryList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–gradebook_column_id, from, or to
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_for_resource
(resource_id)¶Gets a
GradeEntryList
for the given key key resource.
Parameters: resource_id ( osid.id.Id
) – a key resourceId
Returns: the returned GradeEntry
listReturn type: osid.grading.GradeEntryList
Raise: NullArgument
–resource_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_for_resource_on_date
(resource_id, from_, to)¶Gets a
GradeEntryList
for the given key resource and effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- resource_id (
osid.id.Id
) – a resourceId
- from (
osid.calendaring.DateTime
) – start of date range- to (
osid.calendaring.DateTime
) – end of date rangeReturns: the returned
GradeEntry
listReturn type:
osid.grading.GradeEntryList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–resource_id, from, or to
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_for_gradebook_column_and_resource
(gradebook_column_id, resource_id)¶Gets a
GradeEntryList
for the gradebook column and key resource.
Parameters:
- gradebook_column_id (
osid.id.Id
) – a gradebook columnId
- resource_id (
osid.id.Id
) – a key resourceId
Returns: the returned
GradeEntry
listReturn type:
osid.grading.GradeEntryList
Raise:
NullArgument
–gradebook_column_id
orresource_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_for_gradebook_column_and_resource_on_date
(gradebook_column_id, resource_id, from_, to)¶Gets a
GradeEntryList
for the given gradebook column, resource, and effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- gradebook_column_id (
osid.id.Id
) – a gradebook columnId
- resource_id (
osid.id.Id
) – a key resourceId
- from (
osid.calendaring.DateTime
) – start of date range- to (
osid.calendaring.DateTime
) – end of date rangeReturns: the returned
GradeEntry
listReturn type:
osid.grading.GradeEntryList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–gradebook_column_id, resource, from, or to
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_by_grader
(resource_id)¶Gets a
GradeEntryList
for the given grader.
Parameters: resource_id ( osid.id.Id
) – a resourceId
Returns: the returned GradeEntry
listReturn type: osid.grading.GradeEntryList
Raise: NullArgument
–resource_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
grade_entries
¶Gets all grade entries.
Returns: a GradeEntryList
Return type: osid.grading.GradeEntryList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Grade Entry Query Methods¶
Gradebook.
gradebook_id
Gets the
Gradebook
Id
associated with this session.
Returns: the Gradebook Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gradebook.
gradebook
Gets the
Gradebook
associated with this session.
Returns: the Gradebook
associated with this sessionReturn type: osid.grading.Gradebook
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_search_grade_entries
()¶Tests if this user can perform
GradeEntry
searches.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.
Returns: false
if search methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
use_federated_gradebook_view
()Federates the view for methods in this session.
A federated view will include grade entries in gradebooks which are children of this gradebook in the gradebook hierarchy.
compliance: mandatory – This method is must be implemented.
Gradebook.
use_isolated_gradebook_view
()Isolates the view for methods in this session.
An isolated view restricts searches to this gradebook only.
compliance: mandatory – This method is must be implemented.
Gradebook.
grade_entry_query
¶Gets a grade entry query.
Returns: the grade entry query Return type: osid.grading.GradeEntryQuery
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entries_by_query
(grade_entry_query)¶Gets a list of entries matching the given grade entry query.
Parameters: grade_entry_query ( osid.grading.GradeEntryQuery
) – the grade entry queryReturns: the returned GradeEntryList
Return type: osid.grading.GradeEntryList
Raise: NullArgument
–grade_entry_query
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_entry_query
is not of this servicecompliance: mandatory – This method must be implemented.
Grade Entry Admin Methods¶
Gradebook.
gradebook_id
Gets the
Gradebook
Id
associated with this session.
Returns: the Gradebook Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gradebook.
gradebook
Gets the
Gradebook
associated with this session.
Returns: the Gradebook
associated with this sessionReturn type: osid.grading.Gradebook
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_create_grade_entries
()¶Tests if this user can create grade entries.
A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a grade entry will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: false
ifGradeEntry
creation is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
can_create_grade_entry_with_record_types
(grade_entry_record_types)¶Tests if this user can create a single
GradeEntry
using the desired record types.While
GradingManager.getGradeEntryRecordTypes()
can be used to examine which records are supported, this method tests which record(s) are required for creating a specificGradeEntry
. Providing an empty array tests if aGradeEntry
can be created with no records.
Parameters: grade_entry_record_types ( osid.type.Type[]
) – array of grade entry record typesReturns: true
ifGradeEntry
creation using the specified recordTypes
is supported,false
otherwiseReturn type: boolean
Raise: NullArgument
–grade_entry_record_types
isnull
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entry_form_for_create
(gradebook_column_id, resource_id, grade_entry_record_types)¶Gets the grade entry form for creating new grade entries.
A new form should be requested for each create transaction.
Parameters:
- gradebook_column_id (
osid.id.Id
) – the gradebook column- resource_id (
osid.id.Id
) – the key resource- grade_entry_record_types (
osid.type.Type[]
) – array of grade entry record typesReturns: the grade entry form
Return type:
osid.grading.GradeEntryForm
Raise:
NotFound
–gradebook_column_id or resource_id
not foundRaise:
NullArgument
–gradebook_column_id, resource_id,
orgrade_entry_record_types
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failureRaise:
Unsupported
– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
Gradebook.
create_grade_entry
(grade_entry_form)¶Creates a new
GradeEntry
.
Parameters: grade_entry_form ( osid.grading.GradeEntryForm
) – the form for thisGradeEntry
Returns: the new GradeEntry
Return type: osid.grading.GradeEntry
Raise: IllegalState
–grade_entry_form
already used in a create transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–grade_entry_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_entry_form
did not originate fromget_grade_entry_form_for_create()
compliance: mandatory – This method must be implemented.
Gradebook.
can_overridecalculated_grade_entries
()¶Tests if this user can override grade entries calculated from another.
A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a grade entry will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: false
ifGradeEntry
override is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entry_form_for_override
(grade_entry_id, grade_entry_record_types)¶Gets the grade entry form for overriding calculated grade entries.
A new form should be requested for each create transaction.
Parameters:
- grade_entry_id (
osid.id.Id
) – theId
of the grade entry to be overridden- grade_entry_record_types (
osid.type.Type[]
) – array of grade entry record typesReturns: the grade entry form
Return type:
osid.grading.GradeEntryForm
Raise:
AlreadyExists
–grade_entry_id
is already overriddenRaise:
NotFound
–grade_entry_id
not found orgrade_entry_id
is not a calculated entryRaise:
NullArgument
–grade_entry_id
orgrade_entry_record_types
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failureRaise:
Unsupported
– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
Gradebook.
override_calculated_grade_entry
(grade_entry_form)¶Creates a new overriding
GradeEntry
.
Parameters: grade_entry_form ( osid.grading.GradeEntryForm
) – the form for thisGradeEntry
Returns: the new GradeEntry
Return type: osid.grading.GradeEntry
Raise: IllegalState
–grade_entry_form
already used in a create transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–grade_entry_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_entry_form
did not originate fromget_grade_entry_form_for_override()
compliance: mandatory – This method must be implemented.
Gradebook.
can_update_grade_entries
()¶Tests if this user can update grade entries.
A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a
GradeEntry
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: false
if grade entry modification is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
get_grade_entry_form_for_update
(grade_entry_id)¶Gets the grade entry form for updating an existing entry.
A new grade entry form should be requested for each update transaction.
Parameters: grade_entry_id ( osid.id.Id
) – theId
of theGradeEntry
Returns: the grade entry form Return type: osid.grading.GradeEntryForm
Raise: NotFound
–grade_entry_id
is not foundRaise: NullArgument
–grade_entry_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
update_grade_entry
(grade_entry_form)¶Updates an existing grade entry.
Parameters: grade_entry_form ( osid.grading.GradeEntryForm
) – the form containing the elements to be updatedRaise: IllegalState
–grade_entry_form
already used in an update transactionRaise: InvalidArgument
– the form contains an invalid valueRaise: NullArgument
–grade_entry_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–grade_entry_form
did not originate fromget_grade_entry_form_for_update()
compliance: mandatory – This method must be implemented.
Gradebook.
can_delete_grade_entries
()¶Tests if this user can delete grade entries.
A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a
GradeEntry
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: false
ifGradeEntry
deletion is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
delete_grade_entry
(grade_entry_id)¶Deletes the
GradeEntry
identified by the givenId
.
Parameters: grade_entry_id ( osid.id.Id
) – theId
of theGradeEntry
to deleteRaise: NotFound
– aGradeEntry
was not found identified by the givenId
Raise: NullArgument
–grade_entry_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gradebook.
can_manage_grade_entry_aliases
()¶Tests if this user can manage
Id
aliases forGradeEntries
.A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: false
ifGradeEntry
aliasing is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gradebook.
alias_grade_entry
(grade_entry_id, alias_id)¶Adds an
Id
to aGradeEntry
for the purpose of creating compatibility.The primary
Id
of theGradeEntry
is determined by the provider. The newId
performs as an alias to the primaryId
. If the alias is a pointer to another grade entry, it is reassigned to the given grade entryId
.
Parameters:
- grade_entry_id (
osid.id.Id
) – theId
of aGradeEntry
- alias_id (
osid.id.Id
) – the aliasId
Raise:
AlreadyExists
–alias_id
is already assignedRaise:
NotFound
–grade_entry_id
not foundRaise:
NullArgument
–grade_entry_id
oralias_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.