• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Student类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     PHPWS_Core::initModClass('hms', 'RoommateProfile.php');
     $profile = RoommateProfileFactory::getProfile($student->getBannerID(), $this->term);
     PHPWS_Core::initModClass('hms', 'StudentMenuProfileView.php');
     return new StudentMenuProfileView($student, $this->getStartDate(), $this->getEndDate(), $this->term, $profile);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:7,代码来源:CreateProfile.php


示例2: __construct

 public function __construct(Student $student, RoomDamage $damage)
 {
     $this->banner_id = $student->getBannerId();
     $this->damage_id = $damage->getId();
     $this->state = 'new';
     $this->amount = null;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:7,代码来源:RoomDamageResponsibility.php


示例3: actionIndex

 /**
  * 首页
  *
  */
 public function actionIndex()
 {
     parent::_acl();
     $model = new Student();
     $criteria = new CDbCriteria();
     $criteria->condition = $condition;
     $criteria->order = 't.id ASC';
     //$criteria->with = array ( 'catalog' );
     $count = $model->count($criteria);
     $pages = new CPagination($count);
     $pages->pageSize = 13;
     //$pageParams = XUtils::buildCondition( $_GET, array ( 'title' , 'catalogId','titleAlias' ) );
     //$pages->params = is_array( $pageParams ) ? $pageParams : array ();
     $criteria->limit = $pages->pageSize;
     $criteria->offset = $pages->currentPage * $pages->pageSize;
     $result = $model->findAll($criteria);
     //审核
     //$id = $_POST('id');
     //$status = $_POST('status');
     //$count = Student::model()->updateByPk($id, ,'status=:status',array(':status'=>$status));
     $string = '审核更新失败';
     function errorInfo($count, $string)
     {
         if ($count) {
             echo "<b>{$string}</b>";
         } else {
             echo "<b>成功</b>";
         }
     }
     set_error_handler("errorInfo");
     $this->render('student_index', array('datalist' => $result, 'pagebar' => $pages));
 }
开发者ID:tecshuttle,项目名称:51qsk,代码行数:36,代码来源:StudentController.php


示例4: executeFilter

 public function executeFilter(sfWebRequest $request)
 {
     $students = Doctrine_Core::getTable('Student')->createQuery('a')->orderBy('a.created_at DESC');
     $student_uid = $request->getParameter('student_uid');
     $studentname = $request->getParameter('studentname');
     $fstudentname = $request->getParameter('fstudentname');
     $gfstudentname = $request->getParameter('fgstudentname');
     $department = $request->getParameter('department');
     // $college = $request->getParameter('college');
     if ($student_uid == 'Enter Student Id' && $studentname == 'Enter Student Name' && $fstudentname == 'Enter Father Name' && $gfstudentname == 'Enter GFather Name' && $department == '0') {
         $this->redirect('students_list');
     }
     if ($student_uid != 'Enter Student Id') {
         $students->orWhere('a.student_uid like ?', $student_uid . '%');
     }
     if ($studentname != 'Enter Student Name') {
         $students->orWhere('a.name like ?', $studentname . '%');
     }
     if ($studentname != 'Enter Father Name') {
         $students->orWhere('a.fathers_name like ?', $fstudentname . '%');
     }
     $this->pager = new sfDoctrinePager('Student', 10);
     $this->pager->setPage($request->getParameter('page', 1));
     $this->pager->init();
     $this->students = $students->execute();
     $departments = new Student();
     $this->departments = $departments->getAllDepartments();
     //$this->colleges = $departments->getAllColleges();
 }
开发者ID:eyumay,项目名称:srms.psco,代码行数:29,代码来源:actions.class.php


示例5: authenticate

 /**
  * Authenticates a dummy user.
  * @return boolean always true.
  */
 public function authenticate()
 {
     $student = Student::model()->findByAttributes(array('username' => $this->username));
     if ($student === null) {
         $student = new Student();
         $faculty = Faculty::model()->findByPk(1);
         if ($faculty === null) {
             $faculty = new Faculty();
             $faculty->id = 1;
             $faculty->name = 'Dummy Faculty';
             $faculty->save(false);
         }
         $student->username = $this->username;
         $student->name = $this->name;
         $student->is_admin = $this->isAdmin;
         $student->faculty_id = $faculty->id;
         $student->photo = Yii::app()->params['defaultProfilePhoto'];
     }
     $student->last_login_timestamp = date('Y-m-d H:i:s');
     $student->save();
     $this->id = $student->id;
     $this->name = $student->name;
     $this->setState('isAdmin', $student->is_admin);
     $this->setState('profilePhoto', $student->photo);
     return true;
 }
开发者ID:ekospinach,项目名称:berkuliah,代码行数:30,代码来源:DummyUserIdentity.php


示例6: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     PHPWS_Core::initModClass('hms', 'HousingApplication.php');
     PHPWS_Core::initModClass('hms', 'ApplicationMenuBlockView.php');
     $application = HousingApplication::getApplicationByUser($student->getUsername(), $this->term);
     return new ApplicationMenuBlockView($this->term, $this->getStartDate(), $this->getEditDate(), $this->getEndDate(), $application);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:7,代码来源:Application.php


示例7: cont_nou

function cont_nou()
{
    set('recaptcha', recaptcha_get_html(Config::get_key('recaptcha_pubkey')));
    $s = $_POST['s'];
    option('session', true);
    $_SESSION['s'] = $s;
    $s['cnp'] = filter_var($s['cnp'], FILTER_SANITIZE_NUMBER_INT);
    $s['cont'] = filter_var($s['cont'], FILTER_SANITIZE_STRING);
    $s['parola'] = filter_var($s['parola'], FILTER_SANITIZE_STRING);
    $s['alias'] = filter_var($s['alias'], FILTER_SANITIZE_STRING);
    $resp = recaptcha_check_answer(Config::get_key('recaptcha_privkey'), $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
    if (!$resp->is_valid) {
        flash('fail', 'Contul nu a fost creat. Verificați testul anti-robot.');
    } else {
        if (!empty($s['cnp']) && !empty($s['cont']) && !empty($s['parola'])) {
            $cont = new Student();
            $u = $cont->valid_user($s['cont'], $s['parola'], $s['cnp'], $s['alias']);
            if ($u) {
                if ($cont->create_user($u)) {
                    flash('ok', 'Contul a fost creat. Mulțumim.');
                } else {
                    flash('fail', 'Contul nu a fost creat. A intervenit o eroare.');
                }
            } else {
                flash('fail', 'Contul nu a fost creat. Utilizatorul sau alias-ul există deja sau avem o problemă cu SINU.');
            }
        } else {
            flash('fail', 'Contul nu a fost creat. Verificați câmpurile obligatorii.');
        }
    }
    redirect_to('creare');
}
开发者ID:stas,项目名称:student.utcluj.ro,代码行数:32,代码来源:site_controllers.php


示例8: execute

 protected function execute($arguments = array(), $options = array())
 {
     // initialize the database connection
     $databaseManager = new sfDatabaseManager($this->configuration);
     $connection = $databaseManager->getDatabase($options['connection'] ? $options['connection'] : null)->getConnection();
     $names = array('Martin', 'Pedro', 'Lucas', 'Agustin', 'Cristian', 'Matias', 'Tomas', 'Cludio', 'Nancy', 'Emilia', 'Alejandra', 'Barbara', 'Luciana', 'Lucia', 'Belen', 'Natalia', 'Adriana', 'Patricio', 'Diego', 'Gonzalo', 'Juan', 'Pablo');
     $last_names = array('Ramirez', 'Rodriguez', 'Cordoba', 'Brown', 'Osorio', 'Diaz', 'Ayesa', 'Ramirez', 'Perez', 'Ripoll', 'Bottini', 'Ponce', 'Casella', 'Martinez', 'Erviti', 'Rodgriguez', 'Gonzalez', 'Fernandez', 'Benitez');
     $this->createContextInstance('backend');
     for ($i = 1; $i <= 100; $i++) {
         $person = new Person();
         $person->setLastname($last_names[rand(0, 18)]);
         $person->setFirstName($names[rand(0, 21)]);
         $person->setIdentificationType(1);
         $person->setIdentificationNumber($i);
         $person->setSex(rand(1, 2));
         $person->setBirthDate('2000-06-30');
         $student = new Student();
         $student->setGlobalFileNumber($i);
         $student->setPerson($person);
         $person->save();
         $student->save();
         $this->logSection("Person created", $person->__toString());
     }
     // add your code here
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:25,代码来源:createStudentsTask.class.php


示例9: testPaidForDocument

 function testPaidForDocument()
 {
     $x = new Student(1);
     $this->assertTrue($x->paid_for_document(1));
     $this->assertFalse($x->paid_for_document(3));
     $this->assertFalse($x->paid_for_document(999));
     $this->assertFalse($x->paid_for_document('dog'));
 }
开发者ID:songwork,项目名称:songwork,代码行数:8,代码来源:testStudent.php


示例10: getAsObject

 protected function getAsObject($row)
 {
     $result = new Student();
     $result->setNew(false);
     $result->setStudentId(Singleton::create("NullConverter")->fromDBtoDOM($row["studentId"]));
     $result->setName(Singleton::create("NullConverter")->fromDBtoDOM($row["name"]));
     return $result;
 }
开发者ID:aeberh,项目名称:php-movico,代码行数:8,代码来源:StudentPersistence.php


示例11: __construct

 public function __construct(Student $student1, Student $student2, $lifestyle, $earliestTime)
 {
     $this->student1 = $student1;
     $this->student2 = $student2;
     $this->lifestyle = $lifestyle;
     $this->gender = $student1->getGender();
     $this->earliestTime = $earliestTime;
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:8,代码来源:AssignmentPairing.php


示例12: retrieveCurrentForStudentCriteria

 public static function retrieveCurrentForStudentCriteria(Student $student, Criteria $c = null)
 {
     $c = is_null($c) ? new Criteria() : $c;
     $c->add(self::SCHOOL_YEAR_ID, SchoolYearPeer::retrieveCurrent()->getId());
     $c->addJoin(self::ID, StudentCareerSchoolYearPeer::CAREER_SCHOOL_YEAR_ID);
     $c->add(StudentCareerSchoolYearPeer::STUDENT_ID, $student->getId());
     return $c;
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:8,代码来源:CareerSchoolYearPeer.php


示例13: select_group

 public function select_group()
 {
     $group_id = $this->input->post('group_id');
     $this->_transaction_isolation();
     $this->db->trans_begin();
     $group = new Group();
     $group->get_by_id($group_id);
     if ($group->exists()) {
         $course = $group->course->get();
         if (is_null($course->groups_change_deadline) || date('U', strtotime($course->groups_change_deadline)) >= time()) {
             $student = new Student();
             $student->get_by_id($this->usermanager->get_student_id());
             if ($student->is_related_to('active_course', $course->id)) {
                 $participant = new Participant();
                 $participant->where_related($student);
                 $participant->where_related($course);
                 $participant->where('allowed', 1);
                 $participant->get();
                 if ($participant->exists()) {
                     if (!$participant->is_related_to($group)) {
                         $participant->save($group);
                         $participant->where_related($course);
                         $participant->where_related($group);
                         $participant->where('allowed', 1);
                         $participants_count = $participant->count();
                         $room = new Room();
                         $room->where_related($group)->order_by('capacity', 'asc')->limit(1)->get();
                         if ($participants_count > intval($room->capacity)) {
                             $this->db->trans_rollback();
                             $this->messages->add_message('lang:groups_message_group_is_full', Messages::MESSAGE_TYPE_ERROR);
                         } else {
                             $this->db->trans_commit();
                             $this->messages->add_message(sprintf($this->lang->line('groups_message_group_changed'), $this->lang->text($group->name)), Messages::MESSAGE_TYPE_SUCCESS);
                             $this->_action_success();
                             $this->output->set_internal_value('course_id', $participant->course_id);
                         }
                     } else {
                         $this->db->trans_rollback();
                         $this->messages->add_message('lang:groups_message_you_are_in_group', Messages::MESSAGE_TYPE_ERROR);
                     }
                 } else {
                     $this->db->trans_rollback();
                     $this->messages->add_message('lang:groups_message_cant_found_participant_record', Messages::MESSAGE_TYPE_ERROR);
                 }
             } else {
                 $this->db->trans_rollback();
                 $this->messages->add_message('lang:groups_message_cant_change_group_of_inactive_course', Messages::MESSAGE_TYPE_ERROR);
             }
         } else {
             $this->db->trans_rollback();
             $this->messages->add_message('lang:groups_message_groups_switching_disabled', Messages::MESSAGE_TYPE_ERROR);
         }
     } else {
         $this->db->trans_rollback();
         $this->messages->add_message('lang:groups_message_group_not_found', Messages::MESSAGE_TYPE_ERROR);
     }
     redirect(create_internal_url('groups'));
 }
开发者ID:andrejjursa,项目名称:list-lms,代码行数:58,代码来源:groups.php


示例14: getInstance

 public static function getInstance(Student $a_student)
 {
     if (isset(self::$analyticals[$a_student->getId()])) {
         return self::$analyticals[$a_student->getId()];
     }
     $behavior = ucwords(sfConfig::get("nc_flavor_flavors_current", "demo"));
     $clazz = $behavior . "AnalyticalBehaviour";
     return self::$analyticals[$a_student->getId()] = new $clazz($a_student);
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:9,代码来源:AnalyticalBehaviourFactory.class.php


示例15: __construct

 /**
  * Create a new RoomChangeParticipant
  *
  * @param RoomChangeRequest $request
  * @param Student $student
  * @param HMS_Bed $fromBed
  */
 public function __construct(RoomChangeRequest $request, Student $student, HMS_Bed $fromBed)
 {
     $this->id = 0;
     $this->request_id = $request->getId();
     $this->banner_id = $student->getBannerId();
     $this->from_bed = $fromBed->getId();
     // Set initial state
     $this->setState(new ParticipantStateNew($this, time(), null, UserStatus::getUsername()));
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:16,代码来源:RoomChangeParticipant.php


示例16: getMembership

 public static function getMembership(Student $student, $term)
 {
     $db = PdoFactory::getPdoInstance();
     $query = "select hms_learning_community_assignment.* from hms_learning_community_assignment JOIN hms_learning_community_applications ON hms_learning_community_assignment.application_id = hms_learning_community_applications.id where term = :term and username = :username;";
     $stmt = $db->prepare($query);
     $stmt->execute(array('username' => $student->getUsername(), 'term' => $term));
     $stmt->setFetchMode(PDO::FETCH_CLASS, 'RlcMembershipRestored');
     return $stmt->fetch();
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:9,代码来源:RlcMembershipFactory.php


示例17: getMenuBlockView

 public function getMenuBlockView(Student $student)
 {
     PHPWS_Core::initModClass('hms', 'RoomChangeMenuBlockView.php');
     PHPWS_Core::initModClass('hms', 'HMS_Assignment.php');
     PHPWS_Core::initModClass('hms', 'RoomChangeRequestFactory.php');
     $assignment = HMS_Assignment::getAssignment($student->getUsername(), $this->term);
     $request = RoomChangeRequestFactory::getPendingByStudent($student, $this->term);
     return new RoomChangeMenuBlockView($student, $this->term, $this->getStartDate(), $this->getEndDate(), $assignment, $request);
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:9,代码来源:RoomChange.php


示例18: actionAdmin

 public function actionAdmin()
 {
     $model = new Student('search');
     $model->unsetAttributes();
     if (isset($_GET['Student'])) {
         $model->setAttributes($_GET['Student']);
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:ngdvan,项目名称:lntguitar,代码行数:9,代码来源:StudentController.php


示例19: contains

 public function contains(Student $student)
 {
     foreach ($this->students as $s) {
         if ($s->getId() == $student->getId()) {
             return true;
         }
     }
     return false;
 }
开发者ID:zaky-92,项目名称:php-1,代码行数:9,代码来源:ext_spl_tests_array_005.php


示例20: render

 public function render()
 {
     if (isset($this->config['course_id'])) {
         $course = new Course();
         $course->include_related('period');
         $course->get_by_id((int) $this->config['course_id']);
         $this->parser->assign('course', $course);
         if ($course->exists()) {
             $task_sets = new Task_set();
             $task_sets->where_related($course);
             $task_sets->where('published', 1);
             $task_sets->where('content_type', 'task_set');
             $task_sets_count = $task_sets->count();
             $this->parser->assign('task_sets_count', $task_sets_count);
             $task_sets->where_related($course);
             $task_sets->where('published', 1);
             $task_sets->where('content_type', 'project');
             $projects_count = $task_sets->count();
             $this->parser->assign('projects_count', $projects_count);
             $groups = new Group();
             $groups->where_related($course);
             $groups_count = $groups->count();
             $this->parser->assign('groups_count', $groups_count);
             $students = new Student();
             $students->where_related('participant/course', 'id', $course->id);
             $students->where_related('participant', 'allowed', 1);
             $students_count = $students->count();
             $this->parser->assign('students_count', $students_count);
             $task_set_permissions = new Task_set_permission();
             $task_set_permissions->select_func('COUNT', '*', 'count');
             $task_set_permissions->where('enabled', 1);
             $task_set_permissions->where_related('task_set', 'id', '${parent}.id');
             $now = date('Y-m-d H:i:s');
             $plus_two_weeks = date('Y-m-d H:i:s', strtotime($now . ' + 2 weeks'));
             $minus_one_week = date('Y-m-d H:i:s', strtotime($now . ' - 1 week'));
             $task_sets->select('id, name, upload_end_time AS min_upload_end_time, upload_end_time AS max_upload_end_time');
             $task_sets->where_related($course);
             $task_sets->where('published', 1);
             $task_sets->where_subquery('0', $task_set_permissions);
             $task_sets->where('upload_end_time >=', $minus_one_week);
             $task_sets->where('upload_end_time <=', $plus_two_weeks);
             $task_sets_2 = new Task_set();
             $task_sets_2->select('id, name');
             $task_sets_2->where_related($course);
             $task_sets_2->where('published', 1);
             $task_sets_2->select_min('task_set_permissions.upload_end_time', 'min_upload_end_time');
             $task_sets_2->select_max('task_set_permissions.upload_end_time', 'max_upload_end_time');
             $task_sets_2->where_related('task_set_permission', 'enabled', 1);
             $task_sets_2->having('(MAX(`task_set_permissions`.`upload_end_time`) >= ' . $this->db->escape($minus_one_week) . ' AND MAX(`task_set_permissions`.`upload_end_time`) <= ' . $this->db->escape($plus_two_weeks) . ')');
             $task_sets_2->or_having('(MIN(`task_set_permissions`.`upload_end_time`) >= ' . $this->db->escape($minus_one_week) . ' AND MIN(`task_set_permissions`.`upload_end_time`) <= ' . $this->db->escape($plus_two_weeks) . ')');
             $task_sets_2->group_by('id');
             $task_sets->union_iterated($task_sets_2, FALSE, 'min_upload_end_time DESC, max_upload_end_time DESC', isset($this->config['number_of_task_sets']) ? (int) $this->config['number_of_task_sets'] : 5);
             $this->parser->assign('task_sets', $task_sets);
         }
     }
     $this->parser->parse('widgets/admin/course_overview/main.tpl');
 }
开发者ID:andrejjursa,项目名称:list-lms,代码行数:57,代码来源:course_overview.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP StudentFactory类代码示例发布时间:2022-05-23
下一篇:
PHP StubManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap