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
27b8f01f
Commit
27b8f01f
authored
Dec 07, 2012
by
JM Van Thong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the following analyzers: StudentsActive, OverallGradeDistribution, StudentsDropoffPerDay.
parent
b10b6e2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
18 deletions
+72
-18
lms/djangoapps/instructor/views.py
+29
-10
lms/templates/courseware/instructor_dashboard.html
+43
-8
No files found.
lms/djangoapps/instructor/views.py
View file @
27b8f01f
...
...
@@ -274,36 +274,52 @@ def instructor_dashboard(request, course_id):
analytics_json
=
None
students_enrolled_json
=
None
students_active_json
=
None
daily_activity_json
=
None
students_daily_activity_json
=
None
students_per_problem_correct_json
=
None
overall_grade_distribution
=
None
dropoff_per_day
=
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
# get
current 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 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
# number of students active in the past 7 days (including current day), i.e. with at least one activity for the period
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=StudentsActive&course_id=
%
s&from=
%
s"
%
(
course_id
,
from_day
))
students_active_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
# grade distribution for the course
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=OverallGradeDistribution&course_id=
%
s"
%
(
course_id
,))
overall_grade_distribution
=
req
.
json
# number of students distribution drop off per day
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=StudentsDropoffPerDay&course_id=
%
s&from=
%
s"
%
(
course_id
,
from_day
))
dropoff_per_day
=
req
.
json
# number of students active in the past 7 days (including current day) --- online version!
# the following is ++incorrect++ use of studentmodule table
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 active in the past 7 days (including current day) --- online version! experimental
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
req
=
requests
.
get
(
settings
.
ANALYTICS_SERVER_URL
+
"get_analytics?aname=StudentsPerHomework&course_id=
%
s"
%
course_id
)
analytics_json
=
req
.
json
#----------------------------------------
# context for rendering
context
=
{
'course'
:
course
,
...
...
@@ -320,9 +336,12 @@ def instructor_dashboard(request, course_id):
'djangopid'
:
os
.
getpid
(),
'analytics_json'
:
analytics_json
,
'students_enrolled_json'
:
students_enrolled_json
,
'students_active_json'
:
students_active_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
,
'overall_grade_distribution'
:
overall_grade_distribution
,
'dropoff_per_day'
:
dropoff_per_day
,
}
return
render_to_response
(
'courseware/instructor_dashboard.html'
,
context
)
...
...
lms/templates/courseware/instructor_dashboard.html
View file @
27b8f01f
...
...
@@ -176,14 +176,19 @@ function goto( mode)
##-----------------------------------------------------------------------------
%if modeflag.get('Analytics'):
<p>
Number of students enrolled: ${students_enrolled_json['data']['nb_students_enrolled']}
<p>
Number of students enrolled: ${students_enrolled_json['data']['nb_students_enrolled']}
</p>
<p>
Number of active students for the past 7 days: ${students_active_json['data']['nb_students_active']}
</p>
<p>
<h2>
Daily activity for the past 7 days:
</h2>
<p>
Number of active students per problems who have this problem graded as correct:
</p>
<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><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>
...
...
@@ -192,19 +197,38 @@ function goto( mode)
</p>
<p>
<h2>
Number of students with correct problems for the past 7 days:
</h2>
<p>
Grade distribution:
</p>
<div
class=
"divScroll"
>
<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><th>
Grade
</th><th>
Number of students
</th></tr>
% for k,v in overall_grade_distribution['data'].items():
<tr>
<td>
${k}
</td>
<td>
${v}
</td>
</tr>
% endfor
</table>
</div>
</p>
<p>
<p>
Number of students who dropped off per day before becoming inactive:
</p>
<div
class=
"divScroll"
>
<table
class=
"stat_table"
>
<tr><th>
Day
</th><th>
Number of students
</th></tr>
% for k,v in dropoff_per_day['data'].items():
<tr>
<td>
${k}
</td>
<td>
${v}
</td>
</tr>
% endfor
</table>
</div>
</p>
<p>
<
h2>
Students who attempted at least one exercise:
</h2
>
<
p>
Students who attempted at least one exercise:
</p
>
<div
class=
"divScroll"
>
<table
class=
"stat_table"
>
...
...
@@ -231,6 +255,17 @@ function goto( mode)
</table>
</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>
%endif
...
...
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