Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-poll
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
edx
xblock-poll
Commits
3a06ef47
Commit
3a06ef47
authored
Jul 21, 2017
by
Matjaz Gregoric
Committed by
GitHub
Jul 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29 from open-craft/mtyaka/enable-webview
Enable webview for Poll & Survey blocks
parents
1686adc2
a0cba5e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
18 deletions
+2
-18
poll/poll.py
+2
-0
tests/integration/test_private_results.py
+0
-18
No files found.
poll/poll.py
View file @
3a06ef47
...
...
@@ -360,6 +360,7 @@ class PollBlock(PollBase):
else
:
return
None
@XBlock.supports
(
"multi_device"
)
# Mark as mobile-friendly
def
student_view
(
self
,
context
=
None
):
"""
The primary view of the PollBlock, shown to students
...
...
@@ -582,6 +583,7 @@ class SurveyBlock(PollBase):
choices
=
Dict
(
help
=
"The user's answers"
,
scope
=
Scope
.
user_state
)
event_namespace
=
'xblock.survey'
@XBlock.supports
(
"multi_device"
)
# Mark as mobile-friendly
def
student_view
(
self
,
context
=
None
):
"""
The primary view of the SurveyBlock, shown to students
...
...
tests/integration/test_private_results.py
View file @
3a06ef47
...
...
@@ -78,24 +78,6 @@ class TestPrivateResults(PollBaseTest):
@unpack
@data
(
*
scenarios
)
def
test_submit_button
(
self
,
page_name
,
names
):
self
.
go_to_page
(
page_name
)
submit
=
self
.
get_submit
()
self
.
assertIn
(
'Submit'
,
submit
.
get_attribute
(
'outerHTML'
))
self
.
make_selections
(
names
)
submit
.
click
()
self
.
wait_until_clickable
(
self
.
browser
.
find_element_by_css_selector
(
'.poll-voting-thanks'
))
self
.
assertIn
(
'Resubmit'
,
submit
.
get_attribute
(
'outerHTML'
),
'Resubmit'
)
# This should persist on page reload.
self
.
go_to_page
(
page_name
)
submit
=
self
.
get_submit
()
self
.
assertIn
(
'Resubmit'
,
submit
.
get_attribute
(
'outerHTML'
),
'Resubmit'
)
@unpack
@data
(
*
scenarios
)
def
test_feedback_display
(
self
,
page_name
,
names
):
self
.
go_to_page
(
page_name
)
self
.
assertFalse
(
self
.
browser
.
find_element_by_css_selector
(
'.poll-feedback'
)
.
is_displayed
())
...
...
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