From 4d4701bcb71c014fa7c8c289ebae7eee66642745 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 5 Jun 2021 01:44:28 +0000 Subject: [PATCH 1/2] dev now synced with prod --- .../HumanitiesCommonsIdpEnrollerCoPetitionsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/HumanitiesCommonsIdpEnrollerCoPetitionsController.php b/Controller/HumanitiesCommonsIdpEnrollerCoPetitionsController.php index d3183e1..ffce9ef 100644 --- a/Controller/HumanitiesCommonsIdpEnrollerCoPetitionsController.php +++ b/Controller/HumanitiesCommonsIdpEnrollerCoPetitionsController.php @@ -80,7 +80,7 @@ protected function execute_plugin_checkEligibility($id, $onFinish) { // If the petition already has a username then do not present // a form and just redirect. - if ($coPetition['CoPetition']['co_enrollment_flow_id'] != '654' ) { + if ($coPetition['CoPetition']['co_enrollment_flow_id'] != '604' ) { foreach($coPetition['EnrolleeCoPerson']['Identifier'] as $identifier) { if($identifier['type'] == $config['HumanitiesCommonsIdpEnroller']['username_id_type'] && !empty($identifier['identifier']) ) { From 6fda856e80ccbba3bd1db21b10b09f6667e608b9 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Jun 2021 11:54:32 +0000 Subject: [PATCH 2/2] Fix wedge logic for env source enrollment flows. --- .../HumanitiesCommonsIdpEnrollerCoPetitionsController.php | 5 +++-- .../check_eligibility.ctp | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Controller/HumanitiesCommonsIdpEnrollerCoPetitionsController.php b/Controller/HumanitiesCommonsIdpEnrollerCoPetitionsController.php index ffce9ef..f8cf44f 100644 --- a/Controller/HumanitiesCommonsIdpEnrollerCoPetitionsController.php +++ b/Controller/HumanitiesCommonsIdpEnrollerCoPetitionsController.php @@ -50,7 +50,7 @@ protected function execute_plugin_checkEligibility($id, $onFinish) { $args = array(); $args['conditions']['HumanitiesCommonsIdpEnroller.co_enrollment_flow_wedge_id'] = $efwid; - $args['contain'] = true; + $args['contain'] = false; $config = $this->HumanitiesCommonsIdpEnroller->find('first', $args); if (empty($config)) { $this->Flash->set(_txt('er.humanitiescommonsidpenroller.account.noconfig'), array('key' => 'error')); @@ -223,6 +223,7 @@ protected function execute_plugin_checkEligibility($id, $onFinish) { // GET, fall through to display view ( $debug ? $this->log($logPrefix . "received GET so displaying form to collect username") : null); + $this->set('vv_efwid', $efwid); } /** @@ -242,7 +243,7 @@ protected function execute_plugin_selectEnrollee($id, $onFinish) { $args = array(); $args['conditions']['HumanitiesCommonsIdpEnroller.co_enrollment_flow_wedge_id'] = $efwid; - $args['contain'] = true; + $args['contain'] = false; $config = $this->HumanitiesCommonsIdpEnroller->find('first', $args); if (empty($config)) { $this->Flash->set(_txt('er.humanitiescommonsidpenroller.account.noconfig'), array('key' => 'error')); diff --git a/View/HumanitiesCommonsIdpEnrollerCoPetitions/check_eligibility.ctp b/View/HumanitiesCommonsIdpEnrollerCoPetitions/check_eligibility.ctp index c024cca..c9e1527 100644 --- a/View/HumanitiesCommonsIdpEnrollerCoPetitions/check_eligibility.ctp +++ b/View/HumanitiesCommonsIdpEnrollerCoPetitions/check_eligibility.ctp @@ -33,6 +33,7 @@ print $this->element("pageTitleAndButtons", $params); print $this->Form->create(false); + print $this->Form->hidden('CoPetition.co_enrollment_flow_wedge_id', array('default' => $vv_efwid)); ?>