seems like you're hardcoding on file bit on testing for `child.name`, but you have `display` somewhere that you can feed through.

BTW, I hope you don't take this as me being grumpy, but I do think that some of your code could become more readable/maintainable if object attributes were less fractured into individual variables and then regrouped into tuples or dicts  (even reorganizing as a dict here might not be as good as just passing the original object).  For an example of this see `course_materials/get_group_item_data`, where you reorganize `group_item`.  just passing the `group_item` reference and reading its attributes might also work just fine and would require less levels of mental indirection.  

Maybe this is spurred by a desire to delegate work away from the templating layer, which I know is good in general.  But I think it's fine just to pass the ContentGroup obj and the Exam/Video/etc. obj to the template, so that you can do things like `{% if cgobj.display_style=="button" %}` in the template.

Thoughts?