Example #1
0
// List of existing custom fields.
$html = facetoface_list_of_customfields();
$html .= html_writer::start_tag('p');
$url = new moodle_url('/mod/facetoface/customfield.php', array('id' => 0));
$html .= html_writer::link($url, new lang_string('addnewfieldlink', 'facetoface'));
$html .= html_writer::end_tag('p');

$settings->add(new admin_setting_heading('facetoface_customfields_header', new lang_string('customfieldsheading', 'facetoface'), $html));

// List of existing site notices.
$html = html_writer::start_tag('p');
$url = html_writer::link(new moodle_url('/blocks/facetoface/calendar.php'), new lang_string('setting:sitenoticeshere', 'facetoface'));
$html .= new lang_string('setting:sitenotices', 'facetoface', $url);
$html .= html_writer::end_tag('p');
$html .= facetoface_list_of_sitenotices();
$html .= html_writer::start_tag('p');
$url = new moodle_url('/mod/facetoface/sitenotice.php', array('id' => 0));
$html .= html_writer::link($url, new lang_string('addnewnoticelink', 'facetoface'));
$html .= html_writer::end_tag('p');

$settings->add(new admin_setting_heading('facetoface_sitenotices_header', new lang_string('sitenoticesheading', 'facetoface'), $html));

// Link to notification templates.
$html = html_writer::start_tag('p');
$url = new moodle_url('/mod/facetoface/notification/template/');
$html .= html_writer::link($url, new lang_string('managenotificationtemplates', 'facetoface'));
$html .= html_writer::end_tag('p');

$settings->add(new admin_setting_heading('facetoface_notification_template', new lang_string('notificationtemplates', 'facetoface'), $html));
Example #2
0
    function test_facetoface_list_of_sitenotices() {
        $this->assertTrue((bool)facetoface_list_of_sitenotices(), $this->msgtrue);

        $this->resetAfterTest(true);
    }