Move fields.py, inheritance.py, and partitions to openedx/core.

This commit is contained in:
John Eskew
2017-05-23 09:47:47 -04:00
parent 78d8895880
commit 66f3aa5ccf
94 changed files with 464 additions and 452 deletions

View File

@@ -30,7 +30,9 @@ from xmodule.course_module import (
)
from xmodule.error_module import ErrorDescriptor
from xmodule.x_module import XModule
from xmodule.partitions.partitions import NoSuchUserPartitionError, NoSuchUserPartitionGroupError
from openedx.core.lib.partitions.partitions import NoSuchUserPartitionError, NoSuchUserPartitionGroupError
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from openedx.core.djangoapps.external_auth.models import ExternalAuthMap
from courseware.access_response import (
MilestoneError,
@@ -49,8 +51,6 @@ from courseware.masquerade import get_masquerade_role, is_masquerading_as_studen
from lms.djangoapps.ccx.custom_exception import CCXLocatorValidationException
from lms.djangoapps.ccx.models import CustomCourseForEdX
from mobile_api.models import IgnoreMobileAvailableFlagConfig
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from openedx.core.djangoapps.external_auth.models import ExternalAuthMap
from student import auth
from student.models import CourseEnrollmentAllowed
from student.roles import (

View File

@@ -3,7 +3,7 @@ This file contains all the classes used by has_access for error handling
"""
from django.utils.translation import ugettext as _
from xmodule.course_metadata_utils import DEFAULT_START_DATE
from openedx.core.lib.xblock_fields.inherited_fields import DEFAULT_START_DATE
class AccessResponse(object):

View File

@@ -22,7 +22,7 @@ from django.conf import settings
from xblock.field_data import FieldData
from request_cache.middleware import RequestCache
from xmodule.modulestore.inheritance import InheritanceMixin
from openedx.core.lib.xblock_fields.inherited_fields import InheritanceMixin
NOTSET = object()

View File

@@ -17,7 +17,7 @@ from util.json_request import expect_json, JsonResponse
from opaque_keys.edx.keys import CourseKey
from xblock.fragment import Fragment
from xblock.runtime import KeyValueStore
from xmodule.partitions.partitions import NoSuchUserPartitionGroupError
from openedx.core.lib.partitions.partitions import NoSuchUserPartitionGroupError
log = logging.getLogger(__name__)

View File

@@ -29,6 +29,7 @@ from courseware.tests.factories import (
)
from courseware.tests.helpers import LoginEnrollmentTestCase, masquerade_as_group_member
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from openedx.core.lib.partitions.partitions import Group, UserPartition, MINIMUM_STATIC_PARTITION_ID
from student.models import CourseEnrollment
from student.roles import CourseCcxCoachRole, CourseStaffRole
from student.tests.factories import (
@@ -44,7 +45,6 @@ from xmodule.course_module import (
CATALOG_VISIBILITY_NONE,
)
from xmodule.error_module import ErrorDescriptor
from xmodule.partitions.partitions import Group, UserPartition, MINIMUM_STATIC_PARTITION_ID
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory

View File

@@ -7,9 +7,9 @@ import ddt
from nose.plugins.attrib import attr
from stevedore.extension import Extension, ExtensionManager
from openedx.core.lib.partitions.partitions import Group, UserPartition, USER_PARTITION_SCHEME_NAMESPACE
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from xmodule.partitions.partitions import Group, UserPartition, USER_PARTITION_SCHEME_NAMESPACE
from xmodule.modulestore.django import modulestore
import courseware.access as access

View File

@@ -27,7 +27,7 @@ from xblock.runtime import DictKeyValueStore
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import ItemFactory, CourseFactory
from xmodule.partitions.partitions import Group, UserPartition
from openedx.core.lib.partitions.partitions import Group, UserPartition
from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration

View File

@@ -10,7 +10,7 @@ from courseware.model_data import FieldDataCache
from student.tests.factories import UserFactory, CourseEnrollmentFactory
from xmodule.modulestore.tests.factories import ItemFactory, CourseFactory
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from xmodule.partitions.partitions import Group, UserPartition
from openedx.core.lib.partitions.partitions import Group, UserPartition
from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactory

View File

@@ -33,11 +33,11 @@ from openedx.core.djangoapps.credit.api import (
from openedx.core.djangoapps.credit.models import CreditCourse, CreditProvider
from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactory
from openedx.core.lib.url_utils import quote_slashes
from openedx.core.lib.partitions.partitions import Group, UserPartition
from student.models import anonymous_id_for_user, CourseEnrollment
from submissions import api as submissions_api
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from xmodule.partitions.partitions import Group, UserPartition
class ProblemSubmissionTestMixin(TestCase):