Posted by Amit Marwah on July 16, 2013 at 11:43am
Dear Sir/Members
I have creates different roles like class 1,class 2,class 3 etc
I have created different quizzes like class 1 test ,class 2 test ,class 3 test etc
Now i want to assign class 1 test to role class 1 and class 2 test to role class 2
The problem i m facing is user of role class 2 can see quiz "class 1 test"
Is there any way by which we can make a provision in which class 2 role can only see the quiz class 2 test
Regards
Comments
Organic groups is one approach
A fairly complex, but robust solution is to use Organic Groups. I have set-up an LMS where each Course (content-type) is an organic group node, and students are either members of the group or not. As members they are allowed to see all private course content which includes learning modules and quizzes.
Using the invite module and a bit of 'glue' code I was able to allow teachers to invite students to a course, which would automatically set-up their Drupal account and add them as a member of the course(s) to which they were invited.
Entityreference prepopulate is quite handy too because it allows you to hide the Organic Group field when added / editing content if it is prepopulated via the url, for example: node/add/quiz?og_group_ref=1 would automatically add the quiz to the course node with nid 1.
Using Organic Groups may be a little 'heavy' for what you require, but it may be worth considering.