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
21f65404
Commit
21f65404
authored
Dec 19, 2017
by
AlasdairSwan
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
67ff694a
02f01bd4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
openedx/features/learner_analytics/templates/learner_analytics/dashboard.html
+1
-1
openedx/features/learner_analytics/views.py
+14
-2
No files found.
openedx/features/learner_analytics/templates/learner_analytics/dashboard.html
View file @
21f65404
...
...
@@ -60,10 +60,10 @@ from openedx.features.course_experience import course_home_page_title
props={
'schedule': assignment_schedule,
'grading_policy': grading_policy,
'grades': assignment_grades,
}
)}
</div>
<p>
${assignment_grades}
</p>
</div>
</div>
</
%
block>
...
...
openedx/features/learner_analytics/views.py
View file @
21f65404
...
...
@@ -65,7 +65,15 @@ class LearnerAnalyticsView(View):
course_key: CourseKey
"""
course_grade
=
CourseGradeFactory
()
.
read
(
user
,
course_key
=
course_key
)
return
course_grade
.
subsection_grades
grades
=
{}
for
(
subsection
,
subsection_grade
)
in
course_grade
.
subsection_grades
.
iteritems
():
grades
[
unicode
(
subsection
)]
=
{
'assignment_type'
:
subsection_grade
.
format
,
'total_earned'
:
subsection_grade
.
graded_total
.
earned
,
'total_possible'
:
subsection_grade
.
graded_total
.
possible
,
}
return
json
.
dumps
(
grades
)
def
get_schedule
(
self
,
request
,
course_key
):
"""
...
...
@@ -84,4 +92,8 @@ class LearnerAnalyticsView(View):
requested_fields
=
[
'display_name'
,
'due'
,
'graded'
,
'format'
],
block_types_filter
=
[
'sequential'
]
)
return
all_blocks
graded_blocks
=
{}
for
block
in
all_blocks
[
'blocks'
]:
if
all_blocks
[
'blocks'
][
block
]
.
get
(
'graded'
,
False
):
graded_blocks
[
block
]
=
all_blocks
[
'blocks'
][
block
]
return
json
.
dumps
(
graded_blocks
)
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