Issue Details (XML | Word | Printable)

Key: MDL-20147
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: moodle.com
Reporter: Nenashev Ilya
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

API support for icon for activity subtypes

Created: 23/Aug/09 02:01 AM   Updated: 23/Aug/09 02:01 AM
Return to search
Component/s: Lib
Affects Version/s: 1.9.5
Fix Version/s: None

Participants: moodle.com and Nenashev Ilya
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.