function r7d_selectDocument(documentId, checked, value) {
    var values = JSON.parse(value);
    var index = values.indexOf(documentId);
    if (checked) {
        if (index < 0) {
            values.push(documentId);
        }
    } else {
        if (index >= 0) {
            values.splice(index, 1);
        }
    }
    return JSON.stringify(values);
}
function r7d_getModuleId(target) {
	var c = $(target).closest("div.DnnModule").attr("class");
	return c.substr(c.lastIndexOf("DnnModule-") + 10);
}
function r7d_selectDocument2(target) {
	var documentId = $(target).data("document-id");
	var moduleId = r7d_getModuleId(target);
	var field = document.getElementById("dnn_ctr" + moduleId + "_ViewDocuments_hiddenSelectedDocuments");
	field.value = r7d_selectDocument(documentId, target.checked, field.value);
}
function r7d_selectDeselectAll(target) {
	var moduleId = r7d_getModuleId(target);
	$("div.DnnModule-" + moduleId + " .EditCell input[type='checkbox']").prop("checked", target.checked).trigger("change");
}
@@ -450,57 +450,71 @@
 );%0A%09
-return c.substr(c.lastIndexOf(%22DnnModule-%22) + 10)
+var moduleId = c.match(%22DnnModule-(%5C%5Cd+)%22)%5B1%5D;%0A%09return moduleId
 ;%0A%7D%0A
@@ -1023,12 +1023,13 @@
 %22change%22);%0A%7D
+%0A

Fix GH-115 Cannot select documents with checkboxes on DNN 9