change visibility of resource from a script

change visibility of resource from a script

by Meir Shloush -
Number of replies: 0
hallo,

I tried to change the visibility of a resources from a script, so I changed the 'visible' field in the 'course_modules' table. the problem is that as an admin I see that the visibility changed, but as student if it wasn't visible i stil can't see it, if it was visible I can see it in gray - like a teacher.
I made a log file to the MySQL and checked what happend when I change the visibility from the GUI, so I find that except the UPDATE I did it makes 2 more things. it updates the log field in the course table and insert to the log table.
any idea what's wrong with the procedure I did ?
what is the right way to do it ?

thanks a lot
meir
Average of ratings: -