open-craft / xblock-poll

An XBlock for Polling users and displaying the result
GNU Affero General Public License v3.0
18 stars 66 forks source link

Enable webview for Poll & Survey blocks #29

Closed mtyaka closed 7 years ago

mtyaka commented 7 years ago

This enables mobile view. Over time we will work to improve the responsiveness of each webview version.

Testing:

  1. Add Survey and Poll blocks to your course.
  2. Publish the unit.
  3. Without this patch: verify that the course blocks API reports "student_view_multi_device": false for both blocks.
  4. With this patch: verify that the course blocks API reports "student_view_multi_device": true for both blocks.

Example of the course blocks API url is:

http://lms.mcka.local/api/courses/v1/blocks/?course_id=my/course/key&all_blocks=true&depth=all&requested_fields=student_view_multi_device&block_types_filter=poll,survey

NOTE 1: Course block API responses are cached, so you may see stale responses. One simple way to clear and rebuild the cache is to publish a random unit in your course.

NOTE 2: For some reason I can't get the course API to work with the DemoX course, it keeps errorring out for me. Please use a course other than the default DemoX to test this.

Reviewers:

mtyaka commented 7 years ago

Tests are failling because of https://github.com/open-craft/xblock-poll/commit/1686adc2d4beaf0feb46fc8d1bb89c32b410fc8d, which is included in the copy-change-patch branch we are basing this PR on (as that's what's used on McKA). It looks like tests were never adjusted for that change.