def render_accordion(request, course, table_of_contents):
 context = dict(([('toc', table_of_contents), ('course_id', unicode(course.id)), ('csrf', csrf(request)['csrf_token']), ('due_date_display_format', course.due_date_display_format)] + TEMPLATE_IMPORTS.items()))
 return render_to_string('courseware/accordion.html', context)

def render_accordion ( request , course , table_of_contents ) : context = dict ( ( [ ( 'toc' , table_of_contents ) , ( 'course_id' , unicode ( course . id ) ) , ( 'csrf' , csrf ( request ) [ 'csrf_token' ] ) , ( 'due_date_display_format' , course . due_date_display_format ) ] + TEMPLATE_IMPORTS . items ( ) ) ) return render_to_string ( 'courseware/accordion.html' , context )
returns the html that renders the navigation for the given course .