[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/format/ -> upgrade.txt (source)

   1  This files describes API changes for course formats
   2  
   3  Overview of this plugin type at http://docs.moodle.org/dev/Course_formats
   4  
   5  === 3.2 ===
   6  * Callback delete_course is deprecated and should be replaced with observer for event \core\event\course_content_deleted
   7  
   8  === 3.1 ===
   9  * Course format may use the inplace_editable template to allow quick editing of section names, see
  10    https://docs.moodle.org/dev/Inplace_editable and MDL-51802 for example implementation.
  11  
  12  === 3.0 ===
  13  * Course formats should now use section_edit_control_items and use the returned array of controls items and their attributes to create a
  14    renderable menu or array of links.  Plugin calls to section_edit_controls will now include the section edit control in the returned array.
  15  * The section name is now wrapped in a new span (.sectionname > span), process_sections method in format.js should be updated so .sectionname
  16    DOM node's wraps the section title in a span. You can look at how to implement the change in course/format/topics/format.js or MDL-48947.
  17  * New method format_base::get_default_section_name retrieves the default section name for the given course format. The base
  18    implementation basically uses the implementation of format_base::get_section_name. The method can be overridden in
  19    format_base subclasses that use sections (i.e. format_topics, format_weeks). In relation to the changes made for the default
  20    section name, the default section name is now being shown when editing the section information.
  21  
  22  === 2.9 ===
  23  * Course formats may support deleting sections, see MDL-10405 for more details.
  24    format_section_renderer_base::section_edit_controls() is now also called for
  25    stealth sections and it also returns "delete" control.
  26  
  27  === 2.8 ===
  28  * The activity chooser now uses M.course.format.get_sectionwrapperclass()
  29    to determine the section selector, rather than a hard-coded `li.section`.
  30  * Activity duplication in /course/modduplicate.php is deprecated and is now done in /course/mod.php.  Deprecated calls will be honored by
  31    redirecting to /course/mod.php for 3rd party plugin support.
  32  * New method format_base::section_get_available_hook() allows plugins to override section availability.
  33  
  34  === 2.7 ===
  35  * The ->testedbrowsers array no longer needs to be defined in supports_ajax().
  36  * format_section_renderer_base::section_hidden has an new second optional argument $courseorid.
  37    If provided the section name is printed in the not available string when displaying the hidden section.
  38  
  39  === 2.6 ===
  40  
  41  * core_course_renderer::course_section_cm_edit_actions has two new optional arguments and now uses and action_menu component.
  42  * core_course_renderer::course_section_cm has been altered to call core_course_renderer::course_section_cm_edit_actions with the two new arguments
  43  * An additional course renderer function has been created which allows you to
  44    specify the wrapper for a course module within a section (e.g. the <li>).  This can be
  45    found in core_course_renderer::course_section_cm_list_item().
  46  
  47  === 2.5 ===
  48  
  49  * Functions responsible for output in course/lib.php are deprecated, the code is moved to
  50    appropriate renderers: print_section(), print_section_add_menus(), get_print_section_cm_text(),
  51    make_editing_buttons()
  52    See functions' phpdocs in lib/deprecatedlib.php
  53  * Function get_print_section_cm_text() is deprecated, replaced with methods in cm_info
  54  
  55  === 2.4 ===
  56  
  57  Course format API has been changed significantly. Instead of implementing callbacks course formats
  58  may overwrite the class format_base. See format_legacy class for a template for upgrading course
  59  format.
  60  
  61  * Function settings_navigation::add_course_editing_links() is completely removed, course format
  62    functions callback_XXXX_request_key() are no longer used (where XXXX is the course format name)
  63  * functions get_generic_section_name(), get_all_sections(), add_mod_to_section(), get_all_mods()
  64    are deprecated. See their phpdocs in lib/deprecatedlib.php on how to replace them
  65  * Course formats may now have their settings.php file as the most of other plugin types
  66  * Function format_section_renderer_base::is_section_current() is deprecated, overwrite/use
  67    function is_section_current in format class
  68  
  69  === 2.3 ===
  70  
  71  * The new $course->coursedisplay option was introduced, users can now choose to display
  72    a section at a time if the course formats support it:
  73   - COURSE_DISPLAY_SINGLEPAGE indicates the teacher has chosen to display all sections on one page
  74   - COURSE_DISPLAY_MULTIPAGE indicates the teacher has chose to have seperate pages with each section.
  75  
  76  * The parameter for 'currently active section' was standardised in core:
  77    - The course format is passed the currently live section through the $displaysection varaible to format.php
  78    - A 'section' paramter is the standardised way to pass around the current section in a course
  79    - Navigation no longer looks for custom parameters defined in callback_format_request_key


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1