Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-16782

paypal: default cost is not used

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.2
    • 1.9.7
    • Enrolments
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      hi!

      as i understand:
      the setting "enrol_cost" in paypal-plugin should be used, if a course has no cost set.
      but it doesn't.

      the error is in enrol/paypal/enrol.php
      where this is checked on line 25 and 95:
      if ( (float) $course->cost < 0)
      // use default cost
      else
      // use course cost

      but if i add a course it has the cost of 0.
      so the solution is to change the if-statement to check for less or equal than 0:
      if ( (float) $course->cost <= 0)

      regards, daniel.

      Attachments

        Activity

          People

            poltawski Dan Poltawski
            danielpr Daniel P
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25/Nov/09