/** * Specifies available report filters * (empty by default but can be implemented by child class) * * @param boolean $init_data If true, signal the report to load the * actual content of the filter objects * * @return array The list of available filters */ function get_filters($init_data = true) { // Create all requested User Profile field filters $upfilter = new generalized_filter_userprofilematch(sitewide_time_summary_report::upfilterid, get_string('filter_user_match', $this->langfile), array('choices' => $this->_fields, 'notadvanced' => array('fullname'), 'extra' => true, 'heading' => get_string('filter_profile_match', $this->langfile), 'footer' => get_string('footer', $this->langfile))); $filters = $upfilter->get_filters(); // Cluster filter options $clusters = get_records('crlm_cluster', '', '', 'name ASC', 'id,name'); if (!empty($clusters)) { // Merge cluster filter IFF values exist $filters = array_merge($filters, array(new generalized_filter_entry(sitewide_time_summary_report::clusterfilterid, 'crlmu', 'id', get_string('filter_cluster', $this->langfile), false, 'clusterselect', array('default' => null)))); } // Segment filter options $segchoices = array('weeks' => get_string('seg_weeks', $this->langfile), 'months' => get_string('seg_months', $this->langfile), 'years' => get_string('seg_years', $this->langfile), 'noseg' => get_string('seg_none', $this->langfile)); return array_merge($filters, array(new generalized_filter_entry(sitewide_time_summary_report::datefilterid, '', '', get_string('filter_date_range', $this->langfile), false, 'date'), new generalized_filter_entry(sitewide_time_summary_report::segfilterid, '', '', get_string('segmentreportby', $this->langfile), false, 'radiobuttons', array('choices' => $segchoices, 'checked' => 'noseg', 'heading' => get_string('segmentreportby', $this->langfile), 'footer' => '<br/>')))); }
/** * Specifies available report filters * (empty by default but can be implemented by child class) * * @param boolean $init_data If true, signal the report to load the * actual content of the filter objects * * @return array The list of available filters */ function get_filters($init_data = true) { // Create all requested User Profile field filters $upfilter = new generalized_filter_userprofilematch(sitewide_transcript_report::filterid, get_string('filter_user_match', $this->langfile), array('choices' => $this->_fields, 'notadvanced' => array('fullname'), 'extra' => true, 'heading' => get_string('filter_profile_match', $this->langfile), 'footer' => get_string('footer', $this->langfile))); return $upfilter->get_filters(); }
/** * Specifies available report filters * (empty by default but can be implemented by child class) * * @param boolean $init_data If true, signal the report to load the * actual content of the filter objects * * @return array The list of available filters */ function get_filters($init_data = true) { // Create all requested User Profile field filters $upfilter = new generalized_filter_userprofilematch('nsu', get_string('filter_user_match', 'rlreport_nonstarter'), array('choices' => $this->_fields, 'notadvanced' => array('fullname'), 'extra' => true, 'heading' => get_string('filter_profile_match', 'rlreport_nonstarter'), 'footer' => get_string('footer', 'rlreport_nonstarter'))); // Save the user profile filter for later use in header entries $this->upfilter = $upfilter; $filters = $upfilter->get_filters(); $filterhelp = array('nonstarter_report_help', get_string('nonstarter_report_help', 'rlreport_nonstarter'), 'block_php_report'); $filters = array_merge($filters, array(new generalized_filter_entry(nonstarter_report::datefilterid, '', '', get_string('filter_date_range', 'rlreport_nonstarter'), false, 'date', array('help' => $filterhelp)))); return $filters; }
/** * Specifies available report filters * (allow for filtering on various user and cluster-related fields) * * @return generalized_filter_entry array The list of available filters */ function get_filters() { // Create all requested User Profile field filters $upfilter = new generalized_filter_userprofilematch('cu', get_string('filter_user_match', 'rlreport_curricula'), array('choices' => $this->_fields, 'notadvanced' => array('fullname'), 'extra' => true, 'heading' => get_string('filter_profile_match', 'rlreport_curricula'), 'footer' => get_string('footer', 'rlreport_curricula'))); $filters = $upfilter->get_filters(); $filters = array_merge($filters, array(new generalized_filter_entry('cluster', 'crlmu', 'id', get_string('filter_cluster', 'rlreport_curricula'), false, 'clusterselect', array('default' => null)))); return $filters; }