public function executeDogradesubmission(sfWebRequest $request) { ## Also show filter form $this->gradeFilterForm = new FilterForm($this->getUser()->getAttribute('departmentId')); ## Recreate the GRADE SUBMISSION Form, $this->gradeForm = new FrontendGradeForm($this->getUser()->getAttribute('enrollments'), $this->getUser()->getAttribute('courses'), $this->gradeChoices = submitgradeActions::getGradeChoicesAsArray(Doctrine_Core::getTable('Grade')->getAllLetterGradeChoices())); $this->processDogradesubmission($request, $this->gradeForm); $this->setTemplate('dogradesubmission'); }
public function executeDogradesubmission(sfWebRequest $request) { $programSectionId = $request->getParameter('sectionId'); $courseId = $request->getParameter('courseId'); $this->studentIdsArray = array(); $this->studentIdNamePairArray = array(); $this->enrollmentIdNamePairArray = array(); $enrollmentIdsArray = array(); $departmentId = $this->getUser()->getAttribute('departmentId'); $this->programs = Doctrine_Core::getTable('Program')->getProgramsByDepartmentId($departmentId); ## Pass Program infomation $this->centers = Doctrine_Core::getTable('Center')->getAllCenters(); $this->years = FormChoices::getYearChoices(); $this->academicYears = FormChoices::getAcademicYear(); $this->semesters = FormChoices::getSemesterChoices(); $this->programs = Doctrine_Core::getTable('Program')->getProgramsByDepartmentId($departmentId); //$sectionId = $request->getParameter('sectionId'); //$this->program_section = Doctrine_Core::getTable('ProgramSection')->findOneById($sectionId); //$this->forward404Unless($this->program_section); ## Also show filter form $this->gradeFilterForm = new FilterForm($this->getUser()->getAttribute('departmentId')); ## Recreate the GRADE SUBMISSION Form, $this->gradeForm = new FrontendGradeSubmissionForm($this->getUser()->getAttribute('studentIdNamePairArray'), $this->getUser()->getAttribute('courseId'), $this->gradeChoices = submitgradeActions::getGradeChoicesAsArray(Doctrine_Core::getTable('Grade')->getAllLetterGradeChoices())); $this->processDogradesubmission($request, $this->gradeForm); $this->setTemplate('dogradesubmission'); }