Clean up imports
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
import yaml
|
||||
import os
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
from functools import partial
|
||||
from lxml import etree
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import json
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import static_replace
|
||||
|
||||
from functools import partial
|
||||
from requests.auth import HTTPBasicAuth
|
||||
from dogapi import dog_stats_api
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
@@ -12,14 +16,20 @@ from django.http import Http404
|
||||
from django.http import HttpResponse
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
from requests.auth import HTTPBasicAuth
|
||||
from dogapi import dog_stats_api
|
||||
|
||||
from capa.xqueue_interface import XQueueInterface
|
||||
from courseware.access import has_access
|
||||
from courseware.masquerade import setup_masquerade
|
||||
from courseware.model_data import FieldDataCache, DjangoKeyValueStore
|
||||
from lms.xblock.field_data import LmsFieldData
|
||||
from mitxmako.shortcuts import render_to_string
|
||||
from psychometrics.psychoanalyze import make_psychometrics_data_update_handler
|
||||
from student.models import unique_id_for_user
|
||||
from util.json_request import JsonResponse
|
||||
from util.sandboxing import can_execute_unsafe_code
|
||||
from xblock.fields import Scope
|
||||
from xblock.runtime import DbModel
|
||||
from xblock.runtime import KeyValueStore
|
||||
from xmodule.error_module import ErrorDescriptor, NonStaffErrorDescriptor
|
||||
from xmodule.errortracker import exc_info_to_str
|
||||
from xmodule.exceptions import NotFoundError, ProcessingError
|
||||
from xmodule.modulestore import Location
|
||||
from xmodule.modulestore.django import modulestore
|
||||
@@ -27,18 +37,6 @@ from xmodule.modulestore.exceptions import ItemNotFoundError
|
||||
from xmodule.x_module import ModuleSystem
|
||||
from xmodule_modifiers import replace_course_urls, replace_jump_to_id_urls, replace_static_urls, add_histogram, wrap_xblock
|
||||
|
||||
import static_replace
|
||||
from psychometrics.psychoanalyze import make_psychometrics_data_update_handler
|
||||
from student.models import unique_id_for_user
|
||||
|
||||
from courseware.access import has_access
|
||||
from courseware.masquerade import setup_masquerade
|
||||
from courseware.model_data import FieldDataCache, DjangoKeyValueStore
|
||||
from xblock.runtime import KeyValueStore
|
||||
from xblock.fields import Scope
|
||||
from util.sandboxing import can_execute_unsafe_code
|
||||
from util.json_request import JsonResponse
|
||||
from lms.xblock.field_data import LmsFieldData
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -8,17 +8,17 @@ Notes for running by hand:
|
||||
./manage.py lms --settings test test lms/djangoapps/courseware
|
||||
"""
|
||||
|
||||
import json
|
||||
|
||||
from django.test.utils import override_settings
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from django.contrib.auth.models import Group, User
|
||||
|
||||
from courseware.access import _course_staff_group_name
|
||||
from courseware.tests.helpers import LoginEnrollmentTestCase
|
||||
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.modulestore.django import modulestore, clear_existing_modulestores
|
||||
import json
|
||||
|
||||
|
||||
@override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE)
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
"""
|
||||
Instructor Views
|
||||
"""
|
||||
from collections import defaultdict
|
||||
import csv
|
||||
import json
|
||||
import logging
|
||||
from markupsafe import escape
|
||||
import os
|
||||
import re
|
||||
import requests
|
||||
from requests.status_codes import codes
|
||||
from collections import OrderedDict
|
||||
|
||||
from collections import defaultdict, OrderedDict
|
||||
from markupsafe import escape
|
||||
from requests.status_codes import codes
|
||||
from StringIO import StringIO
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
from django.conf import settings
|
||||
from xmodule.open_ended_grading_classes import peer_grading_service
|
||||
from .staff_grading_service import StaffGradingService
|
||||
from xmodule.open_ended_grading_classes.controller_query_service import ControllerQueryService
|
||||
import json
|
||||
from student.models import unique_id_for_user
|
||||
from courseware.models import StudentModule
|
||||
import logging
|
||||
from courseware.access import has_access
|
||||
from util.cache import cache
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from xmodule.open_ended_grading_classes import peer_grading_service
|
||||
from xmodule.open_ended_grading_classes.controller_query_service import ControllerQueryService
|
||||
|
||||
from courseware.access import has_access
|
||||
from xmodule.x_module import ModuleSystem
|
||||
from mitxmako.shortcuts import render_to_string
|
||||
import datetime
|
||||
from student.models import unique_id_for_user
|
||||
from util.cache import cache
|
||||
|
||||
from .staff_grading_service import StaffGradingService
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -4,18 +4,20 @@ This module provides views that proxy to the staff grading backend service.
|
||||
|
||||
import json
|
||||
import logging
|
||||
from xmodule.open_ended_grading_classes.grading_service_module import GradingService, GradingServiceError
|
||||
|
||||
from django.conf import settings
|
||||
from django.http import HttpResponse, Http404
|
||||
|
||||
from courseware.access import has_access
|
||||
from util.json_request import expect_json
|
||||
from xmodule.course_module import CourseDescriptor
|
||||
from student.models import unique_id_for_user
|
||||
from xmodule.x_module import ModuleSystem
|
||||
from xmodule.open_ended_grading_classes.grading_service_module import GradingService, GradingServiceError
|
||||
|
||||
from courseware.access import has_access
|
||||
from mitxmako.shortcuts import render_to_string
|
||||
from utils import does_location_exist
|
||||
from student.models import unique_id_for_user
|
||||
from util.json_request import expect_json
|
||||
|
||||
from open_ended_grading.utils import does_location_exist
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -5,36 +5,34 @@ Tests for open ended grading interfaces
|
||||
"""
|
||||
|
||||
import json
|
||||
from mock import MagicMock, patch, Mock
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.contrib.auth.models import Group, User
|
||||
from django.conf import settings
|
||||
from mitxmako.shortcuts import render_to_string
|
||||
|
||||
from xmodule.open_ended_grading_classes import peer_grading_service, controller_query_service
|
||||
from xmodule import peer_grading_module
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.x_module import ModuleSystem
|
||||
from xmodule.error_module import ErrorDescriptor
|
||||
from xblock.fields import ScopeIds
|
||||
|
||||
from open_ended_grading import staff_grading_service, views, utils
|
||||
from courseware.access import _course_staff_group_name
|
||||
from student.models import unique_id_for_user
|
||||
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import Group, User
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.test.utils import override_settings
|
||||
|
||||
from xmodule.tests import test_util_open_ended
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from mock import MagicMock, patch, Mock
|
||||
from xblock.field_data import DictFieldData
|
||||
from xblock.fields import ScopeIds
|
||||
|
||||
from xmodule import peer_grading_module
|
||||
from xmodule.error_module import ErrorDescriptor
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
from xmodule.open_ended_grading_classes import peer_grading_service, controller_query_service
|
||||
from xmodule.tests import test_util_open_ended
|
||||
from xmodule.x_module import ModuleSystem
|
||||
|
||||
from courseware.access import _course_staff_group_name
|
||||
from courseware.tests import factories
|
||||
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
|
||||
from courseware.tests.helpers import LoginEnrollmentTestCase, check_for_get_code, check_for_post_code
|
||||
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
|
||||
from mitxmako.shortcuts import render_to_string
|
||||
from student.models import unique_id_for_user
|
||||
|
||||
from open_ended_grading import staff_grading_service, views, utils
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class EmptyStaffGradingService(object):
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import json
|
||||
import logging
|
||||
|
||||
from xmodule.modulestore import search
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem
|
||||
from xmodule.x_module import ModuleSystem
|
||||
from xmodule.open_ended_grading_classes.controller_query_service import ControllerQueryService
|
||||
from xmodule.open_ended_grading_classes.grading_service_module import GradingServiceError
|
||||
from xmodule.x_module import ModuleSystem
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.conf import settings
|
||||
|
||||
from mitxmako.shortcuts import render_to_string
|
||||
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user