From: <Or...@us...> - 2009-02-06 19:41:28
|
Revision: 493 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=493&view=rev Author: Oracle_ Date: 2009-02-06 19:41:24 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Fixed bug with javasctript in result html (jump to home in page). Data.dat rename to <id>.dat, where <id> is id of problem. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-05 23:17:46 UTC (rev 492) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 19:41:24 UTC (rev 493) @@ -53,6 +53,7 @@ h.Head += "document.getElementById(who+'_1').style.display = 'block';\n"; h.Head += "document.getElementById(who+'_2').style.display = 'block';\n"; h.Head += "}\n"; + h.Head += "return false;\n"; h.Head += "}\n"; h.Head += "</script>\n"; @@ -104,7 +105,7 @@ int n = result.testResults.Length; for (int i = 0; i < n; i++) { - data[i, 0] = "<a href=\"#\" onclick=\"javascript:flipBox('show" + i.ToString() + "')\">" + i.ToString() + "</a>"; + data[i, 0] = "<a href=\"#\" onclick=\"return flipBox('show" + i.ToString() + "')\">" + i.ToString() + "</a>"; data[i, 1] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_0\">\n<pre>" + result.testResults[i].input + "</pre></div>"; data[i, 2] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_1\">\n<pre>" + result.testResults[i].output + "</pre></div>"; data[i, 3] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_2\">\n<pre>" + result.testResults[i].contestantOutput + "</pre></div>"; @@ -133,8 +134,8 @@ StreamWriter w = File.CreateText(dir + "\\" + result.Submit.submit.pbolemID.ToString() + ".html"); w.Write(h.Result); w.Close(); - StreamWriter dat = File.CreateText(dir+"\\data.dat"); - dat.WriteLine(result.Submit.name + ";" + result.Submit.form + ";"+result.Submit.submit.pbolemID.ToString()+";" + ((result.testResults == null) ? "CE" : myPoints.ToString() + "/" + allPoints.ToString())); + StreamWriter dat = File.CreateText(dir + "\\data" + result.Submit.submit.pbolemID.ToString() + ".dat"); + dat.WriteLine(result.Submit.name + ";" + result.Submit.form + ";"+result.Submit.submit.pbolemID.ToString()+";" + ((result.testResults == null) ? "0;CE" : myPoints.ToString() + ";" + allPoints.ToString())); dat.Close(); } //Uri url=new Uri(result.Submit.submit.id.ToString() + ".html"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |