3 defined('MOODLE_INTERNAL') ||
die;
5 if ($ADMIN->fulltree
) {
6 $settings->add(new admin_setting_heading('chat_method_heading', get_string('generalconfig', 'chat'),
7 get_string('explaingeneralconfig', 'chat')));
10 $options['ajax'] = get_string('methodajax', 'chat');
11 $options['header_js'] = get_string('methodnormal', 'chat');
12 $options['sockets'] = get_string('methoddaemon', 'chat');
13 $settings->add(new admin_setting_configselect('chat_method', get_string('method', 'chat'),
14 get_string('configmethod', 'chat'), 'ajax', $options));
16 $settings->add(new admin_setting_configtext('chat_refresh_userlist', get_string('refreshuserlist', 'chat'),
17 get_string('configrefreshuserlist', 'chat'), 10, PARAM_INT
));
19 $settings->add(new admin_setting_configtext('chat_old_ping', get_string('oldping', 'chat'),
20 get_string('configoldping', 'chat'), 35, PARAM_INT
));
23 $settings->add(new admin_setting_heading('chat_normal_heading', get_string('methodnormal', 'chat'),
24 get_string('explainmethodnormal', 'chat')));
26 $settings->add(new admin_setting_configtext('chat_refresh_room', get_string('refreshroom', 'chat'),
27 get_string('configrefreshroom', 'chat'), 5, PARAM_INT
));
30 $options['jsupdate'] = get_string('normalkeepalive', 'chat');
31 $options['jsupdated'] = get_string('normalstream', 'chat');
32 $settings->add(new admin_setting_configselect('chat_normal_updatemode', get_string('updatemethod', 'chat'),
33 get_string('confignormalupdatemode', 'chat'), 'jsupdate', $options));
36 $settings->add(new admin_setting_heading('chat_daemon_heading', get_string('methoddaemon', 'chat'),
37 get_string('explainmethoddaemon', 'chat')));
39 $settings->add(new admin_setting_configtext('chat_serverhost', get_string('serverhost', 'chat'),
40 get_string('configserverhost', 'chat'), get_host_from_url($CFG->wwwroot
)));
42 $settings->add(new admin_setting_configtext('chat_serverip', get_string('serverip', 'chat'),
43 get_string('configserverip', 'chat'), '127.0.0.1'));
45 $settings->add(new admin_setting_configtext('chat_serverport', get_string('serverport', 'chat'),
46 get_string('configserverport', 'chat'), 9111, PARAM_INT
));
48 $settings->add(new admin_setting_configtext('chat_servermax', get_string('servermax', 'chat'),
49 get_string('configservermax', 'chat'), 100, PARAM_INT
));