Opigno video course tool icon shows when it's not purchased

saidev
Forums
Hi, I have Opigno Video App and Opigno Commerce installed. The site will allow student to purchase the course thru the system. I've notice that when a student browsing the course category and click into a that they have not purchased, the Videos icon shows as part of the course tool http://diuhear.com/opigno_commerce_video_problem.png</a" title="See pic">a link. The actual videos in the course is not showing; which is an expected behavior. So I gone into the function og_user_access() and did some debugging and notice that all the other course tools call backs for og_user_access() was called but the Videos did not. Here is a log of what's all was called when I load a course that has not been purchased by the student. og_user_access : 8, node, subscribe without approval, referer: og_user_access : 8, node, manage members, referer: og_user_access : 8, node, administer group, referer: og_user_access : 8, node, update any course content, referer: og_user_access : 8, node, update group, referer: og_user_access : 8, node, manage members, referer: og_user_access : 8, node, sort courses, referer: og_user_access : 8, node, add user, referer: og_user_access : 8, node, add user, referer: og_user_access : 8, node, manage permissions, referer: og_user_access : 8, node, access quiz, referer: og_user_access : 7, node, create h5p_content content, referer: og_user_access : 7, node, create poll content, referer: og_user_access : 7, node, create quiz content, referer: og_user_access : 7, node, create forum content, referer: og_user_access : 8, node, manage members, referer: og_user_access : 8, node, sort courses, referer: og_user_access : 8, node, view group statistics, referer: og_user_access : 8, node, access quiz, referer: og_user_access : 8, node, tft access file tree, referer: It feels like I'm missing a setting somewhere, maybe in the og_context but I have been setting different settings for awhile and nothing seem to impact this. Please help. Thanks
davemanuel

Hello

Im am also looking for a solution on that, Please comment here if you find one. Thanks!
saidev

davemanuel, I have not found

davemanuel, I have not found the solution but I'm hoping one of the Opigno module developer might see this. If I have more time, I'm going to try to debug it more. I'm relearning drupal and just learning the opigno platform for the first time; it does mostly what I need but writing addition functions and modules to replace and override some existing templates and functions. Hope this learning process will bring me more knowledge to debug the issue further. If I figure it out, I'll be sure to post back. Meanwhile, I hope someone else might have the solution. Good luck.
davemanuel

Hi saidev!

Yeah, its my first time to encounter drupal and opigno and its kinda complicated. I hope some of the developer response to this coz I also posted many times in support but I barely receive replies.
saidev

Solved I think

davemanuel, I think I figured it out. It seem that the 'access_callback' => 'og_user_access', in the opigno_video module is being override by the "views" module itself to call the "views_access" instead of the suggested "og_user_access". The short of it is to go to /admin/structure/views/view/videos/edit and change the "Page settings" "Access" from "Permission" to "OG permission" and set it for "access video content, getting the group ID from argument position 1". For my /admin/config/group/permissions/node/course - The "student" should have "Allows the user the view the videos" (event the sub text say that creation of new videos, but student can't create videos; I think it's a mis-labeled). Anyway, I hope this helps with your situation.
davemanuel

Hello Saidev!

I will try your solution thanks for your effort! really appreaciated. By the way, since support barely replies, can I get your idea because I am stock and this is my scenario. I want to edit the "ADD NEW COURSE PAGE". I want is to be separated the fields. To be step by step in inputting. Let say STEP 1 : Input course name and course description then click next button then step 2 until finish Something like this . http://demos.creative-tim.com/paper-bootstrap-wizard/wizard-list-place.html
saidev

@davemanuel,

@davemanuel, I like the wizard idea, I too have thought about it but haven't explored it too much. I'm leaning on more of creating the Course basic info -> force create a lesson -> and than assign it as the required to assign a cert -> and than publish; it make sense to what I'm doing but it might be different for you. Know myself, I'll try to use as much plugins as possible then write custom modules (addition/overrides) then patch any of the core. If I learn more about wizard steps, I'll ping back. Good luck with the video icon, hope what I found helps with what you are doing.
davemanuel

Hello

Yes, I amstill studying and still cant figure out what to do with my concern, bacause our opigno version is now live and client what that wizard. I will try your solution on my localhost and Ill message back