Exemplo n.º 1
0
function zero_cost($course)
{
    $curcost = get_course_cost($course);
    return abs($curcost['cost']) < 0.01;
}
Exemplo n.º 2
0
 /**
  * Gets access icons.
  *
  * @param object $course
  * @return string
  * @access public
  */
 function get_access_icons($course)
 {
     $manual = enrolment_factory::factory('manual');
     $str = $manual->get_access_icons($course);
     $curcost = get_course_cost($course);
     if (abs($curcost['cost']) > 0.0) {
         $strrequirespayment = get_string("requirespayment");
         $strcost = get_string("cost");
         $currency = $curcost['currency'];
         switch ($currency) {
             case 'USD':
                 $currency = 'US$';
                 break;
             case 'CAD':
                 $currency = 'C$';
                 break;
             case 'EUR':
                 $currency = '&euro;';
                 break;
             case 'GBP':
                 $currency = '&pound;';
                 break;
             case 'JPY':
                 $currency = '&yen;';
                 break;
         }
         $str .= '<div class="cost" title="' . $strrequirespayment . '">' . $strcost . ': ';
         $str .= $currency . ' ' . $curcost['cost'] . '</div>';
     }
     return $str;
 }
Exemplo n.º 3
0
function zero_cost($plugininstance)
{
    $curcost = get_course_cost($plugininstance);
    return abs($curcost['cost']) < 0.01;
}