Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function executeList(sfWebRequest $request)
- {
- if (!$request->getParameter('preview') && $this->getContext()->getConfiguration()->getEnvironment() != 'dev')
- {
- $this->redirect("/admin/?page=app");
- }
- $settings = $this->getUser()->getGuardUser()->getBSSMUser()->getUsersPreferences();
- // execute a list of students that are filtered by the current settings
- $query = Doctrine_Query::create()
- ->from('StudentsProfile SP')
- ->innerJoin('SP.Students S')
- ->where(" SP.graduating_year LIKE '".$settings->getGraduatingYear()."'")
- ->andWhere(" SP.schoolyear LIKE '".$settings->getSchoolYear()."' ")
- ->andWhere(" SP.status IN (".$settings->getStatusCSV().") ")
- ->orderBY('S.last_name ASC');
- $this->pager = new sfDoctrinePager('Students', sfConfig::get('sf_per_page'));
- $this->pager->setQuery($query);
- $this->pager->setPage($request->getParameter('page', 1));
- $this->pager->init();
- $configuration = sfContext::getInstance()->getConfiguration();
- $configuration->loadHelpers('Url');
- $query = $request->getParameter('search');
- $this->base_url = url_for('@student_list');
- $student_list = new StudentList;
- $this->fields = $student_list->getMyFields($this->getUser()->getGuardUser());
- }
Add Comment
Please, Sign In to add comment