Commit graph

106 commits

Author SHA1 Message Date
sam marshall
adaeccb66d MDL-26781 Ensure get_fast_modinfo $cm is compatible with get_record $cm 2011-03-16 15:03:01 +00:00
Petr Skoda
12923c92b1 MDL-26476 fix incorrect fetching of user groups in modinfo 2011-02-17 18:19:41 +01:00
Petr Skoda
4478743ca4 MDL-26265 use cm_info in PAGE->cm because it has more useful information; add context property to cm_info 2011-02-07 23:11:43 +01:00
Sam Hemelryk
1e4cb18940 lib-modinfolib MDL-26264 cm_info and course_modinfo classes both now extend stdClass 2011-02-04 16:22:57 +08:00
Petr Skoda
d6f4508c36 MDL-25981 add missing global DB when fetching course modinfo 2011-01-31 22:23:34 +01:00
sam marshall
0d8b6a69ce lib MDL-25981 Improved modinfo
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.
2011-01-26 10:29:16 +00:00