Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-60910

Drag and Drop onto Image, using transparent pictures

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_400_STABLE, MOODLE_500_STABLE
    • MOODLE_500_STABLE
    • MDL-60910-master
    • Hide

      Initial setup

      1. Go to question bank and import the question questions-drag-drop-image.xml

      Testing for Drag and Drop onto image

      1. Login as admin > Go to any course > Go to the question bank
      2. Create the new 'Drag and Drop onto image' question OR import the sample question questions-drag-drop-image.xml 
      3. Go to the editing page of the question created above
      4. Observe the 'Drop zones' section
      5. Verify the new setting option added
      Expected: The new Drop zone visibility option be added to the editing page

      • Label: Drop zone visibility - Help icon
      • Type: Dropdown list - Value: Hide drop zones/Show drop zones
      • Help text inside the Help icon: Setting 'Hide drop zones' will make them invisible when the question is attempted. However, drag items will still snap to nearby drop zones. This setting is recommended if you have images over an image background and the normal drop zone indicators are not desired. Drop zone borders will remain visible while editing to help with placement.

      6. Verify the Drop zone visibility options apply for the Preview section:

        • Show drop zones:* At default, the existing behaviour should display as usual without transparency. 
        • Hide drop zones:* All draggable items and defined drop zones will have an opacity of 0, meaning they’ll be fully transparent. However, the border of the draggable items will remain visible to show the position of the drop zones.

      7. Clicking on 'Save changes and continue editing' OR 'Save changes' button 
      8. Go to the Preview question page
      9. Verify the dropzone's behaviour depending on which value is selected for the 'Drop zone visibility'.

      • If the option is chosen as Show drop zones: At default, the existing behaviour should display as usual without transparency. 
      • If the option is chosen as Hide drop zones: 
        When hovering or dragging and dropping the item should be transparent (opacity of 0)
        When dragged into the dropzone, the item should be transparent and the border of the background should be hidden

       

      Show
      Initial setup Go to question bank and import the question questions-drag-drop-image.xml Testing for Drag and Drop onto image 1. Login as admin > Go to any course > Go to the question bank 2. Create the new 'Drag and Drop onto image' question OR import the sample question questions-drag-drop-image.xml  3. Go to the editing page of the question created above 4. Observe the 'Drop zones' section 5. Verify the new setting option added Expected: The new Drop zone visibility option be added to the editing page Label: Drop zone visibility - Help icon Type: Dropdown list - Value: Hide drop zones/Show drop zones Help text inside the Help icon: Setting 'Hide drop zones' will make them invisible when the question is attempted. However, drag items will still snap to nearby drop zones. This setting is recommended if you have images over an image background and the normal drop zone indicators are not desired. Drop zone borders will remain visible while editing to help with placement. 6. Verify the Drop zone visibility options apply for the Preview section: Show drop zones:* At default, the existing behaviour should display as usual without transparency.  Hide drop zones:* All draggable items and defined drop zones will have an opacity of 0, meaning they’ll be fully transparent. However, the border of the draggable items will remain visible to show the position of the drop zones. 7. Clicking on 'Save changes and continue editing' OR 'Save changes' button  8. Go to the Preview question page 9. Verify the dropzone's behaviour depending on which value is selected for the 'Drop zone visibility'. If the option is chosen as Show drop zones : At default, the existing behaviour should display as usual without transparency.  If the option is chosen as Hide drop zones:   When hovering or dragging and dropping the item should be transparent (opacity of 0) When dragged into the dropzone, the item should be transparent and the border of the background should be hidden  
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-60910 using repository: https://github.com/danghieu1407/moodle

      Should these errors be fixed?

      Built on: Wed Feb 5 07:20:05 AM UTC 2025

      Show
      Code verified against automated checks with warnings. Checked MDL-60910 using repository: https://github.com/danghieu1407/moodle main (0 errors / 2 warnings) [branch: MDL-60910-master | CI Job ] overview (0/0) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/2) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Should these errors be fixed? Built on: Wed Feb 5 07:20:05 AM UTC 2025
    • Hide

      Launching automatic jobs for branch MDL-60910-master

      Built on: Thu Jan 16 08:54:23 UTC 2025

      Show
      Launching automatic jobs for branch MDL-60910 -master https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61246/ Behat (NonJS - boost and classic / --tags @qtype,@core_question,@qbank,@mod_quiz) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61247/ Behat (Firefox - boost / --tags @qtype,@core_question,@qbank,@mod_quiz) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61248/ Behat (Firefox - classic / --tags @qtype,@core_question,@qbank,@mod_quiz) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/61249/ App tests (stable app version) / --tags @qtype,@core_question,@qbank,@mod_quiz) Built on: Thu Jan 16 08:54:23 UTC 2025

      Currently it's not possible to use transparent pictures in the drag and drop question type.

      If you want to make students, for example, place countries on a map (which would be the background picture in this example) you won't see the background map anymore, since the drag image will have a white background itself, that covers boarders of the countries on the map.

       

      So far this issue was only adressed in the forum (at least I couldn't find any relating to this in the tracker), see https://moodle.org/mod/forum/discuss.php?d=351943

       

       
       

        1. 2021-03-22 18-25-47.flv
          1013 kB
        2. ddimageortext_transparent-objects2.mp4
          17.14 MB
        3. 2021-03-23 14-02-50.flv
          2.93 MB
        4. before_1.png
          before_1.png
          857 kB
        5. before_2.png
          before_2.png
          621 kB
        6. after_1.png
          after_1.png
          777 kB
        7. after_2.png
          after_2.png
          859 kB
        8. questions-drag-drop-image.xml
          397 kB
        9. image-2024-09-24-16-36-24-207.png
          image-2024-09-24-16-36-24-207.png
          57 kB
        10. questions-c1-Drag amp; drop Image-20240930-0752.xml
          398 kB
        11. image-2024-10-23-14-24-33-920.png
          image-2024-10-23-14-24-33-920.png
          9 kB
        12. image-2024-10-23-14-26-47-932.png
          image-2024-10-23-14-26-47-932.png
          751 kB
        13. image-2024-10-23-14-33-23-345.png
          image-2024-10-23-14-33-23-345.png
          640 kB
        14. image-2024-10-23-14-34-26-064.png
          image-2024-10-23-14-34-26-064.png
          643 kB
        15. image-2024-10-23-14-35-37-327.png
          image-2024-10-23-14-35-37-327.png
          637 kB
        16. image-2024-11-29-16-50-57-835.png
          image-2024-11-29-16-50-57-835.png
          17 kB
        17. image-2024-11-29-16-58-33-362.png
          image-2024-11-29-16-58-33-362.png
          9 kB
        18. image-2024-11-29-16-59-51-218.png
          image-2024-11-29-16-59-51-218.png
          614 kB
        19. image-2025-01-15-15-59-20-920.png
          image-2025-01-15-15-59-20-920.png
          23 kB
        20. image-2025-01-15-16-00-24-638.png
          image-2025-01-15-16-00-24-638.png
          360 kB
        21. image-2025-01-15-16-01-37-320.png
          image-2025-01-15-16-01-37-320.png
          440 kB
        22. image-2025-01-15-16-02-07-090.png
          image-2025-01-15-16-02-07-090.png
          679 kB
        23. image-2025-01-15-16-02-26-950.png
          image-2025-01-15-16-02-26-950.png
          756 kB
        24. MDL-60910.png
          MDL-60910.png
          3.79 MB

            danghieu1407 Hieu Nguyen Dang
            Tony Moser Tony Moser
            Anupama Sarjoshi Anupama Sarjoshi
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            20 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 58 minutes
                1d 2h 58m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.