Make archived training active again
Sometimes a training goes to archive before teachers get chance to mark the results.
To get it back from archive use this script (you will need training_id's for that):
update examresults set state=1 where training_id in (<list of training_ids>)
update trainings set state=1 where training_id in (<list of training_ids>)
update trainingevents set end_time = DATEADD(d, 3, GETDATE())
where training_id IN (<list of training_ids>)
and trainingevent_type = 6
This script also set training marking period end 3 days into the future, so that the trainings will not get archived again immediately.