Moodle

There is no way how to fill course "cost" field when using manual enrolment

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Not a bug
  • Affects Version/s: 1.9.2
  • Fix Version/s: 1.9.4
  • Component/s: Course, Enrolments
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

In course/edit_form.php there is an IF statement, that displays the "cost" field only if default enrolment method is not "manual". It makes sense as the cost field is usually only used by PayPal or Authorize.net. However in some cases admins want to set the cost of the course even they have set default enrolment to "manual" - e.g. when they use "External DB enrolement" together with "Course ordering and invoicing" (http://docs.moodle.org/en/Course_ordering_and_invoicing).

At the moment there is no clean way how to force Moodle to always display course cost setting field with default enrolment plugin set to "manual". I consider this as a bug.

Issue Links

Activity

Hide
David Mudrak added a comment -

The solution included in the attached patch is to check $CFG->alwaysdisplaycoursecost. Admins who want display course cost in the setting form may simply set this variable in their config.php.

Waiting for +1

Show
David Mudrak added a comment - The solution included in the attached patch is to check $CFG->alwaysdisplaycoursecost. Admins who want display course cost in the setting form may simply set this variable in their config.php. Waiting for +1
Hide
Eloy Lafuente (stronk7) added a comment -

Hi David,

just guessing if, alternatively... you could create a new enrol plugin, call it "database_cost" or so that, simply, extends enrolment_plugin_database.

By adding the print_entry() function to it, you'll enable the cost to be showed for those courses using that extended enrolment plugin.

Of course, your solution is an alternative one, adding MD as watcher, to decide about it. Also, perhaps, we should enable this properly for 2.0 instead of current dependency of print_entry() function.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi David, just guessing if, alternatively... you could create a new enrol plugin, call it "database_cost" or so that, simply, extends enrolment_plugin_database. By adding the print_entry() function to it, you'll enable the cost to be showed for those courses using that extended enrolment plugin. Of course, your solution is an alternative one, adding MD as watcher, to decide about it. Also, perhaps, we should enable this properly for 2.0 instead of current dependency of print_entry() function. Ciao
Hide
David Mudrak added a comment -

Yes, new plugin is a way. However in Czech we call such solution as "using a cannon to shoot a sparrow". I can imagine someone wants to keep (and display) the cost of courses even they use internal enrolment - students can be asked to send/bring money somehow.

Please Martin can you decide this? TIA

Show
David Mudrak added a comment - Yes, new plugin is a way. However in Czech we call such solution as "using a cannon to shoot a sparrow". I can imagine someone wants to keep (and display) the cost of courses even they use internal enrolment - students can be asked to send/bring money somehow. Please Martin can you decide this? TIA
Hide
David Mudrak added a comment -

Eloy was right. Implementing new enrolment plugin seems to be more pretty solution here. Closing.

Show
David Mudrak added a comment - Eloy was right. Implementing new enrolment plugin seems to be more pretty solution here. Closing.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: