EdTechDev

developing educational technology

Recent Course & Workshop Resources: HTML5, Drupal, Distance Education

Here are some web sites for courses I’m currently teaching or recently taught:

At the AECT conference last week I gave a workshop on using Drupal to create web applications – here’s a Drupal Cheat Sheet I made for it.  And here are slides for a talk on embodied cognition and instructional design.

November 3, 2010 Posted by | conferences, development, drupal, edtech, embodiment, teaching, technology | Comments Off

Some useful Drupal modules you may not have heard about

We’re using many of these modules on our newly upgraded to drupal 6 department website at http://itls.usu.edu/.

Even if you’re experienced with Drupal, you may not have heard of some of these modules. I encourage you to check them out to see if they are of use to your site(s). I’ve marked the ones I consider essential.

If you’d like to know how we did some of the features on our site just contact me, or wait a few weeks and I’ll be releasing a generic version of our site (called “Department 2.0″). For example there is a job board, upcoming calendar events block, slideshow, customized listing of people, and our groups have numerous custom views and blocks and features (see my Foundations of Educational Technology class group page for example).

  • FriendFeed – Show other social networking activity via the FriendFeed.com site. I had to make a few patches to this one
  • activity – Show all activity on the site on one page, including comments and profiles edits (stuff that views still can’t show together in one view unless you use nodecomment and content_profile which convert comments and profiles to nodes)
  • admin_menu – we’re using simplemenu instead actually
  • admin_theme – so you have a clean built-in theme when doing administration work
  • advanced_help
  • ajax – works with logintoboggan and numerous other modules to make forms submit without a page reload
  • alt_login – not using now, but we needed this for ldap support before
  • auto_nodetitle – we use this to auto-title our course nodes and other things
  • autologout – in case many of your users are using shared computers and forget to log out
  • backup_migrate – ESSENTIAL
  • better_formats – ESSENTIAL if you have multiple input formats/filters – so that you don’t default to plain text for example
  • block_edit
  • calendar – works with the date module. See alternatively the event module.
  • cck – ESSENTIAL
  • comment_notify
  • commentrss – ESSENTIAL if you want to track all site activity including comments without having to visit administration every time. Alternatively you can create a view of recent comments yourself with an rss feed.
  • contemplate – important if you want site administrators to be able to make changes to the site without shell access
  • context – not using yet
  • creativecommons – not using, but we may switch from the next one
  • creativecommons_lite – a bit buggy but we were using it before in drupal 5
  • custom_pagers – alternative to book
  • date – ESSENTIAL for cck types with date/time info like our job board (expiration date), calendar and so forth
  • devel – useful for debugging issues
  • diff – useful for our wiki and for tracking edits
  • draft – lets users have a ‘save as draft’ button, plus features autosave
  • drush – ESSENTIAL for easier module/theme installation and upgrading. Also works with features module. This is the only module you’ll have to install by hand.
  • ed_readmore – Improve the ‘read more’ teaser link that nobody clicks.
  • email – for email cck fields
  • extlink – distinguish internal from external links
  • fckeditor – ESSENTIAL for wysiwyg editing. See also the TinyMCE module.
  • filefield – I think this is ESSENTIAL but we aren’t using it yet. It puts uploaded files in separate folders rather than having a huge mess of files like we do now.
  • freelinking – for [[wiki links]].
  • globalredirect – ESSENTIAL for making sure you don’t have 2 or more paths with identical content. ‘node/1234′ will redirect to the nicer path for example if you use pathauto.
  • google_analytics – ESSENTIAL for tracking statistics on your site, but piwik is a recommended open source alternative.
  • image – ESSENTIAL unless you are using imagecache instead
  • imce – ESSENTIAL for making it easier for users to insert images in fckeditor. Also gives each user their own personal file space.
  • interwiki – if using a wiki
  • invisimail – obscure any email addresses users might type in a comment or node
  • javascript_aggregator – this is now mostly built-in to drupal 6, but has a few extra features
  • job_queue
  • jq
  • jquery_ui
  • ldap_integration
  • ldap_provisioning
  • link – cck field type
  • linkchecker – haven’t tried, but checks for broken links on your site
  • live – live preview of posts/comments – used on the drupal.org site
  • location – cck field type
  • logintoboggan – ESSENTIAL to me anyway – lets people login with email address instead of username among other nice features.
  • menu_block – see also nodehierarchy, submenutree and other related modules
  • messaging – ESSENTIAL along with notifications if using organic groups (og) especially
  • mimemail – we were using this, but now we are using HTMLMail with messaging/notifications instead
  • moduleinfo – ESSENTIAL – gives more info about modules on module list page
  • mollom – ESSENTIAL or else find another spam prevention solution if your site is open to any public contributions such as comments (or for example our job board)
  • nice_menus – not using, but provides suckerfish menus if not provided by your theme directly
  • node_import – importing content
  • nodecomment – turns comments into nodes – I tried this to I could show comments and node updates together in a view block, but I had to make comments og-enabled, too, which wouldn’t work for anonymous commenting, so I’m not using it now.
  • nodehierarchy – Integrates the organization of your content with the menu system
  • notifications – works with messaging – overly complicated interface though for end-users to customize their preferences
  • og – organic groups
  • og_forum – makes it easier to set up per group forums
  • og_mandatory_group – nice to force end-users to be in a group before they can contribute stuff
  • path_redirect
  • pathauto – ESSENTIAL for nicer looking, automatically generated URLs
  • permissions_api – easier administration of permissions
  • poormanscron – if you don’t have cron or it is unreliable (like on Mac OS X)
  • prepopulate – if you want to use bookmarklets for things like shared links and so forth
  • print – ESSENTIAL for printable versions of your pages
  • quicktabs – we ended up using views_slideshow instead
  • quiz – not using, but nice module
  • realname – we just have people use their real name (First Last) as their regular username, so we didn’t require this module.
  • revision_deletion – ESSENTIAL if you are using a wiki or a site with many people editing, so you can occasionally clean up stuff.
  • rules – Much nicer, easier to use alternative to workflow. We use it to do numerous things on our site, for example notifying someone when a job is posted, promoting items in certain groups to the front page, etc. Formerly called workflow_ng in drupal 5 (not upgradeable though)
  • scanner – ESSENTIAL find/replace text on your site. Regex support.
  • scheduler – set your node to be published at a future date
  • securepages – ESSENTIAL if using an SSL server (which you should)
  • similarterms
  • simplemenu – this is our end-users’ toolbar for creating content, visiting groups, etc.
  • site_map
  • site_tour
  • smtp – ESSENTIAL if sendmail doesn’t work or is restricted from your server. I label it essential because stuff like this is already included in other tools like moodle even though most won’t need it (moodle includes built-in ldap support and other things too).
  • submenutree – alternative to book module – displaying child items below a node
  • tagadelic
  • talk – if wanted for wiki pages
  • theme_editor – ESSENTIAL if you want administrators to be able to edit theme files without having shell access
  • token – ESSENTIAL – required by many other modules including pathauto
  • trash – essential but broken? We need a way for end-users to delete stuff like wiki pages in a way that administrators can undo it if they deleted something important. At least drupal 6 finally separated the edit and delete permissions.
  • twitter – if you want to have a site-wide twitter account that announces stuff on twitter
  • upload_replace – ESSENTIAL – should be built-in to drupal. Right now if you upload a new version of a file, it gets a new name, rather than moving the old file.
  • user_import – import users from a spreadsheet – warning, backup everything first – this module created duplicate entries in our profile tables a year ago
  • userplus
  • userprotect – prevent users from changing certain things in their accounts
  • video
  • video_filter – easy linking and displaying of videos from external sites
  • views – ESSENTIAL – works with cck
  • views_bulk_operations – lets you do batch operations on nodes and other things
  • views_calc
  • views_slideshow – see other alternatives for doing slideshows like slider
  • webform – ESSENTIAL if you want to do things like surveys and so forth on your site – 1000x better than the built-in poll module
  • wikitools – for wikis – move protection, etc.
  • I also posted a comparison of drupal modules for uploading large files recently, including swfupload, image_fupload, and others

August 30, 2009 Posted by | drupal, usu | 1 Comment

Bash Script to Quickly Create Drupal Sub-sites

I haven’t tried this for real yet, only tested it with a local xampp-based drupal site, but here’s a shell script that quickly creates drupal sub-sites, say, for students. The sub-sites use the same database as your main drupal site, but each has its own table prefix.

So basically if you already have drupal installed, say at http://your.drupal.host/ , the script below makes it easy to create sub-sites like http://your.drupal.host/student1 and http://your.drupal.host/student2 . This uses drupal’s multi-site feature.

You just copy the below script to a file and make it executable (chmod 700 makesite.sh), edit some of the settings in it (like change “nobody” to “www-data” if using debian/ubuntu, and “localhost” to “your.drupal.host” or whatever),
and then on the command line change (cd) to your drupal root folder and run:

sudo /path/to/makesite.sh student1

Of course replacing ‘student1′ with whatever site name you want to use, and then you or your student/user can visit http://your.drupal.host/student1/install.php
to finish the drupal installation.

Of course, backup your main site’s database before using this (see the backup and migrate module).

For other related options see aegir, densite (both of which use separate databases per site), and domain (in which multi-sites not only share the same database but the same tables as well).

This script doesn’t handle sub-sites with their own domain names (see densite or aegir instead), and it doesn’t create cron jobs for each drupal site (see densite or just enable poormanscron on each site). Of course any modules or themes installed under sites/all/modules or sites/all/themes can be shared by all the sub-sites, so you only need to install them once. If you want a module or theme just for one particular subsite, install it under sites/your.drupal.host.student1/modules or sites/your.drupal.host.student1/themes or whatever the names are. Those sub-folders and the files folder are already created for you with the right permissions by the script.

I’ll also probably be using modules like theme_editor and zenophile so that students won’t need command line or ftp access to edit the look of their sites.

#makesite.sh

##About this script:
##This script will create a drupal sub-site using table prefixes.
##It assumes you already have a main drupal site running,
##and can be used to create sub-sites, such as:
##   http://yoursite/subsite
##The database tables will have prefix: subsite__
##The script also assumes that your main drupal site has
##no prefix ''.  If that's not the case, edit the sed line below

##To run it:
## -First change the options below (apache user, site host)
## -cd into your root drupal folder (cd /var/www, etc)
## -run: sudo /path/to/makesite.sh subsitename
##    'subsitename' should have only have letters/numbers
##    also it should not duplicate an existing sub-folder
## -then visit http://yoursite/subsitename/install.php
##    to finish the drupal install

##### CHANGE THESE 2 or 3 TO MATCH YOUR CONFIG: #####

#what user does apache2/httpd run under:
APACHEUSER="nobody"  #www-data on debian/ubuntu

#what is the root hostname/url of your main drupal site:
SITEHOST="localhost"  #root hostname for main drupal site

#where to find the settings.php we'll base sub-sites on:
DEFAULTFOLDER="default" #main sites/default/settings.php file

#########Stuff below shouldn't need editing:########

if [ $# -ne 1 ]
then
  echo "Usage: sudo $0 directoryname"
  exit 1
fi

if [ $(whoami) != "root" ]; then
  echo "You need to run this script as root."
  echo "Use sudo $0 directoryname"
  exit 1
fi

if [ -d $1 ]
then
  echo "$1 already exists, please use a different name"
  exit 1
fi

echo "Creating symlink from $1 to ."
ln -s . $1

NEWSITEDIR="sites/$SITEHOST.$1"

echo "Creating sub-site folders at $NEWSITEDIR"
mkdir $NEWSITEDIR
mkdir $NEWSITEDIR/files
mkdir $NEWSITEDIR/themes
mkdir $NEWSITEDIR/modules
chown -R $APACHEUSER $NEWSITEDIR

echo "Copying settings.php"
OLDSETTINGS="sites/$DEFAULTFOLDER/settings.php";
if [ ! -f $OLDSETTINGS ]
then
  echo "Cannot find default settings.php file: $OLDSETTINGS"
  exit 1
fi

NEWSETTINGS="$NEWSITEDIR/settings.php"
cp $OLDSETTINGS $NEWSETTINGS
chown $APACHEUSER $NEWSETTINGS

PREFIX="$1__"
echo "Using table prefix: $PREFIX"
#drupal 7:
sed -i "s/'prefix' => '',/'prefix' => '$PREFIX',/" $NEWSETTINGS
#drupal 6
## sed -i "s/\$db_prefix = '';/\$db_prefix = '$PREFIX';/" $NEWSETTINGS

echo "FINISHED: Visit http://$SITEHOST/$1/install.php to finish"

August 15, 2009 Posted by | drupal | Comments Off

Syncing Two Drupal Sites

The drush module for Drupal has a new “sync” option to synchronize two Drupal sites, but it is undocumented and looking at the source code all it does is sync the files, not the mysql database. I haven’t seen any other public solutions that do completely sync 2 drupal sites including the databases.

Here’s a little shell script I’m using to synchronize the files and database of 2 drupal sites on different servers. We have a staging area where we test out upgrades or new code and features first. When not testing out stuff, we also use that 2nd server as a fallback in case the first server goes down. So this script copies everything over from the main drupal site to the 2nd staging area server using rsync, and then imports the mysql database on the 2nd server as well.

This script does depend on using the backup and migrate module for drupal, too, to dump the mysql database at regularly scheduled intervals to drupal’s files folder. The script fetches the newest sql dump and imports it into mysql on the staging area.

Also this script prompts for the ssh password to remotely connect. To run without any prompting, you’d need to generate an ssh key file (see this tutorial).

Edit the sections that start with ##EDIT:

##syncdrupal.sh

##EDIT:
STAGESERVERNAME="name.of.staging.server"

##run this script on staging area server only:
if [ `uname -n` != $STAGESERVERNAME ];
then
  echo "only run this on staging area server"
  exit 0
fi

##EDIT:
##src and dest can be remote or local (see rsync tutorials)
SRC="username@mainsite.edu:/path/to/mainsite/drupal/folder/*"
DEST="/path/to/stagingarea/drupal/folder/"

echo "Going to sync files from $SRC"
echo "to $DEST"

##I exclude cache because of a permission error with print/tcpdf/cache
rsync -e ssh -azv --delete --exclude="cache" $SRC $DEST

##EDIT:
SQLPATH="/path/to/stagingarea/sites/default/files/backup_migrate/scheduled"

##find most recent scheduled backup .sql.gz file:
MOSTRECENTSQL=`ls -1t $SQLPATH | awk 'NR==1{print $1}'`

gunzip "$SQLPATH/$MOSTRECENTSQL"

##get sql filename minus the ".gz" part
MOSTRECENTSQL=`ls -1t $SQLPATH | awk 'NR==1{print $1}'`

##EDIT:
##db name, user, pass for staging area mysql server:
DBNAME="db"
DBUSER="user"
DBPASS="pass"

echo "Importing $SQLPATH/$MOSTRECENTSQL"

##import the sql file into mysql:
mysql -u $DBUSER -p$DBPASS $DBNAME < "$SQLPATH/$MOSTRECENTSQL"

We also add a little code like this to our theme’s page.tpl.php file to flash a red box at the top of the staging area website so we’ll remember which site we are working on: (change “stage” to servername of your staging area, and change 5 to the number of characters in that name)

<?php if (strncmp($_SERVER['SERVER_NAME'],"stage",5) == 0) { ?>
<div id="warn" style="background-color:red;text-align:center;">
<h1>You are viewing a backup version of the WHATEVER website (servername).
Please do not save any information here.</h1>
</div>
<?php } ?>

May 29, 2009 Posted by | drupal | 1 Comment

Internet Development Course, Using Drupal

I’ll have a paper coming out this summer in MERLOT’s Journal of Online Learning and Teaching (JOLT) on using Drupal as a blended learning support tool for a class. This was my foundations of educational technology course in which students created their own wiki book called the Ed Tech Knowledge Base with notes about the field of educational technology. Later this summer I’ll be conducting a workshop at the MERLOT conference on using Drupal to build educational or academic websites, and also releasing the pre-configured Drupal site with the modules and views underlying our department website, called “Department 2.0″.

This summer I’m also teaching a course on Internet Development – beginning web development. All the materials and video screencasts are being posted online as well. I’m trying a new style of teaching web design. CSS is taught much earlier (in the 3rd week), tables much later. I’m using a more powerful text editor (JEdit) and Firefox addon (web developer) instead of the traditional notepad lessons. JEdit helps scaffold the process of authoring HTML and CSS files. Lastly, during the last month of class starting in late June we are going to learn about content management systems (in particular, Drupal). I’ve been building websites for 15 years starting with a site in 1995 for my student Amnesty International group that included a Perl CGI script to support letter writing, and in 1996 the Amnesty International USA site. But over the past 10 years pretty much every site I’ve built has used a content management system, starting with PHPNuke and later PostNuke, TikiWiki, and now Drupal. So I think it’s fitting to introduce students to content management systems even in a beginning class so that they are prepared to create real websites for some organization, business, or school.

I’ve put the materials for every course I’ve taught online, starting with a simple wiki outline for a survey class on computer applications such as iMovie, Dreamweaver, and Photoshop to my Advanced Learning Design course in Moodle (login as guest).

Related to all this, I’m helping a student finish up a dissertation exploring the motivations for why faculty at MIT put their courses online in opencourseware. Actually though, faculty have been putting their courses online on their own websites or using wikis like wetpaint or pbworks or wikispaces for many years. Below are some reasons for my own decision to put my course materials online:

  • It sticks around for students and others to review later. In Blackboard and other traditional learning management systems your stuff disappears shortly after your class is over. I don’t really take to the philosophy that students should have to memorize everything for a test. They’ll forget it soon afterward anyway (see this five minutes university bit by Father Guido Sarducci).
  • Re-use is easier. I can review a previous year’s class materials and revise them without having to start from scratch.
  • Posting publicly online and using blogs I believe makes assignments more meaningful to the students and to myself. You aren’t just writing a paper for the instructor, but for everyone else to see as well.
  • I can improve the materials on the fly, or post stuff before the whole class is finished. In traditional opencourseware, you don’t put your stuff out in the public until all the materials for the whole course are completely designed.
  • It’s difficult to get people to observe your course for peer review and feedback. Even more difficult when you are teaching online. Members of my tenure committee and others can review my teaching materials much more easily when they are publicly accessible online.
  • No one else is doing it in your area. There is no other open course out there on learning design or educational technology, and not even on internet development (except for some wikiversity notes). Of course there are thousands of HTML and CSS and Drupal tutorials and videos online, but this way I can organize them all or create new resources for one integrated course.

Btw, we are using a tweaked version of the creativecommons_lite Drupal module so that all wiki pages and blog posts on our site default to use a creative commons open license. But interestingly I’m already seeing students on their own pick other licenses for their blog posts. One student made a post public domain, another made it all right reserved, etc. Other faculty in my department are getting onboard as well, using Drupal as a blended learning support tool for their courses, and/or posting news and wiki pages to our site. We even used the wiki to work on a forthcoming article for Educational Technology magazine about our department, which is unique in that it combines both learning sciences folks and folks with a background in instructional design / instructional technology.

May 24, 2009 Posted by | drupal, opensource, research, teaching | Comments Off

Setting up Apache, Secure SSL Drupal Logins, and Drupal multi-site support on Ubuntu

I updated my earlier instructions on setting up a secure Ubuntu server. I added notes about setting up fail2ban, which protects your server from repeated login attempts or brute force attacks.

In the course of setting up some new sites on a server, I realized there was a gap between those notes on initial setup of the server, and my other notes on configuring and getting started with drupal. So here here are some notes on configuring apache and drupal 6 with multi-site support and support for secure logins using the securepages module.

Instructions

This assumes you already have an ubuntu or debian server up and running
with apache2, mysql, and php installed as seen in these earlier instructions.

PHP5-GD Module and Mod-Rewrite

Install the php5-gd module (required by drupal, moodle, others for
resizing images and so forth):

sudo apt-get install php5-gd

Enable the apache2 mod-rewrite module (required for clean url support
in drupal):

sudo a2enmod rewrite

Edit the file /etc/apache2/sites-available/default, and in the “Directory /var/www/”
section, change:

AllowOverride None

to

AllowOverride all

Make this change also to the /etc/apache2/sites-available/default-ssl file when it is available. If you aren’t familiar with how to edit a file on the command line, use “sudo nano (filename)” to edit.

Enable Apache2 SSL support

This will increase the security of your website by encrypting communications for certain pages. Here are the instructions online for how to enable ssl support (scroll down to the “Enabling SSL” section). You can read your local copy of this README by running:

sudo gunzip /usr/share/doc/apache2.2-common/README.Debian.gz
more /usr/share/doc/apache2.2-common/README.Debian

To enable SSL support, run these commands:

sudo a2ensite default-ssl
sudo a2enmod ssl

Restart apache2:

sudo /etc/init.d/apache2 restart

Here’s another tutorial on this too if you want to sign your own certificate. These “self-signed” certificates will cause firefox to throw an error, and you’ll have to tell firefox to make an exception. For me that’s acceptable, but if it isn’t for you, you’ll have to purchase an ssl certificate.

Otherwise, to regenerate the default ssl certificate: (if apache2 gives you an error when you restart it or if your hostname changed)

sudo -s
make-ssl-cert generate-default-snakeoil --force-overwrite
exit

“sudo -s” switches you to the root user, and “exit” switches you back to your own user.

Set up PHPMyAdmin

sudo apt-get install phpmyadmin

(configure for apache-ssl if given a choice)

Add this line to /etc/apache2/sites-enabled/default-ssl:

Include /etc/phpmyadmin/apache.conf

Restart apache2: sudo /etc/init.d/apache2 restart
and visit the ssl version of your site to see phpmyadmin:

https://yoursite/phpmyadmin

Remember you need to tell firefox to make an exception for your self-signed certificate. You’ll be able to login with username “root” and the mysql root password as soon as you specify it in the next step:

Create MySQL root password

First make sure you have a password for the mysql root user:

sudo dpkg-reconfigure mysql-server-5.0

Enter the password you want to use (twice), and make that password a good one. Write it down or save it somewhere safe.

Create database users for Drupal/Moodle/etc.

Login with “root” and that password in phpmyadmin using the https secure url: https://yoursite/phpmyadmin

Click on the link to “Privileges” and then the link to “Add a new user”.

Fill out the form. You might call the user “drupalsite1″ for example or
“moodledb”. Generate a strong password (write it down), and under “Database for user” check the radio button to “Create database with same name and grant all privileges”. Don’t check any global privileges.

Click the “Go” button at the bottom right and that will create a user
and database with the same name in one fell swoop. Remember the name
and password for when you install and configure drupal, moodle, or
whatever. Repeat these instructions (from “Add a new user” on) if you
plan on installing multiple php tools that use mysql. You’ll want a user for each drupal sub-site/sub-domain you are planning on running. A multi-site install lets you share the same drupal php files, but each site still needs its own database and settings.php file.

Download, install, and configure Drupal

See drupal.org for the latest version to download. If you want to avoid a lot of these “sudo” commands below, try a command like this (assuming you are in the admin group):

sudo chown -R root.admin /var/www

In the instructions below though, I use sudo. To download and install drupal:

mkdir ~/downloads
cd ~/downloads
wget http://ftp.drupal.org/files/projects/drupal-6.10.tar.gz
tar xzvf drupal-6.10.tar.gz
cd drupal-6.10
sudo cp -R * /var/www/
sudo cp .htaccess /var/www/

#remove old index.html file (replaced by index.php)
sudo rm /var/www/index.html

#create upload folder that server can write to:
cd /var/www/sites/default
sudo mkdir files
sudo chown www-data.www-data files
sudo cp default.settings.php settings.php
sudo chown www-data.www-data settings.php

Now visit your site (http://yousite/) and run through the drupal installation. Enter the database name and password you created just for your default drupal site.

Drupal Multi-Site Configuration

This assumes you have created some other domain names (CNAMEs) for your server, or you want to install drupal at some sub-paths (http://yoursites/drupal2site).

See these instructions on drupal multi-site to guide you. I’ll assume the 2nd domain name is called “second.domain.edu” below:

cd /var/www/sites
sudo mkdir second.domain.edu
sudo cp default/default.settings.php second.domain.edu/settings.php
cd second.domain.edu
sudo mkdir files
sudo chown www-data.www-data files
sudo chown www-data.www-data settings.php

Visit http://second.domain.edu and install drupal again. This time using a different mysql user and database name. It is possible for multiple drupal sites to share one database though, by entering a different table prefix each time (see advanced options in drupal installer).

Setting up drush for easier Drupal management

Drush is a command line tool that makes it easier to install new modules and do other tasks. Right now the drupal 6 version is in flux, but it does work basically when I tested it.

Find the right tar.gz drush file to download. At the present, I have to download the cvs HEAD version for drupal 6:

cd /var/www/sites/all
sudo mkdir modules
cd modules
sudo wget http://ftp.drupal.org/files/projects/drush-HEAD.tar.gz
sudo tar xzvf drush-HEAD.tar.gz
cd drush #see the README file
sudo ln -s /var/www/sites/all/modules/drush/drush.php /usr/bin/drush

Now you can run “drush help” on the command line to test it. To actually install modules, you’ll want to prefix drush with “sudo ” unless you ran my earlier “sudo chown -R root.admin /var/www” command.

To install a module, change to the root directory of your drupal site [/var/www or /var/www/sites/(sitename)] run “drush dl (modulename)”. For example to install the pathauto module:

cd /var/www
sudo drush dl pathauto

If you are in /var/www when you run the command, it will put the module in the sites/all/modules/ folder. That means all your sub-sites can use that module. If you want a module just for one sub-site, create a ‘modules’ folder under sites/(sitename) and cd into sites/(sitename) first before running drush.

See the drush page for more commands that work. In drupal 6, that’s the only command that works at the moment.

Have Drupal use SSL for logins

Run “sudo drush dl securepages”, and assuming that was successful, go to http://yoursite/admin/build/modules and enable the securepages module. Now change the url to https instead of http and visit the securepages configuration page to turn it on: https://yoursite/admin/build/securepages

Drupal module list

Here are some other modules I’ve been using. I haven’t checked them all for drupal 6 compatibility yet (ones marked with a ?).

securepages
backup_migrate
mollom
poormanscron (if you can't run cron)

print
pathauto
globalredirect
path_redirect

comment_notify
ed_readmore

fckeditor
IMCE
htmlcorrector

webform
date
calendar
advanced_help

cck
views
contemplate
panels?

og
og_mandatory_group
wikitools?
diff
talk?
freelinking
interwiki?

rules
google_analytics

Ones I’m less certain I’ll be using in drupal 6:

image
feedapi
autologout
autotimezone
import_html
invisimail
jstools
jq
ldap_integration
ldap_provisioning
logintoboggan
nodetype
node_import
user_import
nice_menus
prepopulate
private
similarterms
site_map
site_tour
smtp
tagadelic
video_filter

See my Getting of the Ground with Drupal post for more info.

April 5, 2009 Posted by | drupal, opensource, technology | 3 Comments

Impulse Conferencing

The website for the DrupalCon 2009 conference for Drupal developers is now online. You can register online for free and vote for or propose sessions. I have to schedule a trip next spring to visit NSF in DC anyway, so partly on a whim I proposed a session entitled “Drupal in Academia and Education.” I don’t know that it will be accepted, and if Bill Fitzgerald (author of an upcoming book on drupal and education) or someone else proposes a talk on using Drupal with K-12 schools, I can narrow the focus of my talk to using Drupal in higher education and for academic department websites (like our own). I’ll talk about using Drupal as a blended learning support tool, using Drupal to help market an academic department, and Drupal vs. (or in combination with) Moodle. I’m now in the process of taking the design used for our department site and creating a more generic version in Drupal 6, to be called “Department 2.0″ when it is ready to be released. It will be of course free and open source (GPL), just like Drupal and all its modules. Here’s my presentation description:

Abstract

How can Drupal bring academic departments and schools into the 21st century, enhance teaching and learning, and connect students, teachers and faculty with one another? What modules and patches are especially useful for academic/educational Drupal sites? What usability and design features can enhance Drupal for these audiences?

Agenda

  • Description of the “Department 2.0″ Drupal distribution for academic departments (in progress), and descriptions of other academic/educational Drupal distros (DrupalEd, Social Media Classroom, Prosepoint…).
  • A summary of some of the dozens of modules used in Department 2.0 and other distros that can be useful for academic/educational sites.
  • Using Drupal to help faculty and students, including distance ed students, feel more connected to their department and to each other.
  • Case study: Using a Drupal-based website to help market an academic department and recruit new students: http://itls.usu.edu/
  • 3 case studies: Using Drupal as a blended learning support tool.
  • Drupal vs. Moodle, Drupal + Moodle. I’ve used both separately with classes, and in January I’ll be combining them in one class. I’ll discuss how they can complement one another.
  • Usability and feature suggestions to enhance Drupal for academic and educational audiences.

More Drupal design and site development related topics (I’ll link to online handouts if there isn’t time to speak about them):

  • Using views/cck/date/calendar to create: listings of people by role, job boards, group calendars, a resource/room reservation system, …
  • Different options and module patches for supporting blogrolls and shared links in Drupal.
  • Module patches to get wikitools, freelinking, and organic groups to work together to support separate group wiki spaces.
  • Module patch to get Drupal and Mac OS X’s LDAP working together
  • Site development tips: to panel or not to panel?, calendar or event?,
    comparing custom user profile options, Drupal 5 vs. Drupal 6.

Goals

Those who design sites for academia and schools and districts will come away with some tips and information about modules, design techniques, and other resources they may find useful. Drupal developers will come away with an understanding of some of the special needs schools and colleges have when using Drupal.

October 22, 2008 Posted by | drupal | 2 Comments

2 More Drupal Hacks

  • Reservation system – Use cck_validation, date, calendar, & workflow_ng to create a system that allows for reserving rooms or other resources. The above link has php code for checking for time conflicts. Use the very latest 5.x dev releases of calendar & date.
  • Group wikis – Modifications to the freelinking & wikitools modules so that [[Bracketed Links]] go to wiki pages in your own group, rather than showing all wiki pages by that name in all groups. Use the very latest version of organic groups (og).

August 11, 2008 Posted by | drupal, opensource | Comments Off

Department 2.0

Here’s our new drupal-based website: http://itls.usu.edu/ with support for blogs, a wiki, groups, event calendar, rss feeds, job board and so forth. There is a site tour overviewing the new features as well. I posted notes on the modules used for the blogs and wiki earlier, and I’ll post more on the other features later on my drupal blog. But in the meantime leave a comment here if you have any questions about the modules or techniques used for various features on the site.

The students are not using the site yet, we’re waiting to get some of them added to an LDAP database first, but by this fall, students in one of my classes will be blogging about foundational issues and debates in instructional technology and participating in a drupal-based group.

I hope to eventually abstract away our department-specific info so that others can download this customized drupal installation as well, with the kitchen sink already included (“department 2.0″).

There are still some outstanding issues to consider. Our department only has masters and doctoral students. Would there need to be any different considerations for undergraduates? Also right now you can moderate who can join a group, but once they are in, anyone can post news stories or events, it is essentially unmoderated. That works fine for our situation, but might not for others. Another issue is how can we allow the public to get more involved? Visitors can comment on blogs or wiki pages (with spam protection by services like mollom or disqus), but is that enough? Lastly, looking at the authentication issue, it would be great if universities and other trustworthy organizations started running openid servers. That would make integration with drupal, moodle, and other tools a snap.

July 17, 2008 Posted by | drupal, usu | 1 Comment

Drupal patches

Here are a few minor additions contributed to drupal the past week to get our drupal site working the way we want. We are running it on an OS X server, which isn’t always the best idea, but we found that drupal’s ldap_integration module (and the php ldap extension) do not work with OS X’s LDAP (OpenDirectory) when you want to change your password. You have to run a special command (dscl) instead, so here is code to make drupal’s ldap work on an OS X server. It currently requires the drupal alt_login module, which we also needed to get LDAP working if you want people to be able to use real names as their drupal usernames. But the alt_login requirement is not necessary if you are not using real names in drupal.

The user_import drupal module is also very handy. You can take a spreadsheet of people and import them all at once into a drupal site. Here are two files that make it compatible with the ldap and alt_login modules as well.

Lastly, the organic groups module doesn’t have a way to filter views by a dropdown list of group names, you currently have to type in the group name by hand or the group ID number. So here is a code snippet that enables a dropdown list for easier filtering.

July 8, 2008 Posted by | drupal, opensource | Comments Off

Follow

Get every new post delivered to your Inbox.