Drupal

Decoder Ring: a framework for collaborative language research

This spring, I wrapped up my masters degree in Educational Technology at Arizona State University. In my studies, I had the great pleasure of working with some of the trailblazing academics in the field of educational language, literacy, and gaming studies. Among the folks I've interacted with over the last several years, James Paul Gee and Elisabeth Hayes have overwhelmingly influenced my interests in academic research in the field. Guided by their seminars and publications, along with many others, including Sean Duncan and Constance Steinkuehler, I developed a strong interest in utilizing my web application development skills to create tools that further the field of academic research in language and literacy.

Last fall, I started in earnest on a project to do just that and, to make a long story very short, the ultimate result is Decoder Ring, which I've just presented at the 2010 Games, Learning & Society Conference. Decoder Ring is a web-based, collaborative language analysis tool designed for academic research of textual content. It features:

  • Abstracted, flexible, powerful data model
  • Sustainable, low cost, open source framework
  • Project- and group-based to facilitate collaboration
  • Tools for gathering (scraping), importing, browsing, and exporting large data sets
  • Automated and extensible reporting tools

I'm still working on the user-facing documentation side of things, but if you're interested in reading a bit more about it, please visit http://www.decoder-ring.net. If you'd like to learn more, please take a look at the slides for my presentation at the 2010 Games, Learning and Society Conference and contact me if you'd like to learn more, including about how to gain access.

Open source

If you know anything about me, you'll know that I'm a staunch advocate of open source, both as a philosophy and as a business model. Decoder Ring is built upon the Drupal framework and the wealth of community modules and themes available for it. All of the Drupal-related code I've created for it is available on my Github page, and I'm working on releasing more of it over the coming weeks.

Here's a list of the technologies that make up the Decoder Ring platform:

DrupalCon San Francisco 2010 Presentation: Drupal at ASU - Slides and video

I recently presented a session titled Case Studies in Academia: Drupal at ASU & Johns Hopkins Knowledge for Health at DrupalCon San Francisco 2010. The presentation went really well. It was great to meet with all the other universities that are using Drupal and talk about the wildly varying ways Drupal is being used in academia.

If you'd like to watch the video recording, it's available on Archive.org or on the DrupalCon presentation page. The slides for the presentation are attached below.

(Finally) rid of that ugly theme

I've hated my personal site's theme for a couple of years now. Cleaning it up has been sitting a few items down on my todo list for a long time, and I finally decided to stop waiting for a good time and just move it up the stack this week.

Old site design
Eww.

I tried out a couple of starter Drupal themes (Ninesixty and Blueprint) but found them light on documentation and simply not as "complete" as my stand-by on nearly every site, Zen. I was adventurous and went for the 6.x-2.x-dev version of Zen, which has some really nice changes under the hood. The dev branch's documentation still needs some updating, but my familiarity with the theme helped me quickly overcome any issues I encountered.

New site design
Fewer viewers report wanting to throw up in their mouths when viewing this theme.

My main goal with the new theme was to get a more clean, readable, and more timeless look. I essentially don't want to have to update my site's theme anymore... at least, not unless one of my far-more-talented-than-me graphic designer friends want to help me out with it. *wink-wink* *nudge-nudge*

I'll be going through old posts and cleaning them up as-needed to make everything fit within the new size restrictions, but that may take a few days.

[Updated] Upgrading your site to Drupal 6.x: Handout for July 2009 ASU Drupal Users Group

[Update] I've updated the handout to be a single page, cleaned-up a lot of the instruction, and fixed several typos. Please see the revised handout below.

An additional note: If you use the handout to assist your site upgrade process, please do me a favor and fill out a brief survey.

Original post:

Attached below is the handout from the July 2009 ASU Drupal Users Group workshop. Use this handout to help you cover all the steps necessary to upgrade your site from Drupal 5.x to 6.x. It contains a module inventory worksheet and a site review checklist that can be used to help you make sure your site is fully functional after the upgrade.

Note: I created this handout for the ASU DUG workshop as well as an assignment for one of the courses I'm in at ASU. If you use the handout as an aid when performing a site upgrade, please let me know so that I can send you a link to a brief survey about your experience with it. The survey will help me get a better understanding of how you used the handout and how it can be improved.

Slides for April 2009 ASU Drupal Users Group

Attached below are the slides for the April, 2009 ASU Drupal Users Group presentation I gave on maintaining sites using a combination of CVS (to checkout Drupal core and contrib modules) and Subversion (for backing up your site's code base and integrating with locally maintained modules and themes).

Here's a quick rundown of links mentioned in the presentation:

Read on after the break for code samples.

Slides for March 2009 ASU Drupal Users Group

Attached below are the slides for the March, 2009 ASU Drupal Users Group presentation I gave. The presentation contains info on the following topics:

DrupalCon 2009: Washington, DC

CAS

FeedAPI

Miscellaneous Links

Catching Apache segfaults due to eAccelerator

Last night we migrated our Linode for Gamers With Jobs to a new Xen VPS and we've noticed a significant performance boost. We did, however, start encountering a random issue with segmentation faults in Apache. If you haven't seen this happen before, it tends to begin innocently with one Apache process dying, and therefore giving errors (usually WSOD), but quickly balloons into dozens of dead processes. It essentially hoses Apache.

Apparently the issue is due to eAccelerator, so I reinstalled it and cleared its caches in the hope that it might limit its occurrence. Just in case, though, 2bits has a great fix for it, using the logwatcher script by Firebright, Inc. I was able to quickly get it going, and the only difference is that I used the Debian init.d script provided by Derek Laventure to run it.

Taxonomy Search 2.0 module release

For a project at work, we needed to be able to manage, and therefore search, large-scale taxonomies (10,000+ terms). Users needed to be able to search for term names, descriptions and synonyms, so I figured a module using the Drupal search API seemed to be the best bet for a solution. I dove in deep and came back up with Taxonomy Search 2.x.

I've just released version 2.0 of the module, and you can check it out at the Taxonomy Search project page. I'd love some feedback, as this is my first module that utilizes the search API, and there may be some rough edges. Please take a look at let me know what you think!

Slides for ASU presentations

Attached below are the slides I used for both the March and April ASU Drupal Users' Group presentations I did. The first was on Content Access and Workflows and discussed the setting up effective content creation workflows with corresponding access controls. The second covered an intro Content Creation Kit (CCK) and Views. See the lists below for modules / sites referenced in the presentations.

Content Access and Workflows presentation

Simple Workflow + Actions

Workflow NG

Other stuff referenced

CCK & Views presentation

Referencing an array in a variable object property

Update:
Thanks to an anonymous commenter for letting me know that this is an issue of operator precedence.

This is more a personal note than anything, but I've been banging my head against a wall trying to figure out how to reference an array within a variably-named object property in PHP. Having not found anything very useful when search Google, I figure my post may end up being someone's helpful search result. Maybe I just don't know the right terminology for what I'm trying to do...?

Anyways, I've got a module that needs to modify the string in a CCK text field before it's shown to users on the node edit form. It's a "glue" module that helps us handle course enrollment, and the field in question handles course instructor(s) via a comma-delimited list of usernames. The module takes the user's submitted data, parses it into an array and stores each username in a table joined with course ID for other uses (such as passing to our Sakai installation). The CCK field is referenced in several places, so I use an admin settings form to allow us to say, "This CCK field is the field that users fill out to define instructors." This allows us to avoid hard-coding the CCK field name all over our glue module, but it also led to the headache I encountered today.

When a user goes back to the form to edit the course, I want to present the username list cleanly (alphabetical, no accidental whitespace, etc). Here's the code I tried to use:

function ideal_courses_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  // ... (irrelevant stuff here)

    case 'prepare':
      $field_instructors = variable_get('ideal_courses_field_instructors', NULL);
      // The line that fails is below:
      $node->$field_instructors[0]['value'] = ideal_courses_instructors_as_string($node);
    break;

  // ... (more irrelevant stuff here)
}

The error I kept getting was, "PHP Fatal error: Cannot use string offset as an array." The strange thing is that doing a print_r($node->$field_instructors); works fine. The fix was simple, but difficult to find: wrap the variable property name in curly braces: $node->{$field_instructors}[0]['value']. The full result is below:

function ideal_courses_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  // ... (irrelevant stuff here)

    case 'prepare':
      $field_instructors = variable_get('ideal_courses_field_instructors', NULL);
      // Fixed line is below:
      $node->{$field_instructors}[0]['value'] = ideal_courses_instructors_as_string($node);
    break;

  // ... (more irrelevant stuff here)
}

Syndicate content