Make one course available to different classes

ls4680
Forums
I am in an organization that has 13 separate units. Different units have different teachers and lessons starting in different months throughout the summer but all member in all units need to pass the same certification test. The certification test needs to be available for different dates for the different classes (members of one unit should not see the certification test until the testing date for their unit. I created separate classes for each unit. I have been able to create separate classes and add the course with the certification test to each class separately. When I go to the URL for the each class it correctly shows a course in that class. But when I change availability date for the course in one class it changes the availability dates for the course the other class. Also when I log in as a user I can not access the URL for the class, it displays "Access denied. You are not authorized to access this page." I would like for a users to be able to see courses in their class.
James Aparicio

Hi ls4680,

Hi ls4680,

 

You can add a multi filed with a node reference and a date with the module multifield or fieldcollection. After doing that you should check opigno the opigno_og_access module. It implements the restrictions to the content based on the group settings / memberships. You will need to do something similar to restrict the access based on this new multifield that you added.

 

BR 

ls4680

Access to the Class URL

I do not understand so let's just take one step at a time. When I log on as a user I can not see the courses in the class because of "Access denied. You are not authorized to access this page." When I am logged on as the admin I and I go to the URL for the class I see the list of courses I have added to that class. I have the module Opigno Og access control 7.x-1.16 but I do not see any settings for the module I do not have the module multifield or field collection. Are you suggesting that I add https://www.drupal.org/project/multifield ? There is only an Alpha and a Dev version, which do you suggest. For https://www.drupal.org/project/field_collection there is only a Beta or a Dev version
James Aparicio

Hi ls4680, 

Hi ls4680, 

What do you mean access denied? He cannot access the node class page, is that it?

Is the user that gets access denied part of the class? If not, is the class private?

Regarding the opigno_og_access there are no settings, just code. You should take a look at what it does. It creates access keys for the nodes and grants the keys (hook_node_access_records and hook_og_access_node_grants). You have to implement something similar adding a key with grater priority based on your new new requirements. Or replace it with your own logic.

 

BR

ls4680

Access to the Class URL {SOLVED}

When logged on as admin and accessing the URL for the class it displays "Group visibility: Public (World-wide open, for example for demo courses)" When logged in as a user and accessing the same URL for the class it displays "Access denied You are not authorized to access this page." [SOLVED] Oops, by bad, I forgot the during testing that I unpublished the class URL For now I have cloned the lesson node with the quiz and then added the separate quiz to each class/course