Importing Moodle into WordPress

flickr photo shared by Internet Archive Book Images with no copyright restriction (Flickr Commons) A week or two ago some faculty members asked me about getting the Leadership Education in Neurodevelopmental Disabilities (LEND) content out of the Moodle hosted at Vanderbilt and into WordPress. I figured I could do this. Someone might even have done it already. If not, I figured the export options would have to put out something fairly straightforward that could be parsed. In any case, the majority of my learning comes from committing to things I don’t quite know how to do. Turns out I couldn’t find anyone who’d done this before. I went a variety of different routes as I attempted not to do the work myself. First, I exported the course in the two different flavors that were available (SCORM1/Course Cartridge and Moodle backup). Just for fun I tried a few different flavors of import plugins . . . Edwiser Bridge might have worked but required a higher level of connection to Moodle than I felt like dealing with and seemed more focused on integration rather than migration, Simple CSV Importer and WP All Import both failed to do what I needed despite pushing XML around a bit to try to make it work. So with all the ready-made solutions exhausted2 I turned to […]

Auto-Logging Email via Google Script

flickr photo shared by OSU Special Collections & Archives : Commons with no copyright restriction (Flickr Commons) A while back I was logging emails in a Google sheet via IFTTT. I’d add a hashtag and forward it on where a spreadsheet would parse out some stuff from the subject line based on the | character. At some point it stopped working and I never quite figured out what the issue was. I thought I wrote about it but, if I did, I can’t find it. It may be in one of my many draft posts. In any case, here’s a better and more customizable solution. It’ll grab anything I label ‘support’ and throw it in a spreadsheet with a few different chunks of information in different columns (to, from, date, subject line, link to the email). You’d open a spreadsheet and name a sheet ‘data.’ Open up the script editor (Tools>Script Editor) and put the script below in it. You might want to change the search parameters. Look at the stuff below the asterisk line. If you want to play around with the right search parameters, just practice in GMail with these parameters and then use them in the query variable below. You will want to set the trigger to run at 1-2AM each day. So now, all I have […]

Grabbing JSON

flickr photo shared by Library Company of Philadelphia with no copyright restriction (Flickr Commons) What I wanted to do was grab data from the WordPress API and use that to provision chunks of my new portfolio site. The portfolio is hosted on GitHub and GitHub is HTTPS. At the moment my bionicteaching site is not HTTPS.1 That causes problems as secure and insecure are not friends. I wanted a quick and easy solution so I could continue until I do the HTTPS switch. The following is how I wandered towards a solution. A number of the things worked but don’t quite work for what I wanted. So they’re worth remembering/documenting for later and it’s kind of fun to see a mix of javascript, php, url manipulation, Google API, and the WordPress V2 API all in one little bit of wandering. My first thought was to grab the JSON via a Google Script and store it in Google Drive. I can do that but can’t seem to make it available for use the way I want. I tried messing with various URL parameters but it wasn’t flowing and I only started there because I thought it would be easy. I did eventually get the file accessible in DropBox (the only other place I could think of immediately for https file storage) […]

Google Scripting Folder Tricks

I often end up confused about some of the Google Script stuff so I’m putting this out there in case it helps others. The following script does a few things that you might want to do all based around a Google Form submission. It creates a folder, adds editors to the folder, puts the folder in another folder, and then copies a spreadsheet to the folder while adding some data in a few cells.

Scraping with Google Spreadsheets Across Instagram, Flickr, YouTube etc.

I remain kind of amazed with how many little tricks can be done with Google Sheets. After seeing Alan’s post today, I wonder how much of the data I could pull (assuming we had the right user names and knew the services . . . really the harder part) just using Google Sheets. Turns out we could get a pretty good amount. The following is a mix of XPath, regex, and APIs. I started with as little real programming as possible and gradually increased sophistication. The following are just meant to get a rough idea of how much stuff you’ve got in the various spaces. Flickr The URL: http://flickr.com/photos/bionicteaching The function: =IMPORTXML(C2,”//*[@class=’photo-count’]”) This uses a basic Google Sheets function to grab the photo-count content. The function is grabbing the div class with the title photo-count. Vimeo The URL: http://vimeo.com/twwoodward The function: =INDEX(IMPORTXML(C3,”//*[@class=’stat_list_count’]”),1) Pretty similar to the example above but with the addition of INDEX. That solves the problem that there are multiple items that are all in the stat_list_count class and we only want the first matching item. Sound Cloud The URL: http://soundcloud.com/cogdog The function: =REGEXEXTRACT(IMPORTXML(C4,”//*[@name=’description’]/@content”),”([0-9]+) Tracks”) This gets a bit fancier. IMPORTXML brings in a large chunk of content from the page but it wasn’t structured in a way that I could get the exact information I wanted. REGEX […]

FI Video Collective – The Project & Theme

The FI Video Collective is a really fun project that Molly is leading centered around VCU’s common book. This spring semester, Focused Inquiry faculty are teaming up with ALT Lab to offer a unique creative opportunity to UNIV 112 students. This project is inspired by the artistic style of the winter reading selection, Lauren Redniss’ “Radioactive,” in combination with crowdsourced video projects like Hit Record’s “First Stars I See Tonight” and The Johnny Cash Project. The end product will be a single video featuring a story collectively written and created by as many UNIV 112 students as are interested in participating. The video will premiere at the FI Expo on May 4th. My summary, in case you are not a video person (really, just watch it), is imagine a bunch of faculty and students collaboratively creating a video with options for participation ranging from script writing and acting, to creating music, to drawing a lamp. Lots of access points for people who like to do different things all leading to a massive collaborative project. The Theme Part While nothing like driving the project1, I had a couple challenges on the web side of things. We needed a way to say what media was needed from students and to associate it with the script/narrative so that’d it make sense to anyone dropping in. Additionally […]

Discography to WordPress

flickr photo shared by Thomas Hawk under a Creative Commons ( BY-NC ) license This is in response to something Adam Croom wrote two(?) days ago. I thought it’d be an interesting proof of concept and would let me figure out some things with a purpose. I also like to have a few projects going on at once so I have things to switch between when I get frustrated. I also see this kind of information pushing/pulling as broadly applicable. Some of this stuff is no doubt uglier than it had to be but I’ll try to show some intersections that happened to occur with other projects and how certain steps might be ignored entirely if you want to be all efficient and stuff. The final plugin is here and should be a decent start to any customized import you want to run against a CSV file. Adam had information in Discogs. He wanted that information in WordPress where he could control it. I had never heard of the site, let alone seen its API. But it well documented and it took me a few minutes to realize I could get all the data I needed without even needing to authenticate. The user data was associated with collections and appending 0 would get me the root level stuff. With Adam’s […]

Post Documents for Student Comments

Students writing short papers and posting them for comments from other students is a fairly common pattern among VCU faculty. It’s a nice entry point because it doesn’t require any radical rethinking but still starts to expand the audience for the work, has possibilities around peer review, and is a possible gateway to writing on the web more natively. There are lots of ways to do this. I’ll break down one option path here. The faculty member wants students to keep writing in Word. There’s no immediate interest in writing in WordPress or in Google Docs. The goal is to have comments made by other students on the document as a whole (not specific to words/phrases/sentences/paragraphs). Initial Setup – The Form We setup a Gravity Form to create a post with a document embedded in it using Google’s document viewer. You can explain it as mail merge into a WordPress post or if that doesn’t help you might show them this image as most people have been on the failure end of a mail merge attempt. You’re probably want a minimum of three fields for the user to fill out and you’ll have two that are invisible to them. The three you’ll need for the student are their name, the title of the document (the post will get this name […]

Shifting out of IFTTT

Kin Lane mentioned that IFTTT, a service entirely built on APIs, doesn’t have an API. That bothered Kin and the more I thought about it it bothered me. So I figured I’d start disentangling myself from IFTTT. One of the things I did with IFTTT was to send out a Tweet any time I posted something new on my blog. Crazy to think I set that up in 2012. Granted, I could have replaced this with any number of plugins but I thought this would be fun and bit of API work but most interestingly it’d put me (mostly) in charge of how the tool worked. The following script is just cobbled together from something I found to get an RSS feed into a spreadsheet and a script I used a while back to send a tweet from a Google SS. Next steps will be to start playing with adding amusing variables to the message. The first message kicked through with a minor error but progress! Grabbing Flickr Photos was blogged & can be found athttp://bionicteaching.com/grabbing-flickr-photos/ — Tom Woodward (@twoodwar) March 20, 2016

Grabbing Flickr Photos

flickr photo shared by goosmurf under a Creative Commons ( BY ) license This one will be improving considerably in the near future but given I’ve just been talking to many interesting people about APIs, reclaiming various things, and Indie-Ed Tech1 I figured I’d get it out early and that’d force me to follow up. Nothing like ugly betas to drive development. It’s also a chance to test my new blog to Twitter system as I disentangle myself from IFTTT. Nothing kills momentum like not doing something . . . So this script currently works on public photos. You’ll need a file named imgs and a file named data.json. This thing should chew through all your photos and download the original size image to the folder. It’ll also make a giant json folder with the image title, any lat/long coordinates, tags (not machine entered though), and the photo date. I will warn you that I’ve only run it on 100 photos so far. I’ll give the full thing a shot once I get things setup to put it on S3. 1 Count down to book . . .