MDL-34737 Course: Modchooser should use coursebase to determine the section class
[moodle.git] / course / format / upgrade.txt
CommitLineData
2db66a93
DP
1This files describes API changes for course formats
2
3Overview of this plugin type at http://docs.moodle.org/dev/Course_formats
4
b791ee3d
AN
5=== 2.8 ===
6* The activity chooser now uses M.course.format.get_sectionwrapperclass()
7 to determine the section selector, rather than a hard-coded `li.section`.
8
af64bc61
AN
9=== 2.7 ===
10* The ->testedbrowsers array no longer needs to be defined in supports_ajax().
0a293483
SH
11* format_section_renderer_base::section_hidden has an new second optional argument $courseorid.
12 If provided the section name is printed in the not available string when displaying the hidden section.
af64bc61 13
e5de4933
SH
14=== 2.6 ===
15
16* core_course_renderer::course_section_cm_edit_actions has two new optional arguments and now uses and action_menu component.
17* core_course_renderer::course_section_cm has been altered to call core_course_renderer::course_section_cm_edit_actions with the two new arguments
9ce4fa2f
AN
18* An additional course renderer function has been created which allows you to
19 specify the wrapper for a course module within a section (e.g. the <li>). This can be
20 found in core_course_renderer::course_section_cm_list_item().
e5de4933 21
b1c2fc65
MG
22=== 2.5 ===
23
24* Functions responsible for output in course/lib.php are deprecated, the code is moved to
25 appropriate renderers: print_section(), print_section_add_menus(), get_print_section_cm_text(),
26 make_editing_buttons()
27 See functions' phpdocs in lib/deprecatedlib.php
28* Function get_print_section_cm_text() is deprecated, replaced with methods in cm_info
29
b874d5c6
MG
30=== 2.4 ===
31
ee7084e9
MG
32Course format API has been changed significantly. Instead of implementing callbacks course formats
33may overwrite the class format_base. See format_legacy class for a template for upgrading course
34format.
35
b874d5c6
MG
36* Function settings_navigation::add_course_editing_links() is completely removed, course format
37 functions callback_XXXX_request_key() are no longer used (where XXXX is the course format name)
97960146
MG
38* functions get_generic_section_name(), get_all_sections(), add_mod_to_section(), get_all_mods()
39 are deprecated. See their phpdocs in lib/deprecatedlib.php on how to replace them
3776335c 40* Course formats may now have their settings.php file as the most of other plugin types
081c8f7f
MG
41* Function format_section_renderer_base::is_section_current() is deprecated, overwrite/use
42 function is_section_current in format class
b874d5c6 43
2db66a93
DP
44=== 2.3 ===
45
46* The new $course->coursedisplay option was introduced, users can now choose to display
47 a section at a time if the course formats support it:
48 - COURSE_DISPLAY_SINGLEPAGE indicates the teacher has chosen to display all sections on one page
49 - COURSE_DISPLAY_MULTIPAGE indicates the teacher has chose to have seperate pages with each section.
50
51* The parameter for 'currently active section' was standardised in core:
52 - The course format is passed the currently live section through the $displaysection varaible to format.php
53 - A 'section' paramter is the standardised way to pass around the current section in a course
54 - Navigation no longer looks for custom parameters defined in callback_format_request_key