Permalink
Browse files

Some documentation.

  • Loading branch information...
ethem
ethem committed Aug 30, 2006
1 parent edbe60a commit d1b86e65cc3e146bd4a108fedfdc6d143407f61d
Showing with 21 additions and 21 deletions.
  1. +21 −21 enrol/authorize/enrol.php
View
@@ -577,10 +577,10 @@ function process_config($config)
}
/**
- * zero_cost (static method)
+ * Whether a course cost is smaller than 0.01
*
- * @param unknown_type $course
- * @return number
+ * @param object $course Course information
+ * @return bool true if the course is free cost
* @static
*/
function zero_cost($course) {
@@ -590,10 +590,10 @@ function zero_cost($course) {
/**
- * get_course_cost (static method)
+ * Gets course cost
*
* @param object $course
- * @return array
+ * @return array cost=>'cost', currency=>'currency'
* @static
*/
function get_course_cost($course)
@@ -616,7 +616,8 @@ function get_course_cost($course)
}
/**
- * email_to_admin (static method)
+ * Sends email to main admin.
+ * FIXME: Admin ROLES
*
* @param string $subject
* @param mixed $data
@@ -671,10 +672,10 @@ function check_openssl_loaded() {
}
/**
- * get_list_of_creditcards (static method)
+ * Gets list of credits cards
*
- * @param bool $getall
- * @return array
+ * @param bool $getall, true get all of types, false config values
+ * @return array, Key => Value
* @static
*/
function get_list_of_creditcards($getall = false)
@@ -705,27 +706,26 @@ function get_list_of_creditcards($getall = false)
return $ret;
}
+ /**
+ * Gets lists of payment methods (CC,ECHECK)
+ *
+ * @param bool $getall, get all of types, false config values
+ * @return array, Key only
+ * @static
+ */
function get_list_of_payment_methods($getall = false)
{
global $CFG;
- $alltypes = array(AN_METHOD_CC, AN_METHOD_ECHECK);
-
if ($getall) {
- return $alltypes;
+ return array(AN_METHOD_CC, AN_METHOD_ECHECK);
}
-
- $ret = array();
- if (empty($CFG->an_acceptmethods)) {
- $ret[] = AN_METHOD_CC; // default
+ elseif (empty($CFG->an_acceptmethods)) {
+ return array(AN_METHOD_CC); // default
}
else {
- $mthds = explode(',', $CFG->an_acceptmethods);
- foreach ($mthds as $mthd) {
- $ret[] = $mthd;
- }
+ return explode(',', $CFG->an_acceptmethods);
}
- return $ret;
}

0 comments on commit d1b86e6

Please sign in to comment.