Commit 10ee2dea by Calen Pennington

Clean up imports

parent a764a466
import logging import logging
import yaml
import os import os
import sys import sys
import yaml
from functools import partial from functools import partial
from lxml import etree from lxml import etree
......
import json import json
import logging import logging
import sys
import static_replace
from functools import partial from functools import partial
from requests.auth import HTTPBasicAuth
from dogapi import dog_stats_api
from django.conf import settings from django.conf import settings
from django.contrib.auth.models import User from django.contrib.auth.models import User
...@@ -12,14 +16,20 @@ from django.http import Http404 ...@@ -12,14 +16,20 @@ from django.http import Http404
from django.http import HttpResponse from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt 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 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 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 DbModel
from xblock.runtime import KeyValueStore
from xmodule.error_module import ErrorDescriptor, NonStaffErrorDescriptor from xmodule.error_module import ErrorDescriptor, NonStaffErrorDescriptor
from xmodule.errortracker import exc_info_to_str
from xmodule.exceptions import NotFoundError, ProcessingError from xmodule.exceptions import NotFoundError, ProcessingError
from xmodule.modulestore import Location from xmodule.modulestore import Location
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
...@@ -27,18 +37,6 @@ from xmodule.modulestore.exceptions import ItemNotFoundError ...@@ -27,18 +37,6 @@ from xmodule.modulestore.exceptions import ItemNotFoundError
from xmodule.x_module import ModuleSystem 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 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__) log = logging.getLogger(__name__)
......
...@@ -8,17 +8,17 @@ Notes for running by hand: ...@@ -8,17 +8,17 @@ Notes for running by hand:
./manage.py lms --settings test test lms/djangoapps/courseware ./manage.py lms --settings test test lms/djangoapps/courseware
""" """
from django.test.utils import override_settings import json
from django.test.utils import override_settings
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.contrib.auth.models import Group, User from django.contrib.auth.models import Group, User
from courseware.access import _course_staff_group_name from courseware.access import _course_staff_group_name
from courseware.tests.helpers import LoginEnrollmentTestCase from courseware.tests.helpers import LoginEnrollmentTestCase
from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.django import modulestore, clear_existing_modulestores from xmodule.modulestore.django import modulestore, clear_existing_modulestores
import json
@override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE) @override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE)
......
""" """
Instructor Views Instructor Views
""" """
from collections import defaultdict
import csv import csv
import json import json
import logging import logging
from markupsafe import escape
import os import os
import re import re
import requests 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 StringIO import StringIO
from django.conf import settings from django.conf import settings
......
import datetime
import json
import logging
from django.conf import settings from django.conf import settings
from xmodule.open_ended_grading_classes import peer_grading_service 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 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 courseware.access import has_access
from util.cache import cache
import datetime
from xmodule.x_module import ModuleSystem from xmodule.x_module import ModuleSystem
from mitxmako.shortcuts import render_to_string 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__) log = logging.getLogger(__name__)
......
...@@ -4,18 +4,20 @@ This module provides views that proxy to the staff grading backend service. ...@@ -4,18 +4,20 @@ This module provides views that proxy to the staff grading backend service.
import json import json
import logging import logging
from xmodule.open_ended_grading_classes.grading_service_module import GradingService, GradingServiceError
from django.conf import settings from django.conf import settings
from django.http import HttpResponse, Http404 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 xmodule.course_module import CourseDescriptor
from student.models import unique_id_for_user
from xmodule.x_module import ModuleSystem 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 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__) log = logging.getLogger(__name__)
......
...@@ -5,36 +5,34 @@ Tests for open ended grading interfaces ...@@ -5,36 +5,34 @@ Tests for open ended grading interfaces
""" """
import json import json
from mock import MagicMock, patch, Mock import logging
from django.core.urlresolvers import reverse
from django.contrib.auth.models import Group, User
from django.conf import settings from django.conf import settings
from mitxmako.shortcuts import render_to_string from django.contrib.auth.models import Group, User
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from mock import MagicMock, patch, Mock
from xblock.field_data import DictFieldData
from xblock.fields import ScopeIds
from xmodule.open_ended_grading_classes import peer_grading_service, controller_query_service
from xmodule import peer_grading_module from xmodule import peer_grading_module
from xmodule.error_module import ErrorDescriptor
from xmodule.modulestore.django import modulestore 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 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 courseware.access import _course_staff_group_name
from courseware.tests import factories
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 student.models import unique_id_for_user
import logging from open_ended_grading import staff_grading_service, views, utils
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
from django.test.utils import override_settings
from xmodule.tests import test_util_open_ended
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xblock.field_data import DictFieldData
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
class EmptyStaffGradingService(object): class EmptyStaffGradingService(object):
......
import json import json
import logging
from xmodule.modulestore import search from xmodule.modulestore import search
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem 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.controller_query_service import ControllerQueryService
from xmodule.open_ended_grading_classes.grading_service_module import GradingServiceError 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.utils.translation import ugettext as _
from django.conf import settings from django.conf import settings
from mitxmako.shortcuts import render_to_string from mitxmako.shortcuts import render_to_string
import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment