qtype_ddwtos/ddwtos

Description:
  • JavaScript to make drag-drop into text questions work.

    Some vocabulary to help understand this code:

    The question text contains 'drops' - blanks into which the 'drags', the missing words, can be put.

    The thing that can be moved into the drops are called 'drags'. There may be multiple copies of the 'same' drag which does not really cause problems. Each drag has a 'choice' number which is the value set on the drop's hidden input when this drag is placed in a drop.

    These may be in separate 'groups', distinguished by colour. Things can only interact with other things in the same group. The groups are numbered from 1.

    The place where a given drag started from is called its 'home'.

Source:
Since:
  • 3.6
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

JavaScript to make drag-drop into text questions work.

Some vocabulary to help understand this code:

The question text contains 'drops' - blanks into which the 'drags', the missing words, can be put.

The thing that can be moved into the drops are called 'drags'. There may be multiple copies of the 'same' drag which does not really cause problems. Each drag has a 'choice' number which is the value set on the drop's hidden input when this drag is placed in a drop.

These may be in separate 'groups', distinguished by colour. Things can only interact with other things in the same group. The groups are numbered from 1.

The place where a given drag started from is called its 'home'.

Members

(inner) init

Description:
  • Initialise one drag-drop into text question.

Source:

Initialise one drag-drop into text question.