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 forms used to filter user.
*
* @package core_user
* @category user
* @copyright 1999 Martin Dougiamas http://dougiamas.com
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir.'/formslib.php');
/**
* Class user_add_filter_form
* @copyright 1999 Martin Dougiamas http://dougiamas.com
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class user_add_filter_form extends moodleform {
/**
* Form definition.
*/
public function definition() {
global $SESSION;
$mform =& $this->_form;
$fields = $this->_customdata['fields'];
$extraparams = $this->_customdata['extraparams'];
$mform->addElement('header', 'newfilter', get_string('newfilter', 'filters'));
foreach ($fields as $ft) {
$ft->setupForm($mform);
}
// In case we wasnt to track some page params.
if ($extraparams) {
foreach ($extraparams as $key => $value) {
$mform->addElement('hidden', $key, $value);
$mform->setType($key, PARAM_RAW);
}
}
// Add buttons.
$replacefiltersbutton = $mform->createElement('submit', 'replacefilters', get_string('replacefilters', 'filters'));
$addfilterbutton = $mform->createElement('submit', 'addfilter', get_string('addfilter', 'filters'));
$buttons = array_filter([
empty($SESSION->user_filtering) ? null : $replacefiltersbutton,
$addfilterbutton,
]);
$mform->addGroup($buttons);
}
}
/**
* Class user_active_filter_form
* @copyright 1999 Martin Dougiamas http://dougiamas.com
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class user_active_filter_form extends moodleform {
/**
* Form definition.
*/
public function definition() {
global $SESSION; // This is very hacky :-(.
$mform =& $this->_form;
$fields = $this->_customdata['fields'];
$extraparams = $this->_customdata['extraparams'];
if (!empty($SESSION->user_filtering)) {
// Add controls for each active filter in the active filters group.
$mform->addElement('header', 'actfilterhdr', get_string('actfilterhdr', 'filters'));
foreach ($SESSION->user_filtering as $fname => $datas) {
if (!array_key_exists($fname, $fields)) {
continue; // Filter not used.
}
$field = $fields[$fname];
foreach ($datas as $i => $data) {
$description = $field->get_label($data);
$mform->addElement('checkbox', 'filter['.$fname.']['.$i.']', null, $description);
}
}
if ($extraparams) {
foreach ($extraparams as $key => $value) {
$mform->addElement('hidden', $key, $value);
$mform->setType($key, PARAM_RAW);
}
}
$objs = array();
$objs[] = &$mform->createElement('submit', 'removeselected', get_string('removeselected', 'filters'));
$objs[] = &$mform->createElement('submit', 'removeall', get_string('removeall', 'filters'));
$mform->addElement('group', 'actfiltergrp', '', $objs, ' ', false);
}
}
}