Scenario: Preview a question using the mouse.
When I click on "Preview" "link" in the "Drag markers" "table_row"
And I switch to "questionpreview" window
- And I wait "2" seconds
# Odd, but the <br>s go to nothing, not a space.
And I drag "OU" to "340,228" in the drag and drop markers question
And I drag "Railway station" to "252,195" in the drag and drop markers question
Scenario: Preview a question using the keyboard.
When I click on "Preview" "link" in the "Drag markers" "table_row"
And I switch to "questionpreview" window
- And I wait "1" seconds
And I type "up" "89" times on marker "Railway station" in the drag and drop markers question
And I type "right" "21" times on marker "Railway station" in the drag and drop markers question
And I press "Submit and finish"
* This is the code for question rendering.
*/
Y.extend(DDMARKER_QUESTION, M.qtype_ddmarker.dd_base_class, {
+ pendingid: '',
initializer : function() {
+ this.pendingid = 'qtype_ddmarker-' + Math.random().toString(36).slice(2); // Random string.
+ M.util.js_pending(this.pendingid);
this.doc = this.doc_structure(this);
this.poll_for_image_load(null, false, 0, this.after_image_load);
this.doc.bg_img().after('load', this.poll_for_image_load, this,
},
after_image_load : function () {
this.redraw_drags_and_drops();
+ M.util.js_complete(this.pendingid);
Y.later(2000, this, this.redraw_drags_and_drops, [], true);
},
clone_new_drag_item : function (draghome, itemno) {
fp : null,
initializer : function() {
+ var pendingid = 'qtype_ddmarker-form-' + Math.random().toString(36).slice(2); // Random string.
+ M.util.js_pending(pendingid);
this.fp = this.file_pickers();
var tn = Y.one(this.get('topnode'));
tn.one('div.fcontainer').append(
this.stop_selector_events();
this.set_options_for_drag_item_selectors();
this.setup_form_events();
- Y.later(500, this, this.update_drop_zones, [], true);
+ Y.later(500, this, this.update_drop_zones, [pendingid], true);
Y.after(this.load_bg_image, M.form_filepicker, 'callback', this);
this.load_bg_image();
},
.setXY(this.doc.bg_img().getXY())
.setStyle('width', this.doc.bg_img().get('width'))
.setStyle('height', this.doc.bg_img().get('height'));
+ M.util.js_complete(this.pendingid);
},
get_coords : function (dropzoneno) {