the error in my case was like below:
" You don't have permission to view this list of courses. "
The issue reason was that i have a hidden course category contains 1 course visible (not hidden). seems that should not have a hidden course category and visible course inside it .
I have fixed it easly, THANKS TO GOOD.
Because im not able to open my moodle site or even adminstration section, so followed the below steps:
1- Went to host
control panel => then PHP admin => then opnned my moodle database
2- Search for course_categories table, then knew that there is a hidden category, contains 1 course.
3- Then went to course table, and knew that the course of the hidden category is visible, so i changed it to invisible by
updating the values of two column from 1 to 0 , like below:
(UPDATE `course` SET `visible` = '0', `visibleold` = '0' WHERE `course`.`id` = 17;)
4- went to my moodle website and refreshed the page, it worked fine.