mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-77865 qtype_ddwtos: fix incorrect inplace class
This commit is contained in:
parent
76fe404dd5
commit
35f0386bd3
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.
|
||||
*/
|
||||
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.
|
||||
var oldDrag = this.getCurrentDragInPlace(this.getPlace(drop));
|
||||
if (oldDrag.length !== 0) {
|
||||
@ -663,7 +669,7 @@ define([
|
||||
*/
|
||||
DragDropToTextQuestion.prototype.getClassnameNumericSuffix = function(node, prefix) {
|
||||
var classes = node.attr('class');
|
||||
if (classes !== '') {
|
||||
if (classes !== undefined && classes !== '') {
|
||||
var classesArr = classes.split(' ');
|
||||
for (var index = 0; index < classesArr.length; index++) {
|
||||
var patt1 = new RegExp('^' + prefix + '([0-9])+$');
|
||||
|
Loading…
x
Reference in New Issue
Block a user