-
Bug
-
Resolution: Fixed
-
Major
-
1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
-
None
-
NA
-
MOODLE_18_STABLE, MOODLE_19_STABLE
-
MOODLE_23_STABLE
When moving resources by drag and drop, there is a strange behavior if the summary of the section contains ul tags. The problem comes from the fact that the resources_ul is identified as the first ul in the content_td. The fix consists of finding the first ul which has a classname of section and use it as the resources_ul.
This snippet shows the place where the problem comes from as well as the proposed fix.
In file /lib/ajax/section_classes.js
In function section_class.prototype.process_section
Line 139:
// Find/edit resources
//this.resources_ul = this.content_td.getElementsByTagName('ul')[0];
// Fix:
var all_uls = this.content_td.getElementsByTagName('ul');
i = 0;
while (i < all_uls.length) {
if (all_uls[i].className == 'section')
i++;
}