2009-08-10 04:53:42 +00:00
|
|
|
<?php
|
2007-02-14 08:03:40 +00:00
|
|
|
|
|
|
|
if ($course->password != '' and !(isguestuser() and !empty($USER->enrolkey[$course->id]))) { // password
|
2009-08-10 04:53:42 +00:00
|
|
|
echo $OUTPUT->box_start('generalbox centerpara');
|
2007-02-14 08:03:40 +00:00
|
|
|
echo '<p align="center">';
|
2007-08-01 11:52:05 +00:00
|
|
|
|
2009-08-10 04:53:42 +00:00
|
|
|
$this->print_enrolmentkeyfrom( $course );
|
2005-03-04 01:53:53 +00:00
|
|
|
?>
|
|
|
|
</p>
|
|
|
|
|
2009-08-20 13:15:04 +00:00
|
|
|
<p align="center"><?php if (! empty($this->errormsg)) {echo $OUTPUT->error_text($this->errormsg);} ?></p>
|
2004-09-29 21:13:53 +00:00
|
|
|
|
|
|
|
|
2007-01-04 21:32:36 +00:00
|
|
|
<form method="post" action="enrol.php">
|
2005-03-04 02:14:44 +00:00
|
|
|
<table align="center" width="100%">
|
2004-09-29 21:13:53 +00:00
|
|
|
<tr>
|
2005-03-04 02:14:44 +00:00
|
|
|
<td align="right"><?php print_string("enrolmentkey") ?>:</td>
|
2005-03-04 01:53:53 +00:00
|
|
|
<td>
|
2005-03-04 02:14:44 +00:00
|
|
|
<input type="password" name="password" size="20" value="<?php p($password) ?>" />
|
|
|
|
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
|
2006-09-03 20:16:24 +00:00
|
|
|
<input type="hidden" name="enrol" value="manual" />
|
2009-11-19 19:41:52 +00:00
|
|
|
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
|
2005-03-04 02:14:44 +00:00
|
|
|
<input type="submit" value="<?php print_string("enrolme") ?>" />
|
2004-09-29 21:13:53 +00:00
|
|
|
</td>
|
2005-03-04 02:14:44 +00:00
|
|
|
</tr>
|
2004-09-29 21:13:53 +00:00
|
|
|
</table>
|
2005-03-04 01:53:53 +00:00
|
|
|
</form>
|
2005-03-04 02:14:44 +00:00
|
|
|
<br />
|
|
|
|
|
|
|
|
<div align="center">
|
|
|
|
<form action="<?php p($CFG->wwwroot)?>/index.php" method="post">
|
|
|
|
<input type="submit" value="<?php print_string("cancel") ?>" />
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2009-08-10 04:53:42 +00:00
|
|
|
<?php
|
|
|
|
echo $OUTPUT->box_end();
|
2007-02-14 08:03:40 +00:00
|
|
|
}
|
2005-03-04 01:53:53 +00:00
|
|
|
|
|
|
|
|
2007-02-14 08:03:40 +00:00
|
|
|
if (isguestuser()) {
|
2009-08-10 04:53:42 +00:00
|
|
|
echo $OUTPUT->box_start('centerpara');
|
2009-01-02 22:56:48 +00:00
|
|
|
$loginurl = get_login_url();
|
2010-01-03 15:46:14 +00:00
|
|
|
echo $OUTPUT->single_button($loginurl, get_string('login'));
|
2009-08-10 04:53:42 +00:00
|
|
|
echo $OUTPUT->box_end();
|
2005-03-04 01:53:53 +00:00
|
|
|
}
|
|
|
|
?>
|