Index: lams_central/web/includes/javascript/common.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/common.js,v diff -u -r1.4 -r1.5 --- lams_central/web/includes/javascript/common.js 14 Dec 2006 23:33:51 -0000 1.4 +++ lams_central/web/includes/javascript/common.js 7 May 2008 03:52:39 -0000 1.5 @@ -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