当前位置: 首页>>代码示例>>PHP>>正文


PHP Student::getApplicationTerm方法代码示例

本文整理汇总了PHP中Student::getApplicationTerm方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::getApplicationTerm方法的具体用法?PHP Student::getApplicationTerm怎么用?PHP Student::getApplicationTerm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Student的用法示例。


在下文中一共展示了Student::getApplicationTerm方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showForStudent

 public function showForStudent(Student $student, $term)
 {
     if ($student->getApplicationTerm() <= Term::getCurrentTerm()) {
         return true;
     }
     if ($student->getApplicationTerm() > Term::getCurrentTerm()) {
         return false;
     }
     return false;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:10,代码来源:Reapplication.php

示例2: showForStudent

 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;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:12,代码来源:Application.php

示例3: showForStudent

 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;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:14,代码来源:RoommateSelection.php

示例4: showForStudent

 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;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:16,代码来源:ReappWaitingList.php

示例5: showForStudent

 public function showForStudent(Student $student, $term)
 {
     // New Incoming Freshmen
     if ($student->getApplicationTerm() > Term::getCurrentTerm()) {
         return true;
     }
     return false;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:8,代码来源:CreateProfile.php

示例6: populateSharedFields

 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);
     }
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:57,代码来源:ContextApplicationFactory.php

示例7: showForStudent

 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;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:14,代码来源:OffCampusWaitingList.php

示例8: showForStudent

 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;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:15,代码来源:RlcApplication.php

示例9: send_rlc_application_confirmation

 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);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:8,代码来源:HMS_Email.php

示例10: getAvailableApplicationTermsForStudent

 /**
  * 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;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:32,代码来源:HousingApplication.php


注:本文中的Student::getApplicationTerm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。