2001-11-22 06:23:56 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
|
|
|
|
// Display profile for a particular user
|
|
|
|
|
2003-01-05 14:19:20 +00:00
|
|
|
require_once("../config.php");
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2005-04-04 03:55:37 +00:00
|
|
|
$id = optional_param('id', 0, PARAM_INT); // user id
|
|
|
|
$course = optional_param('course', SITEID, PARAM_INT); // course id (defaults to Site)
|
|
|
|
$enable = optional_param('enable', ''); // enable email
|
|
|
|
$disable = optional_param('disable', ''); // disable email
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2005-02-17 06:15:22 +00:00
|
|
|
|
2004-09-25 12:53:35 +00:00
|
|
|
if (empty($id)) { // See your own profile by default
|
|
|
|
require_login();
|
|
|
|
$id = $USER->id;
|
|
|
|
}
|
|
|
|
|
2001-11-22 06:23:56 +00:00
|
|
|
if (! $user = get_record("user", "id", $id) ) {
|
|
|
|
error("No such user in this course");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (! $course = get_record("course", "id", $course) ) {
|
|
|
|
error("No such course id");
|
|
|
|
}
|
|
|
|
|
2004-05-03 15:03:31 +00:00
|
|
|
if ($course->category) {
|
2001-11-22 06:23:56 +00:00
|
|
|
require_login($course->id);
|
2004-06-22 18:34:35 +00:00
|
|
|
} else if ($CFG->forcelogin or !empty($CFG->forceloginforprofiles)) {
|
2004-05-03 15:03:31 +00:00
|
|
|
if (isguest()) {
|
|
|
|
redirect("$CFG->wwwroot/login/index.php");
|
|
|
|
}
|
|
|
|
require_login();
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
|
2004-09-21 11:41:58 +00:00
|
|
|
add_to_log($course->id, "user", "view", "view.php?id=$user->id&course=$course->id", "$user->id");
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2004-10-27 06:01:20 +00:00
|
|
|
if ($course->id != SITEID) {
|
|
|
|
if ($student = get_record("user_students", "userid", $user->id, "course", $course->id)) {
|
|
|
|
$user->lastaccess = $student->timeaccess;
|
|
|
|
} else if ($teacher = get_record("user_teachers", "userid", $user->id, "course", $course->id)) {
|
|
|
|
$user->lastaccess = $teacher->timeaccess;
|
|
|
|
}
|
2003-10-27 14:15:05 +00:00
|
|
|
}
|
|
|
|
|
2003-11-19 16:15:56 +00:00
|
|
|
$fullname = fullname($user, isteacher($course->id));
|
2002-07-04 07:52:06 +00:00
|
|
|
$personalprofile = get_string("personalprofile");
|
|
|
|
$participants = get_string("participants");
|
|
|
|
|
2004-08-16 02:15:24 +00:00
|
|
|
if (empty($USER->id)) {
|
|
|
|
$currentuser = false;
|
|
|
|
} else {
|
|
|
|
$currentuser = ($user->id == $USER->id);
|
|
|
|
}
|
|
|
|
|
2004-03-13 15:22:33 +00:00
|
|
|
if (groupmode($course) == SEPARATEGROUPS and !isteacheredit($course->id)) { // Groups must be kept separate
|
|
|
|
require_login();
|
|
|
|
|
2005-11-08 07:19:27 +00:00
|
|
|
///this is changed because of mygroupid
|
|
|
|
$gtrue = false;
|
|
|
|
if ($mygroups = mygroupid($course->id)){
|
|
|
|
foreach ($mygroups as $group){
|
|
|
|
if (ismember($group, $user->id)){
|
|
|
|
$gtrue = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!$currentuser && !isteacheredit($course->id, $user->id) && !$gtrue) {
|
2004-03-13 15:22:33 +00:00
|
|
|
print_header("$personalprofile: ", "$personalprofile: ",
|
|
|
|
"<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
|
|
|
|
<a href=\"index.php?id=$course->id\">$participants</a>",
|
|
|
|
"", "", true, " ", navmenu($course));
|
|
|
|
error(get_string("groupnotamember"), "../course/view.php?id=$course->id");
|
2004-03-09 23:07:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-02-05 02:08:25 +00:00
|
|
|
if ($course->id == SITEID and !$currentuser) { // To reduce possibility of "browsing" userbase at site level
|
2005-01-23 21:38:01 +00:00
|
|
|
if (!isteacherinanycourse() and !isteacherinanycourse($user->id) ) { // Teachers can browse and be browsed at site level
|
2004-08-12 06:57:53 +00:00
|
|
|
print_header("$personalprofile: ", "$personalprofile: ",
|
|
|
|
"<a href=\"index.php?id=$course->id\">$participants</a>",
|
|
|
|
"", "", true, " ", navmenu($course));
|
|
|
|
print_heading(get_string('usernotavailable', 'error'));
|
|
|
|
print_footer($course);
|
|
|
|
die;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-22 06:23:56 +00:00
|
|
|
if ($course->category) {
|
2004-06-22 18:34:35 +00:00
|
|
|
print_header("$personalprofile: $fullname", "$personalprofile: $fullname",
|
|
|
|
"<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
|
2003-10-21 06:40:39 +00:00
|
|
|
<a href=\"index.php?id=$course->id\">$participants</a> -> $fullname",
|
2004-01-10 16:41:29 +00:00
|
|
|
"", "", true, " ", navmenu($course));
|
2001-11-22 06:23:56 +00:00
|
|
|
} else {
|
2004-06-22 18:34:35 +00:00
|
|
|
print_header("$course->fullname: $personalprofile: $fullname", "$course->fullname",
|
2004-01-10 16:41:29 +00:00
|
|
|
"$fullname", "", "", true, " ", navmenu($course));
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
|
2004-03-13 15:22:33 +00:00
|
|
|
|
2004-08-12 06:57:53 +00:00
|
|
|
if ($course->category and ! isguest() ) { // Need to have access to a course to see that info
|
2002-06-10 03:49:28 +00:00
|
|
|
if (!isstudent($course->id, $user->id) && !isteacher($course->id, $user->id)) {
|
2002-07-04 07:52:06 +00:00
|
|
|
print_heading(get_string("notenrolled", "", $fullname));
|
2002-06-10 03:49:28 +00:00
|
|
|
print_footer($course);
|
|
|
|
die;
|
|
|
|
}
|
2002-06-04 06:49:52 +00:00
|
|
|
}
|
|
|
|
|
2002-09-22 03:01:17 +00:00
|
|
|
if ($user->deleted) {
|
|
|
|
print_heading(get_string("userdeleted"));
|
|
|
|
}
|
|
|
|
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2005-03-20 12:02:14 +00:00
|
|
|
/// Print tabs at top
|
|
|
|
/// This same call is made in:
|
|
|
|
/// /user/view.php
|
|
|
|
/// /user/edit.php
|
|
|
|
/// /course/user.php
|
|
|
|
$currenttab = 'profile';
|
|
|
|
include('tabs.php');
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2005-03-20 12:02:14 +00:00
|
|
|
echo "<table width=\"80%\" align=\"center\" border=\"0\" cellspacing=\"0\" class=\"userinfobox\">";
|
|
|
|
echo "<tr>";
|
|
|
|
echo "<td width=\"100\" valign=\"top\" class=\"side\">";
|
|
|
|
print_user_picture($user->id, $course->id, $user->picture, true, false, false);
|
|
|
|
echo "</td><td width=\"100%\" class=\"content\">";
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
// Print the description
|
|
|
|
|
|
|
|
if ($user->description) {
|
2004-09-21 10:52:55 +00:00
|
|
|
echo format_text($user->description, FORMAT_MOODLE)."<hr />";
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Print all the little details in a list
|
|
|
|
|
2005-03-20 12:02:14 +00:00
|
|
|
echo '<table border="0" cellpadding="0" cellspacing="0" class="list">';
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2002-06-10 04:33:46 +00:00
|
|
|
if ($user->city or $user->country) {
|
2003-10-27 14:15:05 +00:00
|
|
|
$countries = get_list_of_countries();
|
2003-09-26 08:04:48 +00:00
|
|
|
print_row(get_string("location").":", "$user->city, ".$countries["$user->country"]);
|
2002-06-10 04:33:46 +00:00
|
|
|
}
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
if (isteacher($course->id)) {
|
|
|
|
if ($user->address) {
|
2002-07-04 07:52:06 +00:00
|
|
|
print_row(get_string("address").":", "$user->address");
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
if ($user->phone1) {
|
2002-07-04 07:52:06 +00:00
|
|
|
print_row(get_string("phone").":", "$user->phone1");
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
if ($user->phone2) {
|
2002-07-04 07:52:06 +00:00
|
|
|
print_row(get_string("phone").":", "$user->phone2");
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-06-22 18:34:35 +00:00
|
|
|
if ($user->maildisplay == 1 or
|
|
|
|
($user->maildisplay == 2 and $course->category and !isguest()) or
|
2004-03-24 12:23:43 +00:00
|
|
|
isteacher($course->id)) {
|
2004-02-20 10:27:24 +00:00
|
|
|
|
2004-10-27 06:01:20 +00:00
|
|
|
$emailswitch = '';
|
|
|
|
|
2004-02-20 10:27:24 +00:00
|
|
|
if (isteacheredit($course->id) or $currentuser) { /// Can use the enable/disable email stuff
|
2005-06-15 09:49:18 +00:00
|
|
|
if (!empty($enable)) { /// Recieved a parameter to enable the email address
|
2004-02-20 10:27:24 +00:00
|
|
|
set_field('user', 'emailstop', 0, 'id', $user->id);
|
|
|
|
$user->emailstop = 0;
|
|
|
|
}
|
2005-06-15 09:49:18 +00:00
|
|
|
if (!empty($disable)) { /// Recieved a parameter to disable the email address
|
2004-02-20 10:27:24 +00:00
|
|
|
set_field('user', 'emailstop', 1, 'id', $user->id);
|
|
|
|
$user->emailstop = 1;
|
|
|
|
}
|
2004-10-27 06:01:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (isteacheredit($course->id)) { /// Can use the enable/disable email stuff
|
2004-02-20 10:27:24 +00:00
|
|
|
if ($user->emailstop) {
|
|
|
|
$switchparam = 'enable';
|
|
|
|
$switchtitle = get_string('emaildisable');
|
2004-07-24 06:37:44 +00:00
|
|
|
$switchclick = get_string('emailenableclick');
|
2004-07-24 06:25:14 +00:00
|
|
|
$switchpix = 'emailno.gif';
|
2004-02-20 10:27:24 +00:00
|
|
|
} else {
|
|
|
|
$switchparam = 'disable';
|
|
|
|
$switchtitle = get_string('emailenable');
|
2004-07-24 06:37:44 +00:00
|
|
|
$switchclick = get_string('emaildisableclick');
|
2004-07-24 06:25:14 +00:00
|
|
|
$switchpix = 'email.gif';
|
2004-02-20 10:27:24 +00:00
|
|
|
}
|
2005-04-18 17:57:26 +00:00
|
|
|
$emailswitch = " <a title=\"$switchclick\" ".
|
|
|
|
"href=\"view.php?id=$user->id&course=$course->id&$switchparam=1\">".
|
|
|
|
"<img border=\"0\" width=\"11\" height=\"11\" src=\"$CFG->pixpath/t/$switchpix\" alt=\"\" /></a>";
|
2004-10-27 06:01:20 +00:00
|
|
|
|
|
|
|
} else if ($currentuser) { /// Can only re-enable an email this way
|
|
|
|
if ($user->emailstop) { // Include link that tells how to re-enable their email
|
|
|
|
$switchparam = 'enable';
|
|
|
|
$switchtitle = get_string('emaildisable');
|
|
|
|
$switchclick = get_string('emailenableclick');
|
|
|
|
|
2005-04-18 17:57:26 +00:00
|
|
|
$emailswitch = " (<a title=\"$switchclick\" ".
|
|
|
|
"href=\"view.php?id=$user->id&course=$course->id&enable=1\">$switchtitle</a>)";
|
2004-10-27 06:01:20 +00:00
|
|
|
}
|
2004-02-20 10:27:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
print_row(get_string("email").":", obfuscate_mailto($user->email, '', $user->emailstop)."$emailswitch");
|
2002-08-21 13:29:25 +00:00
|
|
|
}
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
if ($user->url) {
|
2003-10-21 06:40:39 +00:00
|
|
|
print_row(get_string("webpage").":", "<a href=\"$user->url\">$user->url</a>");
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($user->icq) {
|
2005-03-05 05:57:10 +00:00
|
|
|
print_row(get_string('icqnumber').':',"<a href=\"http://web.icq.com/wwp?uin=$user->icq\">$user->icq <img src=\"http://web.icq.com/whitepages/online?icq=$user->icq&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"\" /></a>");
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($user->skype) {
|
|
|
|
print_row(get_string('skypeid').':','<a href="callto:'.urlencode($user->skype).'">'.s($user->skype).'</a>');
|
|
|
|
}
|
|
|
|
if ($user->yahoo) {
|
2005-03-05 06:26:44 +00:00
|
|
|
print_row(get_string('yahooid').':', '<a href="http://edit.yahoo.com/config/send_webmesg?.target='.s($user->yahoo).'&.src=pg">'.s($user->yahoo).'</a>');
|
2005-03-05 05:57:10 +00:00
|
|
|
}
|
|
|
|
if ($user->aim) {
|
2005-03-05 06:26:44 +00:00
|
|
|
print_row(get_string('aimid').':', '<a href="aim:goim?screenname='.s($user->aim).'">'.s($user->aim).'</a>');
|
2005-03-05 05:57:10 +00:00
|
|
|
}
|
|
|
|
if ($user->msn) {
|
|
|
|
print_row(get_string('msnid').':', s($user->msn));
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
|
2003-11-19 07:55:00 +00:00
|
|
|
if (isteacher($course->id)) {
|
|
|
|
if ($mycourses = get_my_courses($user->id)) {
|
|
|
|
$courselisting = '';
|
|
|
|
foreach ($mycourses as $mycourse) {
|
2004-04-03 07:08:16 +00:00
|
|
|
if ($mycourse->visible and $mycourse->category) {
|
2005-11-08 07:19:27 +00:00
|
|
|
if ($mycourse->id != $course->id){
|
|
|
|
$courselisting .= "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$mycourse->id\">$mycourse->fullname</a>, ";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$courselisting .= "$mycourse->fullname, ";
|
|
|
|
}
|
2003-11-19 07:55:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
print_row(get_string('courses').':', rtrim($courselisting,', '));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-09-06 15:10:36 +00:00
|
|
|
if ($user->lastaccess) {
|
2005-04-18 17:57:26 +00:00
|
|
|
$datestring = userdate($user->lastaccess)." (".format_time(time() - $user->lastaccess).")";
|
2002-09-06 15:10:36 +00:00
|
|
|
} else {
|
2003-10-28 04:09:03 +00:00
|
|
|
$datestring = get_string("never");
|
2002-09-06 15:10:36 +00:00
|
|
|
}
|
2002-07-04 07:52:06 +00:00
|
|
|
print_row(get_string("lastaccess").":", $datestring);
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2005-11-08 07:19:27 +00:00
|
|
|
$groupstr = '';
|
|
|
|
|
|
|
|
///printing groups
|
|
|
|
if (isteacher($course->id)){
|
|
|
|
if ($mygroups = user_group($course->id, $user->id)){
|
|
|
|
foreach ($mygroups as $group){
|
|
|
|
$groupstr .= link_to_popup_window('/user/index.php?id='.$course->id.'&group='.$group->id,'popup',$group->name,400,500,'edit group','none',true).", ";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print_row(get_string("group").":", rtrim($groupstr, ', '));
|
|
|
|
}
|
|
|
|
///End of printing groups
|
|
|
|
|
2003-10-21 06:40:39 +00:00
|
|
|
echo "</table>";
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2003-10-21 06:40:39 +00:00
|
|
|
echo "</td></tr></table>";
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2002-11-28 12:31:46 +00:00
|
|
|
$internalpassword = false;
|
2005-10-03 09:24:47 +00:00
|
|
|
if (is_internal_auth($USER->auth) or (!empty($CFG->{'auth_'.$USER->auth.'_stdchangepassword'}))) {
|
2005-02-09 14:45:19 +00:00
|
|
|
if (empty($CFG->loginhttps)) {
|
|
|
|
$internalpassword = "$CFG->wwwroot/login/change_password.php";
|
2004-06-22 18:34:35 +00:00
|
|
|
} else {
|
|
|
|
$internalpassword = str_replace('http','https',$CFG->wwwroot.'/login/change_password.php');
|
|
|
|
}
|
2002-11-28 12:31:46 +00:00
|
|
|
}
|
|
|
|
|
2002-06-04 06:29:36 +00:00
|
|
|
// Print other functions
|
2005-02-27 10:08:13 +00:00
|
|
|
echo '<div class="buttons"><table align="center"><tr>';
|
2003-01-02 10:35:11 +00:00
|
|
|
if ($currentuser and !isguest()) {
|
2004-10-10 06:26:29 +00:00
|
|
|
if ($internalpassword ) {
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "<td nowrap=\"nowrap\"><form action=\"$internalpassword\" method=\"get\">";
|
2004-09-07 08:05:25 +00:00
|
|
|
echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
|
|
|
|
echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "</form></td>";
|
2004-10-10 06:26:29 +00:00
|
|
|
} else if ( strlen($CFG->changepassword) > 1 ) {
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "<td nowrap=\"nowrap\"><form action=\"$CFG->changepassword\" method=\"get\">";
|
2004-09-07 08:05:25 +00:00
|
|
|
echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "</form></td>";
|
2002-11-28 12:31:46 +00:00
|
|
|
}
|
2002-10-17 12:25:25 +00:00
|
|
|
}
|
2004-06-22 18:34:35 +00:00
|
|
|
if ($course->category and
|
|
|
|
((isstudent($course->id) and ($user->id == $USER->id) and !isguest() and $CFG->allowunenroll) or
|
2004-05-30 20:54:58 +00:00
|
|
|
(isteacheredit($course->id) and isstudent($course->id, $user->id))) ) {
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "<td nowrap=\"nowrap\"><form action=\"../course/unenrol.php\" method=\"get\" />";
|
2004-09-07 08:05:25 +00:00
|
|
|
echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
|
|
|
|
echo "<input type=\"hidden\" name=\"user\" value=\"$user->id\" />";
|
|
|
|
echo "<input type=\"submit\" value=\"".get_string("unenrolme", "", $course->shortname)."\">";
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "</form></td>";
|
2002-06-04 06:35:36 +00:00
|
|
|
}
|
2005-03-20 12:02:14 +00:00
|
|
|
/* if (isteacher($course->id) or ($course->showreports and $USER->id == $user->id)) {
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "<td nowrap=\"nowrap\"><form action=\"../course/user.php\" method=\"get\">";
|
2004-09-07 08:05:25 +00:00
|
|
|
echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
|
|
|
|
echo "<input type=\"hidden\" name=\"user\" value=\"$user->id\" />";
|
|
|
|
echo "<input type=\"submit\" value=\"".get_string("activityreport")."\" />";
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "</form></td>";
|
2003-10-31 06:50:19 +00:00
|
|
|
}
|
2005-03-20 12:02:14 +00:00
|
|
|
*/
|
2004-09-06 14:03:17 +00:00
|
|
|
if ((isadmin() and !isadmin($user->id)) or (isteacher($course->id) and ($USER->id != $user->id) and !iscreator($user->id))) {
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "<td nowrap=\"nowrap\"><form action=\"../course/loginas.php\" method=\"get\">";
|
2004-09-07 08:05:25 +00:00
|
|
|
echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
|
|
|
|
echo "<input type=\"hidden\" name=\"user\" value=\"$user->id\" />";
|
|
|
|
echo "<input type=\"submit\" value=\"".get_string("loginas")."\" />";
|
2004-09-23 11:01:22 +00:00
|
|
|
echo "</form></td>";
|
2002-07-27 10:23:45 +00:00
|
|
|
}
|
2005-03-17 20:39:30 +00:00
|
|
|
if (!empty($CFG->messaging) and !isguest()) {
|
2005-03-20 12:02:14 +00:00
|
|
|
if (!empty($USER->id) and ($USER->id == $user->id)) {
|
2005-01-31 07:11:42 +00:00
|
|
|
if ($countmessages = count_records('message', 'useridto', $user->id)) {
|
|
|
|
$messagebuttonname = get_string("messages", "message")."($countmessages)";
|
|
|
|
} else {
|
|
|
|
$messagebuttonname = get_string("messages", "message");
|
|
|
|
}
|
|
|
|
echo "<td nowrap=\"nowrap\"><form target=\"message\" action=\"../message/index.php\" method=\"get\">";
|
|
|
|
echo "<input type=\"submit\" value=\"$messagebuttonname\" onclick=\"return openpopup('/message/index.php', 'message', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\" />";
|
|
|
|
echo "</form></td>";
|
2004-12-28 13:49:44 +00:00
|
|
|
} else {
|
2005-04-16 02:31:41 +00:00
|
|
|
echo "<td nowrap=\"nowrap\"><form target=\"message_$user->id\" action=\"../message/discussion.php\" method=\"get\">";
|
2005-01-31 07:11:42 +00:00
|
|
|
echo "<input type=\"hidden\" name=\"id\" value=\"$user->id\" />";
|
2005-04-16 02:31:41 +00:00
|
|
|
echo "<input type=\"submit\" value=\"".get_string("sendmessage", "message")."\" onclick=\"return openpopup('/message/discussion.php?id=$user->id', 'message_$user->id', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\" />";
|
2005-01-31 07:11:42 +00:00
|
|
|
echo "</form></td>";
|
2004-12-28 13:49:44 +00:00
|
|
|
}
|
|
|
|
}
|
2004-09-21 10:52:55 +00:00
|
|
|
echo "<td></td>";
|
2005-02-27 10:08:13 +00:00
|
|
|
echo "</tr></table></div>\n";
|
2002-06-04 06:29:36 +00:00
|
|
|
|
2001-11-22 06:23:56 +00:00
|
|
|
print_footer($course);
|
|
|
|
|
|
|
|
/// Functions ///////
|
|
|
|
|
|
|
|
function print_row($left, $right) {
|
2005-03-20 12:02:14 +00:00
|
|
|
echo "\n<tr><td nowrap=\"nowrap\" align=\"right\" valign=\"top\" class=\"label c0\">$left</td><td align=\"left\" valign=\"top\" class=\"info c1\">$right</td></tr>\n";
|
2001-11-22 06:23:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|