Skip to main content

Adding the Uncheck All and Check All Options

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><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>"/>

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>"/>
```