#author("2024-03-01T00:58:09+00:00","default:iseki","iseki") #author("2024-03-01T01:11:30+00:00","default:iseki","iseki") * Moodle 4.x devel ** Icon *** icon のバック - lib.php apply_supports() で FEATURE_MOD_PURPOSE の問い合わせに以下の返答を返すとアイコンのバックが変わる. - default は MOD_PURPOSE_OTHER (紫) -- MOD_PURPOSE_COMMUNICATION (紫) -- MOD_PURPOSE_ASSESSMENT (紫) - default は MOD_PURPOSE_OTHER -- MOD_PURPOSE_ADMINISTRATION (青紫) -- MOD_PURPOSE_ASSESSMENT (赤っぽいピンク) -- MOD_PURPOSE_COLLABORATION (橙) -- MOD_PURPOSE_COMMUNICATION (緑) -- MOD_PURPOSE_CONTENT (水色) -- MOD_PURPOSE_ADMINISTRATION (青紫) -- MOD_PURPOSE_INTERFACE (紫) -- MOD_PURPOSE_OTHER (無色) **** Sample <pre> 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; } } </pre>