diff --git a/renderer.php b/renderer.php index aef5fbe..bea66ca 100644 --- a/renderer.php +++ b/renderer.php @@ -50,7 +50,7 @@ public function formulation_and_controls(question_attempt $qa, question_display_ $this->page->requires->string_for_js('draganswerhere', 'qtype_ddmatch'); $this->page->requires->yui_module('moodle-qtype_ddmatch-dragdrop', 'M.qtype.ddmatch.init_dragdrop', array(array( - 'questionid' => $qa->get_slot(), + 'questionid' => $qa->get_outer_question_div_unique_id(), 'readonly' => $options->readonly, )) ); diff --git a/yui/dragdrop/dragdrop.js b/yui/dragdrop/dragdrop.js index 12035ee..2b46df4 100644 --- a/yui/dragdrop/dragdrop.js +++ b/yui/dragdrop/dragdrop.js @@ -16,7 +16,7 @@ YUI.add('moodle-qtype_ddmatch-dragdrop', function(Y, NAME) { return; } - var containerid = 'div#q' + this.get('questionid'), + var containerid = 'div#' + this.get('questionid'), group = containerid + ' .matchtarget'; // Set the container - we use this in various places