add a function to get previous code
parse more info to _do_coding partial
auto restore previous code in training
fade out button after clicking run
update achievement gain date to submission date(not grading date)
refine code
split summary into 2 lines
move js code to trainingsubmission.js
modify code to support mutiple partials
 refine coding style
change hint text
change activerecord code to sql statement
refine code
remove index in textarea
remove all indexes
Merge pull request #203 from wangqiang1208/features/auto-save-training

auto restore last attempt training
Merge remote-tracking branch 'upstream/development' into bugfixing/achievement
Using new obtained_at field
set obtained_at after create
run migration