Ejemplo n.º 1
0
 public function __construct($items, $columns, moodle_url $base_url = null)
 {
     parent::__construct($items, $columns, $base_url);
     $this->display_date = new display_date_item(get_string('pm_date_format', 'local_elisprogram'));
 }
Ejemplo n.º 2
0
 function __construct(&$items, $columns, $pageurl, $decorators = array())
 {
     parent::__construct($items, $columns, $pageurl, $decorators);
     $this->table->id = 'selectiontable';
 }
Ejemplo n.º 3
0
 /**
  * Constructor for a table that displays management page entries
  *
  * @param array $items The elements representing the rows of the table
  * @param array $columns The specifications for the columns of the table
  * @param elis_page $page An instance of the displayed entity type's page
  * @param array $extra_params Extra parameters to add to the page URL
  */
 function __construct(&$items, $columns, $page, $extra_params = null)
 {
     $namesearch = trim(optional_param('search', '', PARAM_TEXT));
     $alpha = optional_param('alpha', '', PARAM_ALPHA);
     $params = array('search' => $namesearch, 'alpha' => $alpha);
     //add page params
     if (!empty($page->params)) {
         $params += $page->params;
     }
     if (!empty($extra_params)) {
         //ok to use union here since we typically only pass
         //parameters that can't be accessed within the page class
         $params += $extra_params;
     }
     $this->page = $page;
     $this->display_date_item = new display_date_item(get_string('pm_date_format', 'local_elisprogram'));
     $target = $page->get_new_page($params, true);
     parent::__construct($items, $columns + array('_buttons' => array('sortable' => false, 'wrapped' => false, 'align' => 'center')), $target->url);
 }
Ejemplo n.º 4
0
 function __construct(&$items, $columns, $page)
 {
     $this->page = $page;
     parent::__construct($items, $columns, $page->url);
 }
Ejemplo n.º 5
0
 function __construct(&$items, $columns, $pageurl, $decorators = array())
 {
     if (isset($columns['_selection']) && is_array($columns['_selection'])) {
         $columns['_selection']['sortable'] = false;
         $columns['_selection']['display_function'] = array(&$this, 'get_item_display__selection');
     }
     //$this->table->id = 'selectiontable';
     parent::__construct($items, $columns, $pageurl, 'sort', 'dir', array('id' => 'selectiontable'));
 }
 function __construct(&$items)
 {
     $columns = array('options' => '', 'idnumber' => get_string('idnumber'), 'startdate' => get_string('startdate', 'block_curr_admin'), 'enddate' => get_string('enddate', 'block_curr_admin'), 'timeofday' => get_string('timeofday', 'block_curr_admin'), 'instructor' => get_string('instructor', 'block_curr_admin'), 'environment' => get_string('environment', 'block_curr_admin'), 'waitlistsize' => get_string('waitlist_size', 'block_curr_admin'), 'classsize' => get_string('class_size', 'block_curr_admin'));
     parent::__construct($items, $columns, '');
     unset($this->table->width);
 }
Ejemplo n.º 7
0
 function __construct(&$items, $columns, $page, $decorators = array())
 {
     $sort = optional_param('sort', 'title', PARAM_ALPHA);
     // TBV
     $dir = optional_param('dir', 'ASC', PARAM_ALPHA);
     if ($dir !== 'DESC') {
         $dir = 'ASC';
     }
     if (isset($columns[$sort])) {
         $columns[$sort]['sortable'] = $dir;
     } else {
         $sort = 'name';
         $columns[$sort]['sortable'] = $dir;
     }
     $this->page = $page;
     parent::__construct($items, $columns, $page->url);
     // ***TBD*** $decorators
     $this->display_date = new display_date_item(get_string('pm_date_format', 'local_elisprogram'));
 }
Ejemplo n.º 8
0
 function __construct(&$items, $columns, $page)
 {
     $locsearch = trim(optional_param('locsearch', '', PARAM_TEXT));
     $namesearch = trim(optional_param('search', '', PARAM_TEXT));
     $alpha = optional_param('alpha', '', PARAM_ALPHA);
     $params = array('search' => stripslashes($namesearch), 'locsearch' => stripslashes($locsearch), 'alpha' => $alpha);
     //add page params
     if (!empty($page->params)) {
         $params += $page->params;
     }
     $this->page = $page;
     $this->viewurl = $page->get_new_page(array('action' => 'view'))->get_moodle_url();
     $target = $page->get_new_page($params);
     parent::__construct($items, $columns + array('_buttons' => ''), $target->get_moodle_url());
 }
 function __construct(&$items, $columns, $page, $decorators = array())
 {
     $this->page = $page;
     parent::__construct($items, $columns, $page->get_moodle_url(), $decorators);
 }
Ejemplo n.º 10
0
 function __construct(&$items, $columns, $page, $decorators = array())
 {
     $sort = optional_param('sort', 'title', PARAM_ALPHA);
     // TBV
     $dir = optional_param('dir', 'ASC', PARAM_ALPHA);
     if ($dir !== 'DESC') {
         $dir = 'ASC';
     }
     if (isset($columns[$sort])) {
         $columns[$sort]['sortable'] = $dir;
     } else {
         $sort = 'name';
         $columns[$sort]['sortable'] = $dir;
     }
     $this->page = $page;
     if (isset($columns['requestnotice']) && is_array($columns['requestnotice'])) {
         $columns['requestnotice']['sortable'] = false;
     }
     $url = new moodle_url($page->url, array('action' => 'requests', 's' => 'crp'));
     parent::__construct($items, $columns, $url);
     // *TBD* $decorators
 }