It's been almost 12 years now since I've left school so I do not remember everything by heart, but IIRC they taught us something like "everyone was prepared for war, everyone kinda wanted it (France seeking revenge for 1870, UK desiring to extinguish German naval threat, Austria hoping to settle issues on Balkans and Germany trying to finish-off France/crushing Franco-Russian encirclement), no one really tried to avoid it".
The main blame on Germany is, apart from Wilhelm's jingoistic attitude, the diplomatic support to Austria which caused them to escalate the crisis (I think the term usually used is that of a "diplomatic Card Blanche" for the Austrians).