Пример #1
0
 /**
  * Query the reader. Store results in the object for use by build_table.
  *
  * @param int $pagesize size of page for paginated displayed table.
  * @param bool $useinitialsbar do you want to use the initials bar.
  */
 public function query_db($pagesize, $useinitialsbar = true)
 {
     $total = \tool_monitor\subscription_manager::count_user_subscriptions();
     $this->pagesize($pagesize, $total);
     $subs = \tool_monitor\subscription_manager::get_user_subscriptions($this->get_page_start(), $this->get_page_size());
     $this->rawdata = $subs;
     // Set initial bars.
     if ($useinitialsbar) {
         $this->initialbars($total > $pagesize);
     }
 }