Currently only works if course content is visible, and course section(s) is/are already expanded.
Open console for web browser (F12 or Right-Click Inspect) Paste the section of JavaScript below into the console according to your needs.
// Activate sidebar menu to expose course sections
const courseContent = document.querySelector("section[data-purpose='open-course-content']");
// Find all accordian-panel--???? entries in course sections
const courseSection = document.querySelector("section[data-css-toggle-id='accordion-panel--1097']");
// For each accordian-panel--???? entry in course sections, set the data-checked to "checked"
courseSection.forEach((checkbox) => {
if (checkbox.checked) {
checkbox.click();
}
});
const checkboxes = document.querySelectorAll("input[type='checkbox']");
checkboxes.forEach((checkbox) => {
if (checkbox.checked) {
checkbox.click();
}
});
const sectionEl = document.querySelector("section[data-purpose='sidebar']");
const checkboxes = sectionEl.querySelectorAll("input[type='checkbox']");
checkboxes.forEach((checkbox) => {
if (!checkbox.checked) {
checkbox.disabled = false;
checkbox.click();
}
});