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

dragdrop: not displaying correct answer when clicking "fillcorrect" button.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.9
    • None
    • None
    • Easy
    • MOODLE_19_STABLE

    Description

      When viewing "Question Preview" window, and when clicking the "Fill with Correct Answer" button
      all images align to top left of window. (error!)

      To fix this issue, open "question/type/dragdrop/questiontype.php" line 155. and change it from:

      foreach ($question->options->media as $item) {
        $responses[$item->id]="{$item->targetx},{$item->targety},{$item->displaywidth},{$item->displayheight}";
      }

      To:

      foreach ($question->options->media as $item) {
        $hotspots = array_shift($item->hotspots); 
        $responses[$item->id]="{$hotspots->x},{$hotspots->y},{$hotspots->width},{$hotspots->height}"; 
      }
       

      Attachments

        Activity

          People

            jmvedrine Jean-Michel Vedrine
            nadavkav Nadav Kavalerchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: