Skip to content

Commit

Permalink
Pulse automation condition improved.
Browse files Browse the repository at this point in the history
- PLS-732
- PLS-733
  • Loading branch information
raja-lmsace committed Apr 11, 2024
1 parent bdb47d3 commit 3e1446e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conditions/activity/classes/conditionform.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function is_user_completed($instancedata, $userid, \completion_info $comp
}
return false;
}
return true;
return false;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions conditions/cohort/classes/conditionform.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion conditions/session/classes/conditionform.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 3e1446e

Please sign in to comment.