Moodle 4.x devel[edit]
icon のバック[edit]
- lib.php apply_supports() で FEATURE_MOD_PURPOSE の問い合わせに以下の返答を返すとアイコンのバックが変わる.
- default は MOD_PURPOSE_OTHER (紫)
- MOD_PURPOSE_COMMUNICATION (紫)
- MOD_PURPOSE_ASSESSMENT (紫)
- MOD_PURPOSE_COLLABORATION (橙)
- MOD_PURPOSE_CONTENT (水色)
- MOD_PURPOSE_ADMINISTRATION (青紫)
- MOD_PURPOSE_INTERFACE (紫)
- MOD_PURPOSE_OTHER (無色)
function apply_supports($feature)
{
switch($feature) {
case FEATURE_GROUPS: return false;
case FEATURE_GROUPINGS: return false;
case FEATURE_GROUPMEMBERSONLY: return false;
case FEATURE_MOD_INTRO: return true;
case FEATURE_COMPLETION_TRACKS_VIEWS: return false;
case FEATURE_COMPLETION_HAS_RULES: return false;
case FEATURE_GRADE_HAS_GRADE: return false;
case FEATURE_GRADE_OUTCOMES: return false;
case FEATURE_BACKUP_MOODLE2: return true;
case FEATURE_SHOW_DESCRIPTION: return true;
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_COMMUNICATION;
default: return null;
}
}