auto restore last attempt training

![screen shot 2014-09-07 at 22 55 35](https://cloud.githubusercontent.com/assets/4983239/4178625/2f710756-369f-11e4-837b-8bb14d17017b.png)

1. If a student haven't done a coding question, his code will be saved and auto restore next time.

2.provide a button if he wants to revert to the template code

3.UI is not beautiful.. need improve
It's not suitable because of the amount of code change ?
OK, it's not that I don't want support. It's that your solution is half-baked. Add this index won't make it work, you need to change how the code is run too, since now it's identified by id. there will be large amount of code change regardless.