RusticiSoftware / SCORMCloud_NetLibrary

A C# library to assist in the integration of the SCORM Cloud service into .Net 2.0+ applications.
http://scorm.com/scorm-solved/scorm-cloud/develop-a-scorm-cloud-app/
Other
11 stars 22 forks source link

Fix bug where CourseService.GetImportCourseAsyncUrl is always using ScormCloud.Configuration #51

Closed AndrewHore closed 6 years ago

AndrewHore commented 6 years ago

The CourseService.GetImportCourseAsyncUrl method is currently using ScormCloud.Configuration to retrieve its config for the request.

As long as this config has been set (Single App ID use case), it works fine. However, if you're creating an individual instance of the CourseService with a custom Configuration object (Multiple App ID use case), this method either throws an exception (if you haven't set ScormCloud.Configuration), or uses the incorrect configuration (ScormCloud.Configuration over the configuration set on your CourseService object).

This PR updates the CourseService.GetImportCourseAsyncUrl method to use the configuration on the instance object, which seems to be the standard way of doing it when looking at the other methods.