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

Drag-drop onto image question with many drop zones triggers JS warning

XMLWordPrintable

      To reproduce:

      1. On a site with developer debugging turned on ...
      2. Import the attached Moodle XML file to the question bank in a course.
      3. Preview the newly imported question (called "Periodic table").

      Note the error at the top:

      Too much data passed as arguments to js_call_amd("qtype_ddimageortext/question", "init"). Generally there are better ways to pass lots of data from PHP to JavaScript, for example via Ajax, data attributes, ... . This warning is triggered if the argument string becomes longer than 1024 characters.

      The message is right. In this case, we should probably switch to using data attributes.

        1. big dd question.xml
          11 kB
          Tim Hunt
        2. image-2024-08-22-17-15-24-782.png
          63 kB
          Hieu Vu
        3. questions-T100-Q15 DDM Places in MK-20240815-1436.xml
          324 kB
          Hieu Nguyen Dang
        4. MDL-66584.png
          950 kB
          Ron Carl Alfon Yu

            danghieu1407 Hieu Nguyen Dang
            timhunt Tim Hunt
            Anupama Sarjoshi Anupama Sarjoshi
            Tim Hunt Tim Hunt
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 27 minutes
                1h 27m

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