Skip to content

Commit

Permalink
- Fix tag_id school LoadtoMaster
Browse files Browse the repository at this point in the history
  • Loading branch information
ruancelisantos committed Dec 19, 2016
1 parent 882d8b0 commit 16ff392
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ public function actionLoadToMaster(){
$school = SchoolIdentification::model()->findByPk(Yii::app()->user->school);
$classrooms = Classroom::model()->findAllByAttributes(["school_inep_fk" => yii::app()->user->school, "school_year" => Yii::app()->user->year]);
$loads['school'] = $school->attributes;
$loads['school']['tag_id'] = hexdec(crc32($school->inep_id.$school->name));
foreach ($classrooms as $iclass => $classroom) {
$hash_classroom = hexdec(crc32($school->inep_id.$classroom->id.$classroom->school_year));
$loads['classrooms'][$iclass] = $classroom->attributes;
Expand Down

0 comments on commit 16ff392

Please sign in to comment.