Giter Club home page Giter Club logo

xblock-drag-and-drop-v2's Introduction

Drag and Drop XBlock v2

This XBlock implements a friendly drag-and-drop style problem, where the learner has to drag items to zones on a target image.

The editor is fully guided. Features include:

  • custom target image
  • free target zone positioning and sizing
  • custom zone labels
  • ability to show or hide zone borders
  • custom text and background colors for items
  • auto-alignment for items: left, right, center
  • image items
  • decoy items that don't have a zone
  • feedback popups for both correct and incorrect attempts
  • introductory and final feedback

The XBlock supports progressive grading and keeps progress across refreshes. All checking and record keeping is done on the server side.

The following screenshot shows the Drag and Drop XBlock rendered inside the edX LMS before the user starts solving the problem:

Student view start

This screenshot shows the XBlock after the learner successfully completed the Drag and Drop problem:

Student view finish

Installation

Install the requirements into the Python virtual environment of your edx-platform installation by running the following command from the root folder:

$ pip install -r requirements.txt

Theming

The Drag and Drop XBlock ships with an alternate theme called "Apros" that you can enable by adding the following entry to XBLOCK_SETTINGS in lms.env.json:

        "drag-and-drop-v2": {
            "theme": {
                "package": "drag_and_drop_v2",
                "locations": ["public/themes/apros.css"]
            }
        }

You can use the same approach to apply a custom theme:

"package" can refer to any Python package in your virtualenv, which means you can develop and maintain your own theme in a separate package. There is no need to fork or modify this repository in any way to customize the look and feel of your Drag and Drop problems.

"locations" is a list of relative paths pointing to CSS files belonging to your theme. While the XBlock loads, files will be added to it in the order that they appear in this list. (This means that if there are rules with identical selectors spread out over different files, rules in files that appear later in the list will take precedence over those that appear earlier.)

Finally, note that the default (unthemed) appearance of the Drag and Drop XBlock has been optimized for accessibility, so its use is encouraged -- especially for courses targeting large and/or potentially diverse audiences.

Enabling in Studio

Drag and Drop v2 XBlock is already included in Open edX.

You will find it in "Add New Component" box in Studio: click the green Problem button, choose the the Advanced tab and choose Drag and Drop.

Usage

The Drag and Drop XBlock features an interactive editor. Add the Drag and Drop component to a lesson, then click the EDIT button.

Edit view

In the first step, you can set some basic properties of the component, such as the title, the problem mode, the maximum number of attempts, the maximum score, the problem text to render above the background image, the introductory feedback (shown initially), and the final feedback (shown after the learner successfully completes the drag and drop problem, or when the learner runs out of attempts).

There are two problem modes available:

  • Standard: In this mode, the learner gets immediate feedback on each attempt to place an item, and the number of attempts is not limited.
  • Assessment: In this mode, the learner places all items on the board and then clicks a "Submit" button to get feedback.
    • The number of attempts can be limited.
    • The learner can click a "Show Answer" button to temporarily place items on their correct drop zones.
      You can select one of the pre-defined conditions for displaying this button. They work in the same way as in the Problem XBlock, so you can read about each them in the Problem Component documentation.
      By default, the value from the course "Advanced Settings" configuration is used. If you have modified this for a specific XBlock but want to switch back to using the default value, select the "Default" option.

Drop zone edit

In the next step, you set the URL and description for the background image and define the properties of the drop zones. For each zone you can specify the text that should be rendered inside it (the "zone label"), how wide and tall it should be, and where it should be placed on the background image. In this step you can also specify whether you would like zone labels to be shown to learners or not, as well as whether or not to display borders outlining the zones. It is possible to define an arbitrary number of drop zones as long as their labels are unique.

You can specify the alignment for items once they are dropped in the zone. Centered alignment is the default, and places items from top to bottom along the center of the zone. Left alignment causes dropped items to be placed from left to right across the zone. Right alignment causes the items to be placed from right to left across the zone. Items dropped in a zone will not overlap, but if the zone is not made large enough for all its items, they will overflow the bottom of the zone, and potentially overlap the zones below.

Drag item edit

In the final step, you define the background and text color for drag items, as well as the drag items themselves. A drag item can contain either text or an image. You can define custom success and error feedback for each item. In standard mode, the feedback text is displayed in a popup after the learner drops the item on a zone - the success feedback is shown if the item is dropped on a correct zone, while the error feedback is shown when dropping the item on an incorrect drop zone. In assessment mode, the success feedback texts are not used, while error feedback texts are shown when learner submits a solution.

You can select any number of zones for an item to belong to using the checkboxes; all zones defined in the previous step are available. You can leave all of the checkboxes unchecked in order to create a "decoy" item that doesn't belong to any zone.

You can define an arbitrary number of drag items, each of which may be attached to any number of zones.

"Maximum items per Zone" setting controls how many items can be dropped into a single zone, allowing some degree of control over items overlapping zones below.

Scoring

Student assessment scores for the Drag and Drop XBlock are calculated according to the following formula:

score = (C + D) / T

Where C is the number of correctly placed regular items, D is the number of decoy items that were correctly left unplaced, and T is the total number of items available.

Example: consider a Drag and Drop instance configured with a total of four items, of which three are regular items and one is a decoy. If a learner places two of the normal items correctly and one incorrectly (C = 2), and wrongly places the decoy item onto a drop zone (D = 0), that learner's score will be 50%, as given by:

score = (2 + 0) / 4

If the learner were to then move the decoy item back to the bank (D = 1) and move the wrongly placed regular item to the correct dropzone (C = 3), their score would be 100%:

score = (3 + 1) / 4

Optionally, there is an alternative grading that can be enabled, by setting the waffle flag drag_and_drop_v2.grading_ignore_decoys, which will drop the decoy items entirely from the score calculation. The formula will change to:

score = C / R

Where C is the number of correctly placed regular items, R is the number of required regular items.

Demo Course

Export of a demo course that showcases various Drag and Drop v2 features is available at github.com/open-craft/demo-courses/archive/drag-and-drop-v2.tar.gz.

Analytics Events

The following analytics events are provided by this block.

edx.drag_and_drop_v2.loaded

Fired when the Drag and Drop XBlock is finished loading.

Example ("common" fields that are not interesting in this context have been left out):

{
...
    "event": {},
    "event_source": "server",                              --  Common field, contains event source.
    "event_type": "edx.drag_and_drop_v2.loaded",           --  Common field, contains event name.
...

Real event example (taken from a devstack):

{
    "username": "staff",
    "event_type": "edx.drag_and_drop_v2.loaded",
    "ip": "10.0.2.2",
    "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0",
    "host": "precise64",
    "referer": "http://example.com/courses/course-v1:DnD+DnD+DnD/courseware/ec546c58d2f447b7a9223c57b5de7344/756071f8de7f47c3b0ae726586ebbe16/1?activate_block_id=block-v1%3ADnD%2BDnD%2BDnD%2Btype%40vertical%2Bblock%40d2fc47476ca14c55816c4a1264a27280",
    "accept_language": "en;q=1.0, en;q=0.5",
    "event": {},
    "event_source": "server",
    "context": {
        "course_user_tags": {},
        "user_id": 5,
        "org_id": "DnD",
        "module": {
            "usage_key": "block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@6b80ce1e8b78426898b47a834d72ffd3",
            "display_name": "Drag and Drop"
        },
        "course_id": "course-v1:DnD+DnD+DnD",
        "path": "/courses/course-v1:DnD+DnD+DnD/xblock/block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@6b80ce1e8b78426898b47a834d72ffd3/handler/publish_event"
    },
    "time": "2016-01-13T01:52:41.330049+00:00",
    "page": "x_module"
}

edx.drag_and_drop_v2.item.picked_up

Fired when a learner picks up a draggable item.

Example ("common" fields that are not interesting in this context have been left out):

{
...
    "event": {
      "item_id": 0,                                        --  ID of the draggable item.
    },
    "event_source": "server",                              --  Common field, contains event source.
    "event_type": "edx.drag_and_drop_v2.picked_up",        --  Common field, contains event name.
...

Real event example (taken from a devstack):

{
    "username": "staff",
    "event_type": "edx.drag_and_drop_v2.item.picked_up",
    "ip": "10.0.2.2",
    "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0",
    "host": "precise64",
    "referer": "http://example.com/courses/course-v1:DnD+DnD+DnD/courseware/ec546c58d2f447b7a9223c57b5de7344/756071f8de7f47c3b0ae726586ebbe16/1?activate_block_id=block-v1%3ADnD%2BDnD%2BDnD%2Btype%40vertical%2Bblock%40d2fc47476ca14c55816c4a1264a27280",
    "accept_language": "en;q=1.0, en;q=0.5",
    "event": {
        "item_id": 0,
    },
    "event_source": "server",
    "context": {
        "course_user_tags": {},
        "user_id": 5,
        "org_id": "DnD",
        "module": {
            "usage_key": "block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@6b80ce1e8b78426898b47a834d72ffd3",
            "display_name": "Drag and Drop"
        },
        "course_id": "course-v1:DnD+DnD+DnD",
        "path": "/courses/course-v1:DnD+DnD+DnD/xblock/block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@6b80ce1e8b78426898b47a834d72ffd3/handler/publish_event"
    },
    "time": "2016-01-13T01:58:44.395935+00:00",
    "page": "x_module"
}

edx.drag_and_drop_v2.item.dropped

Fired when a learner drops a draggable item.

This event will be emitted when a learner drops a draggable item.

Example ("common" fields that are not interesting in this context have been left out):

{
...
    "event": {
      "is_correct": true,                                  --  Whether the draggable item has been placed in the correct location.
      "item": "Goes to the top",                           --  Name, or in the absence thereof, image URL of the draggable item.
      "item_id": 0,                                        --  ID of the draggable item.
      "location": "The Top Zone",                          --  Name of the location the item was dragged to.
      "location_id": 1,                                    --  ID of the location the item was dragged to.
    },
    "event_source": "server",                              --  Common field, contains event source.
    "event_type": "edx.drag_and_drop_v2.dropped",          --  Common field, contains event name.
...

Real event example (taken from a devstack):

{
    "username": "staff",
    "event_type": "edx.drag_and_drop_v2.item.dropped",
    "ip": "10.0.2.2",
    "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0",
    "host": "precise64",
    "referer": "http://example.com/courses/course-v1:DnD+DnD+DnD/courseware/ec546c58d2f447b7a9223c57b5de7344/756071f8de7f47c3b0ae726586ebbe16/1?activate_block_id=block-v1%3ADnD%2BDnD%2BDnD%2Btype%40vertical%2Bblock%40d2fc47476ca14c55816c4a1264a27280",
    "accept_language": "en;q=1.0, en;q=0.5",
    "event": {
        "is_correct": true,
        "location": "The Top Zone",
        "location_id": 1,
        "item": "Goes to the top",
        "item_id": 0,
    },
    "event_source": "server",
    "context": {
        "course_user_tags": {},
        "user_id": 5,
        "org_id": "DnD",
        "module": {
            "usage_key": "block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@6b80ce1e8b78426898b47a834d72ffd3",
            "display_name": "Drag and Drop"
        },
        "course_id": "course-v1:DnD+DnD+DnD",
        "path": "/courses/course-v1:DnD+DnD+DnD/xblock/block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@6b80ce1e8b78426898b47a834d72ffd3/handler/do_attempt"
    },
    "time": "2016-01-13T01:58:45.202313+00:00",
    "page": "x_module"
}

edx.drag_and_drop_v2.feedback.opened

Fired when the feedback pop-up is opened.

Example ("common" fields that are not interesting in this context have been left out):

{
...
    "event": {
      "content": "Correct! This one belongs to The Top Zone.",  --  Content of the feedback popup.
      "truncated": false,                                       --  Boolean indicating whether "content" field was truncated.
    },
    "event_source": "server",                                   --  Common field, contains event source.
    "event_type": "edx.drag_and_drop_v2.feedback.opened",       --  Common field, contains event name.
...

Real event example (taken from a devstack):

{
    "username": "staff",
    "event_type": "edx.drag_and_drop_v2.feedback.opened",
    "ip": "10.0.2.2",
    "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0",
    "host": "precise64",
    "referer": "http://example.com/courses/course-v1:DnD+DnD+DnD/courseware/ec546c58d2f447b7a9223c57b5de7344/756071f8de7f47c3b0ae726586ebbe16/1?activate_block_id=block-v1%3ADnD%2BDnD%2BDnD%2Btype%40vertical%2Bblock%40d2fc47476ca14c55816c4a1264a27280",
    "accept_language": "en;q=1.0, en;q=0.5",
    "event": {
        "content": "Correct! This one belongs to The Top Zone.",
        "truncated": false,
    },
    "event_source": "server",
    "context": {
        "course_user_tags": {},
        "user_id": 5,
        "org_id": "DnD",
        "module": {
            "usage_key": "block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@6b80ce1e8b78426898b47a834d72ffd3",
            "display_name": "Drag and Drop"
        },
        "course_id": "course-v1:DnD+DnD+DnD",
        "path": "/courses/course-v1:DnD+DnD+DnD/xblock/block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@6b80ce1e8b78426898b47a834d72ffd3/handler/publish_event"
    },
    "time": "2016-01-13T01:58:45.844986+00:00",
    "page": "x_module"
}

edx.drag_and_drop_v2.feedback.closed

Fired when the feedback popup is closed.

Example ("common" fields that are not interesting in this context have been left out):

{
...
    "event": {
      "content": "No, this item does not belong here. Try again." --  Message of the feedback popup that was closed.
      "manually": true,                                           --  Whether or not the user closed the feedback window manually or if it was auto-closed.
      "truncated": false,                                         --  Boolean indicating whether "content" field was truncated.
    },
    "event_source": "server",                                     --  Common field, contains event source.
    "event_type": "edx.drag_and_drop_v2.feedback.closed",         --  Common field, contains event name.
...

Real event example (taken from a devstack):

{
    "username": "staff",
    "event_type": "edx.drag_and_drop_v2.feedback.closed",
    "ip": "10.0.2.2",
    "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0",
    "host": "precise64",
    "referer": "http://example.com/courses/course-v1:DnD+DnD+DnD/courseware/ec546c58d2f447b7a9223c57b5de7344/756071f8de7f47c3b0ae726586ebbe16/1?activate_block_id=block-v1%3ADnD%2BDnD%2BDnD%2Btype%40vertical%2Bblock%40d2fc47476ca14c55816c4a1264a27280",
    "accept_language": "en;q=1.0, en;q=0.5",
    "event": {
        "content": "No, this item does not belong here. Try again."
        "manually": true
        "truncated": false,
    },
    "event_source": "server",
    "context": {
        "course_user_tags": {},
        "user_id": 5,
        "org_id": "DnD",
        "module": {
            "usage_key": "block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@13d1b859a2304c858e1810ccc23f29b2",
            "display_name": "Drag and Drop"
        },
        "course_id": "course-v1:DnD+DnD+DnD",
        "path": "/courses/course-v1:DnD+DnD+DnD/xblock/block-v1:DnD+DnD+DnD+type@drag-and-drop-v2+block@13d1b859a2304c858e1810ccc23f29b2/handler/publish_event"
    },
    "time": "2016-01-13T02:07:00.988534+00:00",
    "page": "x_module"
}

Testing with tox

Inside a fresh virtualenv, cd into the root folder of this repository (xblock-drag-and-drop-v2) and run:

$ make requirements

You can then run the entire test suite via:

$ make test

To run specific test groups, use one of the following commands:

$ make test.unit
$ make test.quality
$ make test.translations

To run individual unit tests, use:

$ make test.unit TEST=tests/unit/test_basics.py::BasicTests::test_student_view_data

Manual testing (without tox)

To run tests without tox, use:

$ make requirements_python
$ make test.python TEST=tests/unit/test_basics.py::BasicTests::test_student_view_data

i18n compatibility

According to edX docs on XBlock i18n, LMS runtime is capable of supporting XBlock i18n and l10n. To comply with l10n requirements, XBlock is supposed to provide translations in xblock_package_root/translations/locale_code/LC_MESSAGES/text.po folder in GNU Gettext Portable Object file format.

Drag and Drop v2 XBlock aims to comply with i18n requirements for Open edX platform, including a stricter set of requirements for edx.org itself, thus providing the required files. So far only two translations are available:

  • Default English translation
  • Fake "Esperanto" translation used to test i18n/l10n.

Updates to translated strings are supposed to be propagated to text.po files. EdX i18n_tools is used here along GNU Gettext and a Makefile for automation.

Note: currently translations directory is a symbolic link to conf/locale directory. Also, 'text.po' file for locale code en is a symbolic link to conf/locale/en/LC_MESSAGES/django.po file. Both links works as a transition step to fully moving translation files to openedx-translations repository

Translatable strings

$ make extract_translations

Note that this command generates text.po which is supposed to contain all translatable strings.

To check if text.po is correct, one can run:

$ make compile_translations

If everything is correct, it will create translations/en/LC_MESSAGES/text.mo and locale/en/LC_MESSAGES/text.js files.

Building fake "Esperanto" translation

As previously said, this fake translation mainly exists for testing reasons. For edX platform it is built using Dummy translator from edX i18n-tools.

$ make dummy_translations

Transifex translations

If you want to download translations from run this command while inside project root directory

$ make pull_translations

Translations can be pushed to Transifex with:

$ make push_translations

Native API

Further information on the API for native mobile applications can be found here.

Releasing

To release a new version, update .travis.yml and setup.py to point to your new intended version number and create a new release with that version tag via Github.

xblock-drag-and-drop-v2's People

Contributors

abodacs avatar agrendalath avatar ahtishamshahid avatar antoviaque avatar arbrandes avatar awais786 avatar awaisdar001 avatar bradenmacdonald avatar davidjoy avatar dawoudsheraz avatar dragonfi avatar e-kolpakov avatar edx-requirements-bot avatar feanil avatar filosottile avatar haikuginger avatar itsjeyd avatar kaizoku avatar kaustavb12 avatar kelketek avatar mtyaka avatar nedbat avatar omarithawi avatar pomegranited avatar sarina avatar shadinaif avatar smarnach avatar usamasadiq avatar xirdneh avatar ziafazal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xblock-drag-and-drop-v2's Issues

update for WCAG 2.2 conformance once finalized

https://www.w3.org/WAI/WCAG22/Understanding/dragging-movements
WCAG 2.2 is expected to be finalized ~December 2022.

A new accessibility requirement is designed to make it possible to drag without actually dragging; one should be able to perform the action with tap/touch/click events. I suggest the solution to this is to show four buttons (up, down, left, right arrow icons; or just up, down icons) surrounding an item's bounding box, when it is in Grabbed state. The user can then click on the buttons to move the item.

Given that we want this xBlock to work for people who have vision impairments, I think it might be best to have the arrow button actions move the grabbed item sequentially through the potential drop targets (centered on each drop zone). For that to work it might make most sense to have only two arrow buttons (to avoid missing any drop targets). Thoughts?

With this enhancement (or whatever is done to satisfy this WCAG requirement), I suggest bumping the version number to 3.

Error when loading on cms (juniper version)

Grettings.

After installing the xblock and using compiling the assets the drag and drop problem doesn't load due the following error:

  • ReferenceError: virtualDom is not defined.

drag-and-drop2

And because of this error the others components stop working as well (attaching capture).

I'm currently using the openedx open-release/juniper.1.

drag-and-drop

These are the following steps I've been using to install:

edxapp: cd /edx/app/edxapp
edxapp: source venvs/edxapp/bin/activate
edxapp: cd xblocks
edxapp: git clone https://github.com/edx-solutions/xblock-drag-and-drop-v2.git
edxapp: pip install xblocks/xblock-drag-and-drop-v2
edxapp: cd /edx/app/edxapp/edx-platform
edxapp: paver update_assets cms --settings=production

Thanks in advance.

Regards.

can't change the image

can't change the image. when I set an image, for example
/static/map.jpg

and click "change image"

it will leave the setting.

When I set the URL, it does not work, either.

image

Remove bok-choy usage

This repo's integration tests still use the bok-choy framework, which openedx/public-engineering#13. The bok-choy repository is no longer being maintained, and it will soon be archived.

Once the bok-choy repo is archived, the tests should continue working, as we will not be removing the package's releases from PyPI. For long-term maintainability of this repo, though, the tests should eventually be upgraded to a non-bok-choy testing framework or removed.

Publish this package to PyPI

Background

This package is currently installed into edx-platform directly from GitHub. This is non-ideal because:

  • GitHub-hosted requirements take significantly longer (> 4x) to install than PyPI-hosted requirements (I care about this for Tutor build speed :)
  • GitHub-hosted requirement pins cannot be upgraded using our standard make upgrade workflow.

Request

  • Audit this package's setup.py to make sure it looks right before publishing. You can test it out by:
    • creating a virtual environment
    • installing package requirements
    • running python setup.py sdist bdist_wheel
    • checking the contents of the generated dist/ folder. The folder should contain a .tar.gz that can be unpacked, yielding the contents of what would be pushed to PyPI. The unpacked .tar.gz should include all Python source files (other than test files) as well as a LICENSE and any assets/resources needed for the block to work.
  • Publish this package to PyPI whenever a release happens. Open edX provides a workflow template for this: https://github.com/openedx/xblock-drag-and-drop-v2/actions/new?category=owner
  • Create a release in order to trigger an initial publish to PyPI
  • In edx-platform, remove the xblock-drag-and-drop-v2 GitHub pin from github.in, and add xblock-drag-and-drop-v2 to base.in, which holds all PyPI-hosted base dependencies. Run make upgrade so that the change is reflected in the requirements *.txt files.

Juniper compatibility

Hi there,

I wanted to know if xblock-drag-and-drop-v2 xBlock is already Juniper (Python 3 and Django 2.2) compatible and if not, is there any plan to update it for Juniper? Or are you open to contributions?

Thanks.

cc @davidjoy @AhtishamShahid

does not load in LMS

I successfully installed this fantastic xblock.
then I enabled it and added a new problem of drag_and_drop_v2 to a unit of my course.
but when I check that unit using an student user via lms the loading message remains on the page
checking the console there showed me some messages like this

GET http://localhost/xblock/resource/drag-and-drop-v2/public/css/drag_and_drop.css net::ERR_CONNECTION_REFUSED

On the page source view this is wrong I think:

changing localhost with my own domain should solve this.
sorry I'm not expert in python to help

Remove xblockutils package

Parent ticket: openedx/axim-engineering#915

This repository is using the xblock-utils package which has been deprecated and migrated to within the xblock package.

In this ticket, we will:

Tasks

Dimensions of the Drag-and-Drop problem block do not adjust to a mobile screen size

This is a copy of a 2022-01-28 issue from 2U's internal Jira tracker that we think is still unresolved, and we'd like some help from OpenCraft in resolving if possible.


Hello,

A partner reached out to us on behalf of learners. Dimensions of the Drag-and-Drop problem block do not adjust to a mobile screen size (see picture attached), creating an almost impossible mobile learning experience. The workaround is for learners to do Drag-and-Drop problems on Desktop. Could this please be fixed?


  1. Steps to Reproduce w/ links

    1. Go to https://learning.edx.org/course/course-v1:IsraelX+infosec101+3T2020/block-v1:IsraelX+infosec101+3T2020+type@sequential+block@d65c63d022f742769bbc52e2dfa842e0/block-v1:IsraelX+infosec101+3T2020+type@vertical+block@f264725a22ad4ab999673a5b9ccc401b
    2. View problem in mobile app as learner
  2. Expected Behavior Vs. Actual Behavior
    Expected Behavior: Learners expect Drag-and-Drop problem blocks to adjust to their mobile screen size
    Actual Behavior: When learners access Drag-and-Drop problem blocks on mobile, the problem are cropped and make it nearly impossible to submit answers

  3. What are the implications to our business?
    Learners are unable to easily interact with Drag-and-Drop problem blocks on mobile impacting their overall learning experience and grades

Screen Shot 2022-01-28 at 2 59 55 PM
Screen Shot 2022-01-28 at 3 00 10 PM

Update from Colin Brash on 2022-06-17

Unfortunately this is not an app issue. This is an issue with that drag-and-drop block not being responsive. If you inspect this page on a desktop browser and change the viewport size, this block does not change width. The same thing would happen in a mobile browser.

I’m out of my area of expertise here, but I see the background image used is 2002x1125px. Maybe it is not scaling correctly? It also looks like the drag-and-drop items (“encryption”, “decryption”, etc.) are not scaling either.

That said, I’m not sure what this should look like if it were scaled down. It seems to me it would be too small to actually interact with. Perhaps it could be allowed to scale down further than it is currently, though?

image-20220617-151720

image-20220617-151902

Fix size of 'pieces', no border

I'm creating a question in which students assemble a puzzle by putting components into the correct place on the background image. To be precise, they see this background image:

and have pieces to fill in:

etc...

such that the final result should look like this:

I can create zones that match the locations for the pieces with no problems:
image

and I can set the percentage width that the pieces should take up in the image, but the pieces are given a blue border that I can't remove, such that the 'puzzle' looks like:

screen shot 2019-01-29 at 2 07 45 pm

This could be fixed by removing the border on images, or allowing it's width to be set to 0. Is there a way I can do this?

It would be nice, although isn't strictly necessary, to specify that the pieces merely use the same resolution as the background image, as this would size them appropriately without having to do the percentage adjustment.

Enabling translations

Hello!
I'm trying to enable translations for this xblock but I can't seem to do it successfully. I've compiled the eo language .po file to the .mo file and enabled eo language in studio with ?preview-lang=eo, everything changed to Esperanto but not the text in the edit modal of this xblock.
How can I enable the translations?

UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 13: ordinal not in range(128)

Hi!

We are seeing some string encoding errors with this xblock, Ginkgo release. Here is some logs:

==> /edx/var/log/cms/edx.log <==
Jan 18 09:20:18 localhost [service_variant=cms][contentstore.views.preview][env:sandbox] WARNING [localhost  12088] [preview.py:318] - Unable to render author_view for <VerticalBlockWithMixins @AB36 visible_to_staff_only=False, graded=False, annotation_token_secret=u'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', hide_after_due=False, giturl=None, edxnotes=False, source_file=None, course_edit_method=u'Studio', default_tab=None, children=[BlockUsageLocator(CourseLocator(u'Cibercolegio', u'PRETI03', u'Maestro', None, None), u'drag-and-drop-v2', u'01deedaf62394b62ac37104da73687a6'), BlockUsageLocator(CourseLocator(u'Cibercolegio', u'PRETI03', u'Maestro', None, None), u'problem', u'7677d15e97a04fecb4da359fb77fd52d'), BlockUsageLocator(CourseLocator(u'Cibercolegio', u'PRETI03', u'Maestro', None, None), u'problem', u'e65300453a2c495f8c1b6b89dbe030d2'), BlockUsageLocator(CourseLocator(u'Cibercolegio', u'PRETI03', u'Maestro', None, None), u'problem', u'0667a127c6e64cf6b2029fb24ac2b8d4'), BlockUsageLocator(CourseLocator(u'Cibercolegio', u'PRETI03', u'Maestro', None, None), u'drag-and-drop-v2', u'6f72b74c7d804435a844f62f9c923ca4')], in_entrance_exam=False, showanswer=u'finished', display_name=u'P1L3 | Act : Conceptualizaci\xf3n', video_speed_optimizations=True, graceperiod=None, format=None, due=None, start=datetime.datetime(2030, 1, 1, 0, 0, tzinfo=tzutc()), xml_attributes={u'filename': [u'', None]}, video_bumper={}, max_attempts=None, parent=BlockUsageLocator(CourseLocator(u'Cibercolegio', u'PRETI03', u'Maestro', None, None), u'sequential', u'46e7967cfae84233a01d2796aafb786d'), tags=[], matlab_api_key=None, xqa_key=None, is_entrance_exam=False, annotation_storage_url=u'http://your_annotation_storage.com', use_latex_compiler=False, days_early_for_beta=None, show_correctness=u'always', static_asset_path=u'', name=None, hide_from_toc=False, group_access={}, rerandomize=u'never', user_partitions=[], chrome=None, edxnotes_visibility=True, position=None, show_reset_button=False, self_paced=False>
Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/preview.py", line 316, in get_preview_fragment
    fragment = module.render(preview_view, context)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1894, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1302, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/xblock/runtime.py", line 808, in render
    frag = view_fn(context)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 99, in author_view
    self.render_children(context, fragment, can_reorder=True, can_add=True)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/studio_editable.py", line 26, in render_children
    rendered_child = child.render(StudioEditableModule.get_preview_view_name(child), context)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
    return self.runtime.render(self, view, context)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1894, in render
    return self.__getattr__('render')(block, view_name, context)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1302, in render
    return super(MetricsMixin, self).render(block, view_name, context=context)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/xblock/runtime.py", line 808, in render
    frag = view_fn(context)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/drag_and_drop_v2/drag_and_drop_v2.py", line 266, in student_view
    fragment.initialize_js('DragAndDropBlock', self.get_configuration())
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/drag_and_drop_v2/drag_and_drop_v2.py", line 308, in get_configuration
    "items": items_without_answers(),
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/drag_and_drop_v2/drag_and_drop_v2.py", line 292, in items_without_answers
    item['expandedImageURL'] = self._expand_static_url(image_url)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/drag_and_drop_v2/drag_and_drop_v2.py", line 809, in _expand_static_url
    url = self.runtime.replace_urls('"{}"'.format(url))[1:-1]
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 13: ordinal not in range(128)

Any idea of how we should proceed?

Save progress

When using through the ui editor, saving on page 1 and page 2 isn't available. Is this intentional? There is a a lot of info involved between those pages, and things happen...a save would be helpful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.