Index: lams_central/web/includes/javascript/common.js =================================================================== diff -u -re726a637db2ccc27aded0f996465b3620dec410c -rf4e47145c5e5a3861dc2cf26a460d80ef3e77308 --- lams_central/web/includes/javascript/common.js (.../common.js) (revision e726a637db2ccc27aded0f996465b3620dec410c) +++ lams_central/web/includes/javascript/common.js (.../common.js) (revision f4e47145c5e5a3861dc2cf26a460d80ef3e77308) @@ -73,4 +73,26 @@ return false; } return true; - } \ No newline at end of file + } + + // refresh the parent window if the parent window is a tool monitoring window + function refreshParentMonitoringWindow() { + if ( window.opener && ! window.opener.closed && window.opener.name.indexOf("MonitorLearnerActivity") >= 0 ) { + var monitoringURL = String(window.opener.location); + var currentTab = window.opener.selectedTabID; + if ( currentTab ) { + var indexStart = monitoringURL.indexOf("¤tTab="); + if ( indexStart != -1 ) { + var indexEnd = monitoringURL.indexOf("&",indexStart+1); + if ( indexEnd == -1 ) { + monitoringURL = monitoringURL.substring(0,indexStart); + } else { + monitoringURL = monitoringURL.substring(0,indexStart)+monitoringURL.substring(indexEnd); + } + } + monitoringURL = monitoringURL+"¤tTab="+currentTab; + } + window.opener.location.href = monitoringURL; + } + } + \ No newline at end of file