Making a link that will save an appointment in MS Outlook’s calendar

May 15, 2013

OK, so the link is an iCalendar file, but until I started looking for, I had no idea what it was called.

The Problem

In a nut shell, for a while now I’ve known about the existence of Google’s Save Event.  Which is great if you have a Google account and you’re signed in and you don’t have separate work and personal accounts.

At school, we use Outlook for EVERYTHING.   Quite possibly a bit too much.   I do hear: “I haven’t had a chance to read your email” as an excuse quite a bit.

What I wanted was the ability to generate a link, which when clicked on would add an appointment to my calendar as opposed to manually going to calendar, creating a new event, setting the time and date correctly, inviting others to the meeting, adding a room…  I’m boring myself.

The Solution

I eventually found a solution on Stackoverflow’s fourm

<?php

$ical = “BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:” . md5(uniqid(mt_rand(), true)) . “@yourhost.test
DTSTAMP:” . gmdate(‘Ymd’).’T’. gmdate(‘His’) . “Z
DTSTART:20130715T100000Z
DTEND:20130715T110000Z
SUMMARY:Bastille Day Party
END:VEVENT
END:VCALENDAR”;

//set correct content-type-header
header(‘Content-type: text/calendar; charset=utf-8′);
header(‘Content-Disposition: inline; filename=calendar.ics’);
echo $ical;
exit;

?>

Which solves the problem quite nicely.  You need to put this in a PHP page, so you need a server which lets run PHP*.  This page also auto-closes once completed, so you need to link to this page from another.  When you run it the page closes itself.

The example above creates a .ics file which when run, opens up an appointment in MS Outlook for 15th July 2013 from 10 am until 11am and names the event Bastille Day party.  Wow, that will be some party!

I’ve tinkered a bit with the original, to make it easier to adapt.  My Comments are in green, things you can set are in red:

<?php

// If you point to this page from another page, you can add variables to the link: eg:

// calendar.php?startdate=201307015&apptTime=100000&location=My Office

// Start date format needs to be YYYYMMDD

$startdate=$_GET['startdate'];

// Appointment time format needs to be HHMMSS

$apptTime=$_GET['apptTime'];

// Location can be pretty much anything

$location=$_GET['location'];

$ical = “BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:” . md5(uniqid(mt_rand(), true)) . “@yourhost.test
DTSTAMP:” . gmdate(‘Ymd’).’T’. gmdate(‘His’) . “Z
DTSTART:”.$startdate.”T”.$apptTime.”Z
DTEND:”.$startdate.”T”.$endTime.”Z
LOCATION:$location
SUMMARY;LANGUAGE=en-gb:$details
END:VEVENT
END:VCALENDAR”;
//set correct content-type-header
header(‘Content-type: text/calendar; charset=utf-8′);
header(‘Content-Disposition: inline; filename=IrisAppt.ics’);
echo $ical;
exit;

?>

You can also add ATTENDEES so that it can auto-generate a meeting.  This is a little trickier to work out.  In the end, I created an iCal file from Outlook and opened it in NotePad++.  Each attendee needs their own line and goes just below the LOCATION line:

ATTENDEE;CN=SomeBody;RSVP=TRUE:mailto:SomeBody@youremail.co.uk

And that’s it.   All you have to do is link to a page containing this code and it should do the rest.

Bonus for Iris Connect users/admins

One of my main reasons for wanting to make an automated appointment system is because I, along with two colleagues administrate Iris Connect in the school.  We need to know when the observations are happening and where.  The easiest way for us to do this if I get everyone to invite me to observe them.  I then put the observation in my diary, invite the other two in case I’m not in the office.  When I get the reminder I set the camera up and set the recording going.  It works really well.  But I get fed up making the appointments.

The beauty of the Iris Connect system is that it sends out an automated email.  It’s always the same format.  So I built a form which means I can copy and paste the text of the email, click submit and up pops an appointment.   I had a slow morning. :)

If you would like to make use of this little bonus, you can find the files here

I’ve spoken to the guys at Iris Connect about this already and apparently this level of functionality is in their roadmap.  But why wait.


* I’m going to do another post very soon# which provides a solution for those of you who don’t have access to a server.

# I promise


FIXED: Playing MP3 files in Windows Media Player from IE (instead of Quicktime)

February 18, 2013

Preamble

OK, before I start. I don’t want to hear about Chrome, Firefox, Winamp, iTunes or frankly anything else. It’s taken me an absolute age to find a solution to this on the internet and almost every forum I went on where someone was having this issue, there was someone else suggesting they just change browser or media player.

I can’t. We run RM CC4 at school, which uses Internet Explorer 8/9 and Windows Media Player.

If you’re a fanboy (or fangirl) of another set up, good for you. Glad you’ve got the freedom to do so. Now shush, this article isn’t for you.

The Problem

For the rest of us, there’s a really annoying issue if you have Quicktime installed and you’re using IE8 or IE9.  When you click on a link to an MP3 file, instead of delivering the file, the window gets taken over by thew Quicktime logo , shortly followed by a whole page of white with a tiny play bar in the middle.  Not pretty, not flexible and kinda annoying.

Quicktime

You get this followed by…

The Playbar

…this

The Extended Problem

A lot of people blame Apple for this, but I think the blame lies with Microsoft (when you see the solution).  The issue is that Microsoft have changed the way you control what plays what, but the parallels with the old system are still there, so lots of forums and help sites list the old way, which no longer works.

The Solution

Inside Internet Explorer, do to the following:

  • Click on Tools
  • Internet Options (yeah, Internet Options, not Manage Add-ons)
  • Click on the Programs tab
  • Click Set Programs

At this point, a window for the Control Panel opens up .  It looks like, but is not the Default Programs area of the Control Panel.

Default Programs page

  • Click on the Set program access and computer defaults link
  • Check Custom
  • Click on the down arrows

Set access

  • Scroll down to Choose a default media player :
  • Check Windows Media Player
  • Click OK

And that’s it.  At least it worked for me.   Hopefully it will help you as well.

 

 


Sparkbook

January 28, 2013

Sparkbook is a database driven system I’ve built for school which populates students directly from our MIS (Serco Facility) and allows teachers to quickly mark them against different criteria.

The system is designed to be customisable, so teachers can add their criteria. There is a tiered marking system built in – teachers can choose from 5 (and counting) marking tiers:

  • Expert, Apprentice, Novice
  • Gold, Silver, Bronze
  • etc…

You can set a target and Sparkbook calculates both the current level and ultimate grade.   It’s the sort of thing, I’ve discovered lots of staff had been doing manually in MS Excel for years, spending ages build all their spreadsheets.

Finally, I’ve described it as a mobile device companion markbook, in that it can run from a tablet (resized automatically and linked from our Frog VLE) leaving the user’s computer screen free.   Very handy if you are marking online work, no changing windows.

I’ve only soft launched it so far.  That is, I’ve linked it in, but not drawn everyone’s attention to it.  I prefer to do introduce new systems this way, it gives systems time to settle in.  There are bound to be glitches, change requests and training issues. By simply making the link available without a grand announcement,  it naturally limits the number of teachers who try it without training.

Showing off

I’m aware in writing this post that Sparkbook isn’t actually available for you all.   Sorry about that.  My long-term ambition is to take a lot of the systems built at Cramlington and package them up as a product for other schools.   Delays in MIS product updates have killed that ambition for the moment and even then, I’ll have to investigate just how we’d go about providing a dynamic product such as this; but that’s the goal someday.   For you, it’s either hang on or apply for a job teaching at Cramlington Learning Village.


FIXED: Frog’s Kerboodle widget

December 14, 2012

Kerboodle is an online subscription resource site.  Frog is our VLE.   And Frog’s official Kerboodle widget allows single-sign-on from Frog to Kerboodle.   So no different usernames or passwords to remember.

Kerboodle

Kerboodle’s Frog widget. Big, isn’t it.

Unfortunately, when I downloaded the official widget from Frog, we discovered a really odd issue.  For our students and teachers on Windows XP machines running IE8* the widget doesn’t appear as a button?    The image is there, but that’s it??  My best guess is that some obscure security setting prevents part of the widget code from running.

Boring background bit (and some name checking)

Fortunately, I was at a Microsoft event hosted at the impressive Harton Technology College in South Shields.   Sean O’Shea (@SeanOfTheNorth) from Microsoft had invited me there to have a look at Surface and Office 365 and both are really very cool.   But more about these in future posts.  Frog had a stand there and Frog’s partnership manager Adrian Bantin (@thebantin) was on hand.

Adrian is a really nice guy and when I explained the issue, he sent me the FDP code that sits behind the widget.

Solution

I found a solution.  This might not work for you, but it works for us.  I’ve also sent it to Frog so they can pull it apart and see if they like it.   But in the meantime, this seemed to be the code which caused the issue:

widget.onLoad = function(){

var link = widget.createElement(‘a’,{‘onClick’:'javascript:openKerboodle();’,'style’:'cursor: pointer;’});    

link.setHTML(‘<img src=”http://appstore-misc.frogdev.co.uk/resources/images/uwa/kerboodle/logo.png” /></br>’);  

widget.setBody(link);                

}

Now, I think what’s happening is that this line:

var link = widget.createElement(‘a’,{‘onClick‘:’javascript:openKerboodle();‘,’style’:'cursor: pointer;’});

isn’t rendering in the browser.   But there’s more than one way to skin a cat or in this case call a Javascript function.  Which is what this code is doing.  It’s saying when you click on the image, run the function openKerboodle().

Another way of doing exactly the same thing is:

onClick=”javascript:openKerboodle();“>

This method is more traditional, the code goes inside the body tag instead of inside an onLoad function and most importantly (seems to) work.

Full code

xmlns=”http://www.w3.org/1999/xhtml”      

xmlns:frog=”http://fdp.frogtrade.com/ns/”      

xmlns:widget=”http://www.netvibes.com/ns/“>    

<head>        

<title>Kerboodle</title>        

<meta name=”frogLib” content=”1.1″ />        

// <![CDATA[
src
="
// ]]>https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js”></script>

    <script>            

 <![CDATA[

                widget.onLoad = function(){                                   

openKerboodle = function(){                        

 UWA.Data.getText('http://www.kerboodle.com', function(data){displayHtml(data);});                    

};               

  }

                displayHtml = function(data){                    

window.open(data);                               

}

 ]]>    

</script>

</head>

<body>

openKerboodle();”> http://appstore-misc.frogdev.co.uk/resources/images/uwa/kerboodle/logo.png /> </a>

</body>

</html>

Here’s a link to the text version, just in case the browser corrupts the code.  Make sure you download the file.  For some reason, the code doesn’t show up in the MediaFire browser.

 

 

*Can’t use other browsers.   Please don’t bore me with how wonderful Chrome and Firefox are.   Don’t care, not my department.  We’re stuck with IE.


Google Forms – passing user details from a VLE

November 27, 2012

The tutorials for how to do this already exist on Google Docs, but whenever I see a survey posted on our VLE, this extra is never included.

Getting started

I’m assuming if you’re reading this you already know how to set up a Google form.  I’m assuming that not because I want to make anyone (including me) an ass, let alone recite a cliché.  No I’m assuming, gentle reader, that you know how to make a form in Google for two reasons:

  1. You want more functionality from your forms
  2. It’s really easy

    Create a form in Google Docs

    This is the current Create button in Google. By the time this post is published I fully expect Google to have changed the design completely

Quick primer

Just in case, I’m going too fast:

  • log into Google Docs
  • click on the Create button
  • click Form

Once your Form is opened you can set about adding questions in all sort of styles, from text entry and paragraphs to multi-choice, scales etc… But let’s be honest, you know all this.

Get to the “fun” bit

Alright, I went as fast as I could.  So, assuming (there I go again) you’re using a similar set up to Cramlington, where surveys are posted as links inside notices and do not require our students to be logged into Google Docs, you will have no idea who the student is who is completing your survey.Easiest solution is to include a username field.   Generally our students are honest and will fill this out, but that’s assuming they spell correctly and include the tutor code part of their username.   It would be so much simpler to just pass those details from our VLE.

Fortunately, we use the Frog VLE which exposes the user’s username in a simple Frog tag: [user_username]

This username can be added to the Google Form address in the following manner:

https://docs.google.com/spreadsheet/viewform?formkey=lots of letters&entry_0=[user_username]&

What does that do?

The actual address of the form is:

https://docs.google.com/spreadsheet/viewform?formkey=lots of letters

There’s a link to the form at the bottom of the edit page.  The rest comprises of:

& tells your browser that the formkey variable has ended.

entry_0 is a new variable and corresponds to the first field in the form.  If you put entry_1 you could set the second variable in the list and so on.

[user_username] is our Frog tag

You can see the example for yourself here:

And that’s it.  Simple.

Now all I have to do is make our 100+ teachers read my blog.


Creating custom fields in Frog forms

October 7, 2012

Frog’s forms are great.  They might not be as simple to use as their Google counterparts, but the results are always user tagged for easy reference and they come with an export button.

Export a database as a CSV

Google can suck it

Alright, maybe I’m over playing their usefulness, but while it is possible to get usernames to automatically pass into Google, it’s a lot easier in Frog.

The only real issue with Frog forms though is that you’re limited to the bricks in the toolkit and the formatting they offer.

The Form Bricks

It’s like they want you to fail

You get everything you need to make a survey or question set, but sometimes you want a different layout for a question than the ones available.

Example

Recently, I wanted to have a survey where users could rate along a line.  You’ve all seen the sort of thing, 1 – 6 strongly agree to strongly disagree.  This would normally be achieved using a radio set:

A Frog Radio Set brick

You can recreate the functionality of this question type, but not the look, as the options can only appear vertically.  That’s when I remembered a trick I employed with Frog forms a few years ago before the hidden field brick was available.

The Trick

Frog bricks are essentially packets of html pre-coded that you can drop in and a page will build.   I know this because if you view the source of any Frog page, you can find the html behind each brick.

Code example

The relevant section of the source code for the radio set example. CTRL + F will be your best friend here.

If you view the full size version of the picture, you’ll see the HTML code which creates the radio set.  This is the relevant bit:

<table border=0><TR><TD align=right valign=top>Radio Set Example</TD><TD width=250>&nbsp; 

<input type=radio name=’frg_Radio_Set_Example’   value=’1′>&nbsp; option 1<BR>&nbsp; 

<input type=radio name=’frg_Radio_Set_Example’   value=’2′>&nbsp; option 2<BR>&nbsp; 

<input type=radio name=’frg_Radio_Set_Example’   value=’3′>&nbsp; option 3<BR></TD></TR></TABLE>

Those of you familiar with HTML will recognise this is standard radio but code, although, note the name of the radio options:

name=’frg_Radio_Set_Example’ 

Frog’s bricks place frg_ in front of any option name you create.  All of this is leading up to the actual trick, which is that you can use an HTML brick inside a Frog form as long as your field name starts with frg_

The catch

Actually, no you can’t. If you drop in a form field inside an HTML brick with frg_ on the front and test the form, your field isn’t passed into the results.  Which is strange because I swear it used to be.

The Fix

Studying the source code again, I did spot another line of code, just underneath the end of table tag:

<input type=hidden name=form_details[] value=’frg_Radio_Set_Example’>

The field name frg_Radio_Set_Example matches the radio set name, so I tried adding it to the HTML brick and tested the form.   Success!  I’ve no idea what it does, but clearly it’s important (at least for the radio set brick).

So my final code for the HTML brick looks like:

<table border=”0″ width=”500″>
<tr>
<td valign=”bottom” rowspan=”2″>
Strongly agree
</td>
<td align=”center”>1</td>
<td align=”center”>2</td>
<td align=”center”>3</td>
<td align=”center”>4</td>
<td align=”center”>5</td>
<td align=”center”>6</td>
<td valign=”bottom” align=”right” rowspan=”2″>
Strongly disagree
</td>
</tr>
<td align=”center”>
<input type=radio name=’frg_rating_example’   value=’1′>
</td>
<td align=”center”>
<input type=radio name=’frg_rating_example’   value=’2′>
</td>
<td align=”center”>
<input type=radio name=’frg_rating_example’   value=’3′>
</td>
<td align=”center”>
<input type=radio name=’frg_rating_example’   value=’4′>
</td>
<td align=”center”>
<input type=radio name=’frg_rating_example’   value=’5′>
</td>
<td align=”center”>
<input type=radio name=’frg_rating_example’   value=’6′>
</td>
</tr>
</table>
<input type=hidden name=form_details[] value=’frg_rating_example’>

And what it looks like:

Radio buttons in Frog created with an HTML brick

And once again Google can suck it

I like to imagine Larry Page reading my blog just asking “why?”.

Hey we can all dream.

Of course in reality, if Larry Page even did read this blog, I’ve probably blown any chance of ever working for Google all for a really, really weak joke.


Class of 2012 – The children of Year 7

August 28, 2012

Alright, so technically, they’ll be the class of 2016, but 2012 seemed like a snappier title.   This is a post I’ve been meaning to write for a few years now, since I started to notice what being 11 in any particular year actually meant.   Until now though, it’s always just been a pub conversation.

For the 11 year-old students starting at Cramlington Learning Village in September 2012, what has the world been like for them, compared to how it was for us?

Year 7 have never known a world without mobile phones

Nokia_6510 - from 2001

These things. Just in case you haven’t heard of them.

Recently, I was on holiday in Florida and we visited EPCOT where they have the international village.  For those of you who don’t know, this is a kitsch but cute, stereotypical representation of a bunch of different countries.  GB’s featured a pub, fish and chips, tea garden etc… and a red telephone box.  I overheard one parent explaining to their child:

“That’s a phone box, it’s what people used before we had cellphones if they needed to make a call when they were out.”

That’s when it struck me, the biggest change we have seen that is probably the rise of mobile technology, yet for every 11 year-old  they have always been in their life.  Incidentally, the iPhone was released in 2007, so these students will remember the world without smart phones, but only just.

All our pop culture is out of date

Andy Warhol's Marilyn

I have no idea who this is. Someone famous apparently. When’s Big Brother on?

These kids were born in 2001, that means the Star Wars prequels largely predate them.

  • The Phantom Menace, 1999 (before they were born)
  • Attack of the Clones in 2002 (they were 1)
  • Revenge of the Sith in 2005 (they were 4, but still capable of writing a better explanation than MidiChlorians)

For them, Star Wars has always been 6 films.  The Matrix (1999) predates them.  Lord of the Rings is the same age as them.  These students have grown up with only one Batman, Christian Bale – the previous Batman (George Clooney) was in 1997.

They have never known a “new” Star Trek TV series (ST: Enterprise ran from 2001 to 2005).  On the plus side, they have never known a world without Doctor Who. :)

They have also never watched Saturday Morning Kids TV.   Live and Kicking ended in 2001, SMTV:Live in 2003.  I’m sure they have watched TV on Saturdays, but not 3 hours of tailored entertainment.  Just James Martin in a kitchen endlessly making omelettes.

When you think back to the seminal films, music and culture of the past three decades, almost all of it is just background noise to these students.  I try to counsel teachers to not include pop culture references in their work for this very reason, they just date so quickly.  Referring to Rocky might engage the PE staff, but the only movie released in the students’ lifetime was about an old guy coming out of retirement.  And the less said about Indiana Jones the better.

It’s also a fair bet they have never used or even seen a VHS.

They have never seen a car unlocked with a key

This one is highly likely, but it’s always possible that some students might have seen an old car at some point.  But when was they last time you saw a car not blink its lights when the owner approached?  TV shows in the 80s regularly featured cars backfiring.  I have never seen this in real life.  Apparently it used to happen quite a bit up until the 70s.  A student watching a TV show where someone unlocks a car physically must have the same level of disconnect as me watching a TV car backfire.

Car Key

You used to stick that where?!?

 They have never known British Athletes to be bad at sport

Alright, you have to ignore football, but other than that:

  • In 1996 at the Atlanta Olympics, Team GB won 1 Gold, 8 Silver and 6 Bronze medals and came 36th in the medal table
  • In 2000, Britain came 10th, 11 Gold, 10 Silver, 7 Bronze
  • In 2004, 10th again, with 9 Gold, 9 Silver and 12 Bronze
  • In 2008, Team GB came 4th – 19 Gold, 13 Silver, 15 Bronze

And we all know the result of the 2012.   These kids have never seen the country fail, they have no need for the scepticism of my generation.

There has always been an Internet

A 56k dial-up modem

A 56k dial-up modem – this page would have taken about 2 hours to open back in the day. Still faster than rural internet.

I bought a router in 1998 and taught myself HTML.  That’s how old the internet is for most people.  Before 1997-2000, the internet was still something fairly academic.  Most people’s first experience of the world-wide-web was at university.  I remember being taught how to email in 1994 – it was on the text-based UNIX system.

Look at our lives now.  We practically couldn’t function without the internet.  These kids have only known this world.  And a lot of them will have never experienced 56k dial-up!

Up until 2010, their country was only ever governed by Labour

And Scotland and Wales have always had their own Parliaments.

They have never known their country not at war

In 2001, terrorist hijackers flew two planes into the World Trade Center, another into the Pentagon and a fourth was preventing from crashing into its intended target by the heroic actions of its passengers.  And from that point on, the United Kingdom and its allies have been involved in armed conflict in Afghanistan and Iraq.

I was born in the 70s, grew up in the 80s and 90s.  In that time, there was the Falklands Conflict, the Gulf War and the NATO action in Kosovo.  War for my generation was something short-lived.  This generation has never known peace.


BONUS FEATURE:

The NQTs of 2012

The new teachers of 2012  (assuming 3 years University, 1 year teacher training) could be as young as 22/23.  They were born in 1989/1990.  So, what does that mean:

  • They were born the same year as the first Tim Burton Batman movie and the last (good) Indiana Jones
  • They were 7 when the Spice Girls went global
  • They grew up with handheld games consoles like the Nintendo Gameboy
  • They will have owned a Tamgotchi
  • They will have been too old for Tellytubbies
  • They won’t have been allowed to stay up for the X-Files (1993)
  • Friends (1994) was probably over their heads.  This lot will have watched Will & Grace and That 70s Show
  • Germany was always one country and the USSR ended in 1991
  • And most importantly, for these youngsters, Marathon has always been Snickers.
A Snickers bar

NO! Never! The line must be drawn here. Chocolate + Caramel + Peanuts + mallowy stuff = Marathon. I don’t give a stuff what you call Opal Fruits.


Follow

Get every new post delivered to your Inbox.

Join 249 other followers