|
@@ 135-143 (lines=9) @@
|
| 132 |
|
$transaction = curl_exec($curl); |
| 133 |
|
curl_close($curl); |
| 134 |
|
|
| 135 |
|
if ($transaction == 'Unauthorized'){ |
| 136 |
|
// Error=1 Não autorizado. |
| 137 |
|
$error_returnurl .= "?id={$courseid}&error=1"; |
| 138 |
|
header("Location: $error_returnurl"); |
| 139 |
|
exit;//Mantenha essa linha |
| 140 |
|
} else { |
| 141 |
|
$transaction_data = serialize(trim($transaction)); |
| 142 |
|
process_moodle($transaction_data, $instanceid, $courseid); |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
} |
| 146 |
|
|
|
@@ 159-167 (lines=9) @@
|
| 156 |
|
$transaction = curl_exec($curl); |
| 157 |
|
curl_close($curl); |
| 158 |
|
|
| 159 |
|
if ($transaction == 'Unauthorized'){ |
| 160 |
|
// Error=1 Não autorizado. |
| 161 |
|
$error_returnurl .= "?id={$courseid}&error=1"; |
| 162 |
|
header("Location: $error_returnurl"); |
| 163 |
|
exit;//Mantenha essa linha |
| 164 |
|
} else { |
| 165 |
|
$transaction_data = serialize(trim($transaction)); |
| 166 |
|
process_moodle($transaction_data, $instanceid, $courseid); |
| 167 |
|
} |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
function process_moodle($transaction_data, $instanceid, $cid) { |