Commit f99ea8ea authored by Xavier de Blas's avatar Xavier de Blas

Exhibition upload data not by sessions: by school, group

parent 5138d382
......@@ -4505,7 +4505,7 @@ public partial class ChronoJumpWindow
if(! execute_auto_doing)
sensitiveGuiYesEvent();
if(configChronojump.Exhibition)
if(configChronojump.Exhibition && configChronojump.ExhibitionStationType == ExhibitionTest.testTypes.JUMP)
uploadExhibitionTest(ExhibitionTest.testTypes.JUMP, Convert.ToDouble(Util.GetHeightInCentimeters(currentJump.Tv.ToString())));
}
else if( currentEventExecute.ChronopicDisconnected )
......@@ -4949,7 +4949,7 @@ public partial class ChronoJumpWindow
//put correct time value in eventWindow (put the time from chronopic and not onTimer soft chronometer)
event_execute_LabelTimeValue = currentRun.Time;
if(configChronojump.Exhibition)
if(configChronojump.Exhibition && configChronojump.ExhibitionStationType == ExhibitionTest.testTypes.RUN)
uploadExhibitionTest(ExhibitionTest.testTypes.RUN, currentRun.Time);
}
else if( currentEventExecute.ChronopicDisconnected )
......
......@@ -136,7 +136,10 @@ public partial class ChronoJumpWindow
private void uploadExhibitionTest(ExhibitionTest.testTypes tt, double result)
{
Json js = new Json();
ExhibitionTest et = new ExhibitionTest(currentSession.UniqueID, currentPerson.UniqueID, tt, result);
ExhibitionTest et = new ExhibitionTest(Convert.ToInt32(spin_exhibition_school.Value),
Convert.ToInt32(spin_exhibition_group.Value),
currentPerson.UniqueID, tt, result);
if( ! js.UploadExhibitionTest (et))
{
LogB.Error(js.ResultMessage);
......
......@@ -950,7 +950,8 @@ public class Json
// Creates the json object
JsonObject json = new JsonObject();
json.Add("sessionID", et.sessionID);
json.Add("schoolID", et.schoolID);
json.Add("groupID", et.groupID);
json.Add("personID", et.personID);
json.Add("testType", et.testType.ToString());
json.Add("result", et.resultToJson);
......@@ -1396,7 +1397,8 @@ public class StationCount
//eg. YOMO
public class ExhibitionTest
{
public int sessionID; //includes school and class-group
public int schoolID;
public int groupID;
public int personID;
public enum testTypes { JUMP, RUN, INERTIAL, FORCE_ROPE, FORCE_SHOT };
public testTypes testType;
......@@ -1409,9 +1411,10 @@ public class ExhibitionTest
* on inertial is mean power of the maximum repetiton
*/
public ExhibitionTest(int sessionID, int personID, testTypes testType, double result)
public ExhibitionTest(int schoolID, int groupID, int personID, testTypes testType, double result)
{
this.sessionID = sessionID;
this.schoolID = schoolID;
this.groupID = groupID;
this.personID = personID;
this.testType = testType;
this.result = result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment