'If the resulting section and chapter are different from what was initially
requested, redirect back to the index page, but with an updated URL that includes
the correct section and chapter values.  We do this so that our analytics events
and error logs have the appropriate URLs.'

def _redirect_if_not_requested_section(self):

    if ((self.chapter.url_name != self.original_chapter_url_name) or (self.original_section_url_name and (self.section.url_name != self.original_section_url_name))):
        raise CourseAccessRedirect(reverse('courseware_section', kwargs={'course_id': unicode(self.course_key), 'chapter': self.chapter.url_name, 'section': self.section.url_name}))
