'Returns and creates the rendering context for the section.'

def _create_section_context(self, previous_of_active_section, next_of_active_section):

    def _compute_section_url(section_info, requested_child):
        '\n                                                Returns    the    section    URL    for    the    given    section_info    with    the    given    child    parameter.\n                                                '
        return '{url}?child={requested_child}'.format(url=reverse('courseware_section', args=[unicode(self.course_key), section_info['chapter_url_name'], section_info['url_name']]), requested_child=requested_child)
    section_context = {'activate_block_id': self.request.GET.get('activate_block_id'), 'requested_child': self.request.GET.get('child'), 'progress_url': reverse('progress', kwargs={'course_id': unicode(self.course_key)})}
    if previous_of_active_section:
        section_context['prev_url'] = _compute_section_url(previous_of_active_section, 'last')
    if next_of_active_section:
        section_context['next_url'] = _compute_section_url(next_of_active_section, 'first')
    section_context['specific_masquerade'] = self._is_masquerading_as_specific_student()
    return section_context
