WPMu Development for Education

Making WPMU work in education, one hack at a time

Archive for August, 2009

dev.wpmued.org, aka the.bomb.com

Posted by boone on 27th August 2009

wpmuedudev

wpmuedudev

In response to some conversations we had at Open Ed, Andre Malan, with some help from Jimbo, has set up dev.wpmued.org. The site aggregates feeds of people doing development of WordPress in education, including YOURS TRULY. Go subscribe! And participate! And read Andre’s post for some background!

Related posts:

  1. Sharing hacks

Posted in Uncategorized | Comments Off

Blackboard hack: Merging classes from multiple pages

Posted by boone on 27th August 2009

Blackboard has a feature called Course Merge that lets instructors teaching more than one section of a course merge the sections into a single roster and course space. It turns out, though, that in Blackboard 8, if a professor has more than 25 or so courses alive in the system (which can easily happen when lab subsections of a large lecture course are listed separately), the Merge tool breaks. In particular, the list of courses to select as parent/child courses of the merge gets broken up into multiple pages. You’ve got to check the boxes next to the courses you want merged and hit Submit to complete the process. But (O! miracle of UI design) the Submit button only appears on the last page, making it impossible to merge courses on any pages but the very last one.

I’ll pause to say that this bug means that the people who most need to merge their courses – the ones who have big classes with lots of subsections – are the most likely to be unable to do so. Yikes.

So here’s an ugly but functional workaround. I’ve cobbled together the information in the HTML form element on the final step of the merge process into a single form. The value attributes in the input tags have be replaced with the unique identifiers for the classes to be merged, which you can find by viewing the source of the course list. You’ll also need to change the URL in the form tag to point to the absolute location of your Blackboard installation. Save the file to your local disk. As long as the HTML file is run in a browser that is logged into Blackboard as a user with the permission to do the merge, selecting the radio button and clicking submit on the local file will successfully submit the form and complete the merge.

Here’s the code:

 <form name="CourseCreateForm" method="post" action="/webapps/bbgs-coursemergetool-bb_bb60/setupMergedCourse.do" onsubmit="javascript:return validate();">

<input type="hidden" name="tab_id" value="_1_1">

<!-- The following two lines are the courses to be merged. Replace the values with your course identifiers -->
  <input type="hidden" name="selectedCoursePkString" value ="_217005_1" />
  <input type="hidden" name="selectedCoursePkString" value ="_217007_1" />

<!-- The following line identifies the "target" or "parent" course into which the others will be merged -->
  <input type="radio" name="coursePkString" value="_217005_1">

<INPUT TYPE="image" ALT="Click here to merge" name="submit" src="/images/ci/formbtns/submit_off.gif" BORDER="0" HSPACE="5">
</form>

Related posts:

  1. Getting Read It Later items to the Kindle

Posted in Uncategorized | Comments Off

Newest Blogs widget

Posted by andrea on 27th August 2009

Today’s post brings you a little goodie. I looked for this before and couldn’t find one. Basically, it’s pretty simple: we used a function included with the List All plugin, and made it a widget with the new widget class for 2.8.

New Members Widget (0)

Available to anyone on the system, it shows a linked list of the last ten public blogs created on the site. You’ll also need a copy of List All for this to work, or you’ll get a nasty WSOD at best, or unusable widgets at worst. Especially if you try this on 2.7 with the old widget method. (see my build a blank widget for widgets before 2.8)

If you’re using Listem instead, you’ll need to change the function name in the widget.

 


© andrea for WPMU Tutorials, 2009. |
Permalink |
No comment |
Add to
del.icio.us


Post tags: , , , , ,

Need real genuine helpful support? MU Support.

Feed enhanced by Better Feed from Ozh

Posted in Uncategorized | Comments Off

Scholarly publishing with WordPress

Posted by Joss Winn on 25th August 2009

Working on the JISCPress project, I’ve been thinking quite a lot about scholarly publishing on the web, and in particular with WordPress. This morning, I read a post over on the ArchivePress blog about some WordPress plugins which are useful additions for creating a scholarly blog and it got me thinking a bit more about what features WordPress would need to support scholarly publishing.

JISCPress does away with the idea that WordPress is a blogging tool, and instead uses WordPress Multi-User as a document publishing platform, where one site or ‘blog’ is a document. The way WPMU is structured means that despite serving multiple (potentially millions) of document sites, the platform remains relatively ‘lightweight’ as each document site generates just a handful of additional database tables, while sharing the same administrative core as a single WordPress install. So, 100 WordPress blogs on WPMU is nothing like the equivalent of running 100 separate WordPress blogs, both from the point of resource requirements and administration. In fact, quite soon, there will be no such thing as WPMU as the two products are going to be merged and because they share 90%+ of the same code already, it’s not too difficult to achieve.1

Anyway, my point here is to discuss whether WordPress can be extended to accommodate most conventions found in scholarly publishing and where it is lacking, to identify the development work required to meet the needs of most academic who wish to write on and publish to the web.2

Scholarly publishing extends to a wide variety of published outputs. As a Content Management System (CMS) and technology development platform, I believe that WordPress has the potential to support any type of scholarly publishing that the web supports. It is extremely extensible, as can be seen from the 6000+ plugins that are available. However, what I’m interested in is what can be done now, by an academic wishing to publish their work through the use of WordPress acting as a CMS. What can be achieved with a few quid3 to self-host WordPress so that a few plugins can be installed and a well structured, typical, scholarly paper can be published.

My Dissertation

For some time, I’ve been meaning to publish my MA dissertation. Back in 2002, I undertook some unique research which has not, to my knowledge, been repeated and I think there is some value in having it easily accessible on the web. I have an OpenOffice file and a PDF and, in the course of a morning, have published it under my own domain. The reason I did not publish it on the university WPMU platform is because I have been experimenting with different plugins and did not want to install plugins that were untested or we may not support long-term.  In this case, I’ve used a single WordPress installation, but ideally an individual researcher, group of researchers or research institution, would run a WPMU installation which allowed multiple documents to be authored individually or collaboratively4 and published directly to the web as XHTML.

BuddyPress, by the way, can make the experience even more natural, not only because it is based around a community of like-minded people writing together  on the same web publishing platform, but also because, with a few tweaks here and there, we can move away from the language of blogs and towards the language of documents.


BuddyPress admin bar

Profile menu

Enough of BuddyPress on WPMU for now and back to my dissertation. I set up the site in ten minutes, without using FTP or a command line because I use a host that provides a one-click install of WordPress and WordPress allows you to search for and install plugins from its Dashboard, rather than having to use FTP. Once the site was installed, I then  made some basic changes to the settings, turning on XML-RPC and AtomPub, so that, if I decided to, I could publish to the site using my Word Processor.5 I didn’t use this in the end, but trust me, it works very well using recent versions of MS Word, Open Office (free) and other blogging clients such as MS Live Writer (free).

So, what are the common characteristics of an academic paper? What does WordPress have to support to provide functionality that meets most scholars’ publishing requirements? I scratched my head (and asked on Twitter) and came up with the following:

  • footnotes/endnotes
  • citations
  • use of LaTeX (sciences)
  • tables
  • images
  • bibliography
  • sub-headings
  • annexes
  • appendices
  • dedication
  • abstract
  • table of contents
  • index to figures
  • introduction
  • exposition
  • conclusion

Many of these are supported in WordPress by default and don’t require any additional plugins (tables, images, sub-headings, annexes, appendices, dedication, abstract, introduction, exposition, conclusion, are all either basic literary conventions or just part of a simply structured document).

For additional support, I installed digress.it, which we have funded through the JISCPress project. This is a WordPress plugin which allows readers to comment on the paragraphs of a document, rather than at the document section level. We’re adding a lot more functionality to meet the objectives of the JISCPress project, but I chose digress.it, principally for the reason that it is designed to turn a WordPress blog into a document site. I could have used any other WordPress theme, but digress.it automatically creates a Table of Contents and allows you to re-order WordPress posts when they are read so that you don’t have to author your document in reverse or adjust the publication dates so the document sections appear in the correct order.

My dissertaion published using digress.it

My dissertation published using digress.it

I added the abstract for my dissertation to the ‘about’ page, so it shows up on the front of the site. I also uploaded a PDF version so that people can download it directly. You’ll see that I also added some links to a related book and DVD, which will certainly appeal to people who are interested in my dissertation. The links pull an image and some basic metadata from Amazon, using the Amazon Machine Tags plugin. This could be used to link to the book in which your article is published and earn you money in click referrals. An alternative, would be the Open Book Book Data plugin, which retrieves a book cover and metadata from Open Library, where your book may already be catalogued. If it’s not on Open Library, catalogue it!

After setting this up, I installed a few more plugins:

Dublin Core for WordPress: Automatically adds ten Dublin Core metadata elements to the document mark up.

wp-footnotes: This allows you to easily add footnotes to your document by enclosing your footnote in double parentheses.6

OAI-ORE Resource Map: Automatically marks up the document sections with a OAI-ORE 1.0 resource map.

Google Analyticator: Adds Google Analytics support so you can collect statistics on the readership of your document.

WP Calais Archive Tagger: Analyses your entire document and automatically keywords each section, using the Open Calais API.

Search API: WordPress comes with search built in, but there is a new search API which will eventually make its way into the WordPress core. I’ve installed the plugin to provide full-text search across the document. It can also add Google Search to your document site.

wp-super-cache: This is simple to install and will significantly speed up your document site, making it a pleasure to navigate through and read :-)

Plugins I didn’t use

wp-latex: Although I didn’t need it for my dissertation, it’s worth noting that WordPress supports the use of \LaTeX.

Academic Citation: You need to add a line of code to your theme for this to display. It supports the concept of an article being a single blog post, rather than a ‘document site’ and displays a variety of citation formats for readers to use.

Do you know of any other plugins for a scholarly blog?

The Beauty of Feeds

The other useful thing about managing a document using WordPress and in particular, using digress.it, is that you automatically get RSS/Atom feeds for the document. I’ve already discussed these in detail. It means that I was able to read my document in my feed reader, with footnotes and images displayed correctly.

Document in Google Reader

See how nicely the formatting is preserved. \LaTeX is also rendered correctly in feed readers.

Document formatted nicely in Google Reader

Reading my dissertation in Google Reader

You’ll see that the document sections are listed in order; that is, first section on top. As I noted above, blogs list posts in reverse (most recent first), so I sorted the feed items in Yahoo Pipes and sorted it in ascending order. Yahoo Pipes exports as RSS and it’s that feed that I subscribed to in Google Reader. Wouldn’t it be nice, if I could import my document feed into an Institutional Repository? Wait a minute, I can! :-)

Importing an RSS feed into EPrints

Click to see the item in the repository

Click to see the item in the repository

When importing the default feed, the HTML output is accurate but in reverse order, while the RSS output from Yahoo Pipes didn’t import into EPrints very cleanly at all. I’ll work on this. UPDATE: Forget Yahoo Pipes. WordPress feeds can be sorted with a switch added to the URL: http://example.com/feed/?orderby=post_date&order=ASC

So there it is. An academic paper, published to the web using a modern CMS which supports most authoring and publishing requirements. I would favour an institutional WPMU platform for academics to author directly to, publish their pre-print to the web for open access and detailed comment, and import their RSS feed into the repository. As a proof of concept, I’m quite pleased with this. We are currently developing a widget that can be embedded in a web page or WordPress sidebar and allow a member of staff to upload a document or zipped folder of documents to the Institutional Repository. I wonder if we can also support the import of a feed from the widget, too?

So, what would your requirements be? Tell me and I’ll do my best to test WordPress against them.

  1. Has anyone done a diff on the two code bases to measure exactly what percentage of the code is shared between WP and WPMU?
  2. Actually, I think I’ll save the discussion of its shortfalls for my next post. This one is already long enough.
  3. I pay $5/year for my domain name and as many sub-domains as I need. I pay $10/month for my hosting with unlimited storage and bandwidth.
  4. Like any decent CMS, WordPress supports role-based authoring and editing and maintains a revision history of edits, auto-saved once per minute. Revisions can be compared alongside of each other.
  5. On a scholarly WPMU installation, plugins could be pre-installed and activated, a default theme selected and settings tweaked so very little work is required by the academic author prior to writing her document.
  6. I am using the plugin on this blog!

Related posts

Posted in API, Amazon, Amazon.com, Blog software, Document, Google Inc., Google Reader, Inc., JISCPress, MS Live Writer, Open Library, Open Office, PHP programming language, Projects, Repositories, Software, TeX, Technology_Internet, Twitter, Twitter Inc, Web 2.0, WordPress, XML, Yahoo!, Yahoo! Inc., content management systems, document site, google, jiscpressblog, jiscri, wpmudev | Comments Off

Version 0.2 of BuddyPressActivity

Posted by Boone Gorges on 24th August 2009

Since releasing my MediaWiki extension BuddyPressActivity, which puts wiki edits into your BuddyPress activity stream, I’ve noticed a bug or two. In particular, the cool feature that filters out multiple edits of a page by a given author within a 24 hour period wasn’t working right. I’ve made the necessary fixes in v0.2.

Get the updated code today.

Posted in Uncategorized | Comments Off

New version of BuddyPressActivity for MediaWiki

Posted by boone on 24th August 2009

Ding ding ding. Soup’s on. And by soup I mean version 0.2 of BuddyPressActivity, a MediaWiki extension I wrote.

Read more about it, and get the code, over at the CUNY Academic Commons dev blog.


[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Technorati]
[Google]
[StumbleUpon]

Related posts:

  1. New MediaWiki extension: BuddyPressActivity
  2. New version of Custom Profile Filters for Buddypress
  3. Custom Profile Filters for BuddyPress

Posted in Uncategorized | Comments Off

WPMu Development for Education

Posted by Reverend on 24th August 2009

Image of wpmudevc ontibutorHats off to Andre Malan for getting the dev.wpmued aggregation site together in no time at all—did it take him a single night of kicking ass while Brian Lamb was fast asleep? The idea behind the site, which you can find here, is right line with all the goodness that came out of the Open Ed conference—do it cheap, do it out in the open, share it, and make the focus of our labor people and ideas.

Let’s face it, many of us are working and hacking within WPMu, and this provides a place to aggregate and share out centrally that development. More than that, it is up and available to any one out there who wants to include the work they are doing. And what’s more, I’m a contributor, so what the hell else could you want? (Although Boone Borges’s blog has been on total fire, which means I better get my game face on :) )

Posted in WordPress, wordpress multi-user, wpmu, wpmued | Comments Off

dev.wpmued is live! Calling all WordPress in education developers to contribute.

Posted by Andre Malan on 24th August 2009

At OpenEd09 I was part of a very necessary conversation. We were talking about different ways in which our respective universities use WordPress MU. The consensus was that in order for us to be truly successful we need to be sharing much more. Sharing our frameworks, sharing our plugins and sharing our hacks. Boone Gorges frames the conversation nicely here and talks about what is needed from developers. Enej and others responded by reviving the OLT Dev blog. However, Matthew Gold rightly said this:

But we need to build more lasting channels of communication soon, lest we miss some important connections

So here is my attempt to provide those connections:

WPMU For Education blog

The basic idea is an aggregation blog for “WPMU for education” developers. Jim Groom provided a blog from his WPMUEd domain so that a new channel, dev.wpmued could be created. I used the Add Link Widget with FeedWordPress to turn this blog into an aggregation of content from developers who are working on developing WPMU in education using the method that Jim and I came up with. I seeded it with a few of my often read WordPress MU in education blogs (myself, Jim, D’Arcy, Boone, OLT and CUNY Dev).

But we need more, much more. If you know of any other blogs that write on this subject, please add their feed to the site.  Here is the current master list of institutions that are using WordPress MU. If you have any connections to any of them help the community out by contacting them and asking them to share what they are doing. Also, before you add your feed remember to turn the number of posts up (if you have more than 10 feeds to contribute). If you use WordPress you can include a mutli-tag feed by going “your-url/tag/tag1,tag2,tag3/feed”.

This can be a powerful way to boost our combined development prowess as well as a fantastic demonstration of the power of WordPress to support a community.

the actual conversation happening (photo credit Michelle Lamberson)

Adding your feed is as simple as dropping the URL into the text box on the left sidebar. Add the password (wpmued) and you are done. I’ll be checking for new feeds periodically but you can give me a shout and I’ll activate it ASAP.

Future plans:

I plan to use Wiki Append to pull important content from the wordcamped wiki into pages (it would be done already but wiki-append is having some problems). I think the wiki can act as  a second channel of communication. I will post again as soon as all of that is set up. In the mean time, edit the wiki, give it some much needed love!

I’ve also been playing with a branding idea. A year ago I came up with the idea for the UBC BlogSquad of having badges for contributors. It has worked really well as it reminds everyone of the existence of the aggregated blog (including the blogger themselves). It also immediately identifies you as part of the community. Of course, these were all first and second year students and I am not sure if seasoned bloggers want to pollute their blog with badges. If you do, feel free to grab one below. If you don’t like the design feel free to take your own shot at it (icon design is definitely not my strong suit). If you think the idea is stupid and that something else would work better, let me know in the comments below.

wpmuedudevwpmueddev2

Posted in Boone, D'Arcy Norman, Jim Groom, WordPress, blog, course blogs, development, education, eduglu, olt, programming, social networking, wpmu | Comments Off

Show user id in site admin

Posted by Ron on 23rd August 2009

Andy posted some jQuery that showed the user ids on the site admin users screen. I wrapped the jQuery in a plugin which you drop into your mu-plugins folder.

Show User ID on Site Admin Users page (69)

 

© ahome for WPMU Tutorials, 2009. | Permalink | One comment | Add to del.icio.us
Post tags: , ,

Need real genuine helpful support? MU Support.

Feed enhanced by Better Feed from Ozh

Posted in plugins, site admin, users, wpmu | Comments Off

Sitewide Tag Suggestion in WordPress MU 2.8+

Posted by boone on 21st August 2009

A recent project of mine has been to improve the “Choose from the most popular tags” button that’s built into the Wordpress edit post screen. The default behavior is to find the most frequently used tags from the current blog. My goal is to add a link that lets you select from frequently used tags across the entire Wordpress MU installation. It’s an idea that Matt Gold gave me. Aside from being kind of gimmicky and neat, such a feature might facilitate the emergence of a more unified folksonomy in a community. In other words, the ability to see what tags other people are using for their posts makes it more likely that I’ll use the same tags that you use when we post about similar things. In this way, we can avoid having people tagging their posts “Wordpress”, “WP”, “Wrdprss” as if these were different things.

It looks like the developer of Simple Tags is going to be working this sort of functionality into an upcoming version, but it’s not nearly as fun to just use someone else’s version if you can hack one out yourself.

Sitewide Tag Suggestion

Sitewide Tag Suggestion

I got it working through a series of hacks and plugins. I’ll describe some of the details below, enough so that you should be able to get a similar setup on your own system. A caveat: I can only attest to the setup (I’ll call it Sitewide Tag Suggestions, or STS) on WPMU 2.8.2, the sandbox version I’m running. The only production version I’ve got access to – the CUNY Academic Commons – is running a version of 2.7. Between 2.7 and 2.8 there were pretty significant changes to the way that the admin AJAX works, and I haven’t yet figured out how to make these changes stick on 2.7. (Moreover, I’m wary of sinking a bunch of time into retrofitting an outdated version of WPMU.)

STS starts off with the plugin WordPress MU Sitewide Tags, which I blogged about recently. Conceptually, the idea is simple. Sitewide Tags creates a blog that aggregates all posts from across the installation. From the tags blog one can then collect tags that reflect all sitewide activity. To make STS work, then, one simply has to duplicate the core WP tag suggester, altering it to pull the most popular tags from the tags blog, rather than from the current blog.

I managed to get some of the key functionality into a standalone plugin. You can download the plugin here. A quick rundown of this plugin’s contents:

  • get_terms_custom is really the heart of STS. It’s a modification of WP core’s get_terms (in wp-includes/taxonomy.php) that allows for an additional argument: blog_id. This allows you to pull taxonomy terms (like tags and categories) from any blog on a WPMU install.
  • sitewidte_tags_selection is the PHP function that writes to the header of the WP admin screen the jQuery function tagCloud2. tagCloud2 is the function that listens for the user to click on the “Choose from the most popular sitewide tags” link, and then posts the AJAX request for the proper tags.

STS has two more parts, one of which could probably be moved into the plugin proper, and one of which probably has to remain a core hack. I’ll cover them in turn.

  1. tagCloud2 sends an AJAX request to the server with the action name ‘get-tagcloud2′ (can you tell that there was a lot of cutting and pasting from the core?). The code for the AJAX response is put into wp-admin/admin-ajax.php. It’s basically a copy of the get-tagcloud function already in admin-ajax.php. That means you should copy everything between case 'get-tagcloud' : and break; roughly lines 568-600, making the following changes:

    • change ‘get-tagcloud’ to ‘get-tagcloud2′;
    • the line that declares the variable $tags,
      $tags = get_terms( $taxonomy, array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC' ) );

      must be replaced with the corresponding get_terms_custom declaration:

      $tags = get_terms_custom( $taxonomy, array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC', 'blog_id' => 28 ) );

      Don’t forget to replace “28″ with the blog_id of your tags blog.

    I am well aware that there are ways to add ajax responses in plugins, i.e. without hacking the core, but for the life of me I couldn’t get it to work. I imagine part of the problem is that back in tagCloud2, I’m replicating the core’s ajax syntax, while a plugin’s syntax has to be more explicit about where’s it’s sending its requests. (That’s what wp_ajax_ is for, I think.) So I’m chalking this one up to my own ineptitude and the fact that I have no idea how to work computers.

  2. Finally, you’ve got to add some markup to the edit post page itself so that STS can actually be used. It’s possible of course to use WP’s hooks to add fields to the edit post page, but I really wanted to include the link right underneath the core “Choose from the most used tags” link. So I put the link in a core file, wp-admin/edit-form-advanced.php. Right after the code for the most used tags link, I added my own:

    <p class="tagcloud2-link hide-if-no-js"><a href="#titlediv2" class="tagcloud2-link" id="link2-<?php echo $tax_name; ?>"><?php printf( __('Choose from the most used sitewide tags'), $box['title'] ); ?></a></p>

    Be sure that each instance of tagcloud is changed to reflect the new ajax call (in my case, tagcloud2).

I think that STS has some potential to be really cool, especially if used in a community that is large enough for rich folksonomies to emerge. If you’ve got any suggestions about how to make it better, or how to fix any of my stupid errors, please don’t hesitate to leave a comment!

Related posts:

  1. Sitewide Tag Suggestion, Part II, Sort of
  2. Making Sitewide Tags work
  3. New BuddyPress plugin: Enhanced BuddyPress Widgets

Posted in CUNY Academic Commons, WordPress, dev.wpmued, edtech, plugin, tags, wpmu | Comments Off