]> git.mjollnir.org Git - moodle.git/commitdiff
NOBUG: fixed incorect use of $output variable
authormudrd8mz <mudrd8mz>
Fri, 28 Aug 2009 11:34:01 +0000 (11:34 +0000)
committermudrd8mz <mudrd8mz>
Fri, 28 Aug 2009 11:34:01 +0000 (11:34 +0000)
I propose to use $output variable name for renderer instance only. Also,
this did not work at all as $output was not returned.

lib/outputrenderers.php

index a34ef08f18c92c8cc67c447ee4b0b123cdca8f2d..1d788c47a54c1224f9aa1ef2442919d1f9fe4f54 100644 (file)
@@ -1845,10 +1845,11 @@ class moodle_core_renderer extends moodle_renderer_base {
         $field = clone($field);
         $field->prepare();
         $this->prepare_event_handlers($field);
+        $returned = '';
         if (!empty($field->label->text)) {
-            $output .= $this->label($field->label);
+            $returned .= $this->label($field->label);
         }
-        return $this->output_empty_tag('input', array(
+        $returned .= $this->output_empty_tag('input', array(
                 'type' => $field->type,
                 'name' => $field->name,
                 'id' => $field->id,
@@ -1857,6 +1858,7 @@ class moodle_core_renderer extends moodle_renderer_base {
                 'alt' => $field->alt,
                 'title' => $field->title,
                 'maxlength' => $field->maxlength));
+        return $returned;
     }
 
     /**