lmsace / enlightlite

Enlightlite - A free responsive moodle theme by LMSACE
2 stars 3 forks source link

Msg: "You don't have permission to view this list of courses" #23

Open eslteacher opened 3 years ago

eslteacher commented 3 years ago

When I tried to access my Moodle site, I got this error message. The issue seems to have appeared after I imported a course from Moodlenet (Illustrative Mathematics Grade 7 Unit 5) on 4/16/20. I recall seeing a course compatibility warning related to Moodle versions. I'm on 3.9 and the imported course was 3.10. I completed the import. Everything appeared normal. I logged out. However, when I returned to my site on 4/18/20 I got the Msg: "You don't have permission to view this list of courses" and I could not assess my Moodle site. I was able to get back into my site by changing the config.php file for my site by adding: $CFG->theme = 'classic'; The imported course and site work as expected with the Classic theme. That lead me to: See Leon Stringer comment- https://moodle.org/mod/forum/discuss.php?d=405486

So, perhaps the course categories/roles for the imported course conflicted with the theme. I did not experiment with adjusting the categories/roles BUT I simply deleted the 3.10 course I previously imported and deleted the $CFG->theme = 'classic'; from my config file. After doing this I was able to enter my Moodle site as normal and the Enlightlite theme displayed as normal.

Thanks also to Dr. Michael Commini (original poster) Hope this helps track down the issue

pikou1985 commented 2 years ago

i have fix this issue by changing in course_renderer.php search: top_course_menu $sql = "SELECT a.category , a.cnt from ( SELECT category , count(category) as cnt FROM {course} C"; $sql .= " INNER JOIN {course_categories} cc ON cc.id = c.category WHERE category != 0 and c.visible <>1 and cc.visible<>1 group by category ) as a order by a.cnt desc ";

bdsigned commented 2 years ago

I have the same problem with the new 4.0 release. Using a moodle 4.0.1 Any suggestions what could be the problem and how to fix it?

LostModern commented 1 year ago

We have this issue too; Moodle 3.11.11+ All the suggestions in Moodle forum and here didn't work..

toosa commented 1 year ago

i have fix this issue by changing in course_renderer.php search: top_course_menu $sql = "SELECT a.category , a.cnt from ( SELECT category , count(category) as cnt FROM {course} C"; $sql .= " INNER JOIN {course_categories} cc ON cc.id = c.category WHERE category != 0 and c.visible <>1 and cc.visible<>1 group by category ) as a order by a.cnt desc ";

This code works in my case, using moodle 3.9.19 , thanks @pikou1985

OTJ-vie commented 10 months ago

I was able to access all the courses as guest when I tick allow in the guest permission of view hidden categories. users>define roles>guests>see-hidden-categories