Skip to content

Commit

Permalink
Fix no discount bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fmido88 committed Jul 6, 2024
1 parent 987095b commit 372ce26
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Wallet Enrollment for Moodle #
==========
## V 5.4.2 ##
- fix confirm page bug.
## V 5.4.6 ##
- Fix discount line bug when no discount available.

## V 5.4.5 ##
- Add more to operation logging.
Expand Down
1 change: 1 addition & 0 deletions classes/form/topup_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public function definition() {
}

if (count($catoptions) === 1) {
$catoptions = array_flip($catoptions);
$rules = discount_rules::get_the_discount_line(reset($catoptions));
} else {
$rules = discount_rules::get_the_discount_line(-1);
Expand Down
4 changes: 2 additions & 2 deletions confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
require_login(null, false);

$instanceid = required_param('instance', PARAM_INT);
$courseid = required_param('id', PARAM_INT);
$confirm = optional_param('confirm', false, PARAM_BOOL);
$courseid = required_param('id', PARAM_INT);
$confirm = optional_param('confirm', false, PARAM_BOOL);

$params = [
'instance' => $instanceid,
Expand Down
1 change: 1 addition & 0 deletions extra/coupontable.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@
foreach ($categories as $cat) {
$catoptions[$cat->id] = $cat->get_nested_name(false);
}

$mform->addElement('select', 'category', get_string('category'), $catoptions);
$mform->addHelpButton('category', 'category_options', 'enrol_wallet');
$mform->hideIf('category', 'type', 'neq', 'category');
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024062300;
$plugin->version = 2024070600;
$plugin->requires = 2020061500;
$plugin->component = 'enrol_wallet';
$plugin->release = '5.4.5';
$plugin->release = '5.4.6';
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = [
'enrol_manual' => ANY_VERSION,
Expand Down

0 comments on commit 372ce26

Please sign in to comment.