From 3e1446e629b401a3840b3e5b66ea6cf02053accf Mon Sep 17 00:00:00 2001 From: "raja.lmsace@gmail.com" Date: Thu, 11 Apr 2024 13:45:41 +0530 Subject: [PATCH] Pulse automation condition improved. - PLS-732 - PLS-733 --- conditions/activity/classes/conditionform.php | 2 +- conditions/cohort/classes/conditionform.php | 4 ++-- conditions/session/classes/conditionform.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conditions/activity/classes/conditionform.php b/conditions/activity/classes/conditionform.php index 904ea8b..290ac20 100644 --- a/conditions/activity/classes/conditionform.php +++ b/conditions/activity/classes/conditionform.php @@ -112,7 +112,7 @@ public function is_user_completed($instancedata, $userid, \completion_info $comp } return false; } - return true; + return false; } /** diff --git a/conditions/cohort/classes/conditionform.php b/conditions/cohort/classes/conditionform.php index 46e9b08..aebd61d 100644 --- a/conditions/cohort/classes/conditionform.php +++ b/conditions/cohort/classes/conditionform.php @@ -55,7 +55,7 @@ public function load_instance_form(&$mform, $forminstance) { $mform->addElement('select', 'condition[cohort][status]', $completionstr, $this->get_options()); $mform->addHelpButton('condition[cohort][status]', 'condition', 'pulsecondition_cohort'); - $cohorts = cohort_get_all_cohorts('0', '500', '', false); + $cohorts = cohort_get_all_cohorts(0, 0); $cohorts = $cohorts['cohorts']; array_walk($cohorts, function(&$value) { @@ -98,7 +98,7 @@ public function is_user_completed($instancedata, $userid, \completion_info $comp } } // Cohorts are configured but not completed. - return !empty($cohorts) ? false : true; + return !empty($cohorts) ? true : false; } /** diff --git a/conditions/session/classes/conditionform.php b/conditions/session/classes/conditionform.php index 54ceb39..c98b1ed 100644 --- a/conditions/session/classes/conditionform.php +++ b/conditions/session/classes/conditionform.php @@ -113,7 +113,7 @@ public function is_user_completed($instancedata, $userid, \completion_info $comp return ($existingsignup) ? true : false; } // Not configured any session modules. - return true; + return false; } /**