|
|
|
I'm writing some activity module for internal usage, based on assignments module sources. There are I have some types of this activity, and user select one of them when he is creating an instance of this activity.
I need to have other icon for each of this types of my activity in every place when system displays an activity name with an icon.
Now i can provide in my own lib.php a function named like <modname>_get_coursemodule_info to return $info->icon value with some icon path, related activity type.
But there are two bad news:
1) this path will be resolved in course\lib.php function print_section() relative only $CFG->pixpath/ nor my module folder. OK, I can move my module's typed icons to that system folder, but it is not so good.
2) this icon will be used ONLY by course\lib.php function print_section() , and not will be used in calendar, grades etc subsystems, which displays activity icon!
I think will be good if an icon path for any activity every where will be received with requesting module's lib.php for custom path and standart icon will be used only if there are no such function. And returned path must be treated as full path to icon on web-site, and modules must use $CFG->pixpath or $CFG->wwwroot by himself if they want.
|
|
Description
|
I'm writing some activity module for internal usage, based on assignments module sources. There are I have some types of this activity, and user select one of them when he is creating an instance of this activity.
I need to have other icon for each of this types of my activity in every place when system displays an activity name with an icon.
Now i can provide in my own lib.php a function named like <modname>_get_coursemodule_info to return $info->icon value with some icon path, related activity type.
But there are two bad news:
1) this path will be resolved in course\lib.php function print_section() relative only $CFG->pixpath/ nor my module folder. OK, I can move my module's typed icons to that system folder, but it is not so good.
2) this icon will be used ONLY by course\lib.php function print_section() , and not will be used in calendar, grades etc subsystems, which displays activity icon!
I think will be good if an icon path for any activity every where will be received with requesting module's lib.php for custom path and standart icon will be used only if there are no such function. And returned path must be treated as full path to icon on web-site, and modules must use $CFG->pixpath or $CFG->wwwroot by himself if they want. |
Show » |
| There are no comments yet on this issue.
|
|