|
@@ 82-85 (lines=4) @@
|
| 79 |
|
$data->contextid = (int)$custom[1]; |
| 80 |
|
$data->timeupdated = time(); |
| 81 |
|
|
| 82 |
|
if (! $user = $DB->get_record("user", array("id" => $data->userid))) { |
| 83 |
|
availability_paypal_message_error_to_admin("Not a valid user id", $data); |
| 84 |
|
die; |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
if (! $context = context::instance_by_id($data->contextid, IGNORE_MISSING)) { |
| 88 |
|
availability_paypal_message_error_to_admin("Not a valid context id", $data); |
|
@@ 192-195 (lines=4) @@
|
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
// Check that user exists. |
| 192 |
|
if (!$user = $DB->get_record('user', array('id' => $data->userid))) { |
| 193 |
|
availability_paypal_message_error_to_admin("User {$data->userid} doesn't exist", $data); |
| 194 |
|
die; |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
// Check that course exists. |
| 198 |
|
if (!$course = $DB->get_record('course', array('id' => $data->courseid))) { |