- Create a bookmarlet with the code below
- Go to the homepage of your MOOC in studio (in our case : studio.fun-mooc.fr/course/[MOOC_ID])
- Run the bookmarklet
javascript:(function(){
var base_url = window.location.href.replace('studio.fun-mooc.fr/course','fun-mooc.fr/courses')+'/jump_to_id/';
var sections = $('.outline-section');
var sectionList = $('<ul/>');
var expandables = $('.expand');
expandables.click();
sections.each(function(i, section) {
var title = $(section).find('.section-title').text();
var subsections = $(section).find('.outline-subsection');
var sectionItem = $('<li></li>').append(
$('<a/>').attr('title', title).attr('href',base_url+$(section).data('locator').split('@').pop()).text(title)
);
var subsectionList = $('<ul/>');
subsections.each(function(i, subsection) {
var subtitle = $(subsection).find('.subsection-title').text();
var units = $(subsection).find('.unit-title a');
var subsectionItem = $('<li></li>').append(
$('<a/>').attr('title', subtitle).attr('href',base_url+$(subsection).data('locator').split('@').pop()).text(subtitle)
);
var unitList = $('<ul/>');
units.each(function(i, unit) {
var $unit = $('<a/>').attr('title', $(unit).text()).attr('href',base_url+$(unit).attr('href').split('@').pop()).text($(unit).text());
unitList.append($('<li></li>').append($unit));
});
subsectionItem.append(unitList);
subsectionList.append(subsectionItem);
});
sectionItem.append(subsectionList);
sectionList.append(sectionItem);
});
expandables.click();
var output = $('<div>').append($('<xmp>').html(sectionList.prop('outerHTML')).css({float: 'right', width: '50%', height: '500px', 'white-space': 'normal'})).append(sectionList);
window.open().document.write(output.html());
})()