diff --git a/client_Core.html b/client_Core.html
index 890a748..2f0cfe8 100644
--- a/client_Core.html
+++ b/client_Core.html
@@ -6,6 +6,7 @@
function handleLogin(){
applyJudgeName();
+ google.script.run.withFailureHandler(handleError).withSuccessHandler(OnJudgeResultsFetched).fetchJudgeResults(getIDValue());
changeView("backform","mainlayer"); // disabled now for comfortable debug
}
@@ -31,6 +32,23 @@
sessionStorage.setItem("teamnames", data);
}
+ function OnJudgeResultsFetched(data){
+ var judge = getJudgeValue();
+ var counter = 0;
+ for(i in data){
+ try{
+ var curForm = JSON.parse(data[i][0]);
+ if(curForm.judge == judge){
+ $('#logslist').prepend("
Загрузка... " + "");
+ pushServerResponse(counter,curForm.team,curForm.problem,curForm.result,curForm.serverResponse,curForm.token);
+ counter++;
+ }
+ }catch(err){
+ continue;
+ }
+ }
+ }
+
function changeView(first ,second){
//change forms disabled
document.getElementById('' + first).setAttribute("hidden","true");
diff --git a/module_server.js b/module_server.js
index b008181..b76afa3 100644
--- a/module_server.js
+++ b/module_server.js
@@ -24,6 +24,12 @@ function module_getTeamnames(id){
return repacked_teamArray;
}
+function fetchJudgeResults(id){
+ var modelSheet = GetSheet(RAW,id);
+ var modelSize = modelSheet.getLastRow() - MODEL_START + CONST_MORE_THAN_JUDGIES;
+ return modelSheet.getRange(MODEL_START, 1, modelSize, 2).getValues();
+}
+
function GetHumanReadableCaption(value) {
if (value[0] == "+")
return "Уже сдана (" + value + ")";