$string['keywords'] = 'Keywords';
$string['keywordssearchresults'] = 'Search results: $a messages found';
$string['maxmessages'] = 'Maximum number of messages to show in the discussion history';
+$string['mailsent'] = 'Your message was sent via email.';
$string['message'] = 'Message';
$string['messagehistory'] = 'Message History';
$string['messages'] = 'Messages';
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo get_string('discussion', 'message').': '.fullname($user) ?></title>
</head>
- <frameset rows="110,*,0,200">
+ <frameset rows="110,*,0,220">
<noframes><body><?php
echo '<a href="discussion.php?id='.$userid.'&noframesjs=1">'.get_string('noframesjs', 'message').'<a/>';
?></body></noframes>
echo '</div></div>';
print_footer('none');
-?>
\ No newline at end of file
+?>
if (!empty($preference->message_emailaddress)) {
$userto->email = $preference->message_emailaddress; // Use custom messaging address
}
- email_to_user($userto, $userfrom, $messagesubject, $messagetext, $messagehtml);
- debugging('Mail was sent', DEBUG_NORMAL);
- echo "mail was sent";
+ if (email_to_user($userto, $userfrom, $messagesubject, $messagetext, $messagehtml)) {
+ $CFG->messagewasjustemailed = true;
+ }
sleep(3);
}
}
add_to_log(SITEID, 'message', 'write', 'history.php?user1='.$user->id.'&user2='.$USER->id.'#m'.$messageid, $user->id);
}
- echo '<title></title></head>';
+ echo '<title> </title></head>';
echo '<body class="message course-1" id="message-send">';
echo '<center>';
echo '<form id="editing" method="post" action="send.php">';
+ echo '<div>';
echo '<input type="hidden" name="id" value="'.$user->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
$usehtmleditor = (can_use_html_editor() && get_user_preferences('message_usehtmleditor', 0));
if ($usehtmleditor) {
echo '<table align="center"><tr><td align="center">';
- print_textarea($usehtmleditor, 8, 34, 0, 0, 'message', '');
+ print_textarea($usehtmleditor, 7, 34, 0, 0, 'message', '');
echo '</td></tr></table>';
+ echo '<input type="submit" value="'.get_string('sendmessage', 'message').'" />';
use_html_editor('message', 'formatblock subscript superscript copy cut paste clean undo redo justifyleft justifycenter justifyright justifyfull lefttoright righttoleft insertorderedlist insertunorderedlist outdent indent inserthorizontalrule createanchor nolink inserttable');
echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
} else {
print_textarea(false, 5, 34, 0, 0, 'message', '');
echo '<input type="hidden" name="format" value="'.FORMAT_MOODLE.'" />';
+ echo '<br /><input type="submit" value="'.get_string('sendmessage', 'message').'" />';
}
- echo '<br /><input type="submit" value="'.get_string('sendmessage', 'message').'" />';
+ echo '</div>';
echo '</form>';
+ if (!empty($CFG->messagewasjustemailed)) {
+ notify(get_string('mailsent', 'message'), 'notifysuccess');
+ }
echo '<div class="noframesjslink"><a target="_parent" href="discussion.php?id='.$userid.'&noframesjs=1">'.get_string('noframesjs', 'message').'</a></div>';
echo '</center>';