Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 5c63501

Browse files
authored
Revert "Merge pull request #178 from edx/edx/kdmccormick/course-listing-reimp-final" (#179)
This reverts commit 14e3a01, reversing changes made to 859d376. Reverts API version from v1 back to v0. See EDUCATOR-1355 to track the eventual refactor and re-commit of these changes.
1 parent 14e3a01 commit 5c63501

57 files changed

Lines changed: 865 additions & 2154 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

analytics_data_api/constants/enrollment_modes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
PROFESSIONAL_NO_ID = u'no-id-professional'
66
VERIFIED = u'verified'
77

8-
ALL = frozenset([AUDIT, CREDIT, HONOR, PROFESSIONAL, PROFESSIONAL_NO_ID, VERIFIED])
8+
ALL = [AUDIT, CREDIT, HONOR, PROFESSIONAL, PROFESSIONAL_NO_ID, VERIFIED]

analytics_data_api/fixtures/problem_response_answer_distribution.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"problem_display_name": "Earth Science Question",
1515
"question_text": "Enter your answer:"
1616
},
17-
"model": "v1.problemfirstlastresponseanswerdistribution",
17+
"model": "v0.problemfirstlastresponseanswerdistribution",
1818
"pk": 1
1919
},
2020
{
@@ -32,7 +32,7 @@
3232
"problem_display_name": "Earth Science Question",
3333
"question_text": "Enter your answer:"
3434
},
35-
"model": "v1.problemfirstlastresponseanswerdistribution",
35+
"model": "v0.problemfirstlastresponseanswerdistribution",
3636
"pk": 2
3737
},
3838
{
@@ -50,7 +50,7 @@
5050
"problem_display_name": "Earth Science Question",
5151
"question_text": "Enter your answer:"
5252
},
53-
"model": "v1.problemfirstlastresponseanswerdistribution",
53+
"model": "v0.problemfirstlastresponseanswerdistribution",
5454
"pk": 3
5555
},
5656
{
@@ -68,7 +68,7 @@
6868
"problem_display_name": "Earth Science Question",
6969
"question_text": "Enter your answer:"
7070
},
71-
"model": "v1.problemfirstlastresponseanswerdistribution",
71+
"model": "v0.problemfirstlastresponseanswerdistribution",
7272
"pk": 4
7373
},
7474
{
@@ -86,7 +86,7 @@
8686
"problem_display_name": null,
8787
"question_text": null
8888
},
89-
"model": "v1.problemfirstlastresponseanswerdistribution",
89+
"model": "v0.problemfirstlastresponseanswerdistribution",
9090
"pk": 5
9191
},
9292
{
@@ -104,7 +104,7 @@
104104
"problem_display_name": null,
105105
"question_text": null
106106
},
107-
"model": "v1.problemfirstlastresponseanswerdistribution",
107+
"model": "v0.problemfirstlastresponseanswerdistribution",
108108
"pk": 6
109109
},
110110
{
@@ -122,7 +122,7 @@
122122
"problem_display_name": null,
123123
"question_text": null
124124
},
125-
"model": "v1.problemfirstlastresponseanswerdistribution",
125+
"model": "v0.problemfirstlastresponseanswerdistribution",
126126
"pk": 7
127127
},
128128
{
@@ -140,7 +140,7 @@
140140
"problem_display_name": "Example problem",
141141
"question_text": "Enter an answer:"
142142
},
143-
"model": "v1.problemfirstlastresponseanswerdistribution",
143+
"model": "v0.problemfirstlastresponseanswerdistribution",
144144
"pk": 8
145145
},
146146
{
@@ -158,7 +158,7 @@
158158
"problem_display_name": "Example problem",
159159
"question_text": "Enter an answer:"
160160
},
161-
"model": "v1.problemfirstlastresponseanswerdistribution",
161+
"model": "v0.problemfirstlastresponseanswerdistribution",
162162
"pk": 9
163163
},
164164
{
@@ -176,7 +176,7 @@
176176
"problem_display_name": "Example problem",
177177
"question_text": "Enter an answer:"
178178
},
179-
"model": "v1.problemfirstlastresponseanswerdistribution",
179+
"model": "v0.problemfirstlastresponseanswerdistribution",
180180
"pk": 10
181181
},
182182
{
@@ -194,7 +194,7 @@
194194
"problem_display_name": "Example problem",
195195
"question_text": "Randomized answer"
196196
},
197-
"model": "v1.problemfirstlastresponseanswerdistribution",
197+
"model": "v0.problemfirstlastresponseanswerdistribution",
198198
"pk": 11
199199
},
200200
{
@@ -212,7 +212,7 @@
212212
"problem_display_name": "Example problem",
213213
"question_text": "Randomized answer"
214214
},
215-
"model": "v1.problemfirstlastresponseanswerdistribution",
215+
"model": "v0.problemfirstlastresponseanswerdistribution",
216216
"pk": 12
217217
},
218218

@@ -231,7 +231,7 @@
231231
"problem_display_name": "Example problem",
232232
"question_text": "Select from the choices below:"
233233
},
234-
"model": "v1.problemfirstlastresponseanswerdistribution",
234+
"model": "v0.problemfirstlastresponseanswerdistribution",
235235
"pk": 13
236236
},
237237
{
@@ -249,7 +249,7 @@
249249
"problem_display_name": "Example problem",
250250
"question_text": "Select from the choices below:"
251251
},
252-
"model": "v1.problemfirstlastresponseanswerdistribution",
252+
"model": "v0.problemfirstlastresponseanswerdistribution",
253253
"pk": 14
254254
},
255255
{
@@ -267,7 +267,7 @@
267267
"problem_display_name": "Example problem",
268268
"question_text": "Select from the choices below:"
269269
},
270-
"model": "v1.problemfirstlastresponseanswerdistribution",
270+
"model": "v0.problemfirstlastresponseanswerdistribution",
271271
"pk": 15
272272
}
273273

analytics_data_api/management/commands/generate_fake_course_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from django.utils import timezone
1313

1414
from analytics_data_api.constants import engagement_events
15-
from analytics_data_api.v1 import models
15+
from analytics_data_api.v0 import models
1616
from analyticsdataserver.clients import CourseBlocksApiClient
1717

1818
logging.basicConfig(level=logging.INFO)

analytics_data_api/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from rest_framework.urlpatterns import format_suffix_patterns
33

44
urlpatterns = [
5-
url(r'^v1/', include('analytics_data_api.v1.urls', 'v1')),
5+
url(r'^v0/', include('analytics_data_api.v0.urls', 'v0')),
66
]
77

88
urlpatterns = format_suffix_patterns(urlpatterns)

analytics_data_api/utils.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from opaque_keys.edx.locator import CourseKey
1111
from opaque_keys import InvalidKeyError
1212

13-
from analytics_data_api.v1.exceptions import (
13+
from analytics_data_api.v0.exceptions import (
1414
ReportFileNotFoundError,
1515
CannotCreateReportDownloadLinkError
1616
)
@@ -230,25 +230,3 @@ def get_expiration_date(seconds):
230230
Determine when a given link will expire, based on a given lifetime
231231
"""
232232
return datetime.datetime.utcnow() + datetime.timedelta(seconds=seconds)
233-
234-
235-
class classproperty(object):
236-
"""
237-
A decorator for declaring a class-level property.
238-
239-
Conceptually ike combining @classmethod and @property, however that
240-
doesn't work in practice, so we have to define our own decorator here.
241-
"""
242-
243-
def __init__(self, getter):
244-
self.getter = getter
245-
246-
def __get__(self, instance, owner):
247-
return self.getter(owner)
248-
249-
250-
def join_dicts(*dicts):
251-
joined = {}
252-
for d in dicts:
253-
joined.update(d)
254-
return joined

analytics_data_api/v0/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default_app_config = 'analytics_data_api.v0.apps.ApiAppConfig'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class ApiAppConfig(AppConfig):
77

8-
name = 'analytics_data_api.v1'
8+
name = 'analytics_data_api.v0'
99

1010
def ready(self):
1111
from analytics_data_api.utils import load_fully_qualified_definition
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.http.response import JsonResponse
33
from rest_framework import status
44

5-
from analytics_data_api.v1.exceptions import (
5+
from analytics_data_api.v0.exceptions import (
66
CourseKeyMalformedError,
77
CourseNotSpecifiedError,
88
LearnerEngagementTimelineNotFoundError,

0 commit comments

Comments
 (0)