Disable bulk email for XML-backed courses

This commit is contained in:
Sarina Canelake
2013-08-21 11:30:13 -04:00
parent 65f7b098dd
commit f98d6764b2
5 changed files with 132 additions and 9 deletions

View File

@@ -25,6 +25,7 @@ from django.utils import timezone
from xmodule_modifiers import wrap_xmodule
import xmodule.graders as xmgraders
from xmodule.modulestore import MONGO_MODULESTORE_TYPE
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.exceptions import ItemNotFoundError
from xmodule.html_module import HtmlDescriptor
@@ -794,6 +795,12 @@ def instructor_dashboard(request, course_id):
else:
editor = None
# Flag for what backing store this course is (Mongo vs. XML)
if modulestore().get_modulestore_type(course_id) == MONGO_MODULESTORE_TYPE:
is_mongo_modulestore_type = True
else:
is_mongo_modulestore_type = False
# display course stats only if there is no other table to display:
course_stats = None
if not datatable:
@@ -809,11 +816,11 @@ def instructor_dashboard(request, course_id):
'datatable': datatable,
'course_stats': course_stats,
'msg': msg,
'email_msg': email_msg,
'modeflag': {idash_mode: 'selectedmode'},
'to_option': to_option, # email
'subject': subject, # email
'editor': editor, # email
'to_option': to_option, # email
'subject': subject, # email
'editor': editor, # email
'email_msg': email_msg, # email
'problems': problems, # psychometrics
'plots': plots, # psychometrics
'course_errors': modulestore().get_item_errors(course.location),
@@ -822,6 +829,7 @@ def instructor_dashboard(request, course_id):
'cohorts_ajax_url': reverse('cohorts', kwargs={'course_id': course_id}),
'analytics_results': analytics_results,
'is_mongo_modulestore_type': is_mongo_modulestore_type,
}
if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'):