MDL-18910 moving modedit features to modname_supports()
[moodle.git] / mod / survey / lib.php
index a3143dc..f181b85 100644 (file)
@@ -588,4 +588,20 @@ function survey_get_extra_capabilities() {
     return array('moodle/site:accessallgroups');
 }
 
-?>
+/**
+ * @param string $feature FEATURE_xx constant for requested feature
+ * @return mixed True if module supports feature, null if doesn't know
+ */
+function survey_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 true;
+        case FEATURE_GRADE_HAS_GRADE:         return true;
+        case FEATURE_GRADE_OUTCOMES:          return true;
+
+        default: return null;
+    }
+}
\ No newline at end of file