Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/monara/public_html/test.athavaneng.com/themes.php on line 99

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
. /** * This file contains the form definition for discussion export. * * @package mod_forum * @copyright 2019 Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_forum\form; defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); require_once($CFG->dirroot.'/mod/forum/lib.php'); require_once($CFG->libdir.'/formslib.php'); /** * Export discussion form. * * @package mod_forum * @copyright 2019 Simey Lameze * @license http://www.gnu.org/copyleft/gpl.html GNU GPL Juv3 or later */ class export_form extends \moodleform { /** * Define the form - called by parent constructor */ public function definition() { $mform = $this->_form; $forum = $this->_customdata['forum']; $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); $mform->setDefault('id', $forum->get_id()); $options = [ 'ajax' => 'mod_forum/form-user-selector', 'multiple' => true, 'noselectionstring' => get_string('allusers', 'mod_forum'), 'courseid' => $forum->get_course_id(), 'valuehtmlcallback' => function($value) { global $OUTPUT; $userfieldsapi = \core_user\fields::for_name(); $allusernames = $userfieldsapi->get_sql('', false, '', '', false)->selects; $fields = 'id, ' . $allusernames; $user = \core_user::get_user($value, $fields); $useroptiondata = [ 'fullname' => fullname($user), ]; return $OUTPUT->render_from_template('mod_forum/form-user-selector-suggestion', $useroptiondata); } ]; $mform->addElement('autocomplete', 'useridsselected', get_string('users'), [], $options); // Get the discussions on this forum. $vaultfactory = \mod_forum\local\container::get_vault_factory(); $discussionvault = $vaultfactory->get_discussion_vault(); $discussions = array_map(function($discussion) { return $discussion->get_name(); }, $discussionvault->get_all_discussions_in_forum($forum)); $options = [ 'multiple' => true, 'noselectionstring' => get_string('alldiscussions', 'mod_forum'), ]; $mform->addElement('autocomplete', 'discussionids', get_string('discussions', 'mod_forum'), $discussions, $options); // Date fields. $mform->addElement('date_time_selector', 'from', get_string('postsfrom', 'mod_forum'), ['optional' => true]); $mform->addElement('date_time_selector', 'to', get_string('poststo', 'mod_forum'), ['optional' => true]); // Export formats. $formats = \core_plugin_manager::instance()->get_plugins_of_type('dataformat'); $options = []; foreach ($formats as $format) { $options[$format->name] = $format->displayname; } $mform->addElement('select', 'format', 'Format', $options); $mform->addElement('header', 'optionsheader', get_string('exportoptions', 'mod_forum')); $mform->addElement('checkbox', 'striphtml', '', get_string('exportstriphtml', 'mod_forum')); $mform->addHelpButton('striphtml', 'exportstriphtml', 'mod_forum'); $mform->addElement('checkbox', 'humandates', '', get_string('exporthumandates', 'mod_forum')); $mform->addHelpButton('humandates', 'exporthumandates', 'mod_forum'); $this->add_action_buttons(true, get_string('export', 'mod_forum')); } }