This is a followup to MDL-18301. That fix missed the following points:
1. On the edit categories and items screens, all items had an eye-con to
control the visibility, even if the visibility was controlled by the
module.
2. Changing the visibility of a grade category change the visibility of
all items within it, even if the visibility was controlled by the
module.
3. The quiz ingored $cm->visible when controlling whether its grade item
was visible.
- function get_mimetypes_array() now contains also information about filetype groups and language strings
- use 'smart' human-readable mimetype description
- never determine filetype group based on filetype icon image! remove function mimeinfo_from_icon()
- get rid of class filetype_parser and file lib/filestorage/file_types.mm, replaced with functions file_get_typegroup(), file_extension_in_typegroup() and file_mimetype_in_typegroup()
- support multiple icon sizes, not only 16 and 32
- retrieve filetype icon only using proper functions file_..._icon() from lib/filelib.php throughout the code
- increase size of repository thumbnails to 90 and icons to 24 (will take effect when new icons exist)
Both methods get_activity_link() and get_grade_analysis_url() now cache
the results of the check whether the activity module provides grade.php
or not. Previously, get_activity_link() called file_exists() in every
call and get_grade_analysis_url() did not check the existence at all.
Note that this solution is still sub-optimal as apparently both methods
do very similar job. This should be refactored one day by a brave
developer who works on gradebook. Meanwhile, even this suboptimal
solution is more effective than the previous one for most courses.
When grade analysis link is enabled, an icon is displayed next to each
grade of a module that supports grade.php file. The parameters needed to
identify the particular user and grade are passed to the grade.php
script.
The activity module must have a chance to display appropriate grades
report per itemnumber. Most activity modules have just one grade items
si they can ignore the param. Complex modules like the Workshop need this.
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.