public function __construct(ReportController $reportCtrl) { parent::__construct('hms_report', 'GenericReport'); $this->reportCtrl = $reportCtrl; $this->addWhere('report', $this->reportCtrl->getReportClassName()); $this->addWhere('completed_timestamp', null, 'IS'); $this->setOrder('scheduled_exec_time', 'ASC', true); $this->setModule('hms'); $this->setTemplate('admin/reports/reportSchedulePager.tpl'); $this->setLink('index.php?module=hms'); $this->setEmptyMessage('No scheduled reports found.'); $this->addRowTags('schedulePagerRowTags'); }
public function __construct(ReportController $reportCtrl) { parent::__construct('hms_report', 'GenericReport'); $this->reportCtrl = $reportCtrl; $this->addWhere('report', $this->reportCtrl->getReportClassName()); $this->addWhere('completed_timestamp', null, 'IS NOT'); $this->setOrder('completed_timestamp', 'DESC', true); $this->setModule('hms'); $this->setTemplate('admin/reports/reportHistoryPager.tpl'); $this->setLink('index.php?module=hms'); $this->setEmptyMessage('No previous reports found.'); $this->addRowTags('historyPagerRowTags'); // Increase this limit because, by default, the DBPager limit is too small $this->default_limit = 1000; $this->limitList = array(1000); }
public function __construct(HMS_Learning_Community $rlc) { parent::__construct('hms_learning_community_applications', 'HMS_RLC_Application'); $this->rlc = $rlc; $tags = array(); $tags['TITLE'] = $this->rlc->get_community_name() . ' Assignments ' . Term::toString(Term::getSelectedTerm()); $backCmd = CommandFactory::getCommand('ShowSearchByRlc'); $tags['BACK_LINK'] = $backCmd->getURI(); $adminAddCmd = CommandFactory::getCommand('ShowAdminAddRlcMember'); $adminAddCmd->setCommunity($this->rlc); $tags['ADD_URI'] = $adminAddCmd->getURI(); $this->db->addJoin('LEFT', 'hms_learning_community_assignment', 'hms_learning_community_applications', 'application_id', 'id'); //$this->db->addJoin('LEFT OUTER', 'hms_learning_community_applications', 'hms_new_application', 'username', 'username AND hms_new_application.term=hms_learning_community_applications.term'); //$this->db->addJoin('LEFT OUTER', 'hms_learning_community_applications', 'hms_roommate', 'username', 'requestor OR hms_learning_community_applications.username = hms_roommate.requestee AND hms_roommate.confirmed = \'1\''); $this->db->addWhere('hms_learning_community_applications.term', Term::getSelectedTerm()); $this->db->addWhere('hms_learning_community_assignment.rlc_id', $this->rlc->get_id()); $this->db->addColumn('hms_learning_community_applications.*'); //$this->db->addColumn('hms_learning_community_assignment.*'); //$this->db->addColumn('hms_roommate.*'); $this->joinResult('username', 'hms_new_application', 'username AND dbp1.term=hms_learning_community_applications.term', 'student_type', 's_type'); $this->joinResult('username', 'hms_roommate', 'requestee OR hms_learning_community_applications.username = dbp2.requestor', 'confirmed', 'conf'); $this->joinResult('username', 'hms_assignment', 'asu_username AND dbp3.term = hms_learning_community_applications.term', 'bed_id', 'bed_assignment'); $this->joinResult('id', 'hms_learning_community_assignment', 'application_id', 'gender'); $this->joinResult('id', 'hms_learning_community_assignment', 'application_id', 'state'); //$this->db->setTestMode(); //var_dump($this->db->select()); //exit; $this->setModule('hms'); $this->setTemplate('admin/view_by_rlc_pager.tpl'); $this->setLink('index.php?module=hms&action=ViewByRlc&rlc=' . $this->rlc->get_id()); $this->setEmptyMessage('There are no students assigned to this learning community.'); $this->addPageTags($tags); $this->addRowTags('viewByRLCPagerTags'); $this->setReportRow('viewByRLCExportFields'); //$this->get(); //$this->initialize(); //var_dump($this->row_query);exit; //var_dump($this->getFinalTemplate()); //exit(); }
public function __construct($table, $class = null) { parent::__construct($table, $class); // Replace the db instance with an instance of SubselectDatabase $this->db = new SubselectDatabase($table); }