mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
small bug in teacher link due to undefined $site
This commit is contained in:
parent
c79271de60
commit
64c3e85374
1 changed files with 1 additions and 45 deletions
|
@ -1,45 +1 @@
|
|||
<table cellpadding="20" align="center">
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td class="generalbox" bgcolor="<?php p($THEME->cellcontent) ?>"><center><?php if (! empty($this->errormsg)) {formerr($this->errormsg);} ?></center>
|
||||
<form name="form" method="post" action="enrol.php">
|
||||
<table>
|
||||
<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($course->id) ?>" >
|
||||
</td>
|
||||
<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>
|
||||
|
||||
<table cellpadding="20" align="center">
<tr valign="top">
<td>
<p align="center">
<?php
if ($teacher) {
$site = get_site();
$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>
</td>
</tr>
<tr valign=top>
<td class="generalbox" bgcolor="<?php p($THEME->cellcontent) ?>">
<center><?php if (! empty($this->errormsg)) {formerr($this->errormsg);} ?></center>
<form name="form" method="post" action="enrol.php">
<table>
<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($course->id) ?>" >
</td>
<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>
|
Loading…
Add table
Add a link
Reference in a new issue