Commit 51354d25 authored by Rich's avatar Rich
Browse files

custom fix script

parent dcd2a79f
......@@ -9,10 +9,10 @@ if (php_sapi_name() !== 'cli') {
exit;
}
// ul21
$surveyID = 8;
// UL19
$surveyID = 3;
// ul21
$surveyID = 8;
/*
$survey = \Civi\Hark\Survey::newFromSurveyID($surveyID);
......@@ -141,6 +141,7 @@ foreach ($participantIDs as $participantID) {
}
*/
/*
// cnp_data_text
$answer = $participant->getAnswer('Q2qP7MCrDTmq0');
print "Participant $participantID {$participant->getContactName()} ";
......@@ -164,6 +165,12 @@ foreach ($participantIDs as $participantID) {
}
}
}
*/
// 4.3: change stored value for option 'Commitment to directly reinvest in community owned renewable energy and or renewable energy projects on campus 10%'
$changes[] = mapRadio($participant, 'Qse7Jll3lFDMz', '15', '10');
// 5.2c
$changes[] = mapRadio($participant, 'QZQ1i5ycNGCj1', '2_5', '5');
// Filter for actual changes.
$_ = [];
......@@ -177,4 +184,11 @@ foreach ($participantIDs as $participantID) {
print "Participant $participantID {$participant->getContactName()} - no changes\n";
}
}
if ($c > 0) {
print "recalc...\n";
$r = \Civi\Api4\HarkSurvey::Recalculate(FALSE)
->setId(8)
->execute();
print_r($r);
}
Supports Markdown
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