mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
More robust enrolment screen
This commit is contained in:
parent
61948621b5
commit
6f9d8d65f6
@ -1,42 +1,47 @@
|
||||
<CENTER>
|
||||
<center>
|
||||
|
||||
<table cellpadding=20>
|
||||
<tr valign=top>
|
||||
<table cellpadding="20">
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<P ALIGN=CENTER>
|
||||
<? if ($teacher) {
|
||||
$teacher->fullname = "$teacher->firstname $teacher->lastname";
|
||||
$teachername = "<A HREF=../user/view.php?id=$teacher->id&course=$site->id>$teacher->fullname</A>.";
|
||||
<p align="center">
|
||||
<?php
|
||||
if ($teacher) {
|
||||
$teachername = "<a href=\"../user/view.php?id=$teacher->id&course=$site->id\">".
|
||||
"$teacher->firstname $teacher->lastname</a>.";
|
||||
} else {
|
||||
$teachername = get_string("yourteacher", "", strtolower($course->teacher));
|
||||
}
|
||||
print_string("enrolmentkeyfrom", "", $teachername);
|
||||
?>
|
||||
</P>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td bgcolor="<?=$THEME->cellheading?>"> <CENTER><? formerr($errormsg) ?> </CENTER>
|
||||
<tr valign=top>
|
||||
<td bgcolor="<?php p($THEME->cellheading)?>"><center><?php if (isset ($errormsg)) {formerr($errormsg);} ?></center>
|
||||
<form name="form" method="post" action="enrol.php">
|
||||
<table>
|
||||
<tr>
|
||||
<td width=50% align=right><P><? print_string("enrolmentkey") ?>:</P></td>
|
||||
<td width=50% >
|
||||
<input type="password" name="password" size=20 value="<? p($password) ?>" >
|
||||
<input type="hidden" name="id" value="<? p($id) ?>" >
|
||||
<tr>
|
||||
<td width="50%" align="right"><p><?php print_string("enrolmentkey") ?>:</p></td>
|
||||
<td width="50%">
|
||||
<input type="password" name="password" size="20" value="<?php p($password) ?>" >
|
||||
<input type="hidden" name="id" value="<?php p($id) ?>" >
|
||||
</td>
|
||||
<tr>
|
||||
<td width=50%> </td>
|
||||
<td width=50%>
|
||||
<table cellpadding=1 cellspacing=0><tr>
|
||||
<td><input type=submit value="<? print_string("login") ?>"></form></td>
|
||||
<td><form action="<?=$CFG->wwwroot?>/index.php" method=post>
|
||||
<input type=submit value="<? print_string("cancel") ?>"></form></td>
|
||||
</tr></table>
|
||||
<tr>
|
||||
<td width="50%"> </td>
|
||||
<td width="50%">
|
||||
<table cellpadding="1" cellspacing="0" align="center">
|
||||
<tr>
|
||||
|
||||
<td><input type="submit" value="<?php print_string("login") ?>"> </form></td>
|
||||
<td><form action="<?php p($CFG->wwwroot)?>/index.php" method=post>
|
||||
<input type="submit" value="<?php print_string("cancel") ?>"></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@ -84,6 +84,9 @@
|
||||
}
|
||||
|
||||
$teacher = get_teacher($course->id);
|
||||
if (!isset($password)) {
|
||||
$password = "";
|
||||
}
|
||||
|
||||
$strloginto = get_string("loginto", "", $course->shortname);
|
||||
$strcourses = get_string("courses");
|
||||
|
Loading…
x
Reference in New Issue
Block a user