Wordpress logo

Getting creative with WordPress for research

Just thought I’d whack a post up re: my work and the WordPress plugins etc. I’ve used to setup some research. The details of my research don’t really matter, but in short I have multiple groups and I want all of them to see basically the same materials, with some small variations (mostly different links). I also don’t want my website to be accessible to anyone else. So, I setup a wordpress installation on OU hosting, and was looking at ways to ensure only certain groups could access it, that they were using Firefox to do so, and that on login they could be directed to different conditions. So I used: * WordPress install with the 2014 theme (and a plugin Fourteen Extended…I know this is cheating but it was just the easiest way to customise to e.g. make sure my posts were more than a stupidly skinny column). * Advanced Browser Check checks whether the user is using ‘firefox’ and gives them an irritating dialogue box if not * Groups which lets me allocate users to groups and give those groups permissions. Specifically, this plugin is what lets me have a single page which all users go to, but only parts of which each group can see * iframe which lets me embed some html files in pages (I know this is inelegant…) * Manage Upload Types which is a plugin that allows you to manage the types of upload allowed, including htm, html, css, etc. This is actually pretty easy to do in php but nevermind. This was a late addition to my collection having realised that media-vault was doing a check of allowed file types prior to allowing users access to them. * Add From Server which lets me upload via samba share folders into the upload directory and still have the files indexed by wordpress (otherwise although these files show to me as admin if I embed them, they don’t show to my users :/ ). * Media File Manager which lets me make folders within the media section (it is weird that you can’t do this by default) * Media Vault which is actually more useful, it lets you upload files which you can then grant specific permissions to (including groups) – normally files are either private or public. I used this to ensure the html files I was using were only accessible to my participants (when embedded using the iframe plugin, and p’s granted specific permission on those pages) * Peter’s Login Redirect I know setting up a redirect isn’t hard, but there’s also this handy plugin which can do it for you. The default behaviour on login is to send users to their profiles/admin…but unless they’re admin this is pretty stupid, so this just sends them back to the homepage on login. * [Simple History]1, which just gives easy access to various things, most crucially for me, login stamps (so I can see if users have logged in, and when) * Email Sharing is a problem on wordpress (i.e., you cannot register multiple accounts to the same email). Given I don’t want p’s personal data on the web at all, (and I really want control of the accounts) I needed to be able  to setup all p’s on a single email address. One [solution is given here]2 (basically if you add +something in a gmail address it looks different but directs to your email). There used to be a [plugin to allow email sharing]3, but it appears not to work (so I used the gmail solution). * Limesurvey is a free but very powerful survey tool (closest to qualtrix you can get, bearing in mind DPA issues with using free providers where you’re not hosting, in particular google forms). * The easiest way I could find to deal with reordering of questions (counterbalancing) was just to replicate the whole survey and give participants different links. I’m sure if I go into the survey logic I can send them to different orders based on their p number, but I didn’t want to have to deal with that. * Related to the above, I realised (late) that actually it wasn’t going to be possible to just send users to a login page on limesurvey through which they would access the appropriate version of the survey; Limesurvey is entirely token based. There are a few work arounds including the creation of a dummy question to ask p’s username p/w and then [using conditions]4 either to send people to the appropriate survey or to generate  a token. An alternative (and the one I took) was to set the surveys to allow multiple uses of the same token (general settings on the survey) and then create a token for each group’s survey version which linked from the wordpress page, alongside similarly creating a dummy question for their username and password (you can easily enough chose to validate these if you like)

Footnotes

  1. https://wordpress.org/plugins/simple-history/

  2. http://en.support.wordpress.com/email-address

  3. http://wordpress.org/plugins/allow-multiple-accounts/

  4. http://manual.limesurvey.org/Setting_conditions