Posts tagged ‘PHP’

Exactly one year ago I joined South Devon College’s Web Team, as their Senior Web Deveoper (with a Lead above me and an Assistant below). Back then we were a Technology Exemplar Network college, meaning we were outstanding in our field (not the exact terminology used, but you get the idea) in the use of ILT.

Today, one year after I joined, we are once again a Technology Exemplar college, and actually we are really good at what we do. No, honestly, we are.

Last week we hosted a TEN open day, in which we showcased what we were good at and how we got there, and invited other colleges to attend and share our good practice. While we had a lot of information to pass on, I personally had 3 lots of 15 minutes to show good practice in developing and managing the technical aspects of our VLE (virtual learning environment) Moodle.

Many of the ways in which I do my job have been inherited from the Lead Web Developer, as he was doing it before I was, however it doesn’t make it any less relevant, or less good. What struck me was how many questions I received and how many conversations I was involved in, where what I perceived as the simplest things weren’t being done, were being done badly, or were being overlooked.

For example, we have four people directly involved in the training and development of Moodle: two technical people (the Lead Web Developer and I (Senior Web Dev), as well as two front-of-house people (the Blended Learning Manager and e-Learning Coordinator). The technical people manage the servers, codebase, and do developent as required by the other two, who teach the teachers how to use Moodle to ensure effective teaching and learning are taking place.

The Moodle Development Team meets every two weeks, and to be honest, they are the best, most productive meetings I have ever attended. I think this is mostly because we are all peers with nobody dictating what is and is not done. (It is worth mentioning that the Blended Learning Manager has the final say as she is the business manager for Moodle, but as she responds to the needs of the teachers and the learners, we are not doing things for no reason or at someone’s whim. Everything we do is driven by the needs of the learners, as they are the reason we are here.)

At the open day, one chap we spoke to (in the context of a whole IT department, not just in terms of Moodle) said that his college’s IT Manager ran the IT aspects of the college as his own personal fiefdom, dictating what was allowed and what was not, regardless of the request or the reason behind it. Consequently the OFSTED report for this college showed that teaching and learning were being prevented from taking place.  Not just ineffective, but prevented. This is a very sad state of affairs indeed. (Please note that so far I’ve been unable to verify this via OFSTED’s website and I’m not naming names.)  Why the IT Manager is not puting the needs of the learners at the top of his list, or has been replaced by a more learner-centric IT Manager, is beyond me.

It surprised me, at our open day, how many colleges do not have a working link between the “front of house” (as I call them) teaching and learning people, and the technical people (whether they are Moodle-specific, as I am, or not). In one case, the people teaching and training the use of Moodle don’t have a channel to request new features be added, or even perform updates (quite vital as of the 1.9.7 release).

We use a code versioning system (called Git) to pull the very latest code from git.moodle.org (to keep on top of security updates, bug fixes and so on), and manage the changes we make to the code.  This way we can modify the core code to meet any needs that we have, and it won’t be overwritten when the next version of Moodle is released. Instead, changes from ‘upstream’ are merged with ours.

It’s simple to use, very effective, and I have trouble remembering how I used to develop code without it, however it strikes me as somewhat odd (maybe ‘unfortunate’ is a better choice of words) the sheer number of Moodle users who aren’t using version control.  Such was the short time I had and the number of questions directed at me that I didn’t have the chance to ask my own, but it would have been as simple as “Why aren’t you using version control?”

We also use the Ruby gem Capistrano to deploy our code to multiple web servers simultaneously and seamlessly.  I know very little about Ruby as a whole but the Lead has developed a number of bespoke in-house systems which use it, and it is simple enough to set up to deploy any code anywhere.

Possibly another example of many small things adding up to one big good thing, is our use of Linux. The Web Team (a small part of the IT department) use Ubuntu Linux on our desktops (three) as well as our servers (seven and counting).  The Moodle developers recommend a LAMP stack (Linux, Apache, MySQL, PHP) over all the other web and database server options, as do the Mahara people,  and our bespoke internal systems use the same but with the addition of Ruby on Rails.  We could use Microsoft products like every other server in the building, indeed there is a small yet constant pressure to do just that, to conform, what with all the Microsoft-specific knowledge and experience in our immediate team, but would it make our Moodle/teaching and learning/us “better”?  Just because something is popular, doesn’t necessarily make it right.  Likewise it’s not necessarily right because it’s less popular either, however the fact of the matter is that we use “non-standard” stuff and it works for us really well.

Example One

Recently we had a bit of snow.  You may have seen it on the news? ;) The college was shut for one afternoon and the whole of the next day.  Despite this, learning was able to continue due to the college strategy of having (two weeks’ worth of) resources available on each and every Moodle course for just such an occasion.  Using Google Analytics we could see that although total ‘hits’ (logged-in page and resource accesses) on Moodle had dropped off to a quarter of what could be considered normal, the number of external ‘hits’ was up by 30%, proving that despite the snow being immense fun, some learners were going home, logging in and getting on with some learning.

Example Two

Did you know that even Technology Exemplar colleges get viruses?  Well, if you logged into Moodle when we had our virus, you wouldn’t have noticed, because like most viruses, it was targetted at computers and servers running Microsoft operating systems and software. We were, however, affected in two ways.

  1. The account Moodle uses internally to log into LDAP to authenticate users was deactivated by the virus, meaning that for a minute or two, anyone trying to log in was unable to. A pain, but out of the control of the Web Team who have no authority to administer user accounts.
  2. Our e-portfolio software Mahara runs on Ubuntu Linux, just like all the other servers, but this one  is running virtually via Microsoft’s Hyper-V on a host computer running Server 2008, which, you guessed it, fell victim to the virus and had to be (literally) switched off, killing one physical server and quite a few virtual ones. Mahara was off for quite some time (will leave out the actual time to spare some blushes) and it is a good job we are trialling it and it is not considered mission-critical.

Conclusion?

I’m less concerned that we’re exemplar now, but more concerned interested in how to do my part to ensure we’re exemplar this time next year, and one year is a very long time in technology.

I honestly want to like Internet Explorer. I used it for a long time and it has varying degrees of the market share depending on who you talk to, certainly it varies from two-thirds to three-quarters for the sites I see the Google Analytics for (probably as it is installed as default and the masses don’t know/don’t care that other web broswers are available, but whatever).

I just cannot bring myself to like something (or the company which produces something) which causes me to have to write the following code:

<!--[if IE]>
    <div style="position:relative; width:460px; height:84px;
    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $path; ?>/image.png');"></div>
<![endif]-->
<!--[if !IE]>-->
    <img src="<?php echo $path; ?>/image.png" />
<!--<![endif]-->

It’s just not right, is it? (PHP simplified somewhat for presentation purposes.)

I’m a Linux user these days, by choice. My day job requires interaction with Linux servers so it seems logical to use Linux as my OS of choice (and I’m lucky enough to have an open-minded IT department and a boss who appears to be an actual l337 h4xx0r) and I have found desktop-server interaction a lot easier than using Windows XP. (I stilll have XP though: my PC is dual-booted but defaulted to Ubuntu.)

Consequently, I don’t have quick and easy access to IE. I use Firefox as my primary browser and have the other main three (Opera, Safari, Chrome) available for testing, so imagine my surprise and dismay when I saw the Moodle theme I have been lovingly working on for the last two weeks look like a complete pile of kak in IE.

Granted, this was IE6. I don’t know how old it is in terms of years but it’s two versions old, which in IT terms is an epoch. Thankfully we’re upgrading en masse over the summer to IE 7. Which does an only slightly better version of rendering my fairly standard CSS.

Can’t we all just agree on how things like margins, collapsing, padding, borders, the box model and all that jazz work? Does the phrase ‘web standards’ get filtered out of all emails inbound to MS IE developers?

I’m not anti-Microsoft, honestly. I have never written M$ when I meant MS. In fact after installing Ubuntu three times and then using it  for a week I had a new-found respect for the nice people at MS and the work they put in to ‘making things just work’, it’s just that I’m not entirely sure they’re going about things the right way. (Maybe they aren’t on purpose? I’m sure they have their own agenda. Like 100% market share of eveything, same as Google.)

They seem to get away with things (for example, the lack of PNG support) simply because they are the market leader: it has to work with IE or you are excluding 67-75% of your customers (my percentages, based on the Analytics figures I mentioned earlier). So if I create a site which uses PNGs (specifically the alpha transparency), it will look kak to 67-75% of the people who see it. That is obviously something I don’t want to happen. Therefore I have to compromise, using GIFs with index (?) transparency, or JPEGs with none and getting the gradients all matched up, which could be a problem.

The only answer (at the moment) is to feed different code to IE than the other browsers, such as the solution above, by which I mean ‘working’ code to the other browsers and ‘IE fixes’ type code to IE.

I can’t say I’ve used IE 8 yet (I will have to for testing purposes: we only have IE 7 internally but our Moodle is of course available externally too) but I hope it works more like Firefox 1.0 than IE 6.