Issue Details (XML | Word | Printable)

Key: MDL-16782
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Dan Poltawski
Reporter: Daniel Prieler
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

paypal: default cost is not used

Created: 03/Oct/08 05:47 PM   Updated: 31/Oct/09 06:11 AM
Component/s: Enrolments
Affects Version/s: 1.9.2
Fix Version/s: 1.9.7

Participants: Dan Poltawski and Daniel Prieler
Security Level: None
Resolved date: 31/Oct/09
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
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.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dan Poltawski added a comment - 31/Oct/09 06:11 AM
Thanks Daniel, I've fixed this in CVS