Merge branch 'MDL-26937' of git://github.com/timhunt/moodle into MOODLE_19_STABLE
[moodle.git] / enrol / manual / enrol.html
blob038dc80f9456bb9806a43f6597319fc2b38e030a
1 <?php
3 if ($course->password != '' and !(isguestuser() and !empty($USER->enrolkey[$course->id]))) { // password
4 print_box_start('generalbox centerpara');
5 echo '<p align="center">';
7 $this->print_enrolmentkeyfrom( $course );
8 ?>
9 </p>
11 <p align="center"><?php if (! empty($this->errormsg)) {formerr($this->errormsg);} ?></p>
14 <form method="post" action="enrol.php">
15 <table align="center" width="100%">
16 <tr>
17 <td align="right"><?php print_string("enrolmentkey") ?>:</td>
18 <td>
19 <input type="password" name="password" size="20" value="<?php p($password) ?>" />
20 <input type="hidden" name="id" value="<?php p($course->id) ?>" />
21 <input type="hidden" name="enrol" value="manual" />
22 <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
23 <input type="submit" value="<?php print_string("enrolme") ?>" />
24 </td>
25 </tr>
26 </table>
27 </form>
28 <br />
30 <div align="center">
31 <form action="<?php p($CFG->wwwroot)?>/index.php" method="post">
32 <input type="submit" value="<?php print_string("cancel") ?>" />
33 </form>
34 </div>
36 <?php
37 print_box_end();
41 if (isguestuser()) {
42 print_box_start('centerpara');
43 if (empty($CFG->loginhttps)) {
44 $loginurl = $CFG->wwwroot .'/login/index.php';
45 } else {
46 $wwwroot = str_replace('http:','https:', $CFG->wwwroot);
47 $loginurl = $wwwroot .'/login/index.php';
49 print_single_button($loginurl, null, get_string('login'));
50 print_box_end();