Promotion Summary in Various Ranks Print
| Level | Rank Name | Qualification Requirments | Qualified | Not Qualified | |||
|---|---|---|---|---|---|---|---|
| Course | Exam | Duration | Discipline | ||||
| name; ?> | No'; }else{ echo 'Yes'; }?> | No'; }else{ echo 'Yes'; }?> | No'; }else{ echo $duration.' years'; }?> | Yes |
db->get('personalDetails')->result() as $allOfficer){
//get course of the current rank
//find current rank for user and check if it match with this rank
$currentRank =0;
$findRank = $this->db->order_by('rankLevel','desc')->where('userId',$allOfficer->id)->limit(1)->get('officerRanks');
foreach($findRank->result() as $currentRankRow){
$currentRank = $currentRankRow->rankId;
}
//check if is rank match;
$thisLevel = $thisRankId;
$currentRank = $currentRank;
if($currentRank == $thisLevel){
//check if course attempted match
$getCourse = $this->UserModel->getCourse($allOfficer->id,$thisRankId);
$getExam = $this->UserModel->getExam($allOfficer->id,$thisRankId);
$getDuration = explode('|',$this->UserModel->getDuration($allOfficer->id,$thisRankId));
$officerRankDuration = $getDuration[0];
$timePassed = $getDuration[1];
$getDiscipline = $this->UserModel->getDescipline($allOfficer->id);
// echo 'UserId '.$allOfficer->id.' User level '.$currentRank.' Rank Level '.$thisLevel.' '; // echo 'Course Required '.$course.'='.$getCourse.' duration '.$duration.' = '.$officerRankDuration.' Exam Required' // .$exam.' = '.$getExam.' decipline '.$getDiscipline; if($course==$getCourse && $exam == $getExam && $officerRankDuration>=$duration && $getDiscipline==0){ // echo 'Promote'; $qualified++; }else{ // echo "Do not promote"; $notqualified++; } }else{ //Level does not meet this level/rank } } ?> |
||