Index: openacs-4/packages/xowf/tcl/test-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/test-item-procs.tcl,v diff -u -N -r1.7.2.119 -r1.7.2.120 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 31 Mar 2021 15:21:15 -0000 1.7.2.119 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 1 Apr 2021 17:24:57 -0000 1.7.2.120 @@ -2514,11 +2514,11 @@ if {$polling} { # - # auto refresh: when in $parent_obj 'state' or 'position' changes, - # do automatically a reload of the current page. + # Auto refresh of number of participants and submissions when + # polling is on. # set url [$manager_obj pretty_link -query m=poll] - template::add_body_script -script [subst { + template::add_body_script -script [subst -nocommands { (function poll() { setTimeout(function() { var xhttp = new XMLHttpRequest(); @@ -2529,6 +2529,14 @@ var el = document.querySelector('#answer-status'); el.innerHTML = data; poll(); + //activate links if a users started the exam + var answers = data.split('/'); + if (answers.length == 2 && answers[1] > 0) { + var disabledLinkItems = document.querySelectorAll(".list-group-item.link-disabled"); + disabledLinkItems.forEach(function(linkItem) { + linkItem.classList.remove("link-disabled"); + }); + } } }; xhttp.send();