def _peer_grading(tab, user, course, active_page, request): if user.is_authenticated(): link = reverse('peer_grading', args=[course.id]) tab_name = "Peer grading" notifications = open_ended_notifications.peer_grading_notifications(course, user) pending_grading = notifications['pending_grading'] img_path = notifications['img_path'] tab = [CourseTab(tab_name, link, active_page == "peer_grading", pending_grading, img_path)] return tab return []
def _peer_grading(tab, user, course, active_page): if user.is_authenticated(): link = reverse('peer_grading', args=[course.id]) tab_name = "Peer grading" notifications = open_ended_notifications.peer_grading_notifications(course, user) pending_grading = notifications['pending_grading'] img_path = notifications['img_path'] tab = [CourseTab(tab_name, link, active_page == "peer_grading", pending_grading, img_path)] return tab return []
def _peer_grading(tab, user, course, active_page, request): if user.is_authenticated(): link = reverse('peer_grading', args=[course.id]) # Translators: "Peer grading" appears on a tab that allows # students to view openended problems that require grading tab_name = _("Peer grading") notifications = open_ended_notifications.peer_grading_notifications(course, user) pending_grading = notifications['pending_grading'] img_path = notifications['img_path'] tab = [CourseTab(tab_name, link, active_page == "peer_grading", pending_grading, img_path)] return tab return []
def _peer_grading(tab, user, course, active_page, request): if user.is_authenticated(): link = reverse('peer_grading', args=[course.id]) # Translators: "Peer grading" appears on a tab that allows # students to view openended problems that require grading tab_name = _("Peer grading") notifications = open_ended_notifications.peer_grading_notifications( course, user) pending_grading = notifications['pending_grading'] img_path = notifications['img_path'] tab = [ CourseTab(tab_name, link, active_page == "peer_grading", pending_grading, img_path) ] return tab return []