marceloschmitt / moodle-block_analytics_graphs

Learning analytics Moodle plugin - graphs to help teachers.
GNU General Public License v3.0
15 stars 17 forks source link

debugging messages on graphResourceUrl.php #2

Closed danmarsden closed 9 years ago

danmarsden commented 9 years ago

get_context_instance() is deprecated, please use context_xxxx::instance() instead. line 3237 of /lib/deprecatedlib.php: call to debugging() line 27 of /blocks/analytics_graphs/graphResourceUrl.php: call to get_context_instance() get_context_instance() is deprecated, please use context_xxxx::instance() instead. line 3237 of /lib/deprecatedlib.php: call to debugging() line 36 of /blocks/analytics_graphs/lib.php: call to get_context_instance() line 33 of /blocks/analytics_graphs/graphResourceUrl.php: call to block_analytics_graphs_get_students() get_role_users() without specifying one single roleid needs to be called prefixing role assignments id (ra.id) as unique field, you can use $fields param for it. line 4091 of /lib/accesslib.php: call to debugging() line 38 of /blocks/analytics_graphs/lib.php: call to get_role_users() line 33 of /blocks/analytics_graphs/graphResourceUrl.php: call to block_analytics_graphs_get_students()

Warning: Unexpected character in input: '' (ASCII=29) state=0 in /var/www/moodle-r2/blocks/analytics_graphs/classes/event/block_analytics_graphs_event_view_graph.php on line 57

Warning: Unexpected character in input: '' (ASCII=28) state=0 in /var/www/moodle-r2/blocks/analytics_graphs/classes/event/block_analytics_graphs_event_view_graph.php on line 57 Unknown table specified in objecttable field line 673 of /lib/classes/event/base.php: call to debugging() line 695 of /lib/classes/event/base.php: call to core\event\base->validate_before_trigger() line 137 of /blocks/analytics_graphs/graphResourceUrl.php: call to core\event\base->trigger()

marceloschmitt commented 9 years ago

Corrected warnings related to get_role_users() and unexpected char. Will leave get_context_instance for compatibility reasons. Will create another branch for newer version of Moodle.

mudrd8mz commented 9 years ago

Alternatively, you can check if ($CFG->version >= xxxxxx) { in your code and keep one branch supporting wider range of Moodle versions. Some developers prefer this way, some prefer multiple branches.

marceloschmitt commented 9 years ago

Yeah. I have thought about it. You are correct.