Index: trunk/webapps/einotebook/script/scrollframe.js
===================================================================
--- trunk/webapps/einotebook/script/scrollframe.js	(revision 551)
+++ trunk/webapps/einotebook/script/scrollframe.js	(revision 631)
@@ -12,5 +12,5 @@
 }
 
-// Collect all the ratings from the events 
+// Collect all the ratings from the events - OBSOLETE
 function collectRatings() 
 {
@@ -62,5 +62,5 @@
 */
 
-// Send the string of ratings to the server
+// Send the string of ratings to the server - OBSOLETE
 function submitRatings(logString)
 {
Index: trunk/webapps/einotebook/scripts/Evaluation.js
===================================================================
--- trunk/webapps/einotebook/scripts/Evaluation.js	(revision 551)
+++ trunk/webapps/einotebook/scripts/Evaluation.js	(revision 631)
@@ -4,5 +4,5 @@
  * @param data Array(label1, text1, label2, text2, ...)
  */
-function Evaluation(type, data)
+function Evaluation(type, evttime, data)
 {
     //========== private static members ==========//
@@ -16,4 +16,5 @@
     this.type = type;
     this.data = data;
+    this.evttime = evttime;
     
     //========== public read-only members ==========//
@@ -25,4 +26,5 @@
     this.recordText = recordText; 
     this.recordRating = recordRating;
+    this.writeRating = writeRating;
     
     //========== private methods ==========//
@@ -70,5 +72,5 @@
     
     /**
-     * Stores the rating given by the evaluation scale radio button form.
+     * Stores the rating given by the evaluation scale radio button form. --OBSOLETE
      */
     function recordRating(givenRating) 
@@ -77,4 +79,20 @@
         this.rating = givenRating;
         //console.log(this.ratingGroupName + " recordRating of " + this.rating )
+    }
+    /**
+     * Write an individual rating to a log file
+     */
+    function writeRating(givenRating)
+    {
+        //alert("writeRating: " + givenRating + " : " + this.evttime.format())
+        // Build a string for the log in this format:
+        //03:01:00, Evaluation, CMS, Poor
+        logString = this.evttime.format() + ", Evaluation, " + this.type + ", " + this.ratingQualities[givenRating] + "\n"
+        // Using POST to send the data 
+        var xhr = new XMLHttpRequest();
+        xhr.open("POST", "/cgi-bin/appendRatingToLog.py", true);
+        xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
+        // send the collected data
+        xhr.send("msg="+logString);
     }
 
@@ -113,26 +131,26 @@
                        (this.rating == 5 ? "checked='true'" : "") + 
                        " onchange='events.getEvaluation(" + this.id + 
-                       ").recordRating(5)' name='" + this.ratingGroupName + 
-                       "' value='1'></td>" +
+                       ").writeRating(5)' name='" + this.ratingGroupName + 
+                       "' value='5'></td>" +
                "<td align='center'><input type='radio' " + 
                        (this.rating == 4 ? "checked='true'" : "") + 
                        " onchange='events.getEvaluation(" + this.id + 
-                       ").recordRating(4)' name='" + this.ratingGroupName + 
-                       "' value='2'></td>" +
+                       ").writeRating(4)' name='" + this.ratingGroupName + 
+                       "' value='4'></td>" +
                "<td align='center'><input type='radio' " + 
                        (this.rating == 3 ? "checked='true'" : "") + 
                        " onchange='events.getEvaluation(" + this.id + 
-                       ").recordRating(3)' name='" + this.ratingGroupName + 
+                       ").writeRating(3)' name='" + this.ratingGroupName + 
                        "' value='3'></td>" +
                "<td align='center'><input type='radio' " + 
                        (this.rating == 2 ? "checked='true'" : "") + 
                        " onchange='events.getEvaluation(" + this.id + 
-                       ").recordRating(2)' name='" + this.ratingGroupName + 
-                       "' value='4'></td>" +
+                       ").writeRating(2)' name='" + this.ratingGroupName + 
+                       "' value='2'></td>" +
                "<td align='center'><input type='radio' " + 
                        (this.rating == 1 ? "checked='true'" : "") + 
                        " onchange='events.getEvaluation(" + this.id + 
-                       ").recordRating(1)' name='" + this.ratingGroupName + 
-                       "' value='5'></td>" +
+                       ").writeRating(1)' name='" + this.ratingGroupName + 
+                       "' value='1'></td>" +
                "</tr>" +
                "</table>"  +
Index: trunk/webapps/einotebook/scripts/LoadEvents.js
===================================================================
--- trunk/webapps/einotebook/scripts/LoadEvents.js	(revision 546)
+++ trunk/webapps/einotebook/scripts/LoadEvents.js	(revision 631)
@@ -104,5 +104,5 @@
                         var evalType = tagName.replace("_EVALUATION","");
                         // Build the evaluation item
-                        var evalItem = new Evaluation(evalType, 
+                        var evalItem = new Evaluation(evalType, evtTime,
                                  parseEvaluation(currEvt.childNodes[child]) );  
                         evalarray.push(evalItem);
@@ -110,5 +110,5 @@
                         
                     case "CMS_EVALUATION":
-                        var cmsEval = new Evaluation("CMS", parseCMSEvaluation(currEvt.childNodes[child]));
+                        var cmsEval = new Evaluation("CMS", evtTime, parseCMSEvaluation(currEvt.childNodes[child]));
                         evalarray.push(cmsEval);
                         break;
