/************* WARNING: THIS IS A GLOBAL VARIABLE. ********************/ // Reference to the 'events' array in Events.js var events; /** * Sets the events. * @param theEvents Reference to the 'events' array in Events.js. */ function setEvents(theEvents) { events = theEvents; } function collectRatings() { // Consider each event in the incident script for (var evtidx = 0; evtidx < events.length; evtidx++) { // Does this event have any evaluations? if (events[evtidx].evaluations.evaluations.length > 0) { // Examine each evaluation contained in this event for (var rating=0; rating 0) { console.log("collecting event"+evtidx + " at " + events[evtidx].time.format() +" "+item.type + " " + item.rating) } } } } } /* This is an alternative way to collect the ratings values by reading them directly from the radio buttons function collectRadios() { var radios = document.getElementsByTagName('input'); var count = 0; for (var j=0; j