Skip to content
  • sam marshall's avatar
    lib MDL-25981 Improved modinfo · 0d8b6a69
    sam marshall authored
    This commit:
    a) moves modinfo code into new library modinfolib.php
    b) uses classes instead of stdClass objects, allowing a huge amount of documentation (and IDE completion)
    c) adds hooks so that plugins other than forum can display messages like forum's 'unread', and plugins other than label can display html (apart from/as well as their view.php link) on the course view page
    d) removes current hacks for forum and label (mainly in print_section but also across the code), replacing with new 'content' and similar variables [this is the reason for the changes in blocks, etc]
    e) reduces size of modinfo in database (only when rebuilt) by excluding empty fields
    The change is intended to be backward compatible and does not affect the format of modinfo in database.