MDL-35339 Deprecate get_all_mods() add get_module_types_names()

- added function get_module_types_names() returning the list of localised strings used for module names;
- added function cm_info::get_used_module_names();
- added magic properties cm_info:: and cm_info:: returning human readable module name;
- replaced usage of function get_all_mods() with get_fast_modinfo() and get_module_types_names();
- function print_section_add_menus() may now retrieve the modules names list itself;
- deprecated function get_all_mods()
This commit is contained in:
Marina Glancy
2012-10-15 14:08:13 +08:00
parent 722e6ba947
commit d57aa283f7
10 changed files with 151 additions and 127 deletions
+2 -2
View File
@@ -271,7 +271,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
*
* @param stdClass $section The course_section entry from DB
* @param stdClass $course The course entry from DB
* @param array $mods course modules indexed by id (from get_all_mods)
* @param array $mods course modules indexed by id (from get_fast_modinfo()->get_cms())
* @return string HTML to output.
*/
protected function section_summary($section, $course, $mods) {
@@ -318,7 +318,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
*
* @param stdClass $section The course_section entry from DB
* @param stdClass $course the course record from DB
* @param array $mods course modules indexed by id (from get_all_mods)
* @param array $mods course modules indexed by id (from get_fast_modinfo()->get_cms())
* @return string HTML to output.
*/
private function section_activity_summary($section, $course, $mods) {