~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to enrol/paypal/enrol.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php  // $Id: enrol.php,v 1.26 2006/12/18 19:21:11 skodak Exp $
 
1
<?php  // $Id: enrol.php,v 1.28.2.5 2008/12/10 06:30:25 dongsheng Exp $
2
2
       // Implements all the main code for the PayPal plugin
3
3
 
4
4
require_once("$CFG->dirroot/enrol/enrol.class.php");
22
22
    } else {
23
23
        $cost = (float) $course->cost;
24
24
    }
25
 
    $cost = format_float($cost, 2);
26
 
 
27
25
 
28
26
    if (abs($cost) < 0.01) { // no cost, default to base class entry to course
29
27
 
31
29
        $manual->print_entry($course);
32
30
 
33
31
    } else {
 
32
        $navlinks = array();
 
33
        $navlinks[] = array('name' => $strcourses, 'link' => "$CFG->wwwroot/course", 'type' => 'misc');
 
34
        $navlinks[] = array('name' => $strloginto, 'link' => null, 'type' => 'misc');
 
35
        $navigation = build_navigation($navlinks);
34
36
 
35
 
        print_header($strloginto, $course->fullname,
36
 
                     "<a href=\"$CFG->wwwroot/course/\">$strcourses</a> -> $strloginto");
 
37
        print_header($strloginto, $course->fullname, $navigation);
37
38
        print_course($course, "80%");
38
39
 
39
40
        if ($course->password) {  // Presenting two options
50
51
                // in unencrypted connection...
51
52
                $wwwroot = str_replace("http://", "https://", $CFG->wwwroot);
52
53
            }
53
 
            echo '<div align="center"><p>'.get_string('paymentrequired').'</p>';
 
54
            echo '<div class="mdl-align"><p>'.get_string('paymentrequired').'</p>';
54
55
            echo '<p><b>'.get_string('cost').": $CFG->enrol_currency $cost".'</b></p>';
55
56
            echo '<p><a href="'.$wwwroot.'/login/">'.get_string('loginsite').'</a></p>';
56
57
            echo '</div>';
124
125
    return $str;
125
126
}
126
127
 
127
 
 
128
128
/// Override the base class config_form() function
129
129
function config_form($frm) {
130
130
    global $CFG;
199
199
    }
200
200
}
201
201
 
 
202
/**
 
203
 * Provides method to print the enrolment key form code. This method is called
 
204
 * from /enrol/manual/enrol.html if it's included
 
205
 * @param  object a valid course object
 
206
 */
 
207
function print_enrolmentkeyfrom($course) {
 
208
    $manual = enrolment_factory::factory('manual');
 
209
    $manual->print_enrolmentkeyfrom($course);
 
210
}
 
211
 
 
212
 
202
213
} // end of class definition
203
214
 
204
215
?>