LearnosityDotNetHelper 0.0.9

dotnet add package LearnosityDotNetHelper --version 0.0.9
                    
NuGet\Install-Package LearnosityDotNetHelper -Version 0.0.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LearnosityDotNetHelper" Version="0.0.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LearnosityDotNetHelper" Version="0.0.9" />
                    
Directory.Packages.props
<PackageReference Include="LearnosityDotNetHelper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LearnosityDotNetHelper --version 0.0.9
                    
#r "nuget: LearnosityDotNetHelper, 0.0.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=LearnosityDotNetHelper&version=0.0.9
                    
Install LearnosityDotNetHelper as a Cake Addin
#tool nuget:?package=LearnosityDotNetHelper&version=0.0.9
                    
Install LearnosityDotNetHelper as a Cake Tool

Learnosity .Net Helper

A personal project. Not sponsored, endorsed, or supported by Learnosity. Learning as I am going.

This project is meant to make it easier for a C# developer to interact with the Learnosity APIs.

Example Usage:

//A Learnosity meta object that can be added to questions and items.
Meta meta = new();
meta.User.FirstName = "First";
meta.User.LastName = "Last";
meta.User.Email = "first.last@site.com";

//Create a list of questions that will be sent to the Learnosity API
Questions questions = new Questions();
questions.Meta = meta;

//Create the question first
Question question = new Question();
question.Type = QuestionTypes.Mcq;
question.Reference = "Unique-Reference-Value-Here";
question.Data.Stimulus = "What is the capital of Texas?";
question.Data.Options.Add(new Option() { Label = "Austin", Value = "A" });
question.Data.Options.Add(new Option() { Label = "Dallas", Value = "B" });
question.Data.Options.Add(new Option() { Label = "Waco", Value = "C" });
question.Data.Options.Add(new Option() { Label = "Lubbock", Value = "D" });
question.Data.Type = QuestionTypes.Mcq;
question.Data.Validation.ScoringType = "exactMatch";
question.Data.Validation.ValidResponse.Score = 1;
question.Data.Validation.ValidResponse.Value.Add("A");
questions.Question.Add(question);

//create a list of items that will be sent to the Learnosity API
Items items = new Items();
items.Meta = meta;

//add the question to an item
Item item = new Item();
item.Reference = "Unique-Reference-Value-Here";
item.Status = Statuses.Published;
item.QuestionReferences.Add(new QuestionReference() { Reference = question.Reference });
item.Definition.Widgets.Add(new Widget() { Reference = question.Reference });
items.Item.Add(item);

//Call SetQuestions and SetItems to create the items in Learnosity
itemBank.SetQuestions(questions);
itemBank.SetItems(items);

In your project, you will need to configure an appsettings.json file with needed Learnosity API information.

For example see below. Note the consumer key and secret below are publicly available and point to the Learnosity Demo site.

{
    "LearnositySettings": {
        "ConsumerKey": "yis0TYCu7U9V4o7M",
        "ConsumerSecret": "74c5fd430cf1242a527f6223aebd42d30464be22",
        "URLAssess": "https://assess.learnosity.com/v2025.1.LTS",
        "URLAuthorAPI": "https://authorapi.learnosity.com/v2025.1.LTS",
        "URLData": "https://data.learnosity.com/v2025.1.LTS",
        "URLItems": "https://items.learnosity.com/v2025.1.LTS",
        "URLReports": "https://reports.learnosity.com/v2025.1.LTS"
    }
}
  
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.9 150 4/4/2025
0.0.8 137 3/30/2025
0.0.7 94 3/29/2025
0.0.6 144 3/22/2025
0.0.5 141 3/22/2025
0.0.4 206 1/7/2024
0.0.3 160 12/28/2023
0.0.2 130 12/28/2023
0.0.1 132 12/28/2023