diff --git a/CHANGELOG.md b/CHANGELOG.md index dc799a695..65950c136 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [Versão 3.94.214] +- Correção de Ficha de notas: Os valores de frequencia e a contagem de aulas foi revisado e foi adaptada a visualização dos dados para diferenciar +o relatório para ensino intanfil e fundamental menor do fundamental maior; + ## [Versão 3.94.213] - Controle de status a serem considerados na exportação do sagres. Por padrão apenas matriculas com status "matriculado" são envadas. No entanto, usando o diario eletronico, o status de algumas matriculas mudaram para "Aprovado", "Reprovado" e outros. Foi adicionado um controle para optar ou não por considerar esses status na exportação. - Novo campo na turma para definir o periodo da turma: Anual, 1 Semestre ou 2 Semestre; diff --git a/app/controllers/GradesController.php b/app/controllers/GradesController.php index 851838095..462380c09 100644 --- a/app/controllers/GradesController.php +++ b/app/controllers/GradesController.php @@ -546,6 +546,7 @@ public function actionSaveGrades() $stage = Yii::app()->request->getPost("stage"); $isConcept = Yii::app()->request->getPost("isConcept"); + $transaction = Yii::app()->db->beginTransaction(); try { foreach ($students as $student) { foreach ($student["grades"] as $grade) { @@ -589,10 +590,12 @@ public function actionSaveGrades() } } self::saveGradeResults($classroomId, $disciplineId, $stage); + $transaction->commit(); header('HTTP/1.1 200 OK'); echo json_encode(["valid" => true]); } catch (Exception $e) { TLog::error("Ocorreu algum erro durante a transação de SaveGrades", ["ExceptionMessage" => $e->getMessage()]); + $transaction->rollback(); throw new Exception($e->getMessage(), 500, $e); } @@ -626,6 +629,7 @@ public function actionGetGrades() public function actionCalculateFinalMedia() { + $transaction = Yii::app()->db->beginTransaction(); try { $classroomId = Yii::app()->request->getPost("classroom"); $stage = Yii::app()->request->getPost("stage"); @@ -669,7 +673,9 @@ public function actionCalculateFinalMedia() } } + $transaction->commit(); } catch (Exception $e) { + $transaction->rollback(); TLog::error("Erro ao atualizar status da matrícula", ["Exception" => $e]); } diff --git a/app/domain/grades/usecases/ChageStudentStatusByGradeUsecase.php b/app/domain/grades/usecases/ChageStudentStatusByGradeUsecase.php index ab3b695ff..8e2c04f2e 100644 --- a/app/domain/grades/usecases/ChageStudentStatusByGradeUsecase.php +++ b/app/domain/grades/usecases/ChageStudentStatusByGradeUsecase.php @@ -114,7 +114,7 @@ private function updateStudentSituation() $hasRecoveryGrade = isset($recoveryMedia) && $recoveryMedia !== ""; if (!$hasRecoveryGrade) { $this->gradeResult->situation = $recoverySituation; - } elseif ($recoveryMedia >= $finalRecoveryMedia && $finalRecovery->gradeCalculationFk->name == "Maior") { + } elseif ($recoveryMedia >= $finalRecoveryMedia) { $this->gradeResult->situation = $approvedSituation; } diff --git a/app/models/ClassContents.php b/app/models/ClassContents.php index cd625150e..a4855b726 100644 --- a/app/models/ClassContents.php +++ b/app/models/ClassContents.php @@ -22,13 +22,13 @@ */ class ClassContents extends CActiveRecord { - /** + /** * @return string the associated database table name - */ + */ public function tableName() - { + { return 'class_contents'; - } + } public function behaviors() { @@ -42,40 +42,40 @@ public function behaviors() ] ]; } - /** - * @return array validation rules for model attributes. - */ - public function rules() + /** + * @return array validation rules for model attributes. + */ + public function rules() { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( array('schedule_fk, course_class_fk', 'required'), - array('schedule_fk, course_class_fk, day, month, year, classroom_fk, discipline_fk', 'numerical', 'integerOnly'=>true), - array('fkid', 'length', 'max'=>40), + array('schedule_fk, course_class_fk, day, month, year, classroom_fk, discipline_fk', 'numerical', 'integerOnly' => true), + array('fkid', 'length', 'max' => 40), array('created_at, updated_at', 'safe'), // The following rule is used by search(). // @todo Please remove those attributes that should not be searched. - array('id, schedule_fk, course_class_fk, fkid, created_at, updated_at, day, month, year, classroom_fk, discipline_fk', 'safe', 'on'=>'search'), + array('id, schedule_fk, course_class_fk, fkid, created_at, updated_at, day, month, year, classroom_fk, discipline_fk', 'safe', 'on' => 'search'), + ); + } + + /** + * @return array relational rules. + */ + public function relations() + { + // NOTE: you may need to adjust the relation name and the related + // class name for the relations automatically generated below. + return array( + 'courseClassFk' => array(self::BELONGS_TO, CourseClass::class, 'course_class_fk'), ); } - /** - * @return array relational rules. - */ - public function relations() - { - // NOTE: you may need to adjust the relation name and the related - // class name for the relations automatically generated below. - return array( - 'courseClassFk' => array(self::BELONGS_TO, CourseClass::class, 'course_class_fk'), - ); - } - - /** - * @return array customized attribute labels (name=>label) - */ - public function attributeLabels() + /** + * @return array customized attribute labels (name=>label) + */ + public function attributeLabels() { return array( 'id' => 'ID', @@ -92,53 +92,54 @@ public function attributeLabels() ); } - /** - * Retrieves a list of models based on the current search/filter conditions. - * - * Typical usecase: - * - Initialize the model fields with values from filter form. - * - Execute this method to get CActiveDataProvider instance which will filter - * models according to data in model fields. - * - Pass data provider to CGridView, CListView or any similar widget. - * - * @return CActiveDataProvider the data provider that can return the models - * based on the search/filter conditions. - */ - public function search() + /** + * Retrieves a list of models based on the current search/filter conditions. + * + * Typical usecase: + * - Initialize the model fields with values from filter form. + * - Execute this method to get CActiveDataProvider instance which will filter + * models according to data in model fields. + * - Pass data provider to CGridView, CListView or any similar widget. + * + * @return CActiveDataProvider the data provider that can return the models + * based on the search/filter conditions. + */ + public function search() { - $criteria=new CDbCriteria; + $criteria = new CDbCriteria; - $criteria->compare('id',$this->id); - $criteria->compare('schedule_fk',$this->schedule_fk); - $criteria->compare('course_class_fk',$this->course_class_fk); - $criteria->compare('fkid',$this->fkid,true); - $criteria->compare('created_at',$this->created_at,true); - $criteria->compare('updated_at',$this->updated_at,true); - $criteria->compare('day',$this->day); - $criteria->compare('month',$this->month); - $criteria->compare('year',$this->year); - $criteria->compare('classroom_fk',$this->classroom_fk); - $criteria->compare('discipline_fk',$this->discipline_fk); + $criteria->compare('id', $this->id); + $criteria->compare('schedule_fk', $this->schedule_fk); + $criteria->compare('course_class_fk', $this->course_class_fk); + $criteria->compare('fkid', $this->fkid, true); + $criteria->compare('created_at', $this->created_at, true); + $criteria->compare('updated_at', $this->updated_at, true); + $criteria->compare('day', $this->day); + $criteria->compare('month', $this->month); + $criteria->compare('year', $this->year); + $criteria->compare('classroom_fk', $this->classroom_fk); + $criteria->compare('discipline_fk', $this->discipline_fk); return new CActiveDataProvider($this, array( - 'criteria'=>$criteria, + 'criteria' => $criteria, )); } - /** - * Returns the static model of the specified AR class. - * Please note that you should have this exact method in all your CActiveRecord descendants! - * @param string $className active record class name. - * @return ClassContents the static model class - */ - public static function model($className=__CLASS__) - { - return parent::model($className); - } - - public function getTotalClassesByMonth($classroomId, $month, $year, $disciplineId) { - if(!$disciplineId) { + /** + * Returns the static model of the specified AR class. + * Please note that you should have this exact method in all your CActiveRecord descendants! + * @param string $className active record class name. + * @return ClassContents the static model class + */ + public static function model($className = __CLASS__) + { + return parent::model($className); + } + + public function getTotalClassesByMonth($classroomId, $month, $year, $disciplineId) + { + if (!$disciplineId) { return Yii::app()->db->createCommand( "select count(*) from schedule sc where sc.year = :year and sc.month = :month and sc.classroom_fk = :classroom @@ -161,8 +162,34 @@ public function getTotalClassesByMonth($classroomId, $month, $year, $disciplineI ->queryScalar(); } - public function getTotalClassContentsByMonth($classroomId, $month, $year, $disciplineId) { - if(!$disciplineId) { + public function getTotalClassesMinorStage($classroomId): int + { + return Yii::app()->db->createCommand( + "select COUNT(DISTINCT CONCAT(sc.`month`, '-', sc.`day`)) from schedule sc + where sc.classroom_fk = :classroom + and sc.unavailable = 0" + ) + ->bindParam(":classroom", $classroomId) + ->queryScalar(); + + } + public function getTotalClassesByClassroomAndDiscipline($classroomId, $disciplineId): int + { + return Yii::app()->db->createCommand( + "select count(*) from class_contents cc + join schedule sc on sc.id = cc.schedule_fk + where sc.classroom_fk = :classroom + and sc.discipline_fk = :discipline and sc.unavailable = 0" + ) + ->bindParam(":classroom", $classroomId) + ->bindParam(":discipline", $disciplineId) + ->queryScalar(); + + } + + public function getTotalClassContentsByMonth($classroomId, $month, $year, $disciplineId) + { + if (!$disciplineId) { return Yii::app()->db->createCommand( "select count(*) from class_contents cc join schedule sc on sc.id = cc.schedule_fk @@ -201,7 +228,7 @@ public function buildClassContents($schedules, $students) $courseClasses = []; foreach ($schedule->classContents as $classContent) { - if(TagUtils::isInstructor() && $classContent->courseClassFk->coursePlanFk->users_fk != Yii::app()->user->loginInfos->id) { + if (TagUtils::isInstructor() && $classContent->courseClassFk->coursePlanFk->users_fk != Yii::app()->user->loginInfos->id) { continue; } diff --git a/app/models/ClassFaults.php b/app/models/ClassFaults.php index 7aad57fd4..eedc16f86 100755 --- a/app/models/ClassFaults.php +++ b/app/models/ClassFaults.php @@ -16,100 +16,103 @@ */ class ClassFaults extends CActiveRecord { - /** - * Returns the static model of the specified AR class. - * @param string $className active record class name. - * @return ClassFaults the static model class - */ - public static function model($className=__CLASS__) - { - return parent::model($className); - } + /** + * Returns the static model of the specified AR class. + * @param string $className active record class name. + * @return ClassFaults the static model class + */ + public static function model($className = __CLASS__) + { + return parent::model($className); + } - /** - * @return string the associated database table name - */ - public function tableName() - { - return 'class_faults'; - } + /** + * @return string the associated database table name + */ + public function tableName() + { + return 'class_faults'; + } - public function behaviors() { - return [ - 'CTimestampBehavior' => [ - 'class' => 'zii.behaviors.CTimestampBehavior', - 'createAttribute' => 'created_at', - 'updateAttribute' => 'updated_at', - 'setUpdateOnCreate' => true, - 'timestampExpression' => new CDbExpression('CONVERT_TZ(NOW(), "+00:00", "-03:00")'), - ], - 'afterSave'=>[ - 'class'=>'application.behaviors.CAfterSaveBehavior', - 'schoolInepId' => Yii::app()->user->school, - ], - ]; - } + public function behaviors() + { + return [ + 'CTimestampBehavior' => [ + 'class' => 'zii.behaviors.CTimestampBehavior', + 'createAttribute' => 'created_at', + 'updateAttribute' => 'updated_at', + 'setUpdateOnCreate' => true, + 'timestampExpression' => new CDbExpression('CONVERT_TZ(NOW(), "+00:00", "-03:00")'), + ], + 'afterSave' => [ + 'class' => 'application.behaviors.CAfterSaveBehavior', + 'schoolInepId' => Yii::app()->user->school, + ], + ]; + } - /** - * @return array validation rules for model attributes. - */ - public function rules() - { - // NOTE: you should only define rules for those attributes that - // will receive user inputs. - return array( - array('schedule_fk, student_fk', 'required'), - array('schedule_fk, student_fk', 'numerical', 'integerOnly'=>true), - array('justification', 'length', 'max'=>200), - // The following rule is used by search(). - // Please remove those attributes that should not be searched. - array('id, schedule_fk, student_fk', 'safe', 'on'=>'search'), - ); - } + /** + * @return array validation rules for model attributes. + */ + public function rules() + { + // NOTE: you should only define rules for those attributes that + // will receive user inputs. + return array( + array('schedule_fk, student_fk', 'required'), + array('schedule_fk, student_fk', 'numerical', 'integerOnly' => true), + array('justification', 'length', 'max' => 200), + // The following rule is used by search(). + // Please remove those attributes that should not be searched. + array('id, schedule_fk, student_fk', 'safe', 'on' => 'search'), + ); + } - /** - * @return array relational rules. - */ - public function relations() - { - // NOTE: you may need to adjust the relation name and the related - // class name for the relations automatically generated below. - return array( - 'scheduleFk' => array(self::BELONGS_TO, 'Schedule', 'schedule_fk'), - 'studentFk' => array(self::BELONGS_TO, 'StudentEnrollment', 'student_fk'), - ); - } + /** + * @return array relational rules. + */ + public function relations() + { + // NOTE: you may need to adjust the relation name and the related + // class name for the relations automatically generated below. + return array( + 'scheduleFk' => array(self::BELONGS_TO, 'Schedule', 'schedule_fk'), + 'studentFk' => array(self::BELONGS_TO, 'StudentEnrollment', 'student_fk'), + ); + } - /** - * @return array customized attribute labels (name=>label) - */ - public function attributeLabels() - { - return array( - 'id' => Yii::t('default', 'ID'), - 'schedule_fk' => Yii::t('default', 'Schedule Fk'), - 'student_fk' => Yii::t('default', 'Student Fk'), + /** + * @return array customized attribute labels (name=>label) + */ + public function attributeLabels() + { + return array( + 'id' => Yii::t('default', 'ID'), + 'schedule_fk' => Yii::t('default', 'Schedule Fk'), + 'student_fk' => Yii::t('default', 'Student Fk'), 'justification' => Yii::t('default', "Justification") - ); - } + ); + } - /** - * Retrieves a list of models based on the current search/filter conditions. - * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. - */ - public function search() - { - // Warning: Please modify the following code to remove attributes that - // should not be searched. + /** + * Retrieves a list of models based on the current search/filter conditions. + * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. + */ + public function search() + { + // Warning: Please modify the following code to remove attributes that + // should not be searched. - $criteria=new CDbCriteria; + $criteria = new CDbCriteria; + + $criteria->compare('id', $this->id); + $criteria->compare('schedule_fk', $this->schedule_fk); + $criteria->compare('student_fk', $this->student_fk); + + return new CActiveDataProvider($this, array( + 'criteria' => $criteria, + )); + } - $criteria->compare('id',$this->id); - $criteria->compare('schedule_fk',$this->schedule_fk); - $criteria->compare('student_fk',$this->student_fk); - return new CActiveDataProvider($this, array( - 'criteria'=>$criteria, - )); - } } diff --git a/app/models/Classroom.php b/app/models/Classroom.php index f4be4fd2a..98ab94390 100755 --- a/app/models/Classroom.php +++ b/app/models/Classroom.php @@ -90,6 +90,7 @@ * @property Calendar $calendarFk * @property SchoolIdentification $schoolInepFk * @property EdcensoProfessionalEducationCourse $edcensoProfessionalEducationCourseFk + * @property EdcensoStageVsModality $edcensoStageVsModalityFk * @property ClassroomHasCoursePlan[] $classroomHasCoursePlans * @property InstructorTeachingData[] $instructorTeachingDatas * @property Schedule[] $schedules diff --git a/app/models/StudentEnrollment.php b/app/models/StudentEnrollment.php index 8d300cb97..b4849cf74 100755 --- a/app/models/StudentEnrollment.php +++ b/app/models/StudentEnrollment.php @@ -261,8 +261,8 @@ public function attributeLabels() 'daily_order' => Yii::t('default', 'daily_order'), 'school-identifications' => Yii::t('default', 'School Identifications'), 'transfer_date' => Yii::t('default', 'Transfer Date'), - 'class_transfer_date' => Yii::t('default' ,'Class Transfer Date'), - 'school_readmission_date' => Yii::t('default','School Readmission Date'), + 'class_transfer_date' => Yii::t('default', 'Class Transfer Date'), + 'school_readmission_date' => Yii::t('default', 'School Readmission Date'), 'enrollment_date' => Yii::t('default', 'Enrollment Date'), ); } @@ -290,40 +290,42 @@ public function search() $criteria->compare('enrollment_id', $this->enrollment_id, true); $criteria->compare('id', $this->id); $criteria->compare('classroomFk.school_year', Yii::app()->user->year); - $criteria->compare('class_transfer_date',$this->class_transfer_date); - $criteria->compare('school_readmission_date',$this->school_readmission_date); - $criteria->compare('enrollment_date',$this->enrollment_date); + $criteria->compare('class_transfer_date', $this->class_transfer_date); + $criteria->compare('school_readmission_date', $this->school_readmission_date); + $criteria->compare('enrollment_date', $this->enrollment_date); $school = Yii::app()->user->school; $criteria->compare('t.school_inep_id_fk', $school); $criteria->addCondition('studentFk.name like "%' . $this->student_fk . '%"'); $criteria->addCondition('classroomFk.name like "%' . $this->classroom_fk . '%"'); - return new CActiveDataProvider($this, array( - 'criteria' => $criteria, - 'sort' => array( - 'attributes' => array( - 'studentFk.name' => array( - 'asc' => 'studentFk.name', - 'desc' => 'studentFk.name DESC', + return new CActiveDataProvider( + $this, + array( + 'criteria' => $criteria, + 'sort' => array( + 'attributes' => array( + 'studentFk.name' => array( + 'asc' => 'studentFk.name', + 'desc' => 'studentFk.name DESC', + ), + 'classroomFk.name' => array( + 'asc' => 'classroomFk.name', + 'desc' => 'classroomFk.name DESC', + ), + 'classroomFk.school_year' => array( + 'asc' => 'classroomFk.school_year', + 'desc' => 'classroomFk.school_year DESC', + ), + '*', + // Make all other columns sortable, too ), - 'classroomFk.name' => array( - 'asc' => 'classroomFk.name', - 'desc' => 'classroomFk.name DESC', + 'defaultOrder' => array( + 'studentFk.name' => CSort::SORT_ASC ), - 'classroomFk.school_year' => array( - 'asc' => 'classroomFk.school_year', - 'desc' => 'classroomFk.school_year DESC', - ), - '*', - // Make all other columns sortable, too - ), - 'defaultOrder' => array( - 'studentFk.name' => CSort::SORT_ASC ), - ), - 'pagination' => false - ) + 'pagination' => false + ) ); } @@ -368,6 +370,52 @@ public function getFaultsByDiscipline($disciplineId) return $faults; } + public function countFaultsDiscipline($disciplineId = null): int + { + $classroomId = $this->classroom_fk; + $studentId = $this->student_fk; + $isMinorEducation = TagUtils::isStageMinorEducation($this->classroomFk->edcensoStageVsModalityFk->edcenso_associated_stage_id); + + $command = Yii::app()->db->createCommand() + ->from('class_faults cf') + ->join('schedule s', 'cf.schedule_fk = s.id') + ->where('student_fk = :studentId and s.classroom_fk = :classroomId') + ->select('count(DISTINCT CONCAT(s.`year`, s.`month`, s.`day`))') + ->bindValues([ + ':classroomId' => $classroomId, + ':studentId' => $studentId + ]); + + if (!$isMinorEducation) { + $command = Yii::app()->db->createCommand() + ->select('COUNT(1)') + ->from('schedule t') + ->join( + '(SELECT s1.classroom_fk, s1.`day`, s1.`month`, s1.`year`, s1.discipline_fk + FROM class_faults cf + JOIN schedule s1 ON cf.schedule_fk = s1.id + WHERE s1.classroom_fk = :classroomId + AND cf.student_fk = :studentId + AND s1.discipline_fk = :disciplineId) sf', + 't.classroom_fk = sf.classroom_fk + AND sf.`month` = t.month + AND sf.`day` = t.`day` + AND sf.discipline_fk = t.discipline_fk' + ) + ->bindValues([ + ':classroomId' => $classroomId, + ':studentId' => $studentId, + ':disciplineId' => $disciplineId, + ]); + } + + return $command->queryScalar() ?? 0; + + + } + + + public function getFaultsByExam($exam) { /* @var $schoolConfiguration SchoolConfiguration */ @@ -602,8 +650,9 @@ public function getSheetGrade() return $result; } - public static function getListStatus(){ - $status = [ + public static function getListStatus() + { + $status = [ "1" => StudentEnrollment::STATUS_ACTIVE, "2" => StudentEnrollment::STATUS_TRANSFERRED, "3" => StudentEnrollment::STATUS_CANCELED, @@ -622,8 +671,9 @@ public static function getListStatus(){ return $status; } - public function getCurrentStatus(){ - $status = [ + public function getCurrentStatus() + { + $status = [ null => "", "1" => StudentEnrollment::STATUS_ACTIVE, "2" => StudentEnrollment::STATUS_TRANSFERRED, @@ -644,29 +694,36 @@ public function getCurrentStatus(){ } - public function isActive(){ + public function isActive() + { $refActiveStatus = [ - "1", "8", "10", "6", "5", null + "1", + "8", + "10", + "6", + "5", + null ]; $stages = new CList($refActiveStatus, true); return $stages->contains($this->status); } - public static function getStatusId($status){ - $statusList = [ - StudentEnrollment::STATUS_ACTIVE => "1" , - StudentEnrollment::STATUS_TRANSFERRED => "2" , - StudentEnrollment::STATUS_CANCELED => "3" , - StudentEnrollment::STATUS_ABANDONED => "4" , - StudentEnrollment::STATUS_RESTORED => "5" , - StudentEnrollment::STATUS_APPROVED => "6" , - StudentEnrollment::STATUS_APPROVEDBYCOUNCIL => "7" , - StudentEnrollment::STATUS_DISAPPROVED => "8" , - StudentEnrollment::STATUS_CONCLUDED => "9" , - StudentEnrollment::STATUS_INDETERMINED => "10" , - StudentEnrollment::STATUS_DEATH => "11" , - StudentEnrollment::STATUS_ADVANCED => "12", - StudentEnrollment::STATUS_REINTEGRATED => "13" + public static function getStatusId($status) + { + $statusList = [ + StudentEnrollment::STATUS_ACTIVE => "1", + StudentEnrollment::STATUS_TRANSFERRED => "2", + StudentEnrollment::STATUS_CANCELED => "3", + StudentEnrollment::STATUS_ABANDONED => "4", + StudentEnrollment::STATUS_RESTORED => "5", + StudentEnrollment::STATUS_APPROVED => "6", + StudentEnrollment::STATUS_APPROVEDBYCOUNCIL => "7", + StudentEnrollment::STATUS_DISAPPROVED => "8", + StudentEnrollment::STATUS_CONCLUDED => "9", + StudentEnrollment::STATUS_INDETERMINED => "10", + StudentEnrollment::STATUS_DEATH => "11", + StudentEnrollment::STATUS_ADVANCED => "12", + StudentEnrollment::STATUS_REINTEGRATED => "13" ]; return $statusList[$status]; diff --git a/app/modules/aeerecord/views/default/_form.php b/app/modules/aeerecord/views/default/_form.php index 5c8912abd..e9f139b46 100644 --- a/app/modules/aeerecord/views/default/_form.php +++ b/app/modules/aeerecord/views/default/_form.php @@ -7,8 +7,8 @@ $themeUrl = Yii::app()->theme->baseUrl; $baseScriptUrl = Yii::app()->controller->module->baseScriptUrl; $cs = Yii::app()->getClientScript(); -$cs->registerScriptFile($baseScriptUrl . '/_initialization.js', CClientScript::POS_END); -$cs->registerScriptFile($baseScriptUrl . '/functions.js', CClientScript::POS_END); +$cs->registerScriptFile($baseScriptUrl . '/_initialization.js?v='.TAG_VERSION, CClientScript::POS_END); +$cs->registerScriptFile($baseScriptUrl . '/functions.js?v='.TAG_VERSION, CClientScript::POS_END); $form=$this->beginWidget('CActiveForm', array( 'id'=>'student-aee-record-form', diff --git a/app/modules/aeerecord/views/default/admin.php b/app/modules/aeerecord/views/default/admin.php index d31ffe0c2..a47d290d7 100644 --- a/app/modules/aeerecord/views/default/admin.php +++ b/app/modules/aeerecord/views/default/admin.php @@ -11,8 +11,8 @@ $themeUrl = Yii::app()->theme->baseUrl; $baseScriptUrl = Yii::app()->controller->module->baseScriptUrl; $cs = Yii::app()->getClientScript(); -$cs->registerScriptFile($baseScriptUrl . '/_initialization.js', CClientScript::POS_END); -$cs->registerScriptFile($baseScriptUrl . '/functions.js', CClientScript::POS_END); +$cs->registerScriptFile($baseScriptUrl . '/_initialization.js?v='.TAG_VERSION, CClientScript::POS_END); +$cs->registerScriptFile($baseScriptUrl . '/functions.js?v='.TAG_VERSION, CClientScript::POS_END); $this->menu=array( array('label'=>'Create StudentAeeRecord', 'url'=>array('create')), diff --git a/app/modules/aeerecord/views/default/index.php b/app/modules/aeerecord/views/default/index.php index 8374846ab..4b1770267 100644 --- a/app/modules/aeerecord/views/default/index.php +++ b/app/modules/aeerecord/views/default/index.php @@ -11,8 +11,8 @@ $themeUrl = Yii::app()->theme->baseUrl; $baseScriptUrl = Yii::app()->controller->module->baseScriptUrl; $cs = Yii::app()->getClientScript(); -$cs->registerScriptFile($baseScriptUrl . '/_initialization.js', CClientScript::POS_END); -$cs->registerScriptFile($baseScriptUrl . '/functions.js', CClientScript::POS_END); +$cs->registerScriptFile($baseScriptUrl . '/_initialization.js?v='.TAG_VERSION, CClientScript::POS_END); +$cs->registerScriptFile($baseScriptUrl . '/functions.js?v='.TAG_VERSION, CClientScript::POS_END); $this->menu=array( array('label'=>'Create StudentAeeRecord', 'url'=>array('create')), diff --git a/app/modules/classdiary/views/default/classDays.php b/app/modules/classdiary/views/default/classDays.php index 35c56b9c7..e7e2e718a 100644 --- a/app/modules/classdiary/views/default/classDays.php +++ b/app/modules/classdiary/views/default/classDays.php @@ -6,7 +6,7 @@ ); $baseScriptUrl = Yii::app()->controller->module->baseScriptUrl; $cs = Yii::app()->getClientScript(); -$cs->registerScriptFile($baseScriptUrl . '/classDays/_initialization.js', CClientScript::POS_END); +$cs->registerScriptFile($baseScriptUrl . '/classDays/_initialization.js?v='.TAG_VERSION, CClientScript::POS_END); ?>