Skip to content

Commit

Permalink
Some documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ethem committed Aug 30, 2006
1 parent edbe60a commit d1b86e6
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions enrol/authorize/enrol.php
Expand Up @@ -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 * @param object $course Course information
* @return number * @return bool true if the course is free cost
* @static * @static
*/ */
function zero_cost($course) { function zero_cost($course) {
Expand All @@ -590,10 +590,10 @@ function zero_cost($course) {




/** /**
* get_course_cost (static method) * Gets course cost
* *
* @param object $course * @param object $course
* @return array * @return array cost=>'cost', currency=>'currency'
* @static * @static
*/ */
function get_course_cost($course) function get_course_cost($course)
Expand All @@ -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 string $subject
* @param mixed $data * @param mixed $data
Expand Down Expand Up @@ -671,10 +672,10 @@ function check_openssl_loaded() {
} }


/** /**
* get_list_of_creditcards (static method) * Gets list of credits cards
* *
* @param bool $getall * @param bool $getall, true get all of types, false config values
* @return array * @return array, Key => Value
* @static * @static
*/ */
function get_list_of_creditcards($getall = false) function get_list_of_creditcards($getall = false)
Expand Down Expand Up @@ -705,27 +706,26 @@ function get_list_of_creditcards($getall = false)
return $ret; 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) function get_list_of_payment_methods($getall = false)
{ {
global $CFG; global $CFG;


$alltypes = array(AN_METHOD_CC, AN_METHOD_ECHECK);

if ($getall) { if ($getall) {
return $alltypes; return array(AN_METHOD_CC, AN_METHOD_ECHECK);
} }

elseif (empty($CFG->an_acceptmethods)) {
$ret = array(); return array(AN_METHOD_CC); // default
if (empty($CFG->an_acceptmethods)) {
$ret[] = AN_METHOD_CC; // default
} }
else { else {
$mthds = explode(',', $CFG->an_acceptmethods); return explode(',', $CFG->an_acceptmethods);
foreach ($mthds as $mthd) {
$ret[] = $mthd;
}
} }
return $ret;
} }




Expand Down

0 comments on commit d1b86e6

Please sign in to comment.