diff --git a/lms/djangoapps/instructor/views.py b/lms/djangoapps/instructor/views.py index 31faf8acb6..666a5d2025 100644 --- a/lms/djangoapps/instructor/views.py +++ b/lms/djangoapps/instructor/views.py @@ -271,12 +271,19 @@ def instructor_dashboard(request, course_id): # analytics analytics_json = None + students_enrolled_json = None + daily_activity_json = None if idash_mode == 'Analytics': - req = requests.get(settings.ANALYTICS_SERVER_URL + "get_daily_activity?sid=2") - #analytics_html = req.text + req = requests.get(settings.ANALYTICS_SERVER_URL + "get_analytics?aname=StudentsPerHomework&course_id=%s" % course_id) analytics_json = req.json - + + 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-11-27") + daily_activity_json = req.json + #---------------------------------------- # context for rendering context = {'course': course, @@ -292,6 +299,8 @@ def instructor_dashboard(request, course_id): 'course_errors': modulestore().get_item_errors(course.location), 'djangopid' : os.getpid(), 'analytics_json' : analytics_json, + 'students_enrolled_json' : students_enrolled_json, + 'daily_activity_json' : daily_activity_json, } return render_to_response('courseware/instructor_dashboard.html', context) diff --git a/lms/templates/courseware/instructor_dashboard.html b/lms/templates/courseware/instructor_dashboard.html index de619a6144..0d12fbc444 100644 --- a/lms/templates/courseware/instructor_dashboard.html +++ b/lms/templates/courseware/instructor_dashboard.html @@ -171,13 +171,34 @@ function goto( mode) ##----------------------------------------------------------------------------- %if modeflag.get('Analytics'): -
| Module | Number of students | ||
| ${r['day']} | ${r['student_count']} | +${k} | ${v} |
+ Daily activity: +
| Day | Number of students |
| ${k} | ${v} | +