Author Archive
Vote MindTouch Badge
In an effort to encourage others to blog their support for MindTouch in the Sourceforge.net Community Choice Awards I’m providing this simple vote for MindTouch HTML snippet:
When you copy/paste this it yields:

Please consider placing this in your blog sidebar, in a blog post, to your facebook wall or on your websites. Thanks!
Perl + Deki = Fun!
I come from a system administration background so my first reaction when a problem arises, aside from the usual string of expletives, is to see how perl could make my life easier. This time around, I needed a utility to create an arbitrary amount of pages to reproduce a situation a customer was encountering. With the assistance of our API reference and the wonderful CPAN community, I was able to accomplish this with relative ease.
The first step was to login to the Deki. This is done via standard HTTP web authentication. The LWP::UserAgent module provides a ‘credentials’ method that handles this for us. We simply provide it with the hostname and port (www.example.com:80), authentication realm, username, and password. When we make any requests to the Deki and receive an authorization challenge, this method passes the credentials to the server and retains the cookie in a cookie jar for subsequent requests.
To actually create the new pages, I used the POST:pages/{pageid}/contents API feature. By posting to this URI, I’m able to create and edit pages. For my purposes, I only needed the ‘edittime’ and the ‘title’ query strings to be set. The ‘edittime’ query string is in the format, yyyymmddMMss. To create a page as new, as opposed to editing an existing page, I gave the {pageid} variable a unique name. When all was said and done, this is what the URI looked like:
http://www.example.com/@api/deki/pages/=new_page/contents?edittime=20090303140505&title=new_page
The actual content to be posted to the page is contained within the body of the HTTP request.
Without further ado, here is the code:
http://wiki.developer.mindtouch.com/User:Brianh/Accessing_the_Deki_API_with_Perl
Image taken by Marshall Astor and licensed under the Creative Commons license.
Moodle Authentication Service
This extension has been requested by our community and, as always, we’re happy to accomodate. The Moodle Authentication extension will allow you to login to Deki using your existing Moodle user base. If you find any bugs with it, please file them at http://bugs.developer.mindtouch.com.
You can grab the extension here:
http://wiki.developer.mindtouch.com/MindTouch_Deki/Authentication/MoodleAuthentication
Enjoy!