- Home
- Moodle and Educational Technology
- Moodle
- Build and Manage Courses
Last Modified on 05/07/2024 1:02 pm EDT
" + "
- "; var el, title, navLink, sectionID, sctn, headerNesting; // Grab all the H2s, H3s, H4s and turn them into TOC titles. // Define the heading levels you want to use in ascending order. // Can add additional headers or remove unneeded. $(".hg-article-body h2, .hg-article-body h3, .hg-article-body h4").each(function() { el = $(this); // Shorthand for the header itself title = el.text(); // The text we write in the editor for the header if (title != '') { // If the [title] is not blank... var anchorTitle, level; anchorTitle = el.text().replace(/([~!@"#$%^&*()_+=`{}\[\]\|\\:;'<>,.\/\? ])+/g, '-').toLowerCase().trim(); // Set all headers to a 0-nesting level. headerNesting = 'header-nesting-0'; // Adjust header-nesting layers so that they point to the correct html tag. // header-nesting-1 should match the second .hg-article-body h# listed above; // header-nesting-2 should match the third, etc. // li-h# classes are used to style the links per header level, independent of indentation. if ($(this).is('h2')) { level = 'li-h2'; } else if ($(this).is('h3')) { headerNesting = 'header-nesting-1'; level = 'li-h3'; } else if ($(this).is('h4')) { headerNesting = 'header-nesting-2'; level = 'li-h4'; } navLink = "#" + anchorTitle; newLine = "
- " + "" + title + "" + " "; ToC += newLine; // buttonID and buttonLink used for the 'Copy section link to clipboard' button, // as seen in the subsequent lines starting with el.html var buttonID, realURL, buttonLink; buttonID = anchorTitle + '-button'; // Build buttonLink: realURL = window.location.href; // Grab the page URL as seen in the address bar function cleanURL(URL) { // removes any current hash (#) anchor at the end of the URL if (URL.includes("#")) { let end = URL.search("#"); let washedURL = URL.slice(0, end); return washedURL; } else { return realURL; }; }; buttonLink = cleanURL(realURL) + navLink; el.html(''+ '
'+el.html()+ ''+ '
'); // Wrap" + "" + "
"; // Add the complete ToC to the page above (before) this script. $("#snippet-prepend").before(ToC); /* Junk attempt to adjust the scroll of the toc: var topPad = $('#nav-column').css('top'); var navColumnH = $('#nav-column').height() - topPad; $('#nav-column').css('height', 'navColumnH');// navColumnH -= topPad;// $('#nav-column').height({// $('#nav-column').height() - 80;// });// var navColumnH = $('#nav-column').height();// var navBlockH = navColumnH - 80;// $('#nav-block').height(navBlockH); */ // ---- TIPPY ---- // // Tippy tutorial content: https://tippyjs.bootcss.com/creating-tooltips/ // Create tippyTextAttribute plugin to handle setting the content of the tippy instance: // Necessary to cleanly pass the content from the specific instance's reference to the // initializing script. See the Plugins and FAQ sections of above docs for details. const tippyTextAttribute = { name: 'tippyTextAttribute', defaultValue: true, fn() { return { // onShow() effectively resets the content of the tooltip each time it is triggered // to be shown. Allows simple functionality to keep the "Copied! message (written // below in the on('click') function) as long as it is in focus instead of // automatically resetting after a set amount of time. onShow(instance) { if (!instance.props.tippyTextAttribute) { return; } const tippyText = instance.reference.getAttribute('tippy-text'); if (tippyText) { instance.setContent(tippyText); } } }; } }; // Settings for clipboard-button tooltip: tippy(".clipboard-button", { allowHTML: true, // HTML instead of just a text string placement: 'top', // Appear above button hideOnClick: "toggle", // Don't immediately disappear when mouse is removed distance: 9, // Pixel distance from top border of button theme: 'owlbert', // Custom theme; see Tippy CSS section tippyTextAttribute: true, // Generate tooltip based on an attribute [double check] plugins: [tippyTextAttribute], // Enable above }); // On clicking the button, copy the "clipboard-link" to the clipboard and // set the tippy to show "Copied!" message: $(document).on("click", ".clipboard-button", function () { // On click of clipboard button, do: var button = $(this) // button = the button clicked var copyText = button.attr("clipboard-link"); // Simplify code: set link URL as var navigator.clipboard.writeText(copyText); // Copy URL to PC clipboard this._tippy.setContent('Copied!'); // Make the tooltip show 'Copied' // Overwrite the HTML within the clipboard button (replacing the old icon with check icon): button.html(''); // Set the time before the resetClipTip function (below) is run clipboard-check icon resets to original clipboard icon: setTimeout(resetClipTip, 3000); // delay: 3000ms (3 seconds) function resetClipTip() { // Define the resetClipTip function // Overwrite the button's HTML with the original check-less clipboard icon: button.html(''); }; }); });
Moodle lets Instructors of record and Other editing teachers hide an entire course site to prevent students, auditors and guests from seeing it.Similarly, Moodle allows course instructors to hide course sections, assignments, and materials.
Before you start, you need:
- an Instructor of record or Other editing teacher role in a Bryn Mawr Moodle course
Hide/show entire course
Hide/show course elements
Manually
Manually hide course sections, activities or resources that you don't wish students and guests to see. (Instructors of record, Other editing teachers, Non-editing teachers will still see them, but with a Hidden from students tag attached.)
Automatically, at a specified time
Add date restrictions to hide or reveala course section, activity or resource to students and guestsat a future date and time. The item remains visible to Instructors of record, Other editing teachers, and Non-editing teachers with a Restricted tag that summarizes the restriction parameters. (Students and guests do not see this tag when the item is visible to them.)
Videos & further reading on courses and course sections
- MoodleDocs:Course Settings
- MoodleDocs:Course Homepage
- Video:Course Editing in Moodle
Questions?
If you have any additional questions or problems, don't hesitate to reach out to the Help Desk!
Phone: 610-526-7440 | Library and Help Desk hours
Email: [email protected] |Service catalog
Location: Canaday Library 1st floor
Related Articles
Moodle: Customize and organize your course
Moodle: Add files and folders to a course
Moodle: Get a merged Moodle site for a multi-section course
Moodle: Save or export course data and content
NameCoach: Add to a Moodle course
Thank you! Your feedback has been submitted.