]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15402: do not display type form if there is no option to set
authorjerome <jerome>
Fri, 19 Sep 2008 06:16:20 +0000 (06:16 +0000)
committerjerome <jerome>
Fri, 19 Sep 2008 06:16:20 +0000 (06:16 +0000)
admin/repository.php

index cc8a97f43206302b028696b8e913fe3b3e564831..a29a823f0664ed82227c38af94d66fe9e0133348 100644 (file)
@@ -91,9 +91,12 @@ if (!empty($edit) || !empty($new)) {
     } else {
         admin_externalpage_print_header();
         print_heading(get_string('configplugin', 'repository_'.$plugin));
-        print_simple_box_start();
-        $mform->display();
-        print_simple_box_end();
+        $typeoptionnames = repository_static_function($edit, 'get_type_option_names');
+        if (!empty($typeoptionnames)){
+            print_simple_box_start();
+            $mform->display();
+            print_simple_box_end();
+        }
         $return = false;
 
         //display instances list and creation form