Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
problem-builder
Commits
b74d5d11
Commit
b74d5d11
authored
Jul 03, 2015
by
Tim Krones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename "Data Export" block to "Student Answers Dashboard" (user-facing
changes only).
parent
48fd5952
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
15 deletions
+15
-15
problem_builder/__init__.py
+1
-1
problem_builder/data_export.py
+7
-7
problem_builder/public/js/data_export.js
+1
-1
problem_builder/templates/html/data_export.html
+1
-1
problem_builder/tests/integration/test_data_export.py
+4
-4
setup.py
+1
-1
No files found.
problem_builder/__init__.py
View file @
b74d5d11
...
@@ -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
DataExport
Block
from
.data_export
import
StudentAnswersDashboard
Block
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
...
...
problem_builder/data_export.py
View file @
b74d5d11
...
@@ -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
DataExport
Block
(
XBlock
):
class
StudentAnswersDashboard
Block
(
XBlock
):
"""
"""
DataExport
Block: An XBlock for instructors to export student answers from a course.
StudentAnswersDashboard
Block: 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
(
'
DataExport
Block'
)
fragment
.
initialize_js
(
'
StudentAnswersDashboard
Block'
)
return
fragment
return
fragment
@property
@property
...
...
problem_builder/public/js/data_export.js
View file @
b74d5d11
function
DataExport
Block
(
runtime
,
element
)
{
function
StudentAnswersDashboard
Block
(
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:
...
...
problem_builder/templates/html/data_export.html
View file @
b74d5d11
{% 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>
...
...
problem_builder/tests/integration/test_data_export.py
View file @
b74d5d11
...
@@ -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
DataExport
Block
from
problem_builder.data_export
import
StudentAnswersDashboard
Block
class
MockTasksModule
(
object
):
class
MockTasksModule
(
object
):
...
@@ -40,10 +40,10 @@ class MockInstructorTaskModelsModule(object):
...
@@ -40,10 +40,10 @@ class MockInstructorTaskModelsModule(object):
]
]
class
DataExport
Test
(
SeleniumXBlockTest
):
class
StudentAnswersDashboard
Test
(
SeleniumXBlockTest
):
def
setUp
(
self
):
def
setUp
(
self
):
super
(
DataExport
Test
,
self
)
.
setUp
()
super
(
StudentAnswersDashboard
Test
,
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
(
DataExport
Block
,
'user_is_staff'
,
Mock
(
return_value
=
True
))
@patch.object
(
StudentAnswersDashboard
Block
,
'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'
)
...
...
setup.py
View file @
b74d5d11
...
@@ -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:
DataExport
Block'
,
'pb-data-export = problem_builder:
StudentAnswersDashboard
Block'
,
]
]
setup
(
setup
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment