]> git.mjollnir.org Git - moodle.git/commitdiff
Show a link for echeck payments if an user has_capability('enrol/authorize:uploadcsv').
authorethem <ethem>
Mon, 30 Oct 2006 10:12:20 +0000 (10:12 +0000)
committerethem <ethem>
Mon, 30 Oct 2006 10:12:20 +0000 (10:12 +0000)
enrol/authorize/locallib.php

index 4dee694fbd2be96199c2137e5248d08635532f80..b188cf00ebc54656b56330000cad6ccd68d274f4 100644 (file)
@@ -458,7 +458,12 @@ function authorize_print_order_details($orderno)
     else { // SHOW
         $actions = '';
         if (empty($status->actions)) {
-            $actions .= $strs->none;
+            if (($order->paymentmethod == AN_METHOD_ECHECK) && has_capability('enrol/authorize:uploadcsv', get_context_instance(CONTEXT_USER, $USER->id))) {
+                $actions .= '<a href="uploadcsv.php">'.get_string('uploadcsv', 'enrol_authorize').'</a>';
+            }
+            else {
+                $actions .= $strs->none;
+            }
         }
         else {
             foreach ($status->actions as $value) {