'Return a CSS selector for the link to the course with `course_id`.'

def _link_css(self, course_id):

    all_links = self.q(css='a.enter-course').map((lambda el: el.get_attribute('href'))).results
    link_index = None
    for index in range(len(all_links)):
        if (course_id in all_links[index]):
            link_index = index
            break
    if (link_index is not None):
        return 'a.enter-course:nth-of-type({0})'.format((link_index + 1))
    else:
        return None
