NP.Lti13Platform.AssignmentGradeServices
1.0.0-preview003
dotnet add package NP.Lti13Platform.AssignmentGradeServices --version 1.0.0-preview003
NuGet\Install-Package NP.Lti13Platform.AssignmentGradeServices -Version 1.0.0-preview003
<PackageReference Include="NP.Lti13Platform.AssignmentGradeServices" Version="1.0.0-preview003" />
paket add NP.Lti13Platform.AssignmentGradeServices --version 1.0.0-preview003
#r "nuget: NP.Lti13Platform.AssignmentGradeServices, 1.0.0-preview003"
// Install NP.Lti13Platform.AssignmentGradeServices as a Cake Addin #addin nuget:?package=NP.Lti13Platform.AssignmentGradeServices&version=1.0.0-preview003&prerelease // Install NP.Lti13Platform.AssignmentGradeServices as a Cake Tool #tool nuget:?package=NP.Lti13Platform.AssignmentGradeServices&version=1.0.0-preview003&prerelease
NP.Lti13Platform.AssignmentGradeServices
The IMS Assignment and Grade Services spec defines a way that tools can platforms can communicate grades back and forth. This project provides an implementation of the spec.
Features
- Gets,creates, updates, and deletes line items
- Gets and creates grades
Getting Started
Add the nuget package to your project:
Add an implementation of the
ILti13AssignmentGradeDataService
interface:
public class DataService: ILti13AssignmentGradeDataService
{
...
}
- Add the required services.
builder.Services
.AddLti13PlatformCore()
.AddLti13PlatformAssignmentGradeServices()
.WithLti13AssignmentGradeDataService<DataService>();
- Setup the routing for the LTI 1.3 platform endpoints:
app.UseLti13PlatformAssignmentGradeServices();
ILti13AssignmentGradeDataService
There is no default ILti13AssignmentGradeDataService
implementation to allow each project to store the data how they see fit.
The ILti13AssignmentGradeDataService
interface is used to manage the persistance of line items and grades.
All of the internal services are transient and therefore the data service may be added at any scope (Transient, Scoped, Singleton).
Defaults
Routing
Default routes are provided for all endpoints. Routes can be configured when calling UseLti13PlatformAssignmentGradeServices()
.
app.UseLti13PlatformAssignmentGradeServices(config => {
config.LineItemsUrl = "/lti13/{deploymentId}/{contextId}/lineItems"; // {deploymentId} and {contextId} are required
config.LineItemUrl = "/lti13/{deploymentId}/{contextId}/lineItems/{lineItemId}"; // {deploymentId}, {contextId}, and {lineItemId} are required
return config;
});
ILti13AssignmentGradeConfigService
The ILti13AssignmentGradeConfigService
interface is used to get the config for the assignment and grade service. The config is used to tell the tools how to request the members of a context.
There is a default implementation of the ILti13AssignmentGradeConfigService
interface that uses a configuration set up on app start.
It will be configured using the IOptions
pattern and configuration.
The configuration path for the service is Lti13Platform:AssignmentGradeServices
.
Examples:
{
"Lti13Platform": {
"AssignmentGradeServices": {
"ServiceAddress": "https://<mysite>"
}
}
}
builder.Services.Configure<ServicesConfig>(x => { });
The Default implementation can be overridden by adding a new implementation of the ILti13AssignmentGradeConfigService
interface.
This may be useful if the service URL is dynamic or needs to be determined at runtime.
builder.AddLti13PlatformCore()
.AddLti13PlatformAssignmentGradeServices()
.WithLti13AssignmentGradeConfigService<ConfigService>();
Configuration
ServiceAddress
The base url used to tell tools where the service is located.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- NP.Lti13Platform.Core (>= 1.0.0-preview003)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NP.Lti13Platform.AssignmentGradeServices:
Package | Downloads |
---|---|
NP.Lti13Platform
A platform implementation of the LTI 1.3 spec. Includes the Core, DeepLinking, Assignment and Grade Services, and Name and Role Provisioning Services specs. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-preview003 | 41 | 11/2/2024 |
1.0.0-preview002 | 42 | 10/26/2024 |
1.0.0-preview001 | 34 | 10/26/2024 |
0.1.0-preview002 | 40 | 10/23/2024 |
0.1.0-preview001 | 37 | 10/23/2024 |
0.1.0-beta | 40 | 10/23/2024 |