Tidy up of instance create, update functions. Added support for changing permissions for legacy type dialogues
Reset permissions to inherit for teacher to stduent legacy type
Added form options to support legacy dialogue type