fmido88 / moodle-enrol_wallet

Enrollment using wallet credit with coupons and using payments gateways with restrictions.
Other
3 stars 1 forks source link

No default value for profile field mapping #24

Closed ewallah closed 6 months ago

ewallah commented 6 months ago

The admin_discount_field has no default value. As a result, the admin bookmarks plugin sometimes does not work: the user is asked to provide a value for discount:

<div class="box py-3 generalbox">The settings shown below were added during your last Moodle upgrade. Make any changes necessary to the defaults and then click the 'Save changes' button at the bottom of this page.</div><form action="upgradesettings.php" method="post" id="adminsettings"><div><input type="hidden" name="sesskey" value="key" /><input type="hidden" name="return" value="" /><fieldset><div class="clearer"><!-- --></div><h2 class="main">New settings - Wallet enrolment</h2><fieldset class="adminsettings">
<div class="clearer"><!-- --></div>
<div class="form-item row" id="admin-discount_field">
    <div class="form-label col-sm-3 text-sm-right">
            <label for="id_s_enrol_wallet_discount_field">
                Profile field mapping
            </label>
        <span class="form-shortname d-block small text-muted">enrol_wallet | discount_field</span>
    </div>
    <div class="form-setting col-sm-9">
        <div class="form-select defaultsnext">
    <select  id="id_s_enrol_wallet_discount_field" name="s_enrol_wallet_discount_field" class="custom-select">
            <option value="0" >Not set</option>
    </select>
</div>
        <div class="form-description mt-3"><p>Select the profile field that stores information about discounts in user profiles.</p>
</div>
fmido88 commented 6 months ago

Thanks @ewallah I fixed it.