Adding the Uncheck All and Check All Options

Follow

The edits listed below will add the Uncheck All and Check All options to your web pages. When Instructors clone courses or clone items from one course to another, they can uncheck all items easily and check only those they want to use, or check all items quickly.

Edit the aresajax.js File

  1. Add the following to your aresajax.js file located in your ares/js webfolder.

    function ToggleCheckboxes(checked, id) {
        var collection = document.getElementById(id).getElementsByTagName('INPUT');
        for (var x = 0; x < collection.length; x++) {
            if (collection[x].type.toUpperCase() == 'CHECKBOX') {
                collection[x].checked = checked;
            }
        }
    }

Edit the ICourseClone.html File

  1. Add an ID parameter, id="CloneItems" to the table tag as shown in the Existing HTML of Step 2.

    <#TABLE id="CloneItems"
  2. Insert the block of code shown under New HTML above the code shown under Existing HTML.

    New HTML
     

    <div>
    	<a href="#" onclick="ToggleCheckboxes(false, 'CloneItems'); return false;">Uncheck All </a> | <a href="#" onclick="ToggleCheckboxes(true, 'CloneItems'); return false;">Check All</a>
    </div>

    Existing HTML

    <#TABLE id="CloneItems" course="instructor-table-nohover" name="CloneItems" headerText="Reserve Materials to Clone" IncludeJavascriptCalendar="Yes" calendarText="<img src='images/cal.gif' alt='Open Calendar'/>"/>

Edit the ICourseImportItems.html File

  1. Add an ID parameter, id=ImportItems to the table tag as shown in the Existing HTML of Step 2.
  2. Insert the block of code shown under New HTML above the code shown under Existing HTML.

    New HTML

    <div>
        <a href="#" onclick="ToggleCheckboxes(false, 'ImportItems'); return false;">Uncheck All</a> | <a href="#" onclick="ToggleCheckboxes(true, 'ImportItems'); return false;">Check All</a>
    </div>

     Existing HTML

    <#TABLE id="ImportItems" course="instructor-table-nohover" type="Import" name="CloneItems" headerText="Reserve Materials to Import" IncludeJavascriptCalendar="Yes" calendarText="<img src='images/cal.gif' alt='Open Calendar'/>"/>

     

Questions?

If this article didn’t resolve your issue, please take a moment and answer a few questions to help improve our documentation:

Feedback