-
Bug
-
Resolution: Fixed
-
Minor
-
2.6.4, 2.7.1
-
None
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
View patterns by view name (e.g. ##viewlink:<viewname>##) are not processed in acceptance tests.
Apparently this is because view_manager::get_views_menu() that is called for generating the patterns for all existing views, uses a static variable to store the menu, and since the acceptance test is essentially a run of one script, this static variable is set once empty on an earlier call and never get updated.
A fix removes the static variable, to the effect that there is a DB access every time the view_manager::get_views_menu() is called. To reduce these DB accesses, simple caches should be implemented as needed where this method is called.