Jump to content

Aircraft table - minrank ranklevel


ProAvia

Recommended Posts

  • Administrators

In the aircraft table, what is the purpose of the minrank and ranklevel fields? I'm assuming one if them is for the minimum rank level to use that specific equipment.

Also, in phpVMS 5.2.2 - does restricting the aircraft by rank actually work correctly. I'm using simpilot's Front Schedules if that makes any difference.

Thanks

Link to comment
Share on other sites

minrank is indeed used for schedules, etc. to restrict the pilot's minimum rank to that rank in the table if it's implemented correctly.

ranklevel I believe is the same thing (number), but it works differently on the backend.

In the default schedules (in phpVMS 5.5.2), it should work as advertised provided in your local.config.php, this is set

Config::Set('RESTRICT_AIRCRAFT_RANKS', true);

In the front schedules module, I don't think it takes this in by default, so you'd have to modify the module in order to check this. Right now, I believe it's just spitting out any schedule within parameters in the form.

Link to comment
Share on other sites

  • Administrators

Thanks for the reply! Yes, that's what I'm seeing in Front Schedules. And local.config is set to true for restrict aircraft ranks.

In the aircraft table, minrank consistently is one number higher than ranklevel..... If minrank=3, ranklevel=2.

EDIT - checked via Schedules also - restricted rank aircraft schedules all show. I used a new account I set up with the minimum rank level.

Edited by ProAvia
Link to comment
Share on other sites

  • Moderators

First of all, there is no need to check your system's database. phpVMS automatically calculates the ranklevel of each rank. The minrank value is the id of the rank you have selected. The ranklevel value is the row of the rank. The initial pilot rank is 1, then goes to 2 and so one. Of course this cannot be the same with the rank id. You may add ranks in a different row in your system for any reason.

Did you check the default phpVMS schedules page? Which phpVMS version are you using?

Link to comment
Share on other sites

  • Administrators

Using version 5.2.2

Yes, I checked the default schedules page also. All routes show, even when ranks are restricted. I created a new account for testing which carries the minimum rank. The restricted aircaft list a rank one or two levels above this minimum rank.

I only checked the database to see if there was something amiss - after verifying minimum rank didn't seem to have any affect.

Edited by ProAvia
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...