Best practice forum (Archived)

Error: could not insert new context level "70", instance "4441".

 
? ?
Error: could not insert new context level "70", instance "4441".
de ? ? - Thursday, 13 de September de 2012, 23:42
 

Hi,

We created a course on our Totara site with multiple resoucres and activties. Then we started to add in activity Availability Restrictions to all of the quizzes - be available when you have achieved a grade of 100% in previous topics quiz. 

These settings appeared to be 'save changes' of the restricted settings, but when we checked them in the course as a Learner , they weren't displaying to any users correctly (greyed out with info or hidden completely)

We then tried to switch back/off the availability restriction settings, and they again appeared to "save changes" but would not apply/display so in the course.

I switched on Debugging to show all PHP errors and it showed this for the course:

Error: could not insert new context level "70", instance "4441".

  • line 2251 of lib/accesslib.php: call to debugging()
  • line 2571 of lib/accesslib.php: call to create_context()
  • line 1237 of course/lib.php: call to get_context_instance()
  • line 223 of course/view.php: call to get_fast_modinfo()

Incorrect context specified

  • line 377 of lib/accesslib.php: call to debugging()
  • line 1261 of course/lib.php: call to has_capability()
  • line 223 of course/view.php: call to get_fast_modinfo()

Does this relate to the user permissions?

How cna it be fixed and we can't change ANY settings or add new resources or activties within the course :(

Any help please?!

Simon Coggins
Re: Error: could not insert new context level "70", instance "4441".
de Simon Coggins - Sunday, 16 de September de 2012, 15:38
Grupo Totara

Hi Ira,

This looks like it might be a tricky one to track down the cause of - I've tried to reproduce it but no luck yet.

Would you be able to try and reproduce the issue with a new course, e.g. create a new course, create a couple of quizzes and link them in the same way, and see if it happens every time? If so,  can give us step by step instructions on how you got the error to occur.

If you could leave debugging on the whole time and post any other error you get that would be great.

Simon