Commit b25a227c by Alex Dusenbery

get manage.py shell to load

parent 1ad86ad6
...@@ -6,7 +6,7 @@ from celery_utils.persist_on_failure import PersistOnFailureTask ...@@ -6,7 +6,7 @@ from celery_utils.persist_on_failure import PersistOnFailureTask
from django.contrib.auth.models import User from django.contrib.auth.models import User
from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.keys import CourseKey
from .api import generate_user_certificates from openedx.features.certificates.api import generate_user_certificates
logger = getLogger(__name__) logger = getLogger(__name__)
......
...@@ -16,7 +16,7 @@ from pytz import timezone, utc ...@@ -16,7 +16,7 @@ from pytz import timezone, utc
from course_modes.models import CourseMode from course_modes.models import CourseMode
from lms.djangoapps.commerce.utils import EcommerceService from lms.djangoapps.commerce.utils import EcommerceService
from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification, VerificationDeadline from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification, VerificationDeadline
from openedx.core.djangoapps.certificates.config import waffle from openedx.features.certificates.config import waffle
from student.models import CourseEnrollment from student.models import CourseEnrollment
......
...@@ -2025,7 +2025,6 @@ INSTALLED_APPS = [ ...@@ -2025,7 +2025,6 @@ INSTALLED_APPS = [
'track', 'track',
'eventtracking.django.apps.EventTrackingConfig', 'eventtracking.django.apps.EventTrackingConfig',
'util', 'util',
'certificates.apps.CertificatesConfig',
'dashboard', 'dashboard',
'lms.djangoapps.instructor', 'lms.djangoapps.instructor',
'lms.djangoapps.instructor_task', 'lms.djangoapps.instructor_task',
...@@ -2244,6 +2243,7 @@ INSTALLED_APPS = [ ...@@ -2244,6 +2243,7 @@ INSTALLED_APPS = [
'openedx.core.djangoapps.schedules', 'openedx.core.djangoapps.schedules',
# Features # Features
'openedx.features.certificates.apps.CertificatesConfig',
'openedx.features.course_bookmarks', 'openedx.features.course_bookmarks',
'openedx.features.course_experience', 'openedx.features.course_experience',
'openedx.features.course_search', 'openedx.features.course_search',
......
...@@ -118,7 +118,7 @@ class CourseOverview(TimeStampedModel): ...@@ -118,7 +118,7 @@ class CourseOverview(TimeStampedModel):
Returns: Returns:
CourseOverview: created or updated overview extracted from the given course CourseOverview: created or updated overview extracted from the given course
""" """
from lms.djangoapps.certificates.api import get_active_web_certificate from openedx.features.certificates.api import get_active_web_certificate
from openedx.core.lib.courses import course_image_url from openedx.core.lib.courses import course_image_url
# Workaround for a problem discovered in https://openedx.atlassian.net/browse/TNL-2806. # Workaround for a problem discovered in https://openedx.atlassian.net/browse/TNL-2806.
......
...@@ -16,7 +16,7 @@ from django.test.utils import override_settings ...@@ -16,7 +16,7 @@ from django.test.utils import override_settings
from django.utils import timezone from django.utils import timezone
from PIL import Image from PIL import Image
from lms.djangoapps.certificates.api import get_active_web_certificate from openedx.features.certificates.api import get_active_web_certificate
from openedx.core.djangoapps.models.course_details import CourseDetails from openedx.core.djangoapps.models.course_details import CourseDetails
from openedx.core.lib.courses import course_image_url from openedx.core.lib.courses import course_image_url
from static_replace.models import AssetBaseUrlConfig from static_replace.models import AssetBaseUrlConfig
......
...@@ -6,8 +6,8 @@ from django.test import TestCase ...@@ -6,8 +6,8 @@ from django.test import TestCase
from openedx.features.certificates.models import CertificateStatuses # pylint: disable=import-error from openedx.features.certificates.models import CertificateStatuses # pylint: disable=import-error
from course_modes.models import CourseMode from course_modes.models import CourseMode
from lms.djangoapps.certificates.api import MODES from openedx.features.certificates.api import MODES
from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory from openedx.features.certificates.tests.factories import GeneratedCertificateFactory
from openedx.core.djangoapps.catalog.tests.factories import ( from openedx.core.djangoapps.catalog.tests.factories import (
generate_course_run_key, generate_course_run_key,
ProgramFactory, ProgramFactory,
......
...@@ -15,7 +15,7 @@ from nose.plugins.attrib import attr ...@@ -15,7 +15,7 @@ from nose.plugins.attrib import attr
from pytz import utc from pytz import utc
from course_modes.models import CourseMode from course_modes.models import CourseMode
from lms.djangoapps.certificates.api import MODES from openedx.features.certificates.api import MODES
from lms.djangoapps.commerce.tests.test_utils import update_commerce_config from lms.djangoapps.commerce.tests.test_utils import update_commerce_config
from lms.djangoapps.commerce.utils import EcommerceService from lms.djangoapps.commerce.utils import EcommerceService
from openedx.core.djangoapps.catalog.tests.factories import ( from openedx.core.djangoapps.catalog.tests.factories import (
...@@ -41,7 +41,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase ...@@ -41,7 +41,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory as ModuleStoreCourseFactory from xmodule.modulestore.tests.factories import CourseFactory as ModuleStoreCourseFactory
CERTIFICATES_API_MODULE = 'lms.djangoapps.certificates.api' CERTIFICATES_API_MODULE = 'openedx.features.certificates.api'
ECOMMERCE_URL_ROOT = 'https://ecommerce.example.com' ECOMMERCE_URL_ROOT = 'https://ecommerce.example.com'
UTILS_MODULE = 'openedx.core.djangoapps.programs.utils' UTILS_MODULE = 'openedx.core.djangoapps.programs.utils'
......
...@@ -19,7 +19,7 @@ from pytz import utc ...@@ -19,7 +19,7 @@ from pytz import utc
from requests.exceptions import ConnectionError, Timeout from requests.exceptions import ConnectionError, Timeout
from course_modes.models import CourseMode from course_modes.models import CourseMode
from lms.djangoapps.certificates import api as certificate_api from openedx.features.certificates import api as certificate_api
from lms.djangoapps.commerce.utils import EcommerceService from lms.djangoapps.commerce.utils import EcommerceService
from lms.djangoapps.courseware.access import has_access from lms.djangoapps.courseware.access import has_access
from openedx.core.djangoapps.catalog.utils import get_programs from openedx.core.djangoapps.catalog.utils import get_programs
......
...@@ -5,7 +5,7 @@ from config_models.admin import ConfigurationModelAdmin ...@@ -5,7 +5,7 @@ from config_models.admin import ConfigurationModelAdmin
from django import forms from django import forms
from django.contrib import admin from django.contrib import admin
from certificates.models import ( from models import (
CertificateGenerationConfiguration, CertificateGenerationConfiguration,
CertificateGenerationCourseSetting, CertificateGenerationCourseSetting,
CertificateHtmlViewConfiguration, CertificateHtmlViewConfiguration,
......
...@@ -11,8 +11,8 @@ from django.core.urlresolvers import reverse ...@@ -11,8 +11,8 @@ from django.core.urlresolvers import reverse
from opaque_keys import InvalidKeyError from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.keys import CourseKey
from branding import api as branding_api from lms.djangoapps.branding import api as branding_api
from certificates.models import ( from models import (
CertificateGenerationConfiguration, CertificateGenerationConfiguration,
CertificateGenerationCourseSetting, CertificateGenerationCourseSetting,
CertificateInvalidation, CertificateInvalidation,
...@@ -23,7 +23,7 @@ from certificates.models import ( ...@@ -23,7 +23,7 @@ from certificates.models import (
GeneratedCertificate, GeneratedCertificate,
certificate_status_for_student certificate_status_for_student
) )
from certificates.queue import XQueueCertInterface from queue import XQueueCertInterface
from eventtracking import tracker from eventtracking import tracker
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from openedx.core.djangoapps.xmodule_django.models import CourseKeyField from openedx.core.djangoapps.xmodule_django.models import CourseKeyField
......
...@@ -3,5 +3,5 @@ from django.conf.urls import include, patterns, url ...@@ -3,5 +3,5 @@ from django.conf.urls import include, patterns, url
urlpatterns = patterns( urlpatterns = patterns(
'', '',
url(r'^v0/', include('lms.djangoapps.certificates.apis.v0.urls', namespace='v0')), url(r'^v0/', include('openedx.features.certificates.apis.v0.urls', namespace='v0')),
) )
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
from django.conf import settings from django.conf import settings
from django.conf.urls import include, patterns, url from django.conf.urls import include, patterns, url
from lms.djangoapps.certificates.apis.v0 import views from openedx.features.certificates.apis.v0 import views
CERTIFICATES_URLS = patterns( CERTIFICATES_URLS = patterns(
'', '',
......
...@@ -8,7 +8,7 @@ from rest_framework.generics import GenericAPIView ...@@ -8,7 +8,7 @@ from rest_framework.generics import GenericAPIView
from rest_framework.permissions import IsAuthenticated from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response from rest_framework.response import Response
from lms.djangoapps.certificates.api import get_certificate_for_user from openedx.features.certificates.api import get_certificate_for_user
from openedx.core.lib.api import authentication, permissions from openedx.core.lib.api import authentication, permissions
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
......
...@@ -62,8 +62,8 @@ from django_extensions.db.fields import CreationDateTimeField ...@@ -62,8 +62,8 @@ from django_extensions.db.fields import CreationDateTimeField
from model_utils import Choices from model_utils import Choices
from model_utils.models import TimeStampedModel from model_utils.models import TimeStampedModel
from badges.events.course_complete import course_badge_check from lms.djangoapps.badges.events.course_complete import course_badge_check
from badges.events.course_meta import completion_check, course_group_check from lms.djangoapps.badges.events.course_meta import completion_check, course_group_check
from lms.djangoapps.instructor_task.models import InstructorTask from lms.djangoapps.instructor_task.models import InstructorTask
from openedx.core.djangoapps.signals.signals import COURSE_CERT_AWARDED from openedx.core.djangoapps.signals.signals import COURSE_CERT_AWARDED
from openedx.core.djangoapps.xmodule_django.models import CourseKeyField, NoneToEmptyManager from openedx.core.djangoapps.xmodule_django.models import CourseKeyField, NoneToEmptyManager
......
...@@ -12,8 +12,8 @@ from lxml.etree import ParserError, XMLSyntaxError ...@@ -12,8 +12,8 @@ from lxml.etree import ParserError, XMLSyntaxError
from requests.auth import HTTPBasicAuth from requests.auth import HTTPBasicAuth
from capa.xqueue_interface import XQueueInterface, make_hashkey, make_xheader from capa.xqueue_interface import XQueueInterface, make_hashkey, make_xheader
from certificates.models import CertificateStatuses as status from models import CertificateStatuses as status
from certificates.models import ( from models import (
CertificateStatuses, CertificateStatuses,
CertificateWhitelist, CertificateWhitelist,
ExampleCertificate, ExampleCertificate,
......
...@@ -6,16 +6,16 @@ import logging ...@@ -6,16 +6,16 @@ import logging
from django.db.models.signals import post_save from django.db.models.signals import post_save
from django.dispatch import receiver from django.dispatch import receiver
from certificates.models import ( from models import (
CertificateGenerationCourseSetting, CertificateGenerationCourseSetting,
CertificateWhitelist, CertificateWhitelist,
CertificateStatuses, CertificateStatuses,
GeneratedCertificate GeneratedCertificate
) )
from certificates.tasks import generate_certificate from lms.djangoapps.certificates.tasks import generate_certificate
from courseware import courses from lms.djangoapps.courseware import courses
from lms.djangoapps.grades.new.course_grade_factory import CourseGradeFactory from lms.djangoapps.grades.new.course_grade_factory import CourseGradeFactory
from openedx.core.djangoapps.certificates.config import waffle from openedx.features.certificates.config import waffle
from openedx.core.djangoapps.signals.signals import COURSE_GRADE_NOW_PASSED, LEARNER_NOW_VERIFIED from openedx.core.djangoapps.signals.signals import COURSE_GRADE_NOW_PASSED, LEARNER_NOW_VERIFIED
from student.models import CourseEnrollment from student.models import CourseEnrollment
......
...@@ -81,7 +81,7 @@ class WhitelistGeneratedCertificatesTest(ModuleStoreTestCase): ...@@ -81,7 +81,7 @@ class WhitelistGeneratedCertificatesTest(ModuleStoreTestCase):
based on 'SELF_PACED_ONLY' flag based on 'SELF_PACED_ONLY' flag
""" """
with mock.patch( with mock.patch(
'lms.djangoapps.certificates.signals.generate_certificate.apply_async', 'openedx.features.certificates.signals.generate_certificate.apply_async',
return_value=None return_value=None
) as mock_generate_certificate_apply_async: ) as mock_generate_certificate_apply_async:
with waffle.waffle().override(waffle.SELF_PACED_ONLY, active=False): with waffle.waffle().override(waffle.SELF_PACED_ONLY, active=False):
...@@ -106,7 +106,7 @@ class WhitelistGeneratedCertificatesTest(ModuleStoreTestCase): ...@@ -106,7 +106,7 @@ class WhitelistGeneratedCertificatesTest(ModuleStoreTestCase):
based on 'INSTRUCTOR_PACED_ONLY' flag based on 'INSTRUCTOR_PACED_ONLY' flag
""" """
with mock.patch( with mock.patch(
'lms.djangoapps.certificates.signals.generate_certificate.apply_async', 'openedx.features.certificates.signals.generate_certificate.apply_async',
return_value=None return_value=None
) as mock_generate_certificate_apply_async: ) as mock_generate_certificate_apply_async:
with waffle.waffle().override(waffle.INSTRUCTOR_PACED_ONLY, active=False): with waffle.waffle().override(waffle.INSTRUCTOR_PACED_ONLY, active=False):
...@@ -157,7 +157,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase): ...@@ -157,7 +157,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase):
def test_cert_generation_on_passing_self_paced(self): def test_cert_generation_on_passing_self_paced(self):
with mock.patch( with mock.patch(
'lms.djangoapps.certificates.signals.generate_certificate.apply_async', 'openedx.features.certificates.signals.generate_certificate.apply_async',
return_value=None return_value=None
) as mock_generate_certificate_apply_async: ) as mock_generate_certificate_apply_async:
with waffle.waffle().override(waffle.SELF_PACED_ONLY, active=True): with waffle.waffle().override(waffle.SELF_PACED_ONLY, active=True):
...@@ -175,7 +175,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase): ...@@ -175,7 +175,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase):
def test_cert_generation_on_passing_instructor_paced(self): def test_cert_generation_on_passing_instructor_paced(self):
with mock.patch( with mock.patch(
'lms.djangoapps.certificates.signals.generate_certificate.apply_async', 'openedx.features.certificates.signals.generate_certificate.apply_async',
return_value=None return_value=None
) as mock_generate_certificate_apply_async: ) as mock_generate_certificate_apply_async:
with waffle.waffle().override(waffle.INSTRUCTOR_PACED_ONLY, active=True): with waffle.waffle().override(waffle.INSTRUCTOR_PACED_ONLY, active=True):
...@@ -193,7 +193,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase): ...@@ -193,7 +193,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase):
def test_cert_already_generated(self): def test_cert_already_generated(self):
with mock.patch( with mock.patch(
'lms.djangoapps.certificates.signals.generate_certificate.apply_async', 'openedx.features.certificates.signals.generate_certificate.apply_async',
return_value=None return_value=None
) as mock_generate_certificate_apply_async: ) as mock_generate_certificate_apply_async:
grade_factory = CourseGradeFactory() grade_factory = CourseGradeFactory()
...@@ -238,7 +238,7 @@ class LearnerTrackChangeCertsTest(ModuleStoreTestCase): ...@@ -238,7 +238,7 @@ class LearnerTrackChangeCertsTest(ModuleStoreTestCase):
def test_cert_generation_on_photo_verification_self_paced(self): def test_cert_generation_on_photo_verification_self_paced(self):
with mock.patch( with mock.patch(
'lms.djangoapps.certificates.signals.generate_certificate.apply_async', 'openedx.features.certificates.signals.generate_certificate.apply_async',
return_value=None return_value=None
) as mock_generate_certificate_apply_async: ) as mock_generate_certificate_apply_async:
with waffle.waffle().override(waffle.SELF_PACED_ONLY, active=True): with waffle.waffle().override(waffle.SELF_PACED_ONLY, active=True):
...@@ -255,7 +255,7 @@ class LearnerTrackChangeCertsTest(ModuleStoreTestCase): ...@@ -255,7 +255,7 @@ class LearnerTrackChangeCertsTest(ModuleStoreTestCase):
def test_cert_generation_on_photo_verification_instructor_paced(self): def test_cert_generation_on_photo_verification_instructor_paced(self):
with mock.patch( with mock.patch(
'lms.djangoapps.certificates.signals.generate_certificate.apply_async', 'openedx.features.certificates.signals.generate_certificate.apply_async',
return_value=None return_value=None
) as mock_generate_certificate_apply_async: ) as mock_generate_certificate_apply_async:
with waffle.waffle().override(waffle.INSTRUCTOR_PACED_ONLY, active=True): with waffle.waffle().override(waffle.INSTRUCTOR_PACED_ONLY, active=True):
......
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