MDL-18910 moving modedit features to modname_supports()
[moodle.git] / mod / chat / lib.php
index 212e4bc..9dd173d 100644 (file)
@@ -971,4 +971,21 @@ class chat_portfolio_caller extends portfolio_module_caller_base {
     }
 }
 
-?>
+/**
+ * @param string $feature FEATURE_xx constant for requested feature
+ * @return mixed True if module supports feature, null if doesn't know
+ */
+function chat_supports($feature) {
+    switch($feature) {
+        case FEATURE_GROUPS:                  return true;
+        case FEATURE_GROUPINGS:               return true;
+        case FEATURE_GROUPMEMBERSONLY:        return true;
+        case FEATURE_MODEDIT_INTRO_EDITOR:    return true;
+        case FEATURE_COMPLETION_TRACKS_VIEWS: return false;
+        case FEATURE_GRADE_HAS_GRADE:         return false;
+        case FEATURE_GRADE_OUTCOMES:          return true;
+
+        default: return null;
+    }
+}
+