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
edx
edx-platform
Commits
737ebccb
Commit
737ebccb
authored
Oct 06, 2017
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove django-simple-history and all HistoricalRecords.
parent
0702df51
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
5 additions
and
38 deletions
+5
-38
cms/envs/common.py
+0
-3
common/djangoapps/microsite_configuration/models.py
+0
-7
common/djangoapps/student/models.py
+0
-4
lms/djangoapps/verify_student/models.py
+0
-4
lms/envs/common.py
+0
-3
openedx/core/djangoapps/api_admin/models.py
+0
-3
openedx/core/djangoapps/credit/models.py
+0
-6
openedx/core/djangoapps/credit/tests/test_api.py
+5
-7
requirements/edx/base.txt
+0
-1
No files found.
cms/envs/common.py
View file @
737ebccb
...
...
@@ -912,9 +912,6 @@ INSTALLED_APPS = [
# Common views
'openedx.core.djangoapps.common_views'
,
# History tables
'simple_history'
,
# Database-backed configuration
'config_models'
,
'waffle'
,
...
...
common/djangoapps/microsite_configuration/models.py
View file @
737ebccb
...
...
@@ -14,7 +14,6 @@ from django.db.models.signals import pre_delete, pre_save
from
django.dispatch
import
receiver
from
jsonfield.fields
import
JSONField
from
model_utils.models
import
TimeStampedModel
from
simple_history.models
import
HistoricalRecords
class
Microsite
(
models
.
Model
):
...
...
@@ -115,9 +114,6 @@ class MicrositeOrganizationMapping(models.Model):
organization
=
models
.
CharField
(
max_length
=
63
,
db_index
=
True
,
unique
=
True
)
microsite
=
models
.
ForeignKey
(
Microsite
,
db_index
=
True
)
# for archiving
history
=
HistoricalRecords
()
def
__unicode__
(
self
):
"""String conversion"""
return
u'{microsite_key}: {organization}'
.
format
(
...
...
@@ -155,9 +151,6 @@ class MicrositeTemplate(models.Model):
template_uri
=
models
.
CharField
(
max_length
=
255
,
db_index
=
True
)
template
=
models
.
TextField
()
# for archiving
history
=
HistoricalRecords
()
def
__unicode__
(
self
):
"""String conversion"""
return
u'{microsite_key}: {template_uri}'
.
format
(
...
...
common/djangoapps/student/models.py
View file @
737ebccb
...
...
@@ -42,7 +42,6 @@ from eventtracking import tracker
from
model_utils.models
import
TimeStampedModel
from
opaque_keys.edx.keys
import
CourseKey
from
pytz
import
UTC
from
simple_history.models
import
HistoricalRecords
from
slumber.exceptions
import
HttpClientError
,
HttpServerError
import
dogstats_wrapper
as
dog_stats_api
...
...
@@ -1027,9 +1026,6 @@ class CourseEnrollment(models.Model):
objects
=
CourseEnrollmentManager
()
# Maintain a history of requirement status updates for auditing purposes
history
=
HistoricalRecords
()
# cache key format e.g enrollment.<username>.<course_key>.mode = 'honor'
COURSE_ENROLLMENT_CACHE_KEY
=
u"enrollment.{}.{}.mode"
# TODO Can this be removed? It doesn't seem to be used.
...
...
lms/djangoapps/verify_student/models.py
View file @
737ebccb
...
...
@@ -32,7 +32,6 @@ from django.utils.translation import ugettext as _
from
django.utils.translation
import
ugettext_lazy
from
model_utils
import
Choices
from
model_utils.models
import
StatusModel
,
TimeStampedModel
from
simple_history.models
import
HistoricalRecords
from
course_modes.models
import
CourseMode
from
lms.djangoapps.verify_student.ssencrypt
import
(
...
...
@@ -1043,9 +1042,6 @@ class VerificationDeadline(TimeStampedModel):
# overwrite the manual setting of the field.
deadline_is_explicit
=
models
.
BooleanField
(
default
=
False
)
# Maintain a history of changes to deadlines for auditing purposes
history
=
HistoricalRecords
()
ALL_DEADLINES_CACHE_KEY
=
"verify_student.all_verification_deadlines"
@classmethod
...
...
lms/envs/common.py
View file @
737ebccb
...
...
@@ -1988,9 +1988,6 @@ INSTALLED_APPS = [
# Common views
'openedx.core.djangoapps.common_views'
,
# History tables
'simple_history'
,
# Database-backed configuration
'config_models'
,
'waffle'
,
...
...
openedx/core/djangoapps/api_admin/models.py
View file @
737ebccb
...
...
@@ -14,7 +14,6 @@ from django.db.models.signals import post_save, pre_save
from
django.dispatch
import
receiver
from
django.utils.translation
import
ugettext
as
_
from
django_extensions.db.models
import
TimeStampedModel
from
simple_history.models
import
HistoricalRecords
from
edxmako.shortcuts
import
render_to_string
from
openedx.core.djangoapps.site_configuration
import
helpers
as
configuration_helpers
...
...
@@ -48,8 +47,6 @@ class ApiAccessRequest(TimeStampedModel):
site
=
models
.
ForeignKey
(
Site
)
contacted
=
models
.
BooleanField
(
default
=
False
)
history
=
HistoricalRecords
()
@classmethod
def
has_api_access
(
cls
,
user
):
"""Returns whether or not this user has been granted API access.
...
...
openedx/core/djangoapps/credit/models.py
View file @
737ebccb
...
...
@@ -21,7 +21,6 @@ from django.utils.translation import ugettext as _
from
django.utils.translation
import
ugettext_lazy
from
jsonfield.fields
import
JSONField
from
model_utils.models
import
TimeStampedModel
from
simple_history.models
import
HistoricalRecords
from
openedx.core.djangoapps.xmodule_django.models
import
CourseKeyField
from
request_cache.middleware
import
RequestCache
,
ns_request_cached
...
...
@@ -437,9 +436,6 @@ class CreditRequirementStatus(TimeStampedModel):
# the grade to users later and to send the information to credit providers.
reason
=
JSONField
(
default
=
{})
# Maintain a history of requirement status updates for auditing purposes
history
=
HistoricalRecords
()
class
Meta
(
object
):
unique_together
=
(
'username'
,
'requirement'
)
verbose_name_plural
=
_
(
'Credit requirement statuses'
)
...
...
@@ -655,8 +651,6 @@ class CreditRequest(TimeStampedModel):
default
=
REQUEST_STATUS_PENDING
)
history
=
HistoricalRecords
()
class
Meta
(
object
):
# Enforce the constraint that each user can have exactly one outstanding
# request to a given provider. Multiple requests use the same UUID.
...
...
openedx/core/djangoapps/credit/tests/test_api.py
View file @
737ebccb
...
...
@@ -651,7 +651,7 @@ class CreditRequirementApiTests(CreditApiTestBase):
api
.
set_credit_requirements
(
self
.
course_key
,
requirements
)
# Satisfy one of the requirements, but not the other
with
self
.
assertNumQueries
(
1
2
):
with
self
.
assertNumQueries
(
1
1
):
api
.
set_credit_requirement_status
(
user
,
self
.
course_key
,
...
...
@@ -663,7 +663,7 @@ class CreditRequirementApiTests(CreditApiTestBase):
self
.
assertFalse
(
api
.
is_user_eligible_for_credit
(
user
.
username
,
self
.
course_key
))
# Satisfy the other requirement
with
self
.
assertNumQueries
(
2
3
):
with
self
.
assertNumQueries
(
2
2
):
api
.
set_credit_requirement_status
(
user
,
self
.
course_key
,
...
...
@@ -717,7 +717,7 @@ class CreditRequirementApiTests(CreditApiTestBase):
# Delete the eligibility entries and satisfy the user's eligibility
# requirement again to trigger eligibility notification
CreditEligibility
.
objects
.
all
()
.
delete
()
with
self
.
assertNumQueries
(
1
6
):
with
self
.
assertNumQueries
(
1
5
):
api
.
set_credit_requirement_status
(
user
,
self
.
course_key
,
...
...
@@ -1048,15 +1048,13 @@ class CreditProviderIntegrationApiTests(CreditApiTestBase):
# - 1 query: Look up the user's enrollment date in the course.
# - 2 query: Look up the user's completion date in the course.
# - 1 query: Update the request.
# - 2 queries: Update the history table for the request.
# - 4 Django savepoints
with
self
.
assertNumQueries
(
1
6
):
with
self
.
assertNumQueries
(
1
4
):
request
=
api
.
create_credit_request
(
self
.
course_key
,
self
.
PROVIDER_ID
,
self
.
USER_INFO
[
'username'
])
# - 2 queries: Retrieve and update the request
# - 1 query: Update the history table for the request.
uuid
=
request
[
"parameters"
][
"request_uuid"
]
with
self
.
assertNumQueries
(
3
):
with
self
.
assertNumQueries
(
2
):
api
.
update_credit_request_status
(
uuid
,
self
.
PROVIDER_ID
,
"approved"
)
with
self
.
assertNumQueries
(
1
):
...
...
requirements/edx/base.txt
View file @
737ebccb
...
...
@@ -28,7 +28,6 @@ django-pipeline-forgiving==1.0.0
django-pyfs==1.0.7
django-sekizai>=0.10
django-ses==0.7.1
django-simple-history==1.6.3
django-statici18n==1.4.0
django-storages==1.4.1
django-method-override==0.1.0
...
...
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