Example #1
0
        foreach ($results_fields as $field) {
            $str = highlight_substrings($q, $result->{$field});
            echo '<td>' . $str . '</td>';
        }
        echo '</tr>';
    }
    unset($results);
    echo '</table>';
} elseif ($mode === 'config') {
    $PAGE->set_context(CONTEXT_SYSTEM);
    require_login();
    if ($filter->config_allowed() === true) {
        $configform = $filter->get_config_form();
        if ($configdata = $configform->get_data()) {
            $configdata = $filter->process_config_data($configdata);
            filt_autoc_set_config($filter->_parent_report, $filter->_uniqueid, $configdata);
            header('Location: ' . qualified_me() . '&saved=1');
            die;
        }
        $saved = optional_param('saved', '0', PARAM_CLEAN);
        ?>
        <html>
        <head>
            <script src="<?php 
        echo $CFG->wwwroot . '/local/eliscore/js/jquery-1.7.1.min.js';
        ?>
"></script>
            <link rel="stylesheet" type="text/css" href="<?php 
        echo $CFG->wwwroot, '/theme/styles.php?theme=' . $CFG->theme;
        ?>
" />
 /**
  * Set the config options for the filter.
  */
 protected function set_filter_config()
 {
     $configdata = array('instance' => array('idnumber' => array('search' => 1, 'disp' => 1), 'firstname' => array('search' => 1, 'disp' => 1), 'lastname' => array('search' => 0, 'disp' => 1)), 'custom_field' => array('testfield' => array('search' => 1, 'disp' => 1, 'restrict' => 1)));
     filt_autoc_set_config($this->parent_report, $this->uniqid, $configdata);
 }