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
ee47e336
Commit
ee47e336
authored
7 years ago
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle due dates better.
parent
21f65404
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
openedx/features/learner_analytics/views.py
+14
-4
No files found.
openedx/features/learner_analytics/views.py
View file @
ee47e336
...
@@ -58,7 +58,7 @@ class LearnerAnalyticsView(View):
...
@@ -58,7 +58,7 @@ class LearnerAnalyticsView(View):
def
get_grade_data
(
self
,
user
,
course_key
):
def
get_grade_data
(
self
,
user
,
course_key
):
"""
"""
Collects and formats the grade
data to be piped to the front end
.
Collects and formats the grade
s data for a particular user and course
.
Args:
Args:
user: User
user: User
...
@@ -74,6 +74,15 @@ class LearnerAnalyticsView(View):
...
@@ -74,6 +74,15 @@ class LearnerAnalyticsView(View):
}
}
return
json
.
dumps
(
grades
)
return
json
.
dumps
(
grades
)
def
get_discussion_data
(
self
,
user
,
course_key
):
"""
Collects and formats the discussion data from a particular user and course.
Args:
user: User
course_key: CourseKey
"""
pass
def
get_schedule
(
self
,
request
,
course_key
):
def
get_schedule
(
self
,
request
,
course_key
):
"""
"""
...
@@ -93,7 +102,8 @@ class LearnerAnalyticsView(View):
...
@@ -93,7 +102,8 @@ class LearnerAnalyticsView(View):
block_types_filter
=
[
'sequential'
]
block_types_filter
=
[
'sequential'
]
)
)
graded_blocks
=
{}
graded_blocks
=
{}
for
block
in
all_blocks
[
'blocks'
]:
for
(
location
,
block
)
in
all_blocks
[
'blocks'
]
.
iteritems
():
if
all_blocks
[
'blocks'
][
block
]
.
get
(
'graded'
,
False
):
if
block
.
get
(
'graded'
,
False
)
and
block
.
get
(
'due'
)
is
not
None
:
graded_blocks
[
block
]
=
all_blocks
[
'blocks'
][
block
]
graded_blocks
[
location
]
=
block
block
[
'due'
]
=
block
[
'due'
]
.
isoformat
()
return
json
.
dumps
(
graded_blocks
)
return
json
.
dumps
(
graded_blocks
)
This diff is collapsed.
Click to expand it.
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