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
b10b6e2b
Commit
b10b6e2b
authored
Dec 05, 2012
by
JM Van Thong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more analytics to instructor dashboard.
parent
39d48b19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
lms/djangoapps/instructor/views.py
+23
-1
lms/templates/courseware/instructor_dashboard.html
+25
-1
No files found.
lms/djangoapps/instructor/views.py
View file @
b10b6e2b
...
...
@@ -5,6 +5,8 @@ import csv
import
logging
import
os
import
urllib
import
datetime
from
datetime
import
datetime
,
timedelta
from
django.conf
import
settings
from
django.contrib.auth.models
import
User
,
Group
...
...
@@ -273,15 +275,33 @@ def instructor_dashboard(request, course_id):
analytics_json
=
None
students_enrolled_json
=
None
daily_activity_json
=
None
students_daily_activity_json
=
None
students_per_problem_correct_json
=
None
if
idash_mode
==
'Analytics'
:
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=StudentsPerHomework&course_id=
%
s"
%
course_id
)
analytics_json
=
req
.
json
# get the day
to_day
=
datetime
.
today
()
.
date
()
from_day
=
to_day
-
timedelta
(
days
=
7
)
# number of students active in the past 7 days (including current day)
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=StudentsDailyActivity&course_id=
%
s&from=
%
s"
%
(
course_id
,
from_day
))
students_daily_activity_json
=
req
.
json
# number of students per problem who have problem graded correct
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=StudentsPerProblemCorrect&course_id=
%
s&from=
%
s"
%
(
course_id
,
from_day
))
students_per_problem_correct_json
=
req
.
json
# number of students enrolled in this course
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=StudentsEnrolled&course_id=
%
s"
%
course_id
)
students_enrolled_json
=
req
.
json
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=DailyActivityAnalyzer&from=2012-11-19&to=2012-12-04&course_id=
%
s"
%
course_id
)
# number of students active in the past 7 days (including current day) --- online version!
to_day
=
datetime
.
today
()
.
date
()
from_day
=
to_day
-
timedelta
(
days
=
7
)
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=DailyActivityAnalyzer&course_id=
%
s&from=
%
s&to=
%
s"
%
(
course_id
,
from_day
,
to_day
))
daily_activity_json
=
req
.
json
#----------------------------------------
...
...
@@ -301,6 +321,8 @@ def instructor_dashboard(request, course_id):
'analytics_json'
:
analytics_json
,
'students_enrolled_json'
:
students_enrolled_json
,
'daily_activity_json'
:
daily_activity_json
,
'students_daily_activity_json'
:
students_daily_activity_json
,
'students_per_problem_correct_json'
:
students_per_problem_correct_json
,
}
return
render_to_response
(
'courseware/instructor_dashboard.html'
,
context
)
...
...
lms/templates/courseware/instructor_dashboard.html
View file @
b10b6e2b
...
...
@@ -180,6 +180,30 @@ function goto( mode)
</p>
<p>
<h2>
Daily activity for the past 7 days:
</h2>
<table
class=
"stat_table"
>
<tr><th>
Day
</td><th>
Number of students
</td></tr>
% for k,v in students_daily_activity_json['data'].items():
<tr>
<td>
${k}
</td>
<td>
${v}
</td>
</tr>
% endfor
</table>
</p>
<p>
<h2>
Number of students with correct problems for the past 7 days:
</h2>
<table
class=
"stat_table"
>
<tr><th>
Problem
</td><th>
Number of students
</td></tr>
% for k,v in students_per_problem_correct_json['data'].items():
<tr>
<td>
${k}
</td>
<td>
${v}
</td>
</tr>
% endfor
</table>
</p>
<p>
<h2>
Students who attempted at least one exercise:
</h2>
<div
class=
"divScroll"
>
...
...
@@ -196,7 +220,7 @@ function goto( mode)
</p>
<p>
<h2>
Daily activity:
</h2>
<h2>
Daily activity
(online version)
:
</h2>
<table
class=
"stat_table"
>
<tr><th>
Day
</td><th>
Number of students
</td></tr>
% for k,v in daily_activity_json['data'].items():
...
...
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