1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019/11/11 0011
- * Time: 14:00
- */
- class SStudentModelEssay extends MyActiveRecord
- {
- public static function model($className = __CLASS__)
- {
- return parent::model($className);
- }
- public function tableName()
- {
- return 'student_model_essay';
- }
- /**
- * 获取学生精品范文答题id
- * @param $exam_id
- * @return array
- */
- public function getStuRsId($exam_id)
- {
- $stu_rs_ids = array();
- $criteria = new CDbCriteria();
- $criteria->addCondition("exam_id = '". $exam_id ."'");
- $sme_info = getAttributes($this->findAll($criteria));
- if($sme_info){
- foreach($sme_info as $value){
- $stu_rs_ids[] = $value['sptr_id'];
- }
- }
- return $stu_rs_ids;
- }
- }
|