diff --git a/poll/poll.py b/poll/poll.py index 190793f..ce666ed 100644 --- a/poll/poll.py +++ b/poll/poll.py @@ -186,7 +186,10 @@ def download_url_for_last_report(self): return dict(report_store.links_for(course_key)).get(self.last_export_result['report_filename']) def student_module_queryset(self): - from lms.djangoapps.courseware.models import StudentModule # pylint: disable=import-error + try: + from lms.djangoapps.courseware.models import StudentModule # pylint: disable=import-error + except RuntimeError: + from courseware.models import StudentModule return StudentModule.objects.select_related('student').filter( course_id=self.runtime.course_id, module_state_key=self.scope_ids.usage_id, diff --git a/setup.py b/setup.py index 68027be..44ee4c8 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def package_data(pkg, roots): setup( name='xblock-poll', - version='1.9.7', + version='1.9.8', description='An XBlock for polling users.', packages=[ 'poll',