Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getScopeRanks($id) {
- global $ministry;
- $i = GLOBAL_RANK_GRUNT;
- $scope = $this->getScope($id);
- $highest_rank = $this->getHighestRank($id);
- while($i > $highest_rank) {
- foreach($scope as $dept=>$rank) {
- if($i == ($rank+1)) {
- echo $dept;
- $dept = $ministry->getMinistry($dept);
- $highest_rank_in[] = $dept['short_name'];
- }
- }
- if($highest_rank_in) {
- $str .= " (Highest assignable rank in";
- foreach($highest_rank_in as $hr => $dept_name) {
- $str .= " $dept_name";
- }
- $str .= ")";
- }
- $ranks[] = [
- "rank" => $i,
- "notes" => $str,
- ];
- $i--;
- }
- return $ranks;
- }
Advertisement
Add Comment
Please, Sign In to add comment