-
Improvement
-
Resolution: Fixed
-
Minor
-
3.3.2, 3.5
-
MOODLE_33_STABLE, MOODLE_35_STABLE
-
MOODLE_35_STABLE
-
patch-2
-
I'm currently writing a plugin in which I extend the class flexible_table. The base class has an option to display two "initials bars" that can be used for filtering by the initial of the first name or surname. You can either display both initials bars or none.
However, I want to be able to let my users filter only by the initial of the surname, not the first name. I want to display only one of the two initials bars. This is possible by deriving from flexible_table and overriding the print_initials_bar method. But then I need to use get_initial_last to get the currently selected initial. However, that method is deprecated since Moodle 3.3. I can't access $prefs from the base class directly because it's private.
I would like to have some non-deprecated way of achieving this without having too much redundant code in the end. I don't mind having to override one method. My suggestion would be to either:
- make get_initial_last (and get_inital_first) protected and non-deprecated (reduces visibility of these methods; may break something)
- make $prefs protected
- change the class flexible_table itself to allow both bars to be enabled individually (changes the public interface; may break something)
What would be the "best" solution? Does anyone have another suggestion?
- is a regression caused by
-
MDL-55941 Improve UX of alpha chooser / initialbar in tablelib and make it responsive
-
- Closed
-