Commit b74d5d11 by Tim Krones

Rename "Data Export" block to "Student Answers Dashboard" (user-facing

changes only).
parent 48fd5952
...@@ -2,7 +2,7 @@ from .mentoring import MentoringBlock ...@@ -2,7 +2,7 @@ from .mentoring import MentoringBlock
from .answer import AnswerBlock, AnswerRecapBlock from .answer import AnswerBlock, AnswerRecapBlock
from .choice import ChoiceBlock from .choice import ChoiceBlock
from .dashboard import DashboardBlock from .dashboard import DashboardBlock
from .data_export import DataExportBlock from .data_export import StudentAnswersDashboardBlock
from .mcq import MCQBlock, RatingBlock from .mcq import MCQBlock, RatingBlock
from .mrq import MRQBlock from .mrq import MRQBlock
from .message import MentoringMessageBlock from .message import MentoringMessageBlock
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# "AGPLv3". If not, see <http://www.gnu.org/licenses/>. # "AGPLv3". If not, see <http://www.gnu.org/licenses/>.
# #
""" """
Data Export: An XBlock for instructors to export student answers from a course. Student Answers Dashboard: An XBlock for instructors to export student answers from a course.
All processing is done offline. All processing is done offline.
""" """
...@@ -39,16 +39,16 @@ def _(text): ...@@ -39,16 +39,16 @@ def _(text):
@XBlock.needs("i18n") @XBlock.needs("i18n")
@XBlock.wants('user') @XBlock.wants('user')
class DataExportBlock(XBlock): class StudentAnswersDashboardBlock(XBlock):
""" """
DataExportBlock: An XBlock for instructors to export student answers from a course. StudentAnswersDashboardBlock: An XBlock for instructors to export student answers from a course.
All processing is done offline. All processing is done offline.
""" """
display_name = String( display_name = String(
display_name=_("Title (Display name)"), display_name=_("Title (Display name)"),
help=_("Title to display"), help=_("Title to display"),
default=_("Data Export"), default=_("Student Answers Dashboard"),
scope=Scope.settings scope=Scope.settings
) )
active_export_task_id = String( active_export_task_id = String(
...@@ -67,13 +67,13 @@ class DataExportBlock(XBlock): ...@@ -67,13 +67,13 @@ class DataExportBlock(XBlock):
@property @property
def display_name_with_default(self): def display_name_with_default(self):
return "Data Export" return "Student Answers Dashboard"
def author_view(self, context=None): def author_view(self, context=None):
""" Studio View """ """ Studio View """
# Warn the user that this block will only work from the LMS. (Since the CMS uses # Warn the user that this block will only work from the LMS. (Since the CMS uses
# different celery queues; our task listener is waiting for tasks on the LMS queue) # different celery queues; our task listener is waiting for tasks on the LMS queue)
return Fragment(u'<p>Data Export Block</p><p>This block only works from the LMS.</p>') return Fragment(u'<p>Student Answers Dashboard Block</p><p>This block only works from the LMS.</p>')
def check_pending_export(self): def check_pending_export(self):
""" """
...@@ -110,7 +110,7 @@ class DataExportBlock(XBlock): ...@@ -110,7 +110,7 @@ class DataExportBlock(XBlock):
fragment.add_css_url(self.runtime.local_resource_url(self, 'public/css/data_export.css')) fragment.add_css_url(self.runtime.local_resource_url(self, 'public/css/data_export.css'))
fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/data_export.js')) fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/data_export.js'))
fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/vendor/underscore-min.js')) fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/vendor/underscore-min.js'))
fragment.initialize_js('DataExportBlock') fragment.initialize_js('StudentAnswersDashboardBlock')
return fragment return fragment
@property @property
......
function DataExportBlock(runtime, element) { function StudentAnswersDashboardBlock(runtime, element) {
'use strict'; 'use strict';
var $element = $(element); var $element = $(element);
// Set up gettext in case it isn't available in the client runtime: // Set up gettext in case it isn't available in the client runtime:
......
{% load i18n %} {% load i18n %}
<h3>{% trans "Data Export" %}</h3> <h3>{% trans "Student Answers Dashboard" %}</h3>
<p>{% trans "You can export all student answers to multiple-choice questions and long-form answers to a CSV file here." %}</p> <p>{% trans "You can export all student answers to multiple-choice questions and long-form answers to a CSV file here." %}</p>
......
...@@ -6,7 +6,7 @@ from mock import patch, Mock ...@@ -6,7 +6,7 @@ from mock import patch, Mock
from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoSuchElementException
from xblockutils.base_test import SeleniumXBlockTest from xblockutils.base_test import SeleniumXBlockTest
from problem_builder.data_export import DataExportBlock from problem_builder.data_export import StudentAnswersDashboardBlock
class MockTasksModule(object): class MockTasksModule(object):
...@@ -40,10 +40,10 @@ class MockInstructorTaskModelsModule(object): ...@@ -40,10 +40,10 @@ class MockInstructorTaskModelsModule(object):
] ]
class DataExportTest(SeleniumXBlockTest): class StudentAnswersDashboardTest(SeleniumXBlockTest):
def setUp(self): def setUp(self):
super(DataExportTest, self).setUp() super(StudentAnswersDashboardTest, self).setUp()
self.set_scenario_xml(""" self.set_scenario_xml("""
<vertical_demo> <vertical_demo>
<pb-data-export url_name="data_export"/> <pb-data-export url_name="data_export"/>
...@@ -59,7 +59,7 @@ class DataExportTest(SeleniumXBlockTest): ...@@ -59,7 +59,7 @@ class DataExportTest(SeleniumXBlockTest):
'instructor_task': True, 'instructor_task': True,
'instructor_task.models': MockInstructorTaskModelsModule(), 'instructor_task.models': MockInstructorTaskModelsModule(),
}) })
@patch.object(DataExportBlock, 'user_is_staff', Mock(return_value=True)) @patch.object(StudentAnswersDashboardBlock, 'user_is_staff', Mock(return_value=True))
def test_data_export(self): def test_data_export(self):
data_export = self.go_to_view() data_export = self.go_to_view()
start_button = data_export.find_element_by_class_name('data-export-start') start_button = data_export.find_element_by_class_name('data-export-start')
......
...@@ -54,7 +54,7 @@ BLOCKS = [ ...@@ -54,7 +54,7 @@ BLOCKS = [
'pb-choice = problem_builder:ChoiceBlock', 'pb-choice = problem_builder:ChoiceBlock',
'pb-dashboard = problem_builder:DashboardBlock', 'pb-dashboard = problem_builder:DashboardBlock',
'pb-data-export = problem_builder:DataExportBlock', 'pb-data-export = problem_builder:StudentAnswersDashboardBlock',
] ]
setup( setup(
......
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