Extending D2L Reports Using Python

So before I get going on this long post, a little bit about me. I fancy myself a programmer. In fact, the first “real” job I had out of college (the second time I went through college, the first job the first time through college was a video store clerk) was programming a PHP/MySQL driven website in 2003-ish (on a scavenged Windows 2000 server running on an HP box). So I have some chops. Of course, as educational technology has moved away from being a multiple skillset job where a little programming, a little graphic design, a little instructional design was all part of what one did, now it’s been parsed out into teams. Anyways, I haven’t had much of an opportunity to write any code for a long time. The last thing I did seriously was some CSS work on my website about four months ago, which is not really doing anything.

With that all said, the LMS administration I do requires little programming skill, as being an admin, while having it’s perks, isn’t exactly a technical job. I do recognize that some admins deal with enrollments and SIS integrations that require a whole skillset that I could do, but I don’t.

As part of my admin jobs, I run monthly reports on how many items are created in D2L’s ePortfolio – these reports include date and time, username and item type. We use this as a gauge of how active students are and cross-referenced with other information it’s incredibly useful in letting us know things like 22,383 items were created by 2650 unique users in ePortfolio in November 2014 (actual numbers).

Using Excel, I can see if users in a month have ever used ePortfolio before, so I can also track how many users are new to the tool per month. However the one thing I can’t easily look at is how frequently a user might interact with ePortfolio. With a total record number of over 125,000, it’s not something I want to do by hand. So I wrote a script. In Python. A language I don’t know well.

If you want to avoid my lengthy diatribe about what I’m doing and skip right to the code it’s on GitHub here: https://github.com/jonkruithof/python-csv-manipulation-d2l-reports. If you don’t want to click a link, here’s the embedded code here:

Basically the code does this:

Look at the username, see if it exists in memory already. If it does, find the difference since the last login write that information to a CSV, and then overwrite the existing entry with this entry. If it does not exist, then write it to memory. Loop through and at the end, you’ll have a large ass CSV that you’d have to manipulate further to get some sense of whether users are frequently using the ePortfolio tool (which might indicate they see value in the reflection process). I do that in CSVed, a handy little Windows program that handles extremely large CSVs quite well. A quick sort by username (an improvement in the Python code coming sometime soonish) and we have something parseable by machine. I’m thinking of taking the difference in creation times, and creating some sort of chart that shows the distribution of differences… I’m not sure what it’ll look like.

Reflections on Week 1 of Udacity’s CS101

Udacity’s CS101 is a beginner programming course, which I’m taking (even though I’m fairly well versed in programming, having done web programming for years prior to getting into e-learning). I’m not all that interested in the content, however the introduction to Python will be interesting, and the project, building a search engine, is very appealing.  Python is a language that I’ve never learned, and always felt I should – it strikes me as a handy complement to PHP (which is bloated) and Perl (which does text processing well, but suffers in other areas).

I am in the course because I’m curious how the course works. When you have a course the scale of this, what checks and balances are there? I’m sure there’s analytics behind the platform that describe how much time the viewer spends on each page. What’s really interesting is the students in the course – many of whom have professed to be excited for homework for the first time. I’m sure the vocal ones will be pumping the tires so to speak, and there will be many who are not excited for homework, or found that the first week was just a bit too much for them – those people we’ll never hear about, because they’ll just stop and do something else. The ones who are excited for homework (and no doubt will be a soundbite that Udacity uses over and over to legitimize their approach) are excited because they are motivated (some for the first time). They signed up, they chose this course because it suits their needs, and frankly, they should be excited and motivated. It’s not often higher education gives something away.

I haven’t done the homework yet, but here’s some criticisms of the videos, and general approaches to the teaching. For those not taking here’s how a week works – several topics are broken down into chunks – usually 5 to 8 minute videos interrupted by a quiz, then another video, then an example code chunk to write, which is the best part. While the videos are good, they do take up the whole screen, so YouTube in their infinite wisdom, obscures things drawn on the screen in the video with their branding, and controls (should you want to rewind). The production values for the course are par for education, which means they could be improved by a bumper at each end, with some visual written title to further accentuate what we’re watching.  As much as I like the instructors, I don’t think their two talking heads interlude, congratulating the student, is necessary. Your students should be motivated, they signed up, they are watching – wait to motivate us (and do it in an authentic way, not wooden as this video comes across). I think the course could be vastly improved if we could have the development window and the video at the same time – that way experimenting as the video explains. I understand that cognitively, it’s not ideal, but it would be useful to actually write out the code that’s being explained and run it.

My biggest peeve is that any work done in their interface is not downloadable – at least isn’t clearly downloadable. I wish I could take those example scripts and build on them. Again, this would save me time doing the homework… something I am not surprised I do not want to do. I guess it shows how much I value an essentially useless piece of paper that will be unlikely to be recognized anywhere as an accomplishment of anything. Another issue, while this isn’t a big problem, I know how to write a couple lines of Python – but shouldn’t I actually be taught early on how to write a whole python script? You know, something as a standalone file with a dot py extension? Isn’t that the point of this – and fundamental to the use of Python (and modularity in programming…)?

At best I see this as a replacement for HR training for some – so that labour costs can go down again (hiring laypeople who are just out of high school, then run them through a series of training courses over a few weeks to get them trained how you want the job to be done, with no transferability). Maybe that’s overly critical. Udacity’s model is clearly rooted in a very American approach to education, which as a whole is outdated and certainly ripe for revolution. That’s not Udacity’s fault in any way, but as long as jobs require degrees, this will not be socially transformational for the majority of the population – unless Udacity figures out the accreditation part of the deal.  Which I suspect will require some sort of money.

With all those criticisms aside, they’ve done an admirable job in developing a free course that seems to be scalable.  They do attend to ones needs, and are quick to respond to bugs and errors that are found. The community around CS101 is quite impressive for being about a week old, and that’s in part to the efforts of the Udacity community representatives.