-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.3.4
-
None
-
MOODLE_23_STABLE
Teacher is deleting items in the course. Seems to be random, but at some point, in some of our courses, they get a message "Coding error detected, it must be fixed by a programmer: PHP catchable fatal error"
I found that deleting sectioncache from the course in the database fixes the problem, but I also dug in a bit deeper.
With debug on:
Debug info: Argument 2 passed to has_capability() must be an instance of context, boolean given, called in modinfolib.php on line 1097 and defined
Error code: codingerror
In debugging the module, modcontext is returning empty causing has_capability to error out.
I added the following code to modinfolib.php update_user_visible() as a work around, but, I believe the issus is occurring at the time of deletion and not display.
if ($modcontext != "") {
if ((!$this->visible or !$this->available) and
!has_capability('moodle/course:viewhiddenactivities', $modcontext, $userid))
} else
{ $this->uservisible = false; }Now the course will open without my intervention.
I have not been able to 100% pin down a testing method, but it has happend repeatedly this past week (our semester just started), so it might be the upgrade version, it might have been there all along.
I am running the weekly build Moodle 2.3.4+ (Build: 20130125)
- duplicates
-
MDL-37939 Moving modules between sections is not properly working
-
- Closed
-