One of the features I like about Desire2Learn is the ability to create custom widgets within the LMS. I’ve just finished creating a custom external resources widget for our faculty based on del.icio.us feeds of some of our course developers and it was a snap to incorporate it into D2L. Here’s how I did it.
The Scenario
In addition to myself, there are 2 other developers at my institution who, among other tasks, actively support faculty using D2L. We wanted to create a custom widget of external Desire2Learn resources for our faculty to give them access to resources other institutions have put together. Instead of creating a page of static links, we decided to use our del.icio.us accounts to create a dynamic reference library that would automatically grow and update as we added d2l related links to our delicious accounts.
One problem was that we all tagged resources slightly differently in del.icio.us, so we needed to standardize our tagging convention. We decided to use the general tag of “d2l” to designate a resource we wanted to share in the widget.
With that non technical piece out of the way, I began to work on merging the three feeds into one.
Mashing up del.icio.us feeds in Yahoo Pipes
I decided to use Yahoo Pipes for no other reason other than I am familiar with it and wanted to get something put together quickly. Since we are all networked in del.icio.us, it was quite easy to go to my colleagues accounts, click on their “d2l” tag and grab an RSS feed of that tag.
Once I had the RSS for all three accounts, I was able to begin creating a new pipe.
The first step in creating a new pipe is to specify the source of the data. In this case, it is the 3 RSS feeds from delicious, so I dragged a Fetch Feed module into the pipes work area and enter the 3 RSS URI’s.
I noticed that we had all tagged some of the same resources, so I needed to do a bit of data cleaning. Enter the Unique Operator, which allowed me to filter out duplicate links that appeared in the mashup. Now I had a unique list of links.
The one other thing I noticed was that both of my colleagues had added and tagged our institutions local instance of Desire2Learn in their delicious accounts. Since the final product of this feed was going to be within a widget inside that instance, I decided to filter out the url to our institutions Desire2Learn instance using the Filter Operator.
I now have a mashup outputting a single RSS feed created from 3 source feeds. The next step is turning that RSS feed into a Javascript snippet that I can use in the D2L widget. A great future enhancement for the widgets in D2L would be the ability to import RSS feeds. Right now you are limited to HTML and Javascript, which is what we are going to use.
Feed2JS
There are tons of great tools that you can use to convert your RSS feed into Javascript. For this project I used Feed2JS.
I took the RSS feed from the Pipe output and plugged it into Feed2JS. Feed2JS gives you a number of options to tweak the behaviour of the feed. I truncate the feed at 15 and choose to open the links in a new window to avoid taking the faculty out of D2L when they click on a link. I click on “Generate Javascript” and voila, I have a nice chunk of Javascript ready for embedding into a D2L widget.
D2L widget
The final step in the process is to copy the Javascript code and create a custom widget in D2L.
In D2L I created a new widget in the “Manage Homepages” area. After giving the widget a title, I decided to share the widget with other faculty members who may want to use it for themselves in their own courses, so I choose the share option in the Admin tab.
Since I only want faculty to see this widget, i set the release conditions to teacher. Finally, in the custom code tab I paste the JavaScript code I generated at Feed2JS and save the widget.
Once I have created the widget, I can then go into our Faculty Community course and add the widget to the homepage of the course. Now, whenever faculty enter the community, they will see the widget with the most recent resources our work group has tagged in delicious.
Reading through this it seems like a bit of work to create the mashup. But in reality it took me much longer to write this article than to actually create the mashup. All in all from start to finish it took me less than 15 minutes to create what will hopefully be a valuable resource for our faculty.