Remove notification_image_for_tab logic (ORA1)
This commit is contained in:
@@ -210,13 +210,7 @@ class TestMongoModuleStore(TestMongoModuleStoreBase):
|
||||
'''Make sure the course objects loaded properly'''
|
||||
courses = self.draft_store.get_courses()
|
||||
|
||||
# note, the number of courses expected is really
|
||||
# 6, but due to a lack of cache flushing between
|
||||
# test case runs, we will get back 7.
|
||||
# When we fix the caching issue, we should reduce this
|
||||
# to 6 and remove the 'ChildTest' course_id
|
||||
# from the list below
|
||||
assert_equals(len(courses), 7)
|
||||
assert_equals(len(courses), 6)
|
||||
course_ids = [course.id for course in courses]
|
||||
|
||||
for course_key in [
|
||||
@@ -229,9 +223,6 @@ class TestMongoModuleStore(TestMongoModuleStoreBase):
|
||||
['edX', 'test_unicode', '2012_Fall'],
|
||||
['edX', 'toy', '2012_Fall'],
|
||||
['guestx', 'foo', 'bar'],
|
||||
# This course below is due to a caching issue in the modulestore
|
||||
# which is not cleared between test runs.
|
||||
['TestX', 'ChildTest', '1234_A1'],
|
||||
]
|
||||
]:
|
||||
assert_in(course_key, course_ids)
|
||||
|
||||
@@ -67,8 +67,6 @@ from .entrance_exams import (
|
||||
from courseware.user_state_client import DjangoXBlockUserStateClient
|
||||
from course_modes.models import CourseMode
|
||||
|
||||
from open_ended_grading import open_ended_notifications
|
||||
from open_ended_grading.views import StaffGradingTab, PeerGradingTab, OpenEndedGradingTab
|
||||
from student.models import UserTestGroup, CourseEnrollment
|
||||
from student.views import is_course_blocked
|
||||
from util.cache import cache, cache_if_anonymous
|
||||
@@ -1126,25 +1124,6 @@ def submission_history(request, course_id, student_username, location):
|
||||
return render_to_response('courseware/submission_history.html', context)
|
||||
|
||||
|
||||
def notification_image_for_tab(course_tab, user, course):
|
||||
"""
|
||||
Returns the notification image path for the given course_tab if applicable, otherwise None.
|
||||
"""
|
||||
|
||||
tab_notification_handlers = {
|
||||
StaffGradingTab.type: open_ended_notifications.staff_grading_notifications,
|
||||
PeerGradingTab.type: open_ended_notifications.peer_grading_notifications,
|
||||
OpenEndedGradingTab.type: open_ended_notifications.combined_notifications
|
||||
}
|
||||
|
||||
if course_tab.name in tab_notification_handlers:
|
||||
notifications = tab_notification_handlers[course_tab.name](course, user)
|
||||
if notifications and notifications['pending_grading']:
|
||||
return notifications['img_path']
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def get_static_tab_contents(request, course, tab):
|
||||
"""
|
||||
Returns the contents for the given static tab
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<%!
|
||||
from django.utils.translation import ugettext as _
|
||||
from courseware.tabs import get_course_tab_list
|
||||
from courseware.views import notification_image_for_tab
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.conf import settings
|
||||
from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_user_partition
|
||||
@@ -88,7 +87,6 @@ include_special_exams = settings.FEATURES.get('ENABLE_SPECIAL_EXAMS', False) and
|
||||
% for tab in get_course_tab_list(request, course):
|
||||
<%
|
||||
tab_is_active = (tab.tab_id == active_page) or (tab.tab_id == default_tab)
|
||||
tab_image = notification_image_for_tab(tab, user, course)
|
||||
%>
|
||||
<li>
|
||||
<a href="${tab.link_func(course, reverse) | h}" class="${url_class(tab_is_active)}">
|
||||
|
||||
Reference in New Issue
Block a user