Hi everyone
When I turn on debugging on our Moodle 2.7.1, some messages related to the activity "book" appear. Before creating tracker entries, I wanted to check whether others have the same issues:
When
I turn on editing in a course (not in the activity book!), the following debug
message appears in topic 0:
The module book does not define the
standard capability mod/book:addinstance
line 2254 of /course/lib.php: call to debugging()
line 1277 of /course/lib.php: call to course_allowed_module()
line 437 of /course/renderer.php: call to get_module_metadata()
line 736 of /course/format/renderer.php: call to
core_course_renderer->course_section_add_cm_control()
line 56 of /course/format/topics/format.php: call to
format_section_renderer_base->print_multiple_section_page()
line 279 of /course/view.php: call to require()
This is an issue which has been reported and resolved for other activities, e.g. Journal (https://tracker.moodle.org/browse/CONTRIB-3735) and attendance (https://tracker.moodle.org/browse/CONTRIB-3923).
When I go into an existing book, the following debug message appears:
get_context_instance() is deprecated, please use context_xxxx::instance() instead.
- line 3670 of /lib/deprecatedlib.php: call to debugging()
- line 51 of /mod/book/view.php: call to get_context_instance()
add_to_log() has been deprecated, please rewrite your code to the new events API
- line 48 of /lib/deprecatedlib.php: call to debugging()
- line 113 of /mod/book/view.php: call to add_to_log()
get_context_instance() is deprecated, please use context_xxxx::instance() instead.
- line 3670 of /lib/deprecatedlib.php: call to debugging()
- line 207 of /mod/book/locallib.php: call to get_context_instance()
- line 171 of /mod/book/locallib.php: call to book_get_toc()
- line 126 of /mod/book/view.php: call to book_add_fake_block()
Among others things, the book seems not prepared yet for the new logging API introduced in Moodle 2.7.
The above mentioned debugging messages (The module book does not define the standard capability mod/book:addinstance, get_context_instance() is deprecated, please use context_xxxx::instance() instead, add_to_log() has been deprecated, please rewrite your code to the new events API) also appear when doing other things with book such as creating a new chapter or editing an existing one.
Important: Besides those debugging messages, book seems to work as usual (no problems).
If others are affected, I would add bugtracker entries for those debugging messages.