tussenopslag
This commit is contained in:
@@ -111,7 +111,6 @@ class Lijsten
|
||||
$this->setBrin();
|
||||
$this->setLabels();
|
||||
$this->setAmbities();
|
||||
$this->setZprocent();
|
||||
$this->setSchoolScores();
|
||||
$this->setIndividueleScores();
|
||||
$this->setBestuurScores();
|
||||
@@ -183,18 +182,38 @@ class Lijsten
|
||||
}
|
||||
|
||||
private function setAmbities(){
|
||||
$ambitie = $this->CI->Ambities_model->getOrgAmbities($this->lijst->orgversieid, $this->orgid);
|
||||
$ambitieorgs = '';
|
||||
$ambitieorgs = $this->getAmbitieOrgs($this->orgid, $ambitieorgs);
|
||||
$ambitieorgs = rtrim($ambitieorgs, ',');
|
||||
|
||||
$toporgsarray = explode(',', $ambitieorgs);
|
||||
$toporgs = '';
|
||||
$index = 0;
|
||||
for($i = count($toporgsarray)-1; $i >= 0 ; $i--) {
|
||||
if($index < 2) {
|
||||
$toporgs .= $toporgsarray[$i] . ',';
|
||||
$index++;
|
||||
}
|
||||
}
|
||||
$toporgs = rtrim($toporgs, ',' );
|
||||
|
||||
$ambitie = $this->CI->Ambities_model->mh_get_ambitie_orgversie($this->lijst->orgversieid, $ambitieorgs, $toporgs);
|
||||
|
||||
if (!in_array($ambitie, $this->ambitiearray, FALSE)) {
|
||||
$this->lijst->ambities = $ambitie;
|
||||
$this->ambitiearray [] = $ambitie;
|
||||
}
|
||||
}
|
||||
|
||||
private function setZprocent(){
|
||||
$this->zprocent = 0;
|
||||
if(isset($this->lijst->ambities)){
|
||||
$this->zprocent = $this->lijst->ambities->zprocent;
|
||||
private function getAmbitieOrgs($orgid, $ambitieorgs){
|
||||
$ambitieorgs .= $orgid . ',';
|
||||
$valtonder = $this->CI->Organisaties_model->get_fieldvalue(['id' => $orgid], 'valtonder_id');
|
||||
if($valtonder != $orgid){
|
||||
return $this->getAmbitieOrgs($valtonder, $ambitieorgs);
|
||||
}
|
||||
|
||||
return $ambitieorgs;
|
||||
|
||||
}
|
||||
|
||||
private function setSchoolScores(){
|
||||
|
||||
Reference in New Issue
Block a user