Commit 67a8ee11 by Brian Wilson

Revert remnants of disable-button, and how html editor is invoked.

parent 9c94263d
......@@ -9,6 +9,7 @@ from mitxmako.shortcuts import render_to_response
from django.core.urlresolvers import reverse
from django.utils.html import escape
from django.http import Http404
from django.conf import settings
from xmodule_modifiers import wrap_xmodule
from xmodule.html_module import HtmlDescriptor
......@@ -50,12 +51,6 @@ def instructor_dashboard_2(request, course_id):
_section_analytics(course_id),
]
enrollment_count = sections[0]['enrollment_count']
disable_buttons = False
max_enrollment_for_buttons = settings.MITX_FEATURES.get("MAX_ENROLLMENT_INSTR_BUTTONS")
if max_enrollment_for_buttons is not None:
disable_buttons = enrollment_count > max_enrollment_for_buttons
if settings.MITX_FEATURES['ENABLE_INSTRUCTOR_EMAIL'] and is_studio_course:
sections.append(_section_send_email(course_id, access, course))
......@@ -63,7 +58,6 @@ def instructor_dashboard_2(request, course_id):
'course': course,
'old_dashboard_url': reverse('instructor_dashboard', kwargs={'course_id': course_id}),
'sections': sections,
'disable_buttons': disable_buttons,
}
return render_to_response('instructor/instructor_dashboard_2/instructor_dashboard_2.html', context)
......@@ -159,9 +153,7 @@ def _section_data_download(course_id):
def _section_send_email(course_id, access, course):
""" Provide data for the corresponding bulk email section """
html_module = HtmlDescriptor(course.system, DictFieldData({'data': ''}), ScopeIds(None, None, None, None))
fragment = course.system.render(html_module, 'studio_view')
fragment = wrap_xmodule('xmodule_edit.html', html_module, 'studio_view', fragment, None)
email_editor = fragment.content
email_editor = wrap_xmodule(html_module.get_html, html_module, 'xmodule_edit.html')()
section_data = {
'section_key': 'send_email',
'section_display_name': _('Email'),
......
......@@ -219,6 +219,11 @@ $action-secondary-disabled-fg: $white;
$header-graphic-super-color: $m-blue-d1;
$header-graphic-sub-color: $m-gray-d2;
// State-based colors
$error-color: $error-red;
$warning-color: $m-pink;
$confirm-color: $m-green;
// ====================
// MISC: visual horizontal rules
......
......@@ -173,7 +173,7 @@ function goto( mode)
</p>
<p>
<input type="submit" name="action" value="Download CSV of answer distributions" class="${'is-disabled' if disable_buttons else ''}">
<input type="submit" name="action" value="Download CSV of answer distributions">
<input type="submit" name="action" value="Dump description of graded assignments configuration">
</p>
<hr width="40%" style="align:left">
......@@ -370,25 +370,9 @@ function goto( mode)
<hr width="40%" style="align:left">
<h2>${_("Enrollment Data")}</h2>
% if disable_buttons:
<div class="msg msg-warning">
<div class="copy">
<p>
${_("Note: some of these buttons are known to time out for larger "
"courses. We have temporarily disabled those features for courses "
"with more than {max_enrollment} students. We are urgently working on "
"fixing this issue. Thank you for your patience as we continue "
"working to improve the platform!").format(
max_enrollment=settings.MITX_FEATURES['MAX_ENROLLMENT_INSTR_BUTTONS']
)}
</p>
</div>
</div>
% endif
<input type="submit" name="action" value="List enrolled students" class="${'is-disabled' if disable_buttons else ''}">
<input type="submit" name="action" value="List students who may enroll but may not have yet signed up" class="${'is-disabled' if disable_buttons else ''}">
<input type="submit" name="action" value="List enrolled students">
<input type="submit" name="action" value="List students who may enroll but may not have yet signed up">
<hr width="40%" style="align:left">
%if settings.MITX_FEATURES.get('REMOTE_GRADEBOOK_URL','') and instructor_access:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment