moodle test function for dynamic creation of forms