Commit 5b971892 authored by David Monllaó's avatar David Monllaó
Browse files

MDL-48947 course: Adding the new extra span after dropping a section

parent 38831914
......@@ -74,7 +74,8 @@ M.course.format.process_sections = function(Y, sectionlist, response, sectionfro
for (var i = sectionfrom; i <= sectionto; i++) {
// Update section title.
sectionlist.item(i).all('.'+CSS.SECTIONNAME).setContent(response.sectiontitles[i]);
var content = Y.Node.create('<span>' + response.sectiontitles[i] + '</span>');
sectionlist.item(i).all('.'+CSS.SECTIONNAME).setHTML(content);
// Update move icon.
ele = sectionlist.item(i).one(SELECTORS.SECTIONLEFTSIDE);
str = ele.getAttribute('alt');
......
......@@ -5,6 +5,8 @@ Overview of this plugin type at http://docs.moodle.org/dev/Course_formats
=== 3.0 ===
* Course formats should now use section_edit_control_items and use the returned array of controls items and their attributes to create a
renderable menu or array of links. Plugin calls to section_edit_controls will now include the section edit control in the returned array.
* The section name is now wrapped in a new span (.sectionname > span), process_sections method in format.js should be updated so .sectionname
DOM node's wraps the section title in a span. You can look at how to implement the change in course/format/topics/format.js or MDL-48947.
=== 2.9 ===
* Course formats may support deleting sections, see MDL-10405 for more details.
......
......@@ -74,7 +74,8 @@ M.course.format.process_sections = function(Y, sectionlist, response, sectionfro
for (var i = sectionfrom; i <= sectionto; i++) {
// Update section title.
sectionlist.item(i).all('.'+CSS.SECTIONNAME).setContent(response.sectiontitles[i]);
var content = Y.Node.create('<span>' + response.sectiontitles[i] + '</span>');
sectionlist.item(i).all('.'+CSS.SECTIONNAME).setHTML(content);
// Update move icon.
ele = sectionlist.item(i).one(SELECTORS.SECTIONLEFTSIDE);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment