Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-platform
Commits
b25a227c
Commit
b25a227c
authored
Aug 30, 2017
by
Alex Dusenbery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get manage.py shell to load
parent
1ad86ad6
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
32 additions
and
32 deletions
+32
-32
lms/djangoapps/certificates/__init__.py
+0
-0
lms/djangoapps/certificates/tasks.py
+1
-1
lms/djangoapps/certificates/tests/__init__.py
+0
-0
lms/djangoapps/certificates/tests/test_tasks.py
+0
-0
lms/djangoapps/courseware/date_summary.py
+1
-1
lms/envs/common.py
+1
-1
openedx/core/djangoapps/content/course_overviews/models.py
+1
-1
openedx/core/djangoapps/content/course_overviews/tests.py
+1
-1
openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py
+2
-2
openedx/core/djangoapps/programs/tests/test_utils.py
+2
-2
openedx/core/djangoapps/programs/utils.py
+1
-1
openedx/features/certificates/admin.py
+1
-1
openedx/features/certificates/api.py
+3
-3
openedx/features/certificates/apis/urls.py
+1
-1
openedx/features/certificates/apis/v0/urls.py
+1
-1
openedx/features/certificates/apis/v0/views.py
+1
-1
openedx/features/certificates/models.py
+2
-2
openedx/features/certificates/queue.py
+2
-2
openedx/features/certificates/signals.py
+4
-4
openedx/features/certificates/tests/test_signals.py
+7
-7
No files found.
lms/djangoapps/certificates/__init__.py
0 → 100644
View file @
b25a227c
openedx/feature
s/certificates/tasks.py
→
lms/djangoapp
s/certificates/tasks.py
View file @
b25a227c
...
...
@@ -6,7 +6,7 @@ from celery_utils.persist_on_failure import PersistOnFailureTask
from
django.contrib.auth.models
import
User
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__
)
...
...
lms/djangoapps/certificates/tests/__init__.py
0 → 100644
View file @
b25a227c
openedx/feature
s/certificates/tests/test_tasks.py
→
lms/djangoapp
s/certificates/tests/test_tasks.py
View file @
b25a227c
File moved
lms/djangoapps/courseware/date_summary.py
View file @
b25a227c
...
...
@@ -16,7 +16,7 @@ from pytz import timezone, utc
from
course_modes.models
import
CourseMode
from
lms.djangoapps.commerce.utils
import
EcommerceService
from
lms.djangoapps.verify_student.models
import
SoftwareSecurePhotoVerification
,
VerificationDeadline
from
openedx.
core.djangoapp
s.certificates.config
import
waffle
from
openedx.
feature
s.certificates.config
import
waffle
from
student.models
import
CourseEnrollment
...
...
lms/envs/common.py
View file @
b25a227c
...
...
@@ -2025,7 +2025,6 @@ INSTALLED_APPS = [
'track'
,
'eventtracking.django.apps.EventTrackingConfig'
,
'util'
,
'certificates.apps.CertificatesConfig'
,
'dashboard'
,
'lms.djangoapps.instructor'
,
'lms.djangoapps.instructor_task'
,
...
...
@@ -2244,6 +2243,7 @@ INSTALLED_APPS = [
'openedx.core.djangoapps.schedules'
,
# Features
'openedx.features.certificates.apps.CertificatesConfig'
,
'openedx.features.course_bookmarks'
,
'openedx.features.course_experience'
,
'openedx.features.course_search'
,
...
...
openedx/core/djangoapps/content/course_overviews/models.py
View file @
b25a227c
...
...
@@ -118,7 +118,7 @@ class CourseOverview(TimeStampedModel):
Returns:
CourseOverview: created or updated overview extracted from the given course
"""
from
lms.djangoapp
s.certificates.api
import
get_active_web_certificate
from
openedx.feature
s.certificates.api
import
get_active_web_certificate
from
openedx.core.lib.courses
import
course_image_url
# Workaround for a problem discovered in https://openedx.atlassian.net/browse/TNL-2806.
...
...
openedx/core/djangoapps/content/course_overviews/tests.py
View file @
b25a227c
...
...
@@ -16,7 +16,7 @@ from django.test.utils import override_settings
from
django.utils
import
timezone
from
PIL
import
Image
from
lms.djangoapp
s.certificates.api
import
get_active_web_certificate
from
openedx.feature
s.certificates.api
import
get_active_web_certificate
from
openedx.core.djangoapps.models.course_details
import
CourseDetails
from
openedx.core.lib.courses
import
course_image_url
from
static_replace.models
import
AssetBaseUrlConfig
...
...
openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py
View file @
b25a227c
...
...
@@ -6,8 +6,8 @@ from django.test import TestCase
from
openedx.features.certificates.models
import
CertificateStatuses
# pylint: disable=import-error
from
course_modes.models
import
CourseMode
from
lms.djangoapp
s.certificates.api
import
MODES
from
lms.djangoapp
s.certificates.tests.factories
import
GeneratedCertificateFactory
from
openedx.feature
s.certificates.api
import
MODES
from
openedx.feature
s.certificates.tests.factories
import
GeneratedCertificateFactory
from
openedx.core.djangoapps.catalog.tests.factories
import
(
generate_course_run_key
,
ProgramFactory
,
...
...
openedx/core/djangoapps/programs/tests/test_utils.py
View file @
b25a227c
...
...
@@ -15,7 +15,7 @@ from nose.plugins.attrib import attr
from
pytz
import
utc
from
course_modes.models
import
CourseMode
from
lms.djangoapp
s.certificates.api
import
MODES
from
openedx.feature
s.certificates.api
import
MODES
from
lms.djangoapps.commerce.tests.test_utils
import
update_commerce_config
from
lms.djangoapps.commerce.utils
import
EcommerceService
from
openedx.core.djangoapps.catalog.tests.factories
import
(
...
...
@@ -41,7 +41,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from
xmodule.modulestore.tests.factories
import
CourseFactory
as
ModuleStoreCourseFactory
CERTIFICATES_API_MODULE
=
'
lms.djangoapp
s.certificates.api'
CERTIFICATES_API_MODULE
=
'
openedx.feature
s.certificates.api'
ECOMMERCE_URL_ROOT
=
'https://ecommerce.example.com'
UTILS_MODULE
=
'openedx.core.djangoapps.programs.utils'
...
...
openedx/core/djangoapps/programs/utils.py
View file @
b25a227c
...
...
@@ -19,7 +19,7 @@ from pytz import utc
from
requests.exceptions
import
ConnectionError
,
Timeout
from
course_modes.models
import
CourseMode
from
lms.djangoapp
s.certificates
import
api
as
certificate_api
from
openedx.feature
s.certificates
import
api
as
certificate_api
from
lms.djangoapps.commerce.utils
import
EcommerceService
from
lms.djangoapps.courseware.access
import
has_access
from
openedx.core.djangoapps.catalog.utils
import
get_programs
...
...
openedx/features/certificates/admin.py
View file @
b25a227c
...
...
@@ -5,7 +5,7 @@ from config_models.admin import ConfigurationModelAdmin
from
django
import
forms
from
django.contrib
import
admin
from
certificates.
models
import
(
from
models
import
(
CertificateGenerationConfiguration
,
CertificateGenerationCourseSetting
,
CertificateHtmlViewConfiguration
,
...
...
openedx/features/certificates/api.py
View file @
b25a227c
...
...
@@ -11,8 +11,8 @@ from django.core.urlresolvers import reverse
from
opaque_keys
import
InvalidKeyError
from
opaque_keys.edx.keys
import
CourseKey
from
branding
import
api
as
branding_api
from
certificates.
models
import
(
from
lms.djangoapps.
branding
import
api
as
branding_api
from
models
import
(
CertificateGenerationConfiguration
,
CertificateGenerationCourseSetting
,
CertificateInvalidation
,
...
...
@@ -23,7 +23,7 @@ from certificates.models import (
GeneratedCertificate
,
certificate_status_for_student
)
from
certificates.
queue
import
XQueueCertInterface
from
queue
import
XQueueCertInterface
from
eventtracking
import
tracker
from
openedx.core.djangoapps.content.course_overviews.models
import
CourseOverview
from
openedx.core.djangoapps.xmodule_django.models
import
CourseKeyField
...
...
openedx/features/certificates/apis/urls.py
View file @
b25a227c
...
...
@@ -3,5 +3,5 @@ from django.conf.urls import include, patterns, url
urlpatterns
=
patterns
(
''
,
url
(
r'^v0/'
,
include
(
'
lms.djangoapp
s.certificates.apis.v0.urls'
,
namespace
=
'v0'
)),
url
(
r'^v0/'
,
include
(
'
openedx.feature
s.certificates.apis.v0.urls'
,
namespace
=
'v0'
)),
)
openedx/features/certificates/apis/v0/urls.py
View file @
b25a227c
...
...
@@ -3,7 +3,7 @@
from
django.conf
import
settings
from
django.conf.urls
import
include
,
patterns
,
url
from
lms.djangoapp
s.certificates.apis.v0
import
views
from
openedx.feature
s.certificates.apis.v0
import
views
CERTIFICATES_URLS
=
patterns
(
''
,
...
...
openedx/features/certificates/apis/v0/views.py
View file @
b25a227c
...
...
@@ -8,7 +8,7 @@ from rest_framework.generics import GenericAPIView
from
rest_framework.permissions
import
IsAuthenticated
from
rest_framework.response
import
Response
from
lms.djangoapp
s.certificates.api
import
get_certificate_for_user
from
openedx.feature
s.certificates.api
import
get_certificate_for_user
from
openedx.core.lib.api
import
authentication
,
permissions
log
=
logging
.
getLogger
(
__name__
)
...
...
openedx/features/certificates/models.py
View file @
b25a227c
...
...
@@ -62,8 +62,8 @@ from django_extensions.db.fields import CreationDateTimeField
from
model_utils
import
Choices
from
model_utils.models
import
TimeStampedModel
from
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_complete
import
course_badge_check
from
lms.djangoapps.
badges.events.course_meta
import
completion_check
,
course_group_check
from
lms.djangoapps.instructor_task.models
import
InstructorTask
from
openedx.core.djangoapps.signals.signals
import
COURSE_CERT_AWARDED
from
openedx.core.djangoapps.xmodule_django.models
import
CourseKeyField
,
NoneToEmptyManager
...
...
openedx/features/certificates/queue.py
View file @
b25a227c
...
...
@@ -12,8 +12,8 @@ from lxml.etree import ParserError, XMLSyntaxError
from
requests.auth
import
HTTPBasicAuth
from
capa.xqueue_interface
import
XQueueInterface
,
make_hashkey
,
make_xheader
from
certificates.
models
import
CertificateStatuses
as
status
from
certificates.
models
import
(
from
models
import
CertificateStatuses
as
status
from
models
import
(
CertificateStatuses
,
CertificateWhitelist
,
ExampleCertificate
,
...
...
openedx/features/certificates/signals.py
View file @
b25a227c
...
...
@@ -6,16 +6,16 @@ import logging
from
django.db.models.signals
import
post_save
from
django.dispatch
import
receiver
from
certificates.
models
import
(
from
models
import
(
CertificateGenerationCourseSetting
,
CertificateWhitelist
,
CertificateStatuses
,
GeneratedCertificate
)
from
certificates.tasks
import
generate_certificate
from
courseware
import
courses
from
lms.djangoapps.
certificates.tasks
import
generate_certificate
from
lms.djangoapps.
courseware
import
courses
from
lms.djangoapps.grades.new.course_grade_factory
import
CourseGradeFactory
from
openedx.
core.djangoapp
s.certificates.config
import
waffle
from
openedx.
feature
s.certificates.config
import
waffle
from
openedx.core.djangoapps.signals.signals
import
COURSE_GRADE_NOW_PASSED
,
LEARNER_NOW_VERIFIED
from
student.models
import
CourseEnrollment
...
...
openedx/features/certificates/tests/test_signals.py
View file @
b25a227c
...
...
@@ -81,7 +81,7 @@ class WhitelistGeneratedCertificatesTest(ModuleStoreTestCase):
based on 'SELF_PACED_ONLY' flag
"""
with
mock
.
patch
(
'
lms.djangoapp
s.certificates.signals.generate_certificate.apply_async'
,
'
openedx.feature
s.certificates.signals.generate_certificate.apply_async'
,
return_value
=
None
)
as
mock_generate_certificate_apply_async
:
with
waffle
.
waffle
()
.
override
(
waffle
.
SELF_PACED_ONLY
,
active
=
False
):
...
...
@@ -106,7 +106,7 @@ class WhitelistGeneratedCertificatesTest(ModuleStoreTestCase):
based on 'INSTRUCTOR_PACED_ONLY' flag
"""
with
mock
.
patch
(
'
lms.djangoapp
s.certificates.signals.generate_certificate.apply_async'
,
'
openedx.feature
s.certificates.signals.generate_certificate.apply_async'
,
return_value
=
None
)
as
mock_generate_certificate_apply_async
:
with
waffle
.
waffle
()
.
override
(
waffle
.
INSTRUCTOR_PACED_ONLY
,
active
=
False
):
...
...
@@ -157,7 +157,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase):
def
test_cert_generation_on_passing_self_paced
(
self
):
with
mock
.
patch
(
'
lms.djangoapp
s.certificates.signals.generate_certificate.apply_async'
,
'
openedx.feature
s.certificates.signals.generate_certificate.apply_async'
,
return_value
=
None
)
as
mock_generate_certificate_apply_async
:
with
waffle
.
waffle
()
.
override
(
waffle
.
SELF_PACED_ONLY
,
active
=
True
):
...
...
@@ -175,7 +175,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase):
def
test_cert_generation_on_passing_instructor_paced
(
self
):
with
mock
.
patch
(
'
lms.djangoapp
s.certificates.signals.generate_certificate.apply_async'
,
'
openedx.feature
s.certificates.signals.generate_certificate.apply_async'
,
return_value
=
None
)
as
mock_generate_certificate_apply_async
:
with
waffle
.
waffle
()
.
override
(
waffle
.
INSTRUCTOR_PACED_ONLY
,
active
=
True
):
...
...
@@ -193,7 +193,7 @@ class PassingGradeCertsTest(ModuleStoreTestCase):
def
test_cert_already_generated
(
self
):
with
mock
.
patch
(
'
lms.djangoapp
s.certificates.signals.generate_certificate.apply_async'
,
'
openedx.feature
s.certificates.signals.generate_certificate.apply_async'
,
return_value
=
None
)
as
mock_generate_certificate_apply_async
:
grade_factory
=
CourseGradeFactory
()
...
...
@@ -238,7 +238,7 @@ class LearnerTrackChangeCertsTest(ModuleStoreTestCase):
def
test_cert_generation_on_photo_verification_self_paced
(
self
):
with
mock
.
patch
(
'
lms.djangoapp
s.certificates.signals.generate_certificate.apply_async'
,
'
openedx.feature
s.certificates.signals.generate_certificate.apply_async'
,
return_value
=
None
)
as
mock_generate_certificate_apply_async
:
with
waffle
.
waffle
()
.
override
(
waffle
.
SELF_PACED_ONLY
,
active
=
True
):
...
...
@@ -255,7 +255,7 @@ class LearnerTrackChangeCertsTest(ModuleStoreTestCase):
def
test_cert_generation_on_photo_verification_instructor_paced
(
self
):
with
mock
.
patch
(
'
lms.djangoapp
s.certificates.signals.generate_certificate.apply_async'
,
'
openedx.feature
s.certificates.signals.generate_certificate.apply_async'
,
return_value
=
None
)
as
mock_generate_certificate_apply_async
:
with
waffle
.
waffle
()
.
override
(
waffle
.
INSTRUCTOR_PACED_ONLY
,
active
=
True
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment