A critical component of the Valence authentication process is the AppKey. Or is it the Application key? Actually, it’s the App ID/Key pair.
In an effort to increase consistency and accuracy across our tools and documentation, we’re making a few tweaks to how we describe things.
|New Term||Old Term(s)|
|App ID/Key pair, Application ID/Key pair||AppKey, Appkey, App key, Application Key|
|App ID, Application ID||AppKey ID value, App ID|
|App Key, Application Key||AppKey key value, AppKey|
|Keytool||KeyTool, Key Tool|
|Limited (refers to an application type that is distributed to an environment based on LMSID)||Domain-limited|
|Universal (refers to an application type that is distributed to all Desire2Learn environments)||Global|
Part of the impetus for this cleanup effort is the launch of Keytool v2, which went live this morning. For those who aren’t familiar with this tool, Keytool is a service used by Valence Community developers to register applications that use the Valence Learning Framework (LF) APIs. Once a registered application is approved by the site administrator, the App ID/Key pair is activated. This App ID/Key pair is an integral component of the ID/Key Authentication mechanism used by the Valence LF APIs. Developers can use the Keytool for ongoing management of their registered applications, including reviewing the status of registration requests (Pending, Approved, Denied), registering new versions of applications, and deleting registered applications that they no longer need.
In this release, we’ve improved the user experience in Keytool by giving the UI a facelift. Keytool v2 offers feature parity with the current version of Keytool , so you will experience the same functionality with a few improvements to the user experience. For example, we’ve updated the terminology in the user interface, and we’ve reorganized the form to Register a New Application to improve the workflow.
Most importantly, the release of Keytool v2 requires no actions from end-users of the tool. The first time you log in after the release, you’ll see the new user interface and can begin to use it normally. We haven’t changed how you access the tool, or to how Keytool synchronizes keys to the Desire2Learn Learning Environment. That being said, if you experience any issues after the upgrade, you can follow the normal Support Path to receive assistance.
- Identify yourself! Be sure to log in to Keytool using your organizational email address via Google OpenID by following the instructions on the Keytool login page. Using a non-organizational address (such as Gmail) to register an application may slow down the approval process by making it difficult to associate the application with the appropriate Desire2Learn Partner or Client organization.
- Accuracy is key! Once you register an application, you cannot change any of the details associated with the application – including the application name, version, or the LMSID associated with a Limited App ID/Key pair. If you make a mistake, you’ll need to register a new application and delete the application record that contains errors. You cannot transfer an App ID/Key pair from one registered application to another.
- Security is paramount! Treat your App ID/Key pair with the same security as a Root User account or online banking credentials, maintaining absolute secrecy of the App Key. If you must send the App ID/Key pair over email, do so securely (i.e. using PGP encryption), and don’t share it outside of a need-to-know basis. If an App ID/Key pair is leaked, it can be revoked to protect the security of impacted systems. Be sure to inform Desire2Learn if you suspect a leak has occurred so that we can work with you to resolve the situation.
This fall, Desire2Learn challenged post-secondary students to Build Something That Matters. And they really rose to the challenge!
Students have submitted high caliber entries for this year’s student innovation competition, and we’re looking forward to sharing them with all of you. In fact, we want you to weigh in on their efforts. From Monday, November 18th through Friday, November 29th, we’re posting all of the Pitch Videos on the Desire2Learn Facebook page so that you can see how these students are taking charge of their own education, and influencing the future of teaching and learning. Vote for your favorite Pitch Video to help the top three teams advance directly to the Final Judging phase. If any of the Pitch Videos really grabs you, leave a comment on the main Facebook page or email that comment to the Edge Challenge team and we’ll be sure to pass it along.
During Final Judging, all of the Finalists’ entries will be evaluated by our panel of eLearning Leaders. The Judges bring expertise from across the spectrum of education, business, and technology. They’ll decide which of the teams has produced the most Innovative, Impactful, and Polished solution to the education challenge they’ve identified.
The winning team will receive a Grand Prize, sponsored in part by mobile gaming innovators XMG Studio Inc. That prize, which will be awarded in February, includes $10,000 cash. But, as with any educational or entrepreneurial venture, it takes more than money to make an idea take flight. Two team members and their faculty Mentor will also receive a trip to FUSION 2014, the Desire2Learn Users Conference, taking place in Nashville, TN. At the conference, they’ll have opportunities for mentoring and networking with some of the best minds in education and technology – including many of you! Keep an eye out for our winners if you’re attending FUSION 2014.
On a personal note, I have been honored and inspired to be part of the Edge Challenge. It’s incredible to see the talent and vision that these students have brought to the table, not to mention the hard work they’re putting into their submissions. I look forward to seeing all of the teams’ creativity come to life when they submit their final solutions next month.
If you’re interested in getting your students involved in next year’s event, email the Edge Challenge team for more information and to receive updates when we begin planning early in the new year.
Note: This article was cross-posted on the Desire2Learn Community blog as well.
The Remote Plugins Test Service was created to facilitate manual testing of Remote Plugins in the Desire2Learn Learning Environment and provide a demonstration of different Remote Plugin types. The service supports four types of Remote Plugins: Widgets, Navbar links, Insert Stuff types, and Quicklink types.
The testing service has proven valuable internally at D2L for verifying the functionality of Remote Plugins and providing a basic starting point for creating new Remote Plugins. It was decided that the testing service would be useful to the developer community as sample code and a working project. It is currently hosted on Valence GitHub account. It is licensed under the Apache 2 open source license. It is currently implemented in C# but additional implementations in other languages are in the works.
Four routes are provided for each of the supported remote plugin types: widget, isfselector, nav, and quicklinksselector. Each route expects an LTI Launch (HTTP POST). The index page will render a splash page with a listing of supported Remote Plugin types. The code for each implementation is meant to be straightforward and minimalist. All error handling scenarios may not be covered.
If using the C# implementation, open the solution and start debugging to launch the IIS development server. It will begin running the service on your local machine. If your machine is accessible from your learning environment you can add the service’s routes as Remote Plugins. Use the Remote Plugins administrative page in the learning environment to add new Remote Plugins.
If you’ve got a GitHub account, you can Watch the Remote Plugin Test Service repo to be notified of improvements and additional language implementations for this test service.
You may have noticed some of the links being updated in existing blog posts. We have recently made the move over to GitHub to host the repos for Valence sample code and client SDKs. The move away from Google Code was prompted by the removal of the Downloads feature.
In a related move, we’ve also added our client SDKs to relevant package managers. Please leave a comment on this blog post or on the documentation for the related SDK if you’d like to suggest additional package managers for the Valence SDKs.
Before diving in, be sure to check out Part 1 to review the basics of creating a tool using the Learning Tools Interoperability (LTI) standard.
You want to provide your users with a learning tool. The user experience should be integrated into the Desire2Learn Learning Environment (LE) user interface, the connection between the LE and your tool needs to be secure and enable rich data manipulation, and your tool needs to be hosted separately from the LE to enable ease of maintenance.
The remote plugin service provides you with a framework to integrate an LTI-enabled tool into the LE interface, and allows you to extend beyond LTI through the use of the Valence Learning Framework APIs.
As of LE version 10.3, there are five types of remote plugins – Widget, Course Builder, NavBar, QuickLink, and the Insert Stuff Framework (ISF). You can use these integration points to deliver a learning tool through the appropriate extension point in the LE interface. Your tool can be a straight LTI-enabled tool that uses an LTI Launch to create a secure connection between the LE and the externally hosted resource – whether it be a widget on your own webserver, or a major third-party content-hosting service. Once your tool moves beyond the capabilities of LTI, the Valence LF APIs can automatically take over to provide the extra functionality you need.
We’ve created the Course Builder Remote Plugin Sample (edit: link updated), which provides a handy tool to assist an instructor in building course content. To set it up in your environment, download the sample, edit the config.php file to configure it for your environment, and host the tool on a web server. Then create a new remote plugin using the same process described for the BookWidget sample, this time choosing the Course Builder plugin type.
When you deploy a Course Builder Remote Plugin, you add a custom object to the Course Builder toolbox. To use this custom object, drag it into the appropriate place in the content structure for the course you are building. For the Course Builder Remote Plugin sample, this action causes a popup to appear, which contains a list of available content that is served by the Tool Provider. To populate this list, an LTI Launch occurs so that the LMS can connect to the external tool and retrieve the list of links to the externally-hosted content. In this case, the list includes LTI-enabled links to quizzes that the instructor can choose to include in their course – including the WHMIS quiz we viewed in Part 1 of this series.
LTI is great for connecting to an external resource, but in order to add a quiz to the course content, you need to go beyond the capabilities of LTI. In this case, inserting a quiz involves inserting a new link in the course content. When the student clicks that link, a new LTI Launch will occur so that the student can access the externally-hosted quiz in order to complete that assessment and receive a grade. This sample uses the Valence LTI APIs to insert that quiz link into the course content.
Since this tool is being deployed as a remote plugin, Valence authentication can happen automatically using the credentials of the user currently logged in to the LE. When Valence Authentication occurs, the user may be prompted to allow the application to proceed. But beyond that prompt, the user experience is seamless.
As you can see, there are several touch-points where LTI and Valence are being used. Here’s a summary of the workflow for this sample:
- INSTRUCTOR: Drag the custom object into the appropriate location in the course structure.
- TOOL: Perform an LTI Launch to the Tool Provider to load a list of available content and present it to the instructor in the Course Builder interface.
- INSTRUCTOR: Click checkboxes to insert content into the course, such as the WHMIS quiz.
- TOOL: Authenticate with Valence using the session for the currently logged in user. If this is the first use of this tool, prompt the user to allow the tool to proceed. Perform Valence calls to create the necessary LTI links for the content and insert them into the course structure.
- STUDENT: Click a link in the course to access the WHMIS quiz.
- LINK: Perform an LTI Launch to enable the student to access the quiz. Using LTI, send the grade result from the quiz to the grade book for the course.
This sample is only one example of how a remote plugin can take advantage of both LTI and Valence to extend the user experience for instructors and students. Give it a try in your own environment. If you have deployed your own tool using a remote plugin, leave a comment describing how your tool helps your end users.
You want to create a learning tool that can connect easily and securely to a learning management system. The connection needs to allow for some context-passing from the LMS to your tool so that you can customize the experience based on the unique user, the role of that user (student versus instructor), and the course where they launched the tool (Biology versus Creative Writing). If your tool offers an assessment, you also need a method to pass back grades for each user.
The IMS Global Learning Consortium has created a standard called Learning Tools Interoperability (LTI) to address these needs. Basic LTI is the 1.0 version of the standard, and offers context passing from an LMS (known as the tool consumer in the relationship) to the learning tool (known as the tool, which is created by a tool provider). LTI version 1.1 offers the ability to pass back grades information from the tool to the LMS grade book.
One of the main goals of the LTI Specification is to enable a seamless user experience. So, in a well-implemented LTI tool, the user simply clicks a link or uses a tool embedded in an iframe in the LMS, with little awareness of whether the tool is being served from an external source, or how the tool is being hooked into their LMS, because the process is not obtrusive.
Context-passing from the LMS to the learning tool occurs through the LTI launch. This launch is an HTTP POST that sends a standard set of information to the LTI-enabled learning tool. The data included in a launch is detailed in the LTI Specification. An LTI Launch can look like the following example:
Array ( [launch_presentation_locale] => EN-US__ [tool_consumer_instance_guid] => 1ed35f2c89ed0exc26we6fw8f50em13a44563a53f [tool_consumer_instance_name] => LVU [tool_consumer_instance_description] => Lake Valley University [tool_consumer_instance_contact_email] => [tool_consumer_info_version] => 10.2.0 [tool_consumer_info_product_family_code] => desire2learn [context_id] => 6609 [context_title] => Chemistry 100 [context_label] => C100 [context_type] => CourseOffering [user_id] => 02405492-05f8-495f-b0ad-358e4741768a_169 [roles] => Student [lis_person_name_given] => Bob [lis_person_name_family] => McFred [lis_person_name_full] => Bob McFred [lis_person_contact_email_primary] => [ext_tc_profile_url] => http://localhost:44444/d2l/api/ext/1.0/lti/tcservices [resource_link_id] => 1226856900 [resource_link_title] => WHMIS Quiz [resource_link_description] => Level 1 WHMIS Quiz [custom_timecreated] => 1371064958 [custom_level] => advanced [lis_result_sourcedid] => 8d053b33-6f1f-410c-888b-1944226e44d3 [lis_outcome_service_url] => http://localhost:44444/d2l/le/lti/Outcome [lti_version] => LTI-1p0 [lti_message_type] => basic-lti-launch-request [oauth_version] => 1.0 [oauth_nonce] => 224535671 [oauth_timestamp] => 1371064981 [oauth_signature_method] => HMAC-SHA1 [oauth_consumer_key] => mykey [oauth_callback] => about:blank [oauth_signature] => /fjsylvVX435ZnY2D85gmQvDWqU= [basiclti_submit] => Launch Endpoint with BasicLTI Data )
To take advantage of LTI, the tool must be able to receive this POST and parse the data being sent, ignoring anything it doesn’t require. The tool can then provide a contextually-appropriate experience for each user. For example, the tool can use the information from the [lis_person_name_full] field to greet each user by name. The tool can use the [roles] and [context_title] fields to provide an instructor with a list of quizzes and videos that are appropriate to the subject area of a course, and then present students with the content assigned by the instructor. Your tool can also use information populated in a [custom_xyz] field, which can be used to relay static information that can be customized for each LTI link. In this example, the tool can be customized to use the [custom_level] field to identify students of advanced standing and present them with additional content for enrichment.
To ensure the security of the LTI Launch, you can opt to use OAuth 1.0 to sign messages. This protocol requires that the tool provider and the tool consumer establish a key and secret ahead of time, as part of the configuration of the tool. Notice that any fields in the LTI Launch that pertain to this security method are prefixed by [oauth_]. The tool should parse these fields to ensure that the key and secret are valid before providing a user with access to functionality.
To send back grades once a student has completed an assessment in a learning tool, the tool sends an HTTP POST back to the LMS via the URL specified in the [lis_outcome_service_url] field, the payload being a block of XML that contains the grade details.
<?xml version = "1.0" encoding = "UTF-8"?> <imsx_POXEnvelopeRequest xmlns = "http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0"> <imsx_POXHeader> <imsx_POXRequestHeaderInfo> <imsx_version>V1.0</imsx_version> <imsx_messageIdentifier>51b8cdfc2a7bb</imsx_messageIdentifier> </imsx_POXRequestHeaderInfo> </imsx_POXHeader> <imsx_POXBody> <replaceResultRequest> <resultRecord> <sourcedGUID> <sourcedId>8d053b33-6f1f-410c-888b-1944226e44d3</sourcedId> </sourcedGUID> <result> <resultScore> <language>en-us</language> <textString>0.33</textString> </resultScore> </result> </resultRecord> </replaceResultRequest> </imsx_POXBody> </imsx_POXEnvelopeRequest>
We can see that the <sourcedId> value matches the value from the [lis_result_sourcedid] field that was sent as part of the initial LTI Launch. This value is a GUID identifying the gradable object in the LMS. The grade is sent as a decimal value in a <textString>, which is used to update the LMS grade book.
To help you get started building your own LTI-enabled tool, we’ve created the LTI Quiz Sample (edit: link updated). This sample uses LTI to enable students to complete an externally-hosted quiz and then sends the final grade back to the course grade book, using similar values for the LTI Launch and the Grades Return that we outlined above. You can download the LTI Quiz Sample (edit: link updated) from our GitHub repository.
To get this sample working in your own environment, you’ll need to run it on a webserver that is accessible from your LMS. (Edit: View the README.md file for full details on how to configure the sample on your webserver.) To implement an LTI-enabled tool in the Desire2Learn Learning Environment, review the following whitepaper: Does Desire2Learn Learning Environment Integrate With..? This whitepaper also goes into more detail about the values sent in an LTI Launch.
Using LTI, we have created an external tool that provides value to instructors and students while also enabling a seamless user experience.
Stay tuned for Part 2 of this post, where we’ll talk about how to integrate your LTI tools into the user interface of the Desire2Learn Learning Environment using Remote Plugins, and how to extend the experience even further using the Valence Learning Framework APIs.
Many of you are already familiar with the BookWidget sample. We’ve updated that sample to show some best practices for using the C# Valence SDK and creating a Remote Plugin Widget. The sample is available on GitHub for download (edit: link updated). It uses Microsoft’s ASP.NET web framework as the basis for the project. Several additional libraries are also used which are described below.
Know Your Platform
It’s important when using any language to be informed about the library options available. There are several excellent libraries available for C# that help relieve some of the tedious work of creating your own OAuth authentication library and handling RESTful HTTP requests.
The sample project makes use of RestSharp for handling Valence requests. Because Valence is a RESTful API, all communication is handled over HTTP. RestSharp makes the process of creating these requests less tedious and, in addition, exposes interfaces that can be used for unit testing.
LTI launch requests can optionally be signed using OAuth 1.0. There are several existing OAuth libraries available for C#; a good option is DevDefined.OAuth. The sample we’ve created makes use of this library to verify the OAuth signature on the LTI launch request.
All of these libraries are available via nuget which is integrated with Visual Studio. You can make use of the package manager built into Visual Studio to easily add packages as dependencies to your project.
There is now an additional Valence SDK package available from nuget that integrates with RestSharp. D2L.Extensibility.AuthSdk.Restsharp implements the IAuthenticator interface provided by RestSharp. You simply supply your ID2LUsercontext to the ValenceAuthenticator class to create an IAuthenticator object. This object is then passed to a RestSharp client object to handle all authentication. You can see how this is handled in the sample project.
Features of the Sample
This sample makes use of the Valence Content APIs to retrieve the list of assigned books from a course the user is enrolled in. After retrieving the list of ISBNs from the the LMS it fetches additional information about the books from the Google Books API. The final view is a grid of book cover thumbnails to show the user which textbooks have been assigned.
The sample makes use of the LTI role field and only allows those with the ‘instructor’ role to add and remove textbooks from the course. All of this functionality is implemented using the existing Valence Content APIs.
Pay attention to the BookController.cs file. It contains a POST handler that takes care of extracting parameters from the LTI launch and verifying the OAuth signature. It also takes care of the initial Valence authentication so that the project can make use of the Valence Content APIs.
Digging deeper you’ll notice the Course.cs file under the models folder. This contains the Valence calls to the LMS implemented using RestSharp. You’ll also notice the project has wrapped up the Google Book API calls and adapts the result to pass to the Razor templates that have been constructed.
We hope this project gives a good starting point for working with Valence and creating remote plugins using our C# SDK. The sample is licensed under the Apache 2 License. Feel free to check it out on Github and adapt it for your own purposes.