]> git.mjollnir.org Git - moodle.git/commitdiff
webservice MDL-20803 fix printed documentation (collapsible javascript broke the...
authorjerome mouneyrac <jerome@moodle.com>
Tue, 22 Dec 2009 07:26:20 +0000 (07:26 +0000)
committerjerome mouneyrac <jerome@moodle.com>
Tue, 22 Dec 2009 07:26:20 +0000 (07:26 +0000)
webservice/renderer.php

index 86ebb6b61af5f86c39035aa4082ada85f15f4ee7..25c47fd1155e727e1cec74ffd8efdf01070ff954 100644 (file)
@@ -290,12 +290,18 @@ EOF;
         
     /// each functions will be displayed into a collapsible region (opened if printableformat = true)
         foreach ($functions as $functionname => $description) {
-            $documentationhtml .= print_collapsible_region_start('',
+
+            if (empty($printableformat)) {
+                $documentationhtml .= print_collapsible_region_start('',
                                                                  'aera_'.$functionname,
                                                                  $this->output_start_tag('strong', array()).$functionname.$this->output_end_tag('strong'),
                                                                  false,
                                                                  !$printableformat,
                                                                  true);
+            } else {
+                $documentationhtml .= $this->output_tag('strong', array(), $functionname);
+                $documentationhtml .= $this->output_empty_tag('br', array());
+            }
 
         /// function global description
             $documentationhtml .= $this->output_empty_tag('br', array());
@@ -405,8 +411,9 @@ EOF;
             }
             $documentationhtml .= $this->output_empty_tag('br', array());
             $documentationhtml .= $this->output_empty_tag('br', array());
-
-            $documentationhtml .= print_collapsible_region_end(true);
+            if (empty($printableformat)) {
+                $documentationhtml .= print_collapsible_region_end(true);
+            }
         }
 
      /// close the table and return the documentation