Takes care of formats other that HTML

Fixes troywilliams/moodle-mod_dialogue#33
Added format support to dialogue_generate_summary_line

Fixes troywilliams/moodle-mod_dialogue#33
Merge pull request #34 from juancs/troywilliams_moodle-mod_dialogue33

Takes care of formats other that HTML