public function publicationselector($courseid) {
        $text = '';

        $advertiseurl = new moodle_url("/course/publish/metadata.php",
            array('sesskey' => sesskey(), 'id' => $courseid, 'advertise' => true));
        $advertisebutton = new single_button($advertiseurl, get_string('advertise', 'hub'));
        $text .= $this->output->render($advertisebutton);
        $text .= html_writer::tag('div', get_string('advertisepublication_help', 'hub'),
            array('class' => 'publishhelp'));

        $text .= html_writer::empty_tag('br');  // TODO Delete.

        $uploadurl = new moodle_url("/course/publish/metadata.php",
            array('sesskey' => sesskey(), 'id' => $courseid, 'share' => true));
        $uploadbutton = new single_button($uploadurl, get_string('share', 'hub'));
        $text .= $this->output->render($uploadbutton);
        $text .= html_writer::tag('div', get_string('sharepublication_help', 'hub'),
            array('class' => 'publishhelp'));

        return $text;
    }