11 posts / 0 new
Last post
satiate
Offline
Last seen: 4 years 8 months ago
Joined: 12/11/2014
Allow to look lesson page for users, who not subscribe on course

Hello. How can i allow to look lesson-page for users, who not subscribe on course? They must have access to look lesson description, but not have access to take quiz, when they not subscribe. This neccessary for semi-public, and private group visibility. What me do? Help me please.

James Aparicio
James Aparicio's picture
Offline
Last seen: 4 months 3 weeks ago
Staff
Joined: 10/30/2013
Hi satiate, 

Hi satiate, 

Depends on where you want to display this information.

 

Best regards

satiate
Offline
Last seen: 4 years 8 months ago
Joined: 12/11/2014
On lesson page, where users,

On lesson page, where users, who subscribe, can take quiz of this lesson. Look.

I could do allow to look lesson-list for "not subscribers" on course page:

http://pastexen.com/i/JCLMPlSzXb.png

But, when they go to some lesson(where red arrow), they get this:

http://pastexen.com/i/sBIHJQpSBV.png

But need get this:

http://pastexen.com/i/ewjDPPRXJ2.png

How can allow access to this page? Course-page allow to look his description, but lessons - no.

James Aparicio
James Aparicio's picture
Offline
Last seen: 4 months 3 weeks ago
Staff
Joined: 10/30/2013
Hi satiate,

Hi satiate,

If you want to change specific access control, you can look in the opigno_og_access.module. Also look at the quiz list view. It also has access on it. For the left block look in the opigno_quiz_app.module file.

Btw, if you want the users to be able to see the courses/classes that are with private visibility, why do you want to use the private for?

satiate
Offline
Last seen: 4 years 8 months ago
Joined: 12/11/2014
Because, i need:

Because, i need: All users, subscribers and unsubscribers on course, have access to see the description of the lesson. But only subscribers have access to start lesson (node/%/take).

Now: users, who not subscribe on course, cannot see description of the lesson. But i need it. Only subscribers can do this.

Sorry my english.

James Aparicio
James Aparicio's picture
Offline
Last seen: 4 months 3 weeks ago
Staff
Joined: 10/30/2013
Hi satiate,

Hi satiate,

Then you should never use the private visibility. Because the private visibility is ment to hide everything from the users. You should set the courses as semi private, and look into what i talked about. opigno_og_access.module to allow users to access the quiz node even if the course is semiprivate. Alter the access on the list of quizes view. For the left block, you should look inside the opigno_quiz_app.module file.

Best regards

techseria
Offline
Last seen: 10 months 3 weeks ago
Joined: 08/26/2017
Hello james Aparicio

@ Hello james Aparicio IN Tincan Api in TOTAL NUMBER OF PAGE VIEWS not display more then 100 how to solve this ? is any setting ?

satiate
Offline
Last seen: 4 years 8 months ago
Joined: 12/11/2014
Thanks. I go to view opigno

Thanks. I go to view opigno_og_access.module now. After, i write there, what i change for resolve my problem.

For the left block: i already did:

opigno_quiz_app.module:
function opigno_quiz_app_course_lessons($course_nid) {

...

// if ($router_item['access']) { //del by satiate

    $lessons[$course_nid][$record['nid']]['vid'] = $record['vid'];

// }

...

}

satiate
Offline
Last seen: 4 years 8 months ago
Joined: 12/11/2014
I can't resolve my problem.

I can't resolve my problem. Please, tell me name of function, where i can do this. I rummaged everything and have not found.

satiate
Offline
Last seen: 4 years 8 months ago
Joined: 12/11/2014
YES! I found!

YES! I found!

I searched solution - 3 days!

Function name is: opigno_og_access_node_content_access (after changes, need rebuilt permissions)

Thanks for help!

Jiayu
Offline
Last seen: 10 months 4 weeks ago
Joined: 09/26/2018
Any detail changes available

Hello, Any detail changes (like what changes need to be made) available, so that all users can view course and lesson description, but without the ability to take the lesson. Any information is appreciated!

Thank you for the help!