Is there a possibility to create a list of questions and for each student make test of randomize set of questions. for example I have 50 questions and each student have any 5 of them.
This is a normal (standard), and I might add a very well implemented and easy to use feature of Moodle that I use all the time. You can read more about it in the Moodle docs.
Moodle's randomization can be used in its simple form, but you can also push it to a higher functionality. For example, you can mix random with specific questions. You can have groups of random questions. And you can mix True/False, Multiple Choice, Calculated Question and others into the random selection. Very powerful stuff! Can't do this with Blackboard, for example.
if we have two categories of questions and we add questions randomally then from first category grade is 1 and second we have grade 2 how