Tim Martin
posted this on June 18, 2009 02:21 pm
The SCORM Cloud (the hosted version of our SCORM Engine) will be quick to evolve here in the early stages. While the signatures of the actual webservices will remain quite consistent, things like the .NET library included in this demo are likely to evolve. Feel free to check back regularly. Also, feel free to download this and mess around. And ask questions.
This demo app will show you how to interact in a reasonably straightforward manner with the included .NET library. For those who have an interest in seeing how the client library works "under the hood", the source code for it has also been included.
The demo app can now be downloaded here: https://github.com/RusticiSoftware/SCORMCloud_NetDemoApp
Comments latest first
The .Net Demo App has been updated to provide more in the way of basic functionality examples. The library has also been moved to a public respositiory on github: https://github.com/RusticiSoftware/SCORMCloud_NetDemoApp
Zhangliye.
Thanks for taking the time to try this stuff out. Since you prefer to work with Java, I would bounce over the Java client library first. That's a great place to get started. Also, these two items might be helpful:
I hope that gets you pointed in the right direction. If you have other questions, just let me know.
Now i am also going to do the same thing.But i wanna integrate the API into my system which can make scorm teaching materials.You konw,i use java language.I don`t know .net,so i can`t understand the demo.Would you have some demo for java?If you happen to have it,i will be grateful.
(A recent response from a support ticket that I thought would serve well as a sort of "mini dev guide", so posting it here...)
We don't yet have a developer guide (this is the documentation I was alluding to when I said we had some improvements coming in the documentation department). But, with that said, I'd be happy to point out the handful of client library calls you would need to import, register, and launch your courses in SCORM Cloud.
The services for SCORM Cloud are provided in your application code via a client library, in your case the .NET client library (which is packaged with the demo application, or you can get it by itself here (http://support.scorm.com/entries/47058-scorm-cloud-net-library)). So the very first thing you'll want to do is make sure you've got the client library available in your application code (either by bringing the project into your VS solution or referencing the compiled DLL for it).
Once you're ready to use the library in your application, the first step is to make sure it is configured when your application initializes. In the demo app, this is done in the Application_Start method in the file Global.asax.cs. There we set the AppId, SecretKey, and Services Url for the client library, so that it knows where to access SCORM Cloud services and what account to access them under. Similarly, in your own application, at initialization time, you'll want to do something like this:
ScormCloud.Configuration = new RusticiSoftware.HostedEngine.Client.Configuration([your services url], [your app id], [your secret key]);
Once the library is configured, you don't have to worry about those values anymore and you can start calling methods and interacting with SCORM Cloud. Here's how you'd do so...
Import: There are two ways to do this process, and since you're on .NET, both of them are fairly easy. One option you have is to use the import web control packaged with the .NET SCORM Cloud client library. You can see an example of how this is used by looking at UploadLearning.aspx and UploadLearning.aspx.cs in the demo application. You just add the control to the page, specify the course id (which you might grab as an increasing index from your DB), and specify what to do on success or failure. The other option is to use the client library directly, with something like this:
ScormCloud.CourseService.ImportCourse([your course id here], [absolute path to course zip here]);
We ask the user to specify the course id in order to allow them to attach it to meaningful data in their own system. Once the course is imported, you can use the course id in subsequent library calls to create registrations for the course. In the demo app, we create registrations when sending out the invitation to a course. You can see the call in SendLearning.aspx.cs around line 82 or so. The simplest version of this call looks like this:
ScormCloud.RegistrationService.CreateRegistration([registration id], [course id], [learner id], [learner first name], [learner last name]);
Again, each id supplied to this call should coincide with a record in your own database, to which you might attach more data, or which you can later use to look up information about the course/registration at a later time.
Now, with a registration created against our course, we can launch that registration, by redirecting the user's browser to the location returned by ScormCloud.RegistrationService.GetLaunchUrl. There is one caveat here, which is that this URL should be fetched moments before the user is redirected, as opposed to generated and placed on a link on a page where it might sit for some time. In the demo app, we have a link that points to Launch.aspx, which in turn does the above and fetches the launch URL from ScormCloud.RegistrationService.GetLaunchUrl, then redirects the user. In it's simplest form the code looks like this:
String launchUrl = ScormCloud.RegistrationService.GetLaunchUrl([registration id], [redirect on exit url]);
Response.Redirect(launchUrl);
Above, the registration id should refer to a registration that you've created, and the redirect on exit url parameter should point to the URL you would like the user to end up at when the course exits. The other idea behind the redirect on exit url parameter is to use that location as an opportunity to fetch the registration information, such as completion, success, score, and total time spent in the course. To do that, you can add the registration id onto the end of the redirect on exit url, and it will be available as a parameter when the user exits the course and goes to that location.
At any rate, you'll want to fetch some information about the registration when it has completed, in order to do any sort of reporting about them. You can get the "big four" pieces of data referred to above (completion, success, score, total time) by making a call to GetRegistrationSummary. We do this in the demo app in LearningSent.aspx.cs around line 54. The simplest version of this call looks like this:
RegistrationSummary summary = ScormCloud.RegistrationService.GetRegistrationSummary([registration id]);
You'll typically want to save the summary data into your own database, so that you can refer to it when reporting, as opposed to fetching the summary for registrations every time from us over the network, which can be very slow. As I noted above, the best practice here would be to include the registration id as a parameter on the redirect-on-exit URL (specified at launch time), and then using the above call to GetRegistrationSummary using that registration id parameter. That way you can fetch the results right then when the user exits and feel assured that what you fetched is also what we have recorded.
That's the basic path to import, register, and launch. Paired with these calls you'll find calls that will help you see your list of courses and registrations, and delete them as well. Other possibilities are open by using the site we've built on top of the service, which you can find by pointing your browser directly at http://cloud.scorm.com. Let me know what you think, and what you discover as you explore further. Thanks!
David
Brian.
Thanks so much for jumping in and giving this stuff a shot. We appreciate it.
I'm going to create a ticket for you and have David Ells get in touch, as he's built a couple of .net + cloud apps already. He'll give you the guidance you seek.
Tim
I am coming at this as a relative noob -- no Visual Studio experience, no Visual Basic experience, no C or C# experience, no .NET experience. I do have experience in SCORM Python and Zope (in which I developed and maintain an AICC learning delivery system)
My ulitmate goal:
I consider the two hardest things to do in developing a SCORM 2004 learning delivery system are the SCORM lesson delivery and upload (I guess that is most of SCORM -- 2004 though seems infinitely more difficult than 1.2 because of the sequencing requirement) and the user management and authentication.
I would like to marry SCORMCloud using .NET and DotNetNuke (to provide user management, security and authentication) to produce a SCORM learning delivery system.
What I have done:
I am somewhat at sea now as to how to start. I would like to as a first step load the sample application into Visual Studio and upload a basic SCORM 2004 package and run it just to get familiar with how it works (and also gain familiarity with Visual Studio et al). I have figured out that I have to modifiy the config file and how to start the upload process in the browser but then it just stalls.
I don't know if VS10 is the problem, what I have done to the configuration file or something else.
I need some gentle guidance here.