adding some strings
[moodle-linuxchix.git] / mod / chat / mod_form.php
blobadf195008c113551c741fa206c52ea95d6237bf9
1 <?php
2 require_once ($CFG->dirroot.'/course/moodleform_mod.php');
4 class mod_chat_mod_form extends moodleform_mod {
6 function definition() {
8 global $CFG;
9 $mform =& $this->_form;
11 //-------------------------------------------------------------------------------
12 $mform->addElement('header', 'general', get_string('general', 'form'));
14 $mform->addElement('text', 'name', get_string('chatname', 'chat'), array('size'=>'64'));
15 $mform->setType('name', PARAM_TEXT);
16 $mform->addRule('name', null, 'required', null, 'client');
18 $mform->addElement('htmleditor', 'intro', get_string('chatintro', 'chat'));
19 $mform->setType('intro', PARAM_RAW);
20 $mform->setHelpButton('intro', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
21 $mform->addRule('intro', get_string('required'), 'required', null, 'client');
23 $mform->addElement('date_time_selector', 'chattime', get_string('chattime', 'chat'));
25 $options=array();
26 $options[0] = get_string('donotusechattime', 'chat');
27 $options[1] = get_string('repeatnone', 'chat');
28 $options[2] = get_string('repeatdaily', 'chat');
29 $options[3] = get_string('repeatweekly', 'chat');
30 $mform->addElement('select', 'schedule', get_string('repeattimes', 'chat'), $options);
33 $options=array();
34 $options[0] = get_string('neverdeletemessages', 'chat');
35 $options[365] = get_string('numdays', '', 365);
36 $options[180] = get_string('numdays', '', 180);
37 $options[150] = get_string('numdays', '', 150);
38 $options[120] = get_string('numdays', '', 120);
39 $options[90] = get_string('numdays', '', 90);
40 $options[60] = get_string('numdays', '', 60);
41 $options[30] = get_string('numdays', '', 30);
42 $options[21] = get_string('numdays', '', 21);
43 $options[14] = get_string('numdays', '', 14);
44 $options[7] = get_string('numdays', '', 7);
45 $options[2] = get_string('numdays', '', 2);
46 $mform->addElement('select', 'keepdays', get_string('savemessages', 'chat'), $options);
48 $mform->addElement('selectyesno', 'studentlogs', get_string('studentseereports', 'chat'));
50 $this->standard_coursemodule_elements();
52 $this->add_action_buttons();