mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
Merge branch 'MDL-77865_Master' of https://github.com/tuanngocnguyen/moodle
This commit is contained in:
commit
5f41e5fdc7
3 changed files with 9 additions and 3 deletions
2
question/type/ddwtos/amd/build/ddwtos.min.js
vendored
2
question/type/ddwtos/amd/build/ddwtos.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -363,6 +363,12 @@ define([
|
||||||
* @param {jQuery} drop the place to put it.
|
* @param {jQuery} drop the place to put it.
|
||||||
*/
|
*/
|
||||||
DragDropToTextQuestion.prototype.sendDragToDrop = function(drag, drop) {
|
DragDropToTextQuestion.prototype.sendDragToDrop = function(drag, drop) {
|
||||||
|
// Send drag home if there is no place in drop.
|
||||||
|
if (this.getPlace(drop) === null) {
|
||||||
|
this.sendDragHome(drag);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Is there already a drag in this drop? if so, evict it.
|
// Is there already a drag in this drop? if so, evict it.
|
||||||
var oldDrag = this.getCurrentDragInPlace(this.getPlace(drop));
|
var oldDrag = this.getCurrentDragInPlace(this.getPlace(drop));
|
||||||
if (oldDrag.length !== 0) {
|
if (oldDrag.length !== 0) {
|
||||||
|
@ -663,7 +669,7 @@ define([
|
||||||
*/
|
*/
|
||||||
DragDropToTextQuestion.prototype.getClassnameNumericSuffix = function(node, prefix) {
|
DragDropToTextQuestion.prototype.getClassnameNumericSuffix = function(node, prefix) {
|
||||||
var classes = node.attr('class');
|
var classes = node.attr('class');
|
||||||
if (classes !== '') {
|
if (classes !== undefined && classes !== '') {
|
||||||
var classesArr = classes.split(' ');
|
var classesArr = classes.split(' ');
|
||||||
for (var index = 0; index < classesArr.length; index++) {
|
for (var index = 0; index < classesArr.length; index++) {
|
||||||
var patt1 = new RegExp('^' + prefix + '([0-9])+$');
|
var patt1 = new RegExp('^' + prefix + '([0-9])+$');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue