diff --git a/.gitignore b/.gitignore index abf0bc2..fa1d839 100644 --- a/.gitignore +++ b/.gitignore @@ -117,3 +117,10 @@ Doc/Help/ .DS_Store *.swp tmp/ +.idea/.idea.TinCan/riderModule.iml +.idea/.idea.TinCan/.idea/.name +.idea/.idea.TinCan/.idea/contentModel.xml +.idea/.idea.TinCan/.idea/indexLayout.xml +.idea/.idea.TinCan/.idea/modules.xml +.idea/.idea.TinCan/.idea/vcs.xml +.idea/.idea.TinCan/.idea/workspace.xml diff --git a/Doc/Content/VersionHistory/VersionHistory.aml b/Doc/Content/VersionHistory/VersionHistory.aml deleted file mode 100644 index c4eb3e3..0000000 --- a/Doc/Content/VersionHistory/VersionHistory.aml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - The topics in this section describe the various changes made to the TinCan.NET over the life of the project. - - -
- Version History - - Select a version below to see a description of its changes. - - - - - - - -
- - - - - -
-
diff --git a/Doc/Content/VersionHistory/v0.0.1.0.aml b/Doc/Content/VersionHistory/v0.0.1.0.aml deleted file mode 100644 index 2c687cd..0000000 --- a/Doc/Content/VersionHistory/v0.0.1.0.aml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Version 0.0.1.0 was released on 2014-04-28. - - - -
- Changes in This Release - - - - - This is the initial release, basic implementation in place. - - - - - -
- - - - - -
-
diff --git a/Doc/Content/Welcome.aml b/Doc/Content/Welcome.aml deleted file mode 100644 index a6c52f5..0000000 --- a/Doc/Content/Welcome.aml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - This is the autogenerated API documentation for the TinCan.NET open source library. - - -
- Getting Started - - These documentation pages are a work in progress. Pull requests are accepted. - -
- - - - -
-
diff --git a/Doc/ContentLayout.content b/Doc/ContentLayout.content deleted file mode 100644 index f8001f2..0000000 --- a/Doc/ContentLayout.content +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Doc/Doc.shfbproj b/Doc/Doc.shfbproj deleted file mode 100644 index 6c875de..0000000 --- a/Doc/Doc.shfbproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Debug - AnyCPU - 2.0 - f8d803ad-a192-4f8c-a582-674b75e42995 - 1.9.9.0 - - Doc - Doc - Doc - - .NET Framework 3.5 - .\Help\ - Doc - en-US - - - - - - - - - - OnlyErrors - Website - False - True - False - False - True - - - - 2 - False - Standard - Blank - False - VS2005 - False - Guid - TinCan.NET API Documentation - AboveNamespaces - support%40tincanapi.com - support%40tincanapi.com - 2014 Rustici Software - AutoDocumentCtors, AutoDocumentDispose - - - - - - - - - - - - - - - - - - - - bin\Documentation\ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Doc/icons/Help.png b/Doc/icons/Help.png deleted file mode 100644 index fb4d1e4..0000000 Binary files a/Doc/icons/Help.png and /dev/null differ diff --git a/README.md b/README.md index 39f1c48..5ad4c79 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ For more information about the Tin Can API visit: http://tincanapi.com/ -Requires .NET 3.5 or later. +Requires .NET Core 2. ### Installation Available via NuGet. + diff --git a/TinCan.sln b/TinCan.sln index 9ffdbe2..345c53e 100644 --- a/TinCan.sln +++ b/TinCan.sln @@ -1,55 +1,52 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinCan", "TinCan\TinCan.csproj", "{27D0FCA1-E869-440C-9D16-F62D7A068C53}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinCanTests", "TinCanTests\TinCanTests.csproj", "{46CFCA33-BCF7-45E5-9D69-39E9FE620970}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinCanTests", "TinCanTests\TinCanTests.csproj", "{854413C2-2F81-4A82-9949-DE2868A10078}" -EndProject -Project("{7CF6DF6D-3B04-46F8-A40B-537D21BCA0B4}") = "Doc", "Doc\Doc.shfbproj", "{F8D803AD-A192-4F8C-A582-674B75E42995}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinCan", "TinCan\TinCan.csproj", "{963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Documentation|Any CPU = Documentation|Any CPU + Release|Any CPU = Release|Any CPU Release-net35|Any CPU = Release-net35|Any CPU Release-net40|Any CPU = Release-net40|Any CPU Release-net45|Any CPU = Release-net45|Any CPU Release-net45-signed|Any CPU = Release-net45-signed|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Debug|Any CPU.Build.0 = Debug|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Documentation|Any CPU.Build.0 = Documentation|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Release-net35|Any CPU.ActiveCfg = Release-net35|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Release-net35|Any CPU.Build.0 = Release-net35|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Release-net40|Any CPU.ActiveCfg = Release-net40|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Release-net40|Any CPU.Build.0 = Release-net40|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Release-net45|Any CPU.ActiveCfg = Release-net45|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Release-net45|Any CPU.Build.0 = Release-net45|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Release-net45-signed|Any CPU.ActiveCfg = Release-net45-signed|Any CPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53}.Release-net45-signed|Any CPU.Build.0 = Release-net45-signed|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Debug|Any CPU.Build.0 = Debug|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Release-net35|Any CPU.ActiveCfg = Release-net35|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Release-net35|Any CPU.Build.0 = Release-net35|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Release-net40|Any CPU.ActiveCfg = Release-net40|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Release-net40|Any CPU.Build.0 = Release-net40|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Release-net45|Any CPU.ActiveCfg = Release-net45|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Release-net45|Any CPU.Build.0 = Release-net45|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Release-net45-signed|Any CPU.ActiveCfg = Release-net45-signed|Any CPU - {854413C2-2F81-4A82-9949-DE2868A10078}.Release-net45-signed|Any CPU.Build.0 = Release-net45-signed|Any CPU - {F8D803AD-A192-4F8C-A582-674B75E42995}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F8D803AD-A192-4F8C-A582-674B75E42995}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {F8D803AD-A192-4F8C-A582-674B75E42995}.Documentation|Any CPU.Build.0 = Documentation|Any CPU - {F8D803AD-A192-4F8C-A582-674B75E42995}.Release-net35|Any CPU.ActiveCfg = Release-net35|Any CPU - {F8D803AD-A192-4F8C-A582-674B75E42995}.Release-net35|Any CPU.Build.0 = Release-net35|Any CPU - {F8D803AD-A192-4F8C-A582-674B75E42995}.Release-net40|Any CPU.ActiveCfg = Release-net35|Any CPU - {F8D803AD-A192-4F8C-A582-674B75E42995}.Release-net45|Any CPU.ActiveCfg = Release-net35|Any CPU - {F8D803AD-A192-4F8C-A582-674B75E42995}.Release-net45-signed|Any CPU.ActiveCfg = Release-net35|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Documentation|Any CPU.Build.0 = Debug|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release|Any CPU.Build.0 = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release-net35|Any CPU.ActiveCfg = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release-net35|Any CPU.Build.0 = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release-net40|Any CPU.ActiveCfg = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release-net40|Any CPU.Build.0 = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release-net45|Any CPU.ActiveCfg = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release-net45|Any CPU.Build.0 = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release-net45-signed|Any CPU.ActiveCfg = Release|Any CPU + {46CFCA33-BCF7-45E5-9D69-39E9FE620970}.Release-net45-signed|Any CPU.Build.0 = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Documentation|Any CPU.Build.0 = Debug|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release|Any CPU.Build.0 = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release-net35|Any CPU.ActiveCfg = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release-net35|Any CPU.Build.0 = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release-net40|Any CPU.ActiveCfg = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release-net40|Any CPU.Build.0 = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release-net45|Any CPU.ActiveCfg = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release-net45|Any CPU.Build.0 = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release-net45-signed|Any CPU.ActiveCfg = Release|Any CPU + {963DFA62-82A3-45BD-9CB0-D51B6B2E3B8F}.Release-net45-signed|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3C4F42BE-83A4-4816-BE3F-65C7B503C757} + EndGlobalSection EndGlobal diff --git a/TinCan/ActivityDefinition.cs b/TinCan/ActivityDefinition.cs index a9fe2af..62ce7d4 100644 --- a/TinCan/ActivityDefinition.cs +++ b/TinCan/ActivityDefinition.cs @@ -14,9 +14,13 @@ You may obtain a copy of the License at limitations under the License. */ using System; +using System.Linq; +using System.Collections.Generic; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using TinCan.Json; + namespace TinCan { public class ActivityDefinition : JsonModel @@ -26,13 +30,13 @@ public class ActivityDefinition : JsonModel public LanguageMap name { get; set; } public LanguageMap description { get; set; } public Extensions extensions { get; set; } - //public InteractionType interactionType { get; set; } - //public List correctResponsesPattern { get; set; } - //public List choices { get; set; } - //public List scale { get; set; } - //public List source { get; set; } - //public List target { get; set; } - //public List steps { get; set; } + public InteractionType interactionType { get; set; } + public List correctResponsesPattern { get; set; } + public List choices { get; set; } + public List scale { get; set; } + public List source { get; set; } + public List target { get; set; } + public List steps { get; set; } public ActivityDefinition() {} @@ -60,6 +64,57 @@ public ActivityDefinition(JObject jobj) { extensions = (Extensions)jobj.Value("extensions"); } + if (jobj["interactionType"] != null) + { + interactionType = InteractionType.FromValue(jobj.Value("interactionType")); + } + if (jobj["correctResponsesPattern"] != null) + { + correctResponsesPattern = ((JArray)jobj["correctResponsesPattern"]).Select(x => x.Value()).ToList(); + } + if (jobj["choices"] != null) + { + choices = new List(); + foreach (JObject jchoice in jobj["choices"]) + { + choices.Add(new InteractionComponent(jchoice)); + } + } + if (jobj["scale"] != null) + { + scale = new List(); + foreach (JObject jscale in jobj["scale"]) + { + scale.Add(new InteractionComponent(jscale)); + } + } + if (jobj["source"] != null) + { + source = new List(); + foreach (JObject jsource in jobj["source"]) + { + source.Add(new InteractionComponent(jsource)); + } + } + if (jobj["target"] != null) + { + target = new List(); + foreach (JObject jtarget in jobj["target"]) + { + target.Add(new InteractionComponent(jtarget)); + } + } + if (jobj["steps"] != null) + { + steps = new List(); + foreach (JObject jstep in jobj["steps"]) + { + steps.Add(new InteractionComponent(jstep)); + } + } + + + } public override JObject ToJObject(TCAPIVersion version) { @@ -85,6 +140,64 @@ public override JObject ToJObject(TCAPIVersion version) { { result.Add("extensions", extensions.ToJObject(version)); } + if (interactionType != null) + { + result.Add("interactionType", interactionType.Value); + } + if (correctResponsesPattern != null && correctResponsesPattern.Count > 0) + { + result.Add("correctResponsesPattern", JToken.FromObject(correctResponsesPattern)); + } + if (choices != null && choices.Count > 0) + { + var jchoices = new JArray(); + result.Add("choices", jchoices); + + foreach (InteractionComponent ichoice in choices) + { + jchoices.Add(ichoice.ToJObject(version)); + } + } + if (scale != null && scale.Count > 0) + { + var jscale = new JArray(); + result.Add("scale", jscale); + + foreach (InteractionComponent iscale in scale) + { + jscale.Add(iscale.ToJObject(version)); + } + } + if (source != null && source.Count > 0) + { + var jsource = new JArray(); + result.Add("source", jsource); + + foreach (InteractionComponent isource in source) + { + jsource.Add(isource.ToJObject(version)); + } + } + if (target != null && target.Count > 0) + { + var jtarget = new JArray(); + result.Add("target", jtarget); + + foreach (InteractionComponent itarget in target) + { + jtarget.Add(itarget.ToJObject(version)); + } + } + if (steps != null && steps.Count > 0) + { + var jsteps = new JArray(); + result.Add("steps", jsteps); + + foreach (InteractionComponent istep in steps) + { + jsteps.Add(istep.ToJObject(version)); + } + } return result; } diff --git a/TinCan/InteractionComponent.cs b/TinCan/InteractionComponent.cs new file mode 100644 index 0000000..bf62c31 --- /dev/null +++ b/TinCan/InteractionComponent.cs @@ -0,0 +1,68 @@ +/* + Copyright 2015 Rustici Software + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +using System; +using System.Collections.Generic; +using Newtonsoft.Json.Linq; +using TinCan.Json; + +namespace TinCan +{ + public class InteractionComponent : JsonModel + { + public String id; + public LanguageMap description { get; set; } + + public InteractionComponent() + { + + } + + public InteractionComponent(JObject jobj) + { + if (jobj["id"] != null) + { + id = jobj.Value("id"); + } + if (jobj["description"] != null) + { + description = (LanguageMap)jobj.Value("description"); + } + + } + + public override JObject ToJObject(TCAPIVersion version) { + JObject result = new JObject(); + + if (id != null) + { + result.Add("id", id); + } + if (description != null && !description.isEmpty()) + { + result.Add("description", description.ToJObject(version)); + } + + return result; + } + + public static explicit operator InteractionComponent(JObject jobj) + { + return new InteractionComponent(jobj); + } + + } + +} diff --git a/TinCan/InteractionType.cs b/TinCan/InteractionType.cs new file mode 100644 index 0000000..21d7fc6 --- /dev/null +++ b/TinCan/InteractionType.cs @@ -0,0 +1,76 @@ +using System; + +namespace TinCan +{ + public sealed class InteractionType + { + private const string CHOICE = "choice"; + private const string SEQUENCING = "sequencing"; + private const string LIKERT = "likert"; + private const string MATCHING = "matching"; + private const string PERFORMANCE = "performance"; + private const string TRUEFALSE = "true-false"; + private const string FILLIN = "fill-in"; + private const string LONGFILLIN = "long-fill-in"; + private const string NUMERIC = "numeric"; + private const string OTHER = "other"; + + public static readonly InteractionType Choice = new InteractionType(CHOICE); + public static readonly InteractionType Sequencing = new InteractionType(SEQUENCING); + public static readonly InteractionType Likert = new InteractionType(LIKERT); + public static readonly InteractionType Matching = new InteractionType(MATCHING); + public static readonly InteractionType Performance = new InteractionType(PERFORMANCE); + public static readonly InteractionType TrueFalse = new InteractionType(TRUEFALSE); + public static readonly InteractionType FillIn = new InteractionType(FILLIN); + public static readonly InteractionType LongFillIn = new InteractionType(LONGFILLIN); + public static readonly InteractionType Numeric = new InteractionType(NUMERIC); + public static readonly InteractionType Other = new InteractionType(OTHER); + + private InteractionType(string value) + { + Value = value; + } + + public static InteractionType FromValue(string value) + { + switch (value) + { + case CHOICE: + return Choice; + + case SEQUENCING: + return Sequencing; + + case LIKERT: + return Likert; + + case MATCHING: + return Matching; + + case PERFORMANCE: + return Performance; + + case TRUEFALSE: + return TrueFalse; + + case FILLIN: + return FillIn; + + case LONGFILLIN: + return LongFillIn; + + case NUMERIC: + return Numeric; + + case OTHER: + return Other; + + default: + throw new ArgumentOutOfRangeException(nameof(value), + $"'{value}' is not a valid interactionType."); + } + } + + public string Value { get; private set; } + } +} diff --git a/TinCan/Properties/AssemblyInfo.cs b/TinCan/Properties/AssemblyInfo.cs deleted file mode 100644 index fc01ca1..0000000 --- a/TinCan/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TinCan")] -[assembly: AssemblyDescription("Library for implementing Tin Can API (Experience API)")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Rustici Software")] -[assembly: AssemblyProduct("TinCan.NET")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6b7c12d3-32ea-4cb2-9399-3004963d2340")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0.0")] -[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/TinCan/TinCan.csproj b/TinCan/TinCan.csproj index a4c09bf..8b3c099 100644 --- a/TinCan/TinCan.csproj +++ b/TinCan/TinCan.csproj @@ -1,17 +1,19 @@ - - - + + - Debug - AnyCPU - {27D0FCA1-E869-440C-9D16-F62D7A068C53} - Library - Properties - TinCan - TinCan - v3.5 - 512 + netcoreapp2.0 + 1.1.0.0 + brianjmiller;rustici-software-systems + RusticiSoftware + TinCan + TinCan + Apache License + Library for implementing Tin Can API (Experience API) + true + https://github.com/RusticiSoftware/TinCan.NET + git + true full @@ -22,14 +24,13 @@ 4 bin\Debug\TinCan.XML - + pdbonly true - bin\Release\net35\ + bin\Release\ TRACE prompt 4 - v3.5 true @@ -41,42 +42,9 @@ prompt MinimumRecommendedRules.ruleset - - bin\Release\net40\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - v4.0 - - - bin\Release\net45\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - v4.5 - - - bin\Release\net45-signed - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - true - TinCan.NET.pfx - v4.5 - - - ..\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll - True + + ..\packages\Newtonsoft.Json.6.0.2\lib\net35\Newtonsoft.Json.dll @@ -94,6 +62,8 @@ + + @@ -128,16 +98,9 @@ + - - + - - - \ No newline at end of file + + diff --git a/TinCan/TinCan.nuspec b/TinCan/TinCan.nuspec deleted file mode 100644 index 9aa3d11..0000000 --- a/TinCan/TinCan.nuspec +++ /dev/null @@ -1,24 +0,0 @@ - - - - $id$ - $version$ - $title$ - $author$ - $author$ - https://github.com/RusticiSoftware/TinCan.NET/blob/master/LICENSE - https://rusticisoftware.github.io/TinCan.NET - http://tincanapi.com/wp-content/assets/icons/tincan-32x32.png - false - $description$ - See https://github.com/RusticiSoftware/TinCan.NET/releases - Copyright 2014 - TinCan TinCanAPI xAPI e-learning elearning SCORM - - - - - - - - diff --git a/TinCanTests/README.md b/TinCanTests/README.md deleted file mode 100644 index d23d8fb..0000000 --- a/TinCanTests/README.md +++ /dev/null @@ -1 +0,0 @@ -These tests are based on NUnit 3 which requires that you have a compatible test adapter to run them. For Visual Studio 2012+ you can install the "NUnit3 Test Adapter" available by going to "Tools" -> "Extensions and Updates" -> "Online" -> "Visual Studio Gallery" and searching for "nunit". diff --git a/TinCanTests/Support.cs b/TinCanTests/Support.cs index 7366eab..1ef648f 100644 --- a/TinCanTests/Support.cs +++ b/TinCanTests/Support.cs @@ -48,6 +48,27 @@ static Support () { activity.definition.description = new LanguageMap(); activity.definition.description.Add("en-US", "Unit test 0 in the test suite for the Tin Can C# library."); + activity.definition.interactionType = InteractionType.Choice; + activity.definition.choices = new List(); + + for (int i = 1; i <= 3; i++) + { + InteractionComponent interactionComponent = new InteractionComponent(); + + interactionComponent.id = "choice-" + i.ToString(); + interactionComponent.description = new LanguageMap(); + interactionComponent.description.Add("en-US", "Choice " + i.ToString()); + + activity.definition.choices.Add(interactionComponent); + } + + activity.definition.correctResponsesPattern = new List(); + + for (int i = 1; i <= 2; i++) + { + activity.definition.correctResponsesPattern.Add("choice-" + i.ToString()); + } + parent = new Activity(); parent.id = "http://tincanapi.com/TinCanCSharp/Test"; parent.definition = new ActivityDefinition(); @@ -78,6 +99,7 @@ static Support () { result.success = true; result.completion = true; result.duration = new TimeSpan(1, 2, 16, 43); + result.response = "choice-2"; subStatement = new SubStatement(); subStatement.actor = agent; diff --git a/TinCanTests/TinCanTests.csproj b/TinCanTests/TinCanTests.csproj index 863109d..0acdd14 100644 --- a/TinCanTests/TinCanTests.csproj +++ b/TinCanTests/TinCanTests.csproj @@ -1,120 +1,18 @@ - - - + + - Debug - AnyCPU - {854413C2-2F81-4A82-9949-DE2868A10078} - Library - Properties - TinCanTests - TinCanTests - v3.5 - 512 + netcoreapp2.0 - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - true - bin\Documentation\ - DEBUG;TRACE - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - bin\Release-net40\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - v4.0 - - - bin\Release-net45\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - v4.5 - - - bin\Release-net45-signed\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - v4.5 - - - - ..\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll - True - - - ..\packages\NUnit.3.2.0\lib\net20\nunit.framework.dll - True - - - - - - - - - - - - - - - - - - - {27d0fca1-e869-440c-9d16-f62d7a068c53} - TinCan - - + - + + + + + - + - - - \ No newline at end of file + + diff --git a/TinCanTests/packages.config b/TinCanTests/packages.config index e1f462b..6e2e518 100644 --- a/TinCanTests/packages.config +++ b/TinCanTests/packages.config @@ -1,5 +1,9 @@  - - + + + + + + \ No newline at end of file