public function showForStudent(Student $student, $term) { if ($student->getApplicationTerm() <= Term::getCurrentTerm()) { return true; } if ($student->getApplicationTerm() > Term::getCurrentTerm()) { return false; } return false; }
public function showForStudent(Student $student, $term) { // for freshmen if ($student->getApplicationTerm() > Term::getCurrentTerm()) { return true; } // for returning students (summer terms) if ($term > $student->getApplicationTerm() && $term != PHPWS_Settings::get('hms', 'lottery_term') && (Term::getTermSem($term) == TERM_SUMMER1 || Term::getTermSem($term) == TERM_SUMMER2)) { return true; } return false; }
public function showForStudent(Student $student, $term) { // Freshmen only if ($student->getApplicationTerm() > Term::getCurrentTerm()) { return true; } // Possibly available for continuing students in the summer terms (this is sort of a hack) //TODO: find a better way to implement this $termSem = Term::getTermSem($term); if ($student->getApplicationTerm() <= Term::getCurrentTerm() && ($termSem == TERM_SUMMER1 || $termSem == TERM_SUMMER2)) { return true; } return false; }
public function showForStudent(Student $student, $term) { // for freshmen if ($student->getApplicationTerm() > Term::getCurrentTerm()) { return false; } PHPWS_Core::initModClass('hms', 'HMS_Assignment.php'); PHPWS_Core::initModClass('hms', 'HousingApplication.php'); $application = HousingApplication::checkForApplication($student->getUsername(), $term); $assignment = HMS_Assignment::checkForAssignment($student->getUsername(), $term); // for returning students (summer terms) if ($term > $student->getApplicationTerm() && $assignment !== TRUE && $application !== FALSE) { return true; } return false; }
public function showForStudent(Student $student, $term) { // New Incoming Freshmen if ($student->getApplicationTerm() > Term::getCurrentTerm()) { return true; } return false; }
private function populateSharedFields($term, Student $student) { $this->app->setTerm($term); $this->app->setBannerId($student->getBannerId()); $this->app->setUsername($student->getUsername()); $this->app->setGender($student->getGender()); $this->app->setStudentType($student->getType()); $this->app->setApplicationTerm($student->getApplicationTerm()); $doNotCall = $this->context->get('do_not_call'); $areaCode = $this->context->get('area_code'); $exchange = $this->context->get('exchange'); $number = $this->context->get('number'); /* Phone Number */ /* if(is_null($doNotCall)){ //test('ohh hai',1); // do not call checkbox was not selected, so check the number if(is_null($areaCode) || is_null($exchange) || is_null($number)){ throw new InvalidArgumentException('Please provide a cell-phone number or click the checkbox stating that you do not wish to share your number with us.'); } } */ if (is_null($doNotCall)) { $this->app->setCellPhone($areaCode . $exchange . $number); } else { $this->app->setCellPhone(null); } /* Meal Plan */ $mealOption = $this->context->get('meal_option'); if (!isset($mealOption)) { //throw new InvalidArgumentException('Missing meal option from context.'); } $this->app->setMealPlan($mealOption); /* Emergency Contact */ $this->app->setEmergencyContactName($this->context->get('emergency_contact_name')); $this->app->setEmergencyContactRelationship($this->context->get('emergency_contact_relationship')); $this->app->setEmergencyContactPhone($this->context->get('emergency_contact_phone')); $this->app->setEmergencyContactEmail($this->context->get('emergency_contact_email')); /* Missing Persons */ $this->app->setMissingPersonName($this->context->get('missing_person_name')); $this->app->setMissingPersonRelationship($this->context->get('missing_person_relationship')); $this->app->setMissingPersonPhone($this->context->get('missing_person_phone')); $this->app->setMissingPersonEmail($this->context->get('missing_person_email')); /* Medical Conditions */ $this->app->setEmergencyMedicalCondition($this->context->get('emergency_medical_condition')); /* Special Needs */ $specialNeeds = $this->context->get('special_needs'); isset($specialNeeds['physical_disability']) ? $this->app->setPhysicalDisability(true) : null; isset($specialNeeds['psych_disability']) ? $this->app->setPsychDisability(true) : null; isset($specialNeeds['gender_need']) ? $this->app->setGenderNeed(true) : null; isset($specialNeeds['medical_need']) ? $this->app->setMedicalNeed(true) : null; if ($student->isInternational()) { $this->app->setInternational(true); } else { $this->app->setInternational(false); } }
public function showForStudent(Student $student, $term) { PHPWS_Core::initModClass('hms', 'HMS_Lottery.php'); PHPWS_Core::initModClass('hms', 'HousingApplicationFactory.php'); if ($student->getApplicationTerm() > Term::getCurrentTerm()) { return false; } $app = HousingApplicationFactory::getAppByStudent($student, $term); // Must be a returning student and either have not re-applied or have re-applied to the waiting list already if ($student->getApplicationTerm() <= Term::getCurrentTerm() && is_null($app) || !is_null($app) && $app->application_type == 'offcampus_waiting_list') { return true; } return false; }
public function showForStudent(Student $student, $term) { if ($student->getType() != TYPE_FRESHMEN && $student->getType() != TYPE_TRANSFER) { return false; } // Application term must be in the future if ($student->getApplicationTerm() <= Term::getCurrentTerm()) { return false; } $sem = substr($term, 4, 2); if ($sem != TERM_SUMMER1 && $sem != TERM_SUMMER2 && $sem != TERM_FALL) { return false; } return true; }
public static function send_rlc_application_confirmation(Student $to) { PHPWS_Core::initModClass('hms', 'Term.php'); $tpl = array(); $tpl['NAME'] = $to->getName(); $tpl['TERM'] = Term::toString($to->getApplicationTerm()); HMS_Email::send_template_message($to->getUsername() . TO_DOMAIN, 'Learning Community Application Confirmation!', 'email/rlc_application_confirmation.tpl', $tpl); }
/** * Returns an array of the terms which this student can potentially apply for. * * @param Student $student * * @return multitype:multitype:number unknown multitype:number string */ public static function getAvailableApplicationTermsForStudent(Student $student) { $availableTerms = array(); $applicationTerm = $student->getApplicationTerm(); $sem = Term::getTermSem($applicationTerm); switch ($sem) { case TERM_SPRING: case TERM_FALL: $availableTerms[] = array('term' => $applicationTerm, 'required' => 1); break; case TERM_SUMMER1: $availableTerms[] = array('term' => $applicationTerm, 'required' => 1); $summer2Term = Term::getNextTerm($applicationTerm); $availableTerms[] = array('term' => $summer2Term, 'required' => 0); $fallTerm = Term::getNextTerm($summer2Term); $availableTerms[] = array('term' => $fallTerm, 'required' => 1); break; case TERM_SUMMER2: $availableTerms[] = array('term' => $applicationTerm, 'required' => 1); $fallTerm = Term::getNextTerm($applicationTerm); $availableTerms[] = array('term' => $fallTerm, 'required' => 1); break; } return $availableTerms; }