{"header":{"format":"treatmentJSON","formatVersion":"1.0.10","createdDate":"2017-07-11","createdTime":"14:07:11","experimentName":"Reports Test","name":"Example Reports","sophieVersion":"3.2.2","md5":"498d44d543508e3edbb2f607704cd6f1"},"content":{"sophie_treatment":{"id":"71","experimentId":"29","name":"Example Reports","description":"","state":"draft","layoutTheme":"sophie_2_0_0","layoutDesign":"default","css":"","payoffScript":"$payoff = 0;\r\n$moneyPayoff = $payoff;","payoffRetrivalMethod":"payoffVarSum","secondaryPayoffScript":"$payoff = 0;\r\n$moneyPayoff = $payoff;","secondaryPayoffRetrivalMethod":"inactive","defaultLocale":"en_US","loggingEnabled":"1","setupScript":"","adminProcessScript":"","javascriptCustomScript":""},"sophie_treatment_screens":null,"sophie_treatment_eav":{"layoutMaxWidthContainer":"","layoutMaxWidthContent":"","mturkAccessPassword":"","mturkAccessPasswordExplanation":"","mturkAwsAccessKeyId":"","mturkAwsSecretAccessKey":"","mturkContactEmail":"","mturkContactName":"","mturkHitDescription":"","mturkHitDuration":"","mturkHitExpires":"","mturkHitFrameHeight":"700","mturkHitKeywords":"","mturkHitReward":"","mturkHitTitle":"","mturkInstructions1":"","mturkInstructions10":"","mturkInstructions2":"","mturkInstructions3":"","mturkInstructions4":"","mturkInstructions5":"","mturkInstructions6":"","mturkInstructions7":"","mturkInstructions8":"","mturkInstructions9":"","mturkParticipantAssignment":"assignExistingAutoExpire","mturkPreview":"","mturkQualification_Adult":"","mturkQualification_LocaleValue":"","mturkQualification_MaxNumberHITsApproved":"","mturkQualification_MaxPercentAssignmentsApproved":"","mturkQualification_MinNumberHITsApproved":"","mturkQualification_MinPercentAssignmentsApproved":"","mturkQualification_NotLocaleValues":"","mturkSaveWorkerCredentials":"1","redirectOnExclude":"","redirectOnFinish":"","redirectOnServerError":"","redirectOnTimeout":""},"sophie_treatment_stepgroup":[{"id":"113","treatmentId":"71","label":"main","name":"Main","position":"1","loop":"5","active":"1","grouping":"static","runConditionScript":null,"runConditionFalse":"skipStepgroupLoop","sophie_treatment_step":[{"id":"494","stepgroupId":"113","position":"1","name":"Input","label":"Input","steptypeSystemName":"Sophie_Steptype_Form_Input_Number_1_0_0","active":"1","sophie_treatment_step_type":[],"sophie_treatment_step_eav":[{"stepId":"494","name":"ajaxProcessScript","value":""},{"stepId":"494","name":"contentBody","value":""},{"stepId":"494","name":"contentHeadline","value":"Please insert any value between 0 and 10..."},{"stepId":"494","name":"formAutofocus","value":"1"},{"stepId":"494","name":"formContentAfter","value":""},{"stepId":"494","name":"formContentAfterSubmit","value":""},{"stepId":"494","name":"formContentBefore","value":""},{"stepId":"494","name":"formContentBetween","value":""},{"stepId":"494","name":"formDefaultValue","value":""},{"stepId":"494","name":"formDivisibleBy","value":""},{"stepId":"494","name":"formFloatPrecision","value":"2"},{"stepId":"494","name":"formHeadline","value":""},{"stepId":"494","name":"formLabel","value":""},{"stepId":"494","name":"formMaxExclude","value":"0"},{"stepId":"494","name":"formMaxValue","value":"10"},{"stepId":"494","name":"formMinExclude","value":"0"},{"stepId":"494","name":"formMinValue","value":"0"},{"stepId":"494","name":"formNotEmpty","value":"1"},{"stepId":"494","name":"formNumberType","value":"int"},{"stepId":"494","name":"formPostProcessScript","value":""},{"stepId":"494","name":"formTrimWhitespace","value":"1"},{"stepId":"494","name":"formType","value":"text"},{"stepId":"494","name":"formVariableContext","value":"PSL"},{"stepId":"494","name":"formVariableName","value":"input"},{"stepId":"494","name":"initializationScript","value":""},{"stepId":"494","name":"internalNote","value":""},{"stepId":"494","name":"javascriptInline","value":""},{"stepId":"494","name":"javascriptOnContentStart","value":""},{"stepId":"494","name":"javascriptOnContentStop","value":""},{"stepId":"494","name":"javascriptOnPostInit","value":""},{"stepId":"494","name":"layoutAdditionalCSS","value":""},{"stepId":"494","name":"layoutDesign","value":""},{"stepId":"494","name":"layoutTheme","value":""},{"stepId":"494","name":"runConditionDefault","value":"1"},{"stepId":"494","name":"runConditionScript","value":""},{"stepId":"494","name":"testingSimulationModeJavascript","value":""},{"stepId":"494","name":"timerContext","value":"E"},{"stepId":"494","name":"timerCountdownBody","value":""},{"stepId":"494","name":"timerCountdownDuration","value":"0"},{"stepId":"494","name":"timerCountdownEnabled","value":"0"},{"stepId":"494","name":"timerCountdownHeadline","value":""},{"stepId":"494","name":"timerDisplay","value":"0"},{"stepId":"494","name":"timerDuration","value":"0"},{"stepId":"494","name":"timerEnabled","value":"0"},{"stepId":"494","name":"timerGracePeriodClient","value":"0"},{"stepId":"494","name":"timerGracePeriodServer","value":"0"},{"stepId":"494","name":"timerInitialLag","value":"0"},{"stepId":"494","name":"timerOnTimeout","value":"continue"},{"stepId":"494","name":"timerOnTimeoutWarning","value":""},{"stepId":"494","name":"timerProceedBeforeTimeout","value":"0"},{"stepId":"494","name":"timerProceedTimeVarname","value":""},{"stepId":"494","name":"timerRemainingTimeVarname","value":""},{"stepId":"494","name":"timerShowOnCountdown","value":"countdownContent"},{"stepId":"494","name":"timerShowOnStartup","value":"startupContent"},{"stepId":"494","name":"timerStart","value":"admin"},{"stepId":"494","name":"timerStartupBody","value":""},{"stepId":"494","name":"timerStartupHeadline","value":""},{"stepId":"494","name":"timerTimeoutScript","value":""}]}]}],"sophie_treatment_group_structure":[{"id":"71","treatmentId":"71","label":"G","name":"Default Group Structure","structureJson":"{\"P\":{\"min\":\"3\",\"max\":\"3\"}}"}],"sophie_treatment_parameter":[],"sophie_treatment_sessiontype":[],"sophie_treatment_type":[{"treatmentId":"71","label":"P","name":"Default Player","description":null,"icon":"","hue":null}],"sophie_treatment_variable":[{"id":"2042","treatmentId":"71","groupLabel":"NULL","participantLabel":"NULL","stepgroupLabel":"NULL","stepgroupLoop":"0","name":"stepgroupLoops","value_bool":null,"value_int":"5","value_double":null,"value_string":null,"value_serialized":null}],"sophie_treatment_asset":[],"sophie_treatment_report":[{"id":"17","treatmentId":"71","name":"Bar Chart Example Report","type":"html","definition":"$groups = $groupApi->getGroupLabels();\r\n$stepgroupLoops = $stepgroupApi->getLoops('main');\r\n$groupResults = array();\r\n\r\n foreach ($groups as $group)\r\n {\r\n\t$roundResult = 0;\r\n\tfor ($i = 1; $i <= $stepgroupLoops; $i++)\r\n\t{\r\n\t $groupMembers = $groupApi->getGroupMemberLabels($group, array('stepgroupLabel' => 'main', 'stepgroupLoop' => $i));\r\n\t foreach ($groupMembers as $groupMember)\r\n\t {\r\n\t\t$roundResult += $variableApi->getPSL('input', $groupMember, 'main', $i);\r\n\t }\r\n\t}\r\n\t$groupResults[] = $roundResult;\r\n }\r\n\r\n\r\n?>\r\n\r\n \r\n \t