Skip to content

Commit

Permalink
fix the logic of refunding
Browse files Browse the repository at this point in the history
  • Loading branch information
fmido88 authored Jun 29, 2023
1 parent e433b6a commit 8253de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ public function unenrol_user(stdClass $instance, $userid) {
$refundperiod = get_config('enrol_wallet', 'unenrolrefundperiod');
$now = time();
if (
$now < $enrolend
|| ($enrolstart - $now) > $refundperiod
$now > $enrolend
|| ($now - $enrolstart) > $refundperiod
) {
// Condition for refunding aren't met.
return parent::unenrol_user($instance, $userid);
Expand Down

0 comments on commit 8253de4

Please sign in to comment.