2009-11-01 10:42:45 +00:00
|
|
|
<?php
|
2007-08-07 07:26:58 +00:00
|
|
|
|
2010-05-13 02:02:05 +00:00
|
|
|
if (!defined('MOODLE_INTERNAL')) {
|
|
|
|
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
|
|
|
}
|
|
|
|
|
2007-08-07 07:26:58 +00:00
|
|
|
require_once($CFG->libdir.'/formslib.php');
|
|
|
|
|
|
|
|
class user_message_form extends moodleform {
|
|
|
|
|
|
|
|
function definition() {
|
2007-11-13 08:43:20 +00:00
|
|
|
$mform =& $this->_form;
|
2007-08-07 07:26:58 +00:00
|
|
|
$mform->addElement('header', 'general', get_string('message', 'message'));
|
|
|
|
|
2007-11-13 08:43:20 +00:00
|
|
|
|
2010-01-25 09:23:02 +00:00
|
|
|
$mform->addElement('editor', 'messagebody', get_string('messagebody'), null, null);
|
|
|
|
$mform->addRule('messagebody', '', 'required', null, 'server');
|
2007-08-07 07:26:58 +00:00
|
|
|
|
2007-11-13 08:43:20 +00:00
|
|
|
$this->add_action_buttons();
|
2007-08-07 07:26:58 +00:00
|
|
|
}
|
|
|
|
}
|