Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-1170

drag drop qtype don't move images

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • 1.9
    • None
    • Any
    • MOODLE_19_STABLE

    Description

      This module work uncorrectly if one page has more than one question same type. Images in questions don't move.
      But it is not as simple as said.
      Let a quiz with three dragdrop questions. The first, with three dragable images. The second, with four and the third, with five. Images are named:
      for the first: 1 2 3
      for de second: 1 2 3 4
      for the third: 1 2 3 4 5
      The quiz will work for the three images in the first question, the fourth image in the second question and the fifth image in the third question. Those written in red.
      If we move the third question to the first position, this will be the only working question.

      It was been because array of images in one question have same name with the array in another question same type.
      I've fix this bug rename array with images in unique name that has array_name+id.

      Attachments

        1. array-fixed-change-name-of-arrays.patch
          9 kB
        2. dragdrop.php
          30 kB
        3. dragdroparrange.tpl
          15 kB
        4. dragdropshow.tpl
          3 kB

        Issue Links

          Activity

            People

              jmvedrine Jean-Michel Vedrine
              chillofoctober Eugene Shwab
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: