mamamusings: August 6, 2003

elizabeth lane lawley's thoughts on technology, academia, family, and tangential topics

Wednesday, 6 August 2003

mt courseware update

I’m chugging along on the MT as courseware project. It’s forcing me to brush off my rusty SQL skills, learn more about MT plugins, and really think about organization of information. All good things.

I struggled for a while with the calendars, because I wanted them to link not to a specific entry (which is the default in the provided templates), but rather to a daily archive. That way all important entries for a given day—due dates, class topics/readings, in-class exercises—would be displayed together on that date. I finally found the solution on Sillybean’s blog, in a post entitled “Various tricks with archive calendars” (caution to Safari users; I have to reload the pages on that blog several times in Safari to get the right style sheet. not sure why).

My next problem with the calendar was that there’s no way to limit a calendar to a group of categories—you can have it find entries in one category, or in all categories, but that’s it. I wanted the calendar dates to be linked to an archive if anything in the due dates, class topics, class readings, or in-class assignments showed up on that day. The solution I ended up with here was to create an “extra” category of “calendar,” and assign that as a secondary category to anything that fell into the above categories. Kind of a kudge, but it works.

The main page of the course site is now showing only current entries with categories of “news,” “due dates,” “in-class exercises,” or “discussion questions”—the things I want students to see first when they go to the site. This was accomplished using Brad Choate’s MTSQL plug-in, and this SQL query:

SELECT DISTINCT entry_id FROM mt_placement right join mt_entry ON mt_placement.placement_entry_id = mt_entry.entry_id WHERE entry_created_on <= NOW() AND TO_DAYS(NOW()) - TO_DAYS(entry_created_on) <= 10 AND entry_blog_id = 9 AND (placement_category_id = 64 OR placement_category_id = 65 OR placement_category_id = 61 OR placement_category_id = 50) ORDER BY entry_created_on DESC

What this does is look for all entries from this course blog that have been assigned any of those categories (the blog ID and category IDs would vary based on your implementation, of course), limiting it to entries published in the past ten days, excluding post-dated entries. Duplicate entries (for example, something that somehow shows up in both “news” and “discussion questions”) are removed with the DISTINCT modifier. Don’t ask how long it took me to write that, or how much time I didn’t spend with my family while I puzzled it out.

Update, 8/5
An alternative to the SQL approach would be to use PHP to hide post-dated entries. This approach is described by Sillybean in the Using Movable Type as an events calendar entry. Basically, you would use an MTEntries tag to limit to the desired categories, then use PHP to hide an entry based on some date calculations. MT would be generating a big page each time, but most of it would be stripped out by the PHP code.

I’ve also created a syllabus category, and a separate syllabus page. That template lists items in ascending rather than descending order, and strips out all of the date and related posting information.

I’ve not yet worked on the individual entry pages, but I plan on using the same basic template as I’ve got on the main and syllabus pages. I may use an include for the sidebar material. The advantages of an include would be not having to modify three different index templates when I change it, and less load on MT in terms of generating index pages with complex calendars. The disadvantage is that pages will load more slowly (as they do with this blog, which uses includes for the banner and sidebar). May try some usability testing this summer to see how much the lag time in loading with includes bothers my target audience.

I’m having to give a lot of thought to the categories to use. Right now I have topical categories for each of the main areas we cover in the class, as well as structural catgories (like syllabus, due dates, in-class exercises, etc). Once I’ve settled on categories, I’ll build some hand-coded archive menus to allow students to see all the posts on a specific topic. (If I have the archive menus auto-generated, it will mix the topical and structural categories, which would be confusing.) The topical archives will point to archive pages that have a standard date/title heading format with comments and trackbacks enabled. The structural pages, like the syllabus, will vary in their layout and presentation based on the content being presented (some will be ascending date order, some descending, some with comments and trackbacks, some without, etc).

This won’t be a “plug and play” solution when it’s done—anyone who wants to use it will have to a) add in their own categories, b) figure out the id #s for blog and categories for the sql query on the main page, and c) install the MTSQL plug-in as well as d) changing content, look and feel, etc for their course. But I will provide all of my templates when I’m done, which should save you a good bit of the work.


Posted at 10:24 AM | Permalink | Comments (10) | TrackBack (1)
more like this: courseware

what a friend we have in jesus

In today’s email:

From: Tribe <>
Date: Wed Aug 6, 2003 2:07:19 PM Canada/Eastern
To: Elizabeth Lawley <liz [at]>
Subject: New Invitation from Jesus Christ

Jesus would like to add you to their personal friend network at Please use the following URL to log on to and approve or reject this request:
Posted at 4:00 PM | Permalink | Comments (2) | TrackBack (7)
more like this: humor
Liz sipping melange at Cafe Central in Vienna