From 67a8ee1184e2c84373920520096de54a26983f2b Mon Sep 17 00:00:00 2001
From: Brian Wilson
Date: Wed, 16 Oct 2013 02:25:46 -0400
Subject: [PATCH] Revert remnants of disable-button, and how html editor is
invoked.
---
.../instructor/views/instructor_dashboard.py | 12 ++--------
lms/static/sass/base/_variables.scss | 5 +++++
.../courseware/instructor_dashboard.html | 22 +++----------------
3 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py
index 90ddf10963..b38d06f00a 100644
--- a/lms/djangoapps/instructor/views/instructor_dashboard.py
+++ b/lms/djangoapps/instructor/views/instructor_dashboard.py
@@ -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'),
diff --git a/lms/static/sass/base/_variables.scss b/lms/static/sass/base/_variables.scss
index 9d8820e369..c1bbcd5d6f 100644
--- a/lms/static/sass/base/_variables.scss
+++ b/lms/static/sass/base/_variables.scss
@@ -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
diff --git a/lms/templates/courseware/instructor_dashboard.html b/lms/templates/courseware/instructor_dashboard.html
index 3c340bed0b..ede9515fb8 100644
--- a/lms/templates/courseware/instructor_dashboard.html
+++ b/lms/templates/courseware/instructor_dashboard.html
@@ -173,7 +173,7 @@ function goto( mode)
-
+
@@ -370,25 +370,9 @@ function goto( mode)
${_("Enrollment Data")}
- % if disable_buttons:
-
-
-
- ${_("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']
- )}
-