Although the Student ID cannot be pulled into the algorithm, there are some other great options....

1)  As Meta mentioned, you can use a combination of Adaptive Assignments utilizing Maple Repositories

2)  You can generate a "pseudo-student" id, using a response from a prior question and then generate a number from that string.

For example:  I built an assignment with the following details:

Question 1: Asks the student to write their name in the box:  "I, ___________, certify that this is my assignment".
-If a student writes a name that does not appear in the comma separated list, their first question is highlighted (as it is graded in-correct).Question 2: Asks the student to write in an ascii-string that resembles their response to question 1 (ie. name):  "take each letter in your name and convert your name to an ASCII string that is padded to a total width of 4-digits per letter: ___________________"
-we use Maple (inside a Maple-graded response) to convert all the possible student names to the same ascii-string and then check to see if the student response is correct (based on their response to the first question).Question 3:  Asks the student to (mod 5) each character in their second answer:  "Take each character in the ASCII string above, find mod 5 of the character, and indicate the resulting string below: ___________"
-Again we use Maple, to check the students supplied answer against what they should have answered based on the first question.

Basically the above allows you to completely customize an assignment based upon what the student responded in the first answer box, on the first question, (I recommend you think about using a table/Matrix with the first column as student names, and each column thereafter as answers to Question#1, Question#2, etc.)

Here is a Mobius Module that demonstrates the above:

Here is a screenshot of what is accomplished: