Merge pull request #4615 from edx/dcs/enrollment_count_dashboard
Show the enrollment counts for each mode on the instructor dashboard.
This commit is contained in:
@@ -141,7 +141,7 @@ Annotator.Plugin.Share = (function(_super) {
|
||||
event.preventDefault(); // disable normal link function so that it doesn't refresh the page
|
||||
annotation = share.getAnnotationFromId(event.currentTarget.attributes.annotationid);
|
||||
var _field = this;
|
||||
var ovaId = annotation.id,
|
||||
var ovaId = annotation.id;
|
||||
var title;
|
||||
if (method == 1) {
|
||||
title = 'Share';
|
||||
@@ -221,7 +221,7 @@ Annotator.Plugin.Share = (function(_super) {
|
||||
source=this.annotation.id;
|
||||
} else {// method 2
|
||||
var annotator = this.annotator;
|
||||
var editor = annotator.editor,
|
||||
var editor = annotator.editor;
|
||||
var textarea = $(editor.element).find('textarea')[0];
|
||||
|
||||
if (source == 'ovaText')
|
||||
@@ -258,7 +258,7 @@ Annotator.Plugin.Share = (function(_super) {
|
||||
The first option is to give a known id of an annotation
|
||||
Example http:// url.com/#id=rTcpOjIMT2aF1apDtboC-Q
|
||||
*/
|
||||
var API = {},
|
||||
var API = {};
|
||||
var ovaId = this.getParameterByName('ovaId'); // Method 1 (Obligatory)
|
||||
var start = this.getParameterByName('ovaStart'); // Method 2 (Obligatory)
|
||||
var end = this.getParameterByName('ovaEnd'); // Method 2 (Obligatory)
|
||||
|
||||
@@ -97,7 +97,7 @@ def instructor_dashboard_2(request, course_id):
|
||||
if is_studio_course:
|
||||
studio_url = get_cms_course_link(course)
|
||||
|
||||
enrollment_count = sections[0]['enrollment_count']
|
||||
enrollment_count = sections[0]['enrollment_count']['total']
|
||||
disable_buttons = False
|
||||
max_enrollment_for_buttons = settings.FEATURES.get("MAX_ENROLLMENT_INSTR_BUTTONS")
|
||||
if max_enrollment_for_buttons is not None:
|
||||
@@ -160,7 +160,7 @@ def _section_course_info(course_key, access):
|
||||
'access': access,
|
||||
'course_id': course_key,
|
||||
'course_display_name': course.display_name,
|
||||
'enrollment_count': CourseEnrollment.num_enrolled_in(course_key),
|
||||
'enrollment_count': CourseEnrollment.enrollment_counts(course_key),
|
||||
'has_started': course.has_started(),
|
||||
'has_ended': course.has_ended(),
|
||||
'list_instructor_tasks_url': reverse('list_instructor_tasks', kwargs={'course_id': course_key.to_deprecated_string()}),
|
||||
|
||||
@@ -774,6 +774,14 @@ input[name="subject"] {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
}
|
||||
table {
|
||||
tr {
|
||||
height: 21px;
|
||||
td {
|
||||
width: 120px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ecommerce-wrapper{
|
||||
|
||||
@@ -3,10 +3,24 @@
|
||||
|
||||
<div class="enrollment-wrapper">
|
||||
<h2>${_("Enrollment Information")}</h2>
|
||||
<span class="tip">${_("Total number of enrollees (instructors, staff members, and students)")}</span>
|
||||
## Translators: 'track' refers to the enrollment type ('honor', 'verified', or 'audit')
|
||||
<span class="tip">${_("Number of enrollees (instructors, staff members, and students) by track")}</span>
|
||||
<br/><br/>
|
||||
<span style="color: green;"><b>${ section_data['enrollment_count'] }</b></span>
|
||||
|
||||
<% modes = section_data['enrollment_count'] %>
|
||||
<table>
|
||||
<tr>
|
||||
<td>${_("Verified")}</td><td>${modes['verified']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${_("Audit")}</td><td>${modes['audit']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${_("Honor")}</td><td>${modes['honor']}</td>
|
||||
</tr>
|
||||
<tr style="color:green;border-top:1px solid #000">
|
||||
<td style="padding-top:10px;"><b>${_("Total")}</b></td><td style="padding-top:10px;"><b>${modes['total']}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user