Considerable modifications made to build a forms interface using moodle formslib

engagement now inherits from moodleforms class