Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-dashboard
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-analytics-dashboard
Commits
b0a0ffd2
Commit
b0a0ffd2
authored
Oct 24, 2016
by
Tyler Hallada
Committed by
GitHub
Oct 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #572 from edx/thallada/update-grades-api
AN-7716 Use new grades API endpoint
parents
12519901
626f5a09
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
analytics_dashboard/courses/presenters/performance.py
+1
-2
analytics_dashboard/courses/tests/test_views/__init__.py
+1
-1
analytics_dashboard/settings/dev.py
+1
-1
No files found.
analytics_dashboard/courses/presenters/performance.py
View file @
b0a0ffd2
...
...
@@ -44,7 +44,6 @@ class CoursePerformancePresenter(CourseAPIPresenterMixin, BasePresenter):
def
__init__
(
self
,
access_token
,
course_id
,
timeout
=
settings
.
LMS_DEFAULT_TIMEOUT
):
super
(
CoursePerformancePresenter
,
self
)
.
__init__
(
access_token
,
course_id
,
timeout
)
# the deprecated course structure API has grading policy. This will be replaced in AN-7716
self
.
grading_policy_client
=
CourseStructureApiClient
(
settings
.
GRADING_POLICY_API_URL
,
access_token
)
def
course_module_data
(
self
):
...
...
@@ -185,7 +184,7 @@ class CoursePerformancePresenter(CourseAPIPresenterMixin, BasePresenter):
if
not
grading_policy
:
logger
.
debug
(
'Retrieving grading policy for course:
%
s'
,
self
.
course_id
)
grading_policy
=
self
.
grading_policy_client
.
grading_policies
(
self
.
course_id
)
.
get
()
grading_policy
=
self
.
grading_policy_client
.
courses
(
self
.
course_id
)
.
policy
.
get
()
# Remove empty assignment types as they are not useful and will cause issues downstream.
grading_policy
=
[
item
for
item
in
grading_policy
if
item
[
'assignment_type'
]]
...
...
analytics_dashboard/courses/tests/test_views/__init__.py
View file @
b0a0ffd2
...
...
@@ -32,7 +32,7 @@ class CourseAPIMixin(object):
COURSE_BLOCKS_API_TEMPLATE
=
\
settings
.
COURSE_API_URL
+
\
'/blocks/?course_id={course_id}&requested_fields=children,graded&depth=all&all_blocks=true'
GRADING_POLICY_API_TEMPLATE
=
settings
.
GRADING_POLICY_API_URL
+
'/
grading_policies/{course_id}
/'
GRADING_POLICY_API_TEMPLATE
=
settings
.
GRADING_POLICY_API_URL
+
'/
courses/{course_id}/policy
/'
def
mock_course_api
(
self
,
url
,
body
=
None
,
**
kwargs
):
"""
...
...
analytics_dashboard/settings/dev.py
View file @
b0a0ffd2
...
...
@@ -83,7 +83,7 @@ HELP_URL = '#'
SEGMENT_IO_KEY
=
os
.
environ
.
get
(
'SEGMENT_WRITE_KEY'
)
########## END SEGMENT.IO
GRADING_POLICY_API_URL
=
'http://127.0.0.1:8000/api/
course_structure
/v0/'
GRADING_POLICY_API_URL
=
'http://127.0.0.1:8000/api/
grades
/v0/'
COURSE_API_URL
=
'http://127.0.0.1:8000/api/courses/v1/'
LOGGING
=
get_logger_config
(
debug
=
DEBUG
,
dev_env
=
True
,
local_loglevel
=
'DEBUG'
)
...
...
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